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 ( 56(84) bytes of data.
From icmp_seq=1 Destination Host Unreachable

ifconfig -a gives:

wlan0     Link encap:Ethernet  HWaddr b4:ee:b4:87:41:c8  
          inet addr:  Bcast:  Mask:

/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 Aug 25, 2015 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 - Maybe this is the issue? Aug 25, 2015 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 Aug 25, 2015 at 16:41
  • Okay, managed to connect wirelessly but still no internet ( again DNS works) Aug 25, 2015 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 Aug 25, 2015 at 16:54

1 Answer 1


Question has been answered in the comments itself

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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