Problems adding default Gateway

Eric ebenze at hotmail.com
Sat Mar 23 09:39:11 PST 2002


I'm running into a strange problem trying to add my default gateway on my
system.  Upon bootup, I'm getting an error that the network address is
unreachable

Bringing up the eth0 interface...
Setting up default gateway...
SIOCADDRT: Network is unreachable


So I poked around in the routing table once the system was up and running.
This is the output of route -n:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0


If I try to manually create the default gateway at this point, I still get
the same error - network is unreachable.  Interestingly enough though, if I
add another route to the table first (ie: 192.168.0.0 mask 255.255.0.0 to
eth0), then I can add the default gateway route without problems.

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth0
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth0


Furthermore, if I then delete the 192.168.0.0 route, then gateway route
stays in place and the system still works fine.

Does anyone understand this?  Why would I need to create this other route
first?  Why can't I directly create my gateway route right from the start?

Thanks!

Eric



-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-support' in the subject header of the message



More information about the lfs-support mailing list