-->
Page 1 of 2

Disable DHCP Gateway option

PostPosted: Sun Jul 26, 2015 2:29 pm
by Beagle
I've worked with other Wi-Fi adapters and what I've noticed is they generally don't hand out a gateway when they are acting as a DHCP server. This prevents the client device from mistakenly thinking that this device has a link to the internet.

When connected, the client ends up with intermittent connectivity issues because it thinks it can route through 192.168.1.4

Has anyone else experienced this?

Re: Disable DHCP Gateway option

PostPosted: Sun Jul 26, 2015 6:53 pm
by kolban
Howdy Beagle,
I'm afraid I'm not understanding ... and it is most likely my error. I assume that when an ESP8266 acts as an access point, then stations that connect to it will use the ESP8266 as a gateway to other TCP/IP networks. If the ESP8266 is not connected to any other networks then, obviously, there is no need for a gateway ... unless some other station connects and it itself is available to be a gateway.

Can you elaborate on your comments to help me understand the issue?

Re: Disable DHCP Gateway option

PostPosted: Sun Jul 26, 2015 9:21 pm
by lethe
kolban wrote:I assume that when an ESP8266 acts as an access point, then stations that connect to it will use the ESP8266 as a gateway to other TCP/IP networks.

The ESP can not act as gateway, since it does not have support for IP routing or masquerading. And a station that connects to an ESP may have more than one network interface, so the ESP may overwrite a previously set default route.

@Beagle: according to the documentation you can prevent the ESP from announcing a route with
Code: Select alluint8 mode = 0;
wifi_softap_set_dhcps_offer_option(OFFER_ROUTER, &mode);


See "2C-ESP8266__SDK__Programming Guide__EN_v1.2.0.pdf" pg. 61

Re: Disable DHCP Gateway option

PostPosted: Sun Jul 26, 2015 10:00 pm
by kolban
Thanks Lethe, your information is like gold to me.

If one disables the offering of a gateway from an ESP acting as an access point, what then does a station see as a "gateway" when it connects to the ESP?

Neil