Ubuntu – unable to reach local network computers, but able to browse the web

domainnetworkingrouterUbuntu

I have a weird problem. Today after turning my Ubuntu 9.10 PC on I can't connect to my local network, but I can use the Internet. We have a single Windows 2003 server machine that acts as a local main DNS server, DHCP server and a domain controller. Although it seems to give me the local IP address, I can not ping it, as well as any other machine on the net.

I have tried all of the below and it didn't help:

  • Rebooting;
  • Reconnecting to the network;
  • Forcing the dhclient to renew the IP address;
  • Deleting and creating new connection profiles;
  • Plugging my machine into another network outlet;

Maybe it has something to do with routing, because I have tampered with routing tables the day before, but the tables seem ok to me:

$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     1      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 vboxnet0
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0

Our LAN uses a D-Link DI-604 router, and it looks to me as if I am connected to the network outside the router. I can not even access its administration page.

Please at least suggest what I can do to solve this.

P.S. What seems strangest to me is that I can access the PC in question from outside the network by opening a port on the router. I have managed to ssh to it from outside, but I still can't ping nothing on the inside.

P.P.S Today I tried reinstalling network-manager with --purge option, but it did no good. After that I created a new DCHP reservation for my PC in order to change my local IP, but that didn't change anything either. My PC is able to get a DHCP offer, but then it's unable to connect to any local computers. I am desperate.

Best Answer

I'm not sure, but I don't like your metrics.
This excerpt from the Unix man page of route is suggestive:

A metric of 0 implies that the route does not refer to a gateway, but rather to one of the machine's interfaces. Destinations matching such a route are sent out on the interface identified by the gateway address. For interfaces using the ARP protocol, a metric of 0 is used to specify all destinations are local, meaning that a host should ARP for all addresses by adding a default route containing a metric of 0, as illustrated in the following example:

route add default 0

<hostname> is the name or IP address associated with the network interface all packets should be sent over. On a host with a single network interface, is normally the same as the returned by uname -n.

Did you change the original metrics? Maybe you should set them all to 1.
In any case, I suggest that you compare these values with another machine on which the network works.

Related Question