I'm using a Debian on a RaspberryPi and the problem that I'm having is that I can't connect to the Internet.
Every time I try I see a message that says "cannot resolve hostname". From the terminal, I tried:
$ ping www.google.com
unknown host google.com
$ ping 8.8.8.8
network is unreachable
output of 'ip addr list'
1: <LOOPBACK, UP, LOWER_UP> mt 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 vrd 00:00:00:00:00:00:
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <BOADCAST, MULTICAST, UP, LOWER_UP> mtu 1500 dis pfifo_fast state UP qlen 100
link/ether b8:27:eb:18:b9:17 brd ff:ff:ff:ff:ff:ff
This appears after doing the ifdown eth0 and ifup eth0 as drobert suggest
innet 1393.182.112.9116 brd 139.182.255.255 scope global eth0
valid_lft forevere preferred_lft forever
ip route ls
139.182.0.0/16 dev eth0 proto kernel scope link src 139.182.112.9
etc/network/interface
auto lo
iface lo inet loopback
iface eth0 inet dhcp
address 139.182.112.9
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.cong
iface default inet dhcp
ifconfig
bcast: 139.182.255.255
Mask: 255.255.0.0
I try the up route list command nothing happed
ip addr list
andip route list
. Your problem seems to be the lack of a default route to your gateway.dhclient eth0
to aquire an address from your lan(if there is a dhcp server somewhere). Cheers :)gateway
clause) in your/etc/network/interfaces
? Also, make sure you haveallow-hotplug eth0
orauto eth0
in there somewhere (otherwise, it won't be started on boot).