[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problems configuring /etc/network/interfaces



Charles Bray wrote:
> 
> Hi,
> 
> I'm fairly new to Linux and just switched from SuSE to Debian
> 2.2.19pre17 a few days ago.  I have a Dell Inspiron 7000 notebook.  I've
> tried very hard to solve this problem on my own, but the solution
> continues to escape me.
> 
> Right now, my /etc/network/interfaces file includes the following lines
> (excluding comments):
> 
> auto lo
> iface lo inet loopback
> 
> My understanding is that the "auto lo" line is supposed to activate the
> loopback interface at boot time.  But evidently it doesn't.  After I
> boot and log in as root, if I ping the localhost at 127.0.0.1, I get the
> error message:
> 
> neighbor table overflow
> 
> At this point, the routing table (route -n command) doesn't list the
> loopback interface, and I must manually activate and add it with the
> lines:
> 
> ifconfig lo 127.0.0.1
> route add 127.0.0.1 lo

The route looks wrong to me. Something like

route add -net 127.0.0.0 netmask 255.0.0.0 lo

should be what you need..

Instead of the two command you might want to try running

ifup lo

> 
> After doing this, I no longer receive the overflow error and can ping
> the localhost.
> 
> Strangely (to me), if I comment out the "auto lo" line in
> /etc/network/interfaces and reboot, I can then successfully ping the
> loopback address, indicating that the interface has been automatically
> activated.  (So "auto lo" is evidently shutting it down.  I wish I could
> find more thorough instructions for configuring
> /etc/network/interfaces.)  Although the interface has been activated
> automatically, I still have to add it to the routing table using the
> above route command.  But, of course, I don't want to have to add the
> route manually every time I reboot.
> 
> All of the above was learned while I was trying to figure out my
> original problem, which is this:
> 
> After successfully connecting to my ISP via serial modem (and after
> manually adding the loopback interface), the routing table is as
> follows:
> 
> Destination      Gateway     Genmask      Flags Metric  Ref Use Iface
> 286.115.220.139  0.0.0.0  255.255.255.255   UH     0     0   0   ppp0
---^ Something is definitely very very wrong here. Each field of the ip
address should be in the interval 0..255, 286 just cannot happen...

> 127.0.0.1        0.0.0.0  255.255.255.255   UH     0     0   0   lo
> 192.168.1.0      0.0.0.0  255.255.255.0     U      0     0   0   eth0
> 0.0.0.0      192.168.1.1  0.0.0.0           UG     0     0   0   eth0
> 
> I can ping 286.115.220.139 as well as my machine's local network IP
> address at 192.168.1.1, but I can't ping my ISP's DNS servers or
> anywhere else on the internet.

If you can ping that illegal address something is completely utterly 
wrong. Did you copy the info by hand and make a typo ?

Your routing table looks very weird to me. Lets have a look... 
First of you need the loopback route:

127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0
lo

If its not present you should run
route add -net 127.0.0.0 netmask 255.0.0.0 lo

Your box is capable of finding itself without a route so the strange
286.... route should go. Experiment with "route del" to get rid of it.

When looking for other addresses you need to first of all be able to
find your gateway. From your info the gateway is 192.168.1.1 and it is
at the other end of the ppp0 interface so you need a line like:

192.168.1.1   0.0.0.0         255.255.255.255 UH    0      0        0
ppp0

instead of the one you have on eth0. It should appear automagically 
when you bring up the interface but otherwise you can add it with

route add -host 192.168.1.1 ppp0

Now that your box can find the local net, itself and its gateway the
only thing missing is everything else. Again your routing table has an 
entry going through eth0 but it should go through ppp0. Try

route add default gw 192.168.1.1 ppp0

In the end the output of route -n should be

Destination    Gateway         Genmask         Flags Metric Ref    Use
Iface
192.168.1.1    0.0.0.0         255.255.255.255 UH    0      0        0
ppp0
127.0.0.0      0.0.0.0         255.0.0.0       U     0      0        0
lo
0.0.0.0        192.168.1.1     0.0.0.0         UG    0      0        0
ppp0

Take care to remove any superflous lines.

Happy hacking,

\Gandalf



Reply to: