Problems adding default Gateway

Marc Heerdink marc at koelkast.net
Sat Mar 23 12:53:28 PST 2002


Op za 23-03-2002, om 18:39 schreef Eric:
> 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?

If you have 192.168.2.0/255.255.255.0 as the only route, you won't be
able to reach 192.168.1.1 which is the gateway. Use
192.168.0.0/255.255.0.0 instead so you can use the gateway from the
beginning.

-- 
"Mooh!"
- A Cow.

Marc Heerdink <marc at koelkast.net>

-- 
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