1

I am trying to connect my raspberry to WPA2-Personal network. Raspberry connects to the WIFI and is assigned IP but I am not able to use the internet (DNS seems to work tho):

pi@raspberrypi ~ $ ping www.sdnojdsdooxgnfija.com
ping: unknown host www.sdnojdsdooxgnfija.com
pi@raspberrypi ~ $ ping www.google.com
PING www.google.com (216.58.209.68) 56(84) bytes of data.
From 169.254.55.21 icmp_seq=1 Destination Host Unreachable

ifconfig -a gives:

wlan0     Link encap:Ethernet  HWaddr b4:ee:b4:87:41:c8  
          inet addr:192.168.1.116  Bcast:192.168.1.255  Mask:255.255.255.0
          ...

/etc/network/interfaces file:

auto wlan0
iface lo inet loopback
face eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
  • do you have any firewall settings enabled on your router. Such as allow only certain Mac address or something – evolutionizer Aug 25 '15 at 16:35
  • No, but I will check if it works with another router. I am connected to the PI via ethernet cable and it has static IP - 169.254.55.21. Maybe this is the issue? – Piotr Dabkowski Aug 25 '15 at 16:40
  • The raspberry prefers ethernet over WiFi, meaning that it will try to connect via the ethernet if available. Please disconnect from ethernet and connect to the PI wirelessly – evolutionizer Aug 25 '15 at 16:41
  • Okay, managed to connect wirelessly but still no internet ( again DNS works) – Piotr Dabkowski Aug 25 '15 at 16:47
  • Have you rebooted the PI once disconnected the ethernet (I can't seem to remember the service that takes care of networking). If still no luck can you also post your interfaces file content to see if that's the issue – evolutionizer Aug 25 '15 at 16:54
2

Question has been answered in the comments itself

OP had added ip=169.254.55.21 to boot/cmdline.txt, removing this fixed the problem

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.