0

Currently working on an OpenEmbedded/Yocto board, and I'm running into an issue with Wifi.

Inside of interfaces, if I set a static IP, and assign it my network, gateway, netmask, and dns, it works when connecting to a specific wireless access point with wlan0.

However, if I set wlan0 to inet dhcp, instead of inet static, then it can connect to the access point, ping other things on the network, but it cannot get out to the internet. I have tried many things to get it to work, but to no avail.

I have played with wpa_supplicant, and interfaces, as well as udhcpc in order to try and get this to work, but nothing is working.

Does anyone have any ideas?

Edit 1: Took a look at route -n with both dhcp and static. The only difference is that with dhcp, Metric is set to 10 on the dhcp attempt, and 0 on the static.

user3169698
  • 143
  • 5
  • 23
  • Did you check if the DHCP client sets default route (gateway) and DNS? – Martin Sugioarto Sep 15 '16 at 19:07
  • Correction: There is a Gateway line in the route -n. 0.0.0.0/MyIP and another line is MyIP/0.0.0.0 for Destination/Gateway. – user3169698 Sep 15 '16 at 19:13
  • Is the DHCP server configured properly? It should send the gateway's IP to the clients. Maybe your DHCP client has got a verbose option to tell you what it actually receives and if something fails. – Martin Sugioarto Sep 15 '16 at 19:20
  • I am currently using udhcpc for this, and I checked, and it doesn't have a verbose option. – user3169698 Sep 15 '16 at 19:22
  • And there is no packet filter on the gateway that restricts the DHCP range to LAN-only? And did you check if you have duplicate IPs assigned? – Martin Sugioarto Sep 15 '16 at 19:29
  • I checked on both. The Gateway drawn from the DHCP is the same as the static, and when assigning as static instead of DHCP, I'm using the exact same IP address that the DHCP provides me, just hard coded. – user3169698 Sep 16 '16 at 11:32
  • Do you have `traceroute`? Can you compare the outputs of static configuration and DHCP for example to `google.com`? – Martin Sugioarto Sep 16 '16 at 12:36
  • Traceroute isn't installed. I just have route. It's a very basic image build. I saw no differences between the static and dhcp route -n outputs, except that dhcp has a Metric of 10. – user3169698 Sep 16 '16 at 13:32

0 Answers0