I'm connecting my pi via ethernet to my router and is assigned an IP address (via static DHCP) but I'm unable to connect to any outside network. The strange thing is I can also connect via WIFI dongle and able to access outside networks:
pi@raspberrypi ~ $ ifconfig
eth0 Link encap:Ethernet HWaddr b8:27:eb:7f:50:3d
inet addr:192.168.2.200 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1068 errors:0 dropped:0 overruns:0 frame:0
TX packets:1346 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:75076 (73.3 KiB) TX bytes:183304 (179.0 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1104 (1.0 KiB) TX bytes:1104 (1.0 KiB)
wlan0 Link encap:Ethernet HWaddr 60:e3:27:0e:50:1b
inet addr:192.168.2.199 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:918 errors:0 dropped:10 overruns:0 frame:0
TX packets:390 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:196056 (191.4 KiB) TX bytes:62046 (60.5 KiB)
able to ping google (presumably via wlan0):
pi@raspberrypi ~ $ ping google.com
PING google.com (103.233.38.108) 56(84) bytes of data.
64 bytes from 103.233.38.108: icmp_req=1 ttl=58 time=22.2 ms
64 bytes from 103.233.38.108: icmp_req=2 ttl=58 time=21.3 ms
^C
--- google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 21.357/21.810/22.263/0.453 ms
disable wlan0:
pi@raspberrypi ~ $ sudo ifdown wlan0
after disabling wlan0:
pi@raspberrypi ~ $ ping google.com
ping: unknown host google.com
more info:
pi@raspberrypi ~ $ more /etc/network/interfaces
auto lo
iface lo inet loopback
iface eth0 inet dhcp
#iface eth0 inet static
#address 192.168.2.200
#netmask 255.255.255.0
#gateway 192.168.2.1
allow-hotplug wlan0
iface wlan0 inet dhcp
#address 192.168.2.199
#netmask 255.255.255.0
#gateway 192.168.2.1
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
pi@raspberrypi ~ $ more /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4