PDA

View Full Version : [ubuntu] network is unreachable



NewbuntuUser777
May 2nd, 2009, 02:59 AM
Hi,

I just setup a router and an ubuntu server. I connected my ubuntu desktop and everything is groovy. The server no luck. Says network is unreachable when I try to ping stuff. Don't know what to do now.

doas777
May 2nd, 2009, 03:02 AM
Hi,

I just setup a router and an ubuntu server. I connected my ubuntu desktop and everything is groovy. The server no luck. Says network is unreachable when I try to ping stuff. Don't know what to do now.

whats the output of:

ifconfig

route

NewbuntuUser777
May 2nd, 2009, 03:05 AM
Found another thread that said to try:


brute-force an IP address via:
ifconfig eth0 inet 192.168.etc...

Then do:
sudo dhclient eth0


Now I can ping, but I have no idea what I just did!

Can anyone explain this magic?

NewbuntuUser777
May 2nd, 2009, 03:11 AM
okay and after rebooting, I'm back to the same place.
No connection...

ifconfig is

lo link encapL: local loopback
inet addr: 127.0.0.1 mask 255.0.0.0
inet6 addr: ::1/128 scope: host
up loopback running mtu: 16436 metric:1
rxpackets 0 ...
then more 0 for rest
rx bytes: 0 etc....

doas777
May 2nd, 2009, 03:29 AM
is eth0 listed in your /etc/network/interfaces file?
if not try adding

auto eth0 inetand after you save, restart networking with:
sudo /etc/init.d/networking restart

what does ifconfig show now? does it notice eth0?

NewbuntuUser777
May 2nd, 2009, 03:33 AM
Did that but it said after restarting...
ignoring unkown interface eth0=eth0
ignoring unknown interface inet=inet

doas777
May 2nd, 2009, 03:35 AM
drop the "inet" part, and try again

NewbuntuUser777
May 2nd, 2009, 03:39 AM
ignoring unkown interface eth0=eth0

doas777
May 2nd, 2009, 03:43 AM
ignoring unkown interface eth0=eth0hmmm. check out this page on manually configuring your interfaces file.


http://www.cyberciti.biz/faq/setting-up-an-network-interfaces-file/

NewbuntuUser777
May 2nd, 2009, 03:48 AM
Brilliance my friend!

You had it part right:

auto eth0
iface eth0 inet dhcp

Solved it.

Thanks thanks thanks!