Default gateway in route table

Default gateway in route table

Post by Bill Unr » Sat, 17 Apr 1999 04:00:00




Quote:>> I am having trouble getting routes to load properly at boot-up time.

>> The following route table enables my system to work fine with nslookup, ping,
>> sendmail, etc.:

>> Destination    Gateway     Genmask            Flags  Metric  Ref   Use  Iface
>> www.alias.com      *       255.255.255.255    UH      0       0     0   eth0:0
>> 206.238.176.0      *       255.255.255.0      U       0       0     3   eth0
>> 127.0.0.0          *       255.0.0.0          U       0       0     7   lo
>> default            *       0.0.0.0            U       0       0     0   eth0

I do not think  you want a default route to your eth0 anyway, since I
suspect that you only have a finite number of machines you can get to on
eth0 (otherwise why would you connect via ppp to the net).
So, get rid of the default entry entirely -- eg put
route del default
at the end of your rc.local file (eg /etc/rc.d/rc.local on RedHat)
Then make sure that all of your machines on eth are  listed with
explicit routes.

Quote:

>> With this route table, nslookup just hangs.  At this point if I type the
>> following commands, I can get my route table to display the correct
>> information: (Not necessarily correct, but one that works!)

Sorry, why are you using nslookup on a finite sized ethernet ? You
(probably) have no nameserver anyway, and it cannot get out to the net
to get names anyway.

Perhaps you need to be more specific as to your network topology and why
you use ppp as well.

 
 
 

Default gateway in route table

Post by David K. Mean » Sat, 17 Apr 1999 04:00:00




> >> I am having trouble getting routes to load properly at boot-up time.

> >> The following route table enables my system to work fine with nslookup,
ping,
> >> sendmail, etc.:

> >> Destination    Gateway     Genmask            Flags  Metric  Ref   Use
Iface
> >> www.alias.com      *       255.255.255.255    UH      0       0     0
eth0:0
> >> 206.238.176.0      *       255.255.255.0      U       0       0     3
eth0
> >> 127.0.0.0          *       255.0.0.0          U       0       0     7
lo
> >> default            *       0.0.0.0            U       0       0     0
eth0

> I do not think  you want a default route to your eth0 anyway, since I
> suspect that you only have a finite number of machines you can get to on
> eth0 (otherwise why would you connect via ppp to the net).
> So, get rid of the default entry entirely -- eg put
> route del default
> at the end of your rc.local file (eg /etc/rc.d/rc.local on RedHat)
> Then make sure that all of your machines on eth are  listed with
> explicit routes.

> >> With this route table, nslookup just hangs.  At this point if I type
the
> >> following commands, I can get my route table to display the correct
> >> information: (Not necessarily correct, but one that works!)

> Sorry, why are you using nslookup on a finite sized ethernet ? You
> (probably) have no nameserver anyway, and it cannot get out to the net
> to get names anyway.

> Perhaps you need to be more specific as to your network topology and why
> you use ppp as well.

You later said that this machine is on an ethernet segment that attaches
somehow
to an ISP over a T1 line.  It isn't clear (yet) what device makes the
transition
from Ethernet to T1, but in any case, the correct address for your default
gateway
is the IP address of that device (if it routes), or of the `other' end of
the T1 line
(if you convert from ethernet to T1 some other way, like bridging).  The
reason for
this is that your webserver needs only to know how to forward packets that
it doesn't
know how to route itself; the right address is that of another box that
(presumably)
does know how to forward the packets to the intended destination.

 
 
 

1. RH 5.2: Routing table losing default route/gateway

We're running RH 5.2 Apollo, 1 NIC.

Here's what our working routing table looks like:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
206.100.166.128 *               255.255.255.192 U     0      0     1521 eth0
127.0.0.0       *               255.0.0.0       U     0      0       41 lo
default         206.100.166.190 0.0.0.0         UG    0      0     4935 eth0

this box was just setup and configured.  It seems to spontaneously/ramdomly
loose it's default route.

I'm no linux expert so I'm not too sure if this is the right way or not, but
the only way we can seem to get the route back is by doing the following:

route -add default netmask 0.0.0.0 dev eth0
route -add default netmask 0.0.0.0 gw 206.100.166.190 dev eth0

then the table looks like:

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
206.100.166.128 *               255.255.255.192 U     0      0     1521 eth0
127.0.0.0       *               255.0.0.0       U     0      0       41 lo
default         *               0.0.0.0         U     0      0       42 eth0
default         206.100.166.190 0.0.0.0         UG    0      0     4935 eth0

Any ideas?

Thanks
Charlie

2. How do I get Updates?

3. How automatic route trafic from default gateway to second gateway then connect to default will broken

4. Complex -austria question

5. Problems routing table - Losing default gateway - ISDN

6. Promisc mode

7. How to set up routing table or gateway tables for ppp?

8. How can I cleanly unmount my filesystems

9. pppd not setting up default route in routing table

10. default route entry vanishing from routing table

11. Routing table default route entry question

12. diald routing problem, no default route for ppp0 with correct gateway

13. Default gateway's default gateway.