How to get the gateway address with ESP32 board under WIFI network

Hi, I am working with an ESP32 board under wifi network. I used lwip module to connect with wifi; however, I cannot configure the global address as I did when using gnrc module. Moreover, I don’t know what gateway is attached to the node. When I type ifconfig, I can only see a local address, and that address is unreachable without a proper gateway.