From: Kenn Humborg (kenn at domain avalon.wombat.ie)
Date: Tue 12 Oct 1999 - 01:20:46 IST
On Mon, Oct 11, 1999 at 09:35:18PM +0100, Ger Gorman wrote:
> I'm running rh6.0.
>
> table before rebooting:
> Kernel IP routing table
> Destination Gateway Genmask Flags MSS Window irtt Iface
> 140.203.1.130 0.0.0.0 255.255.255.255 UH 0 0 0 lo
> 192.168.2.2 0.0.0.0 255.255.255.255 UH 0 0 0 eth1
> 140.203.1.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 eth1
> 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
>
> table after rebooting:
> Kernel IP routing table
> Destination Gateway Genmask Flags MSS Window irtt Iface
> 140.203.1.130 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
> 192.168.2.2 0.0.0.0 255.255.255.255 UH 0 0 0 eth1
> 140.203.1.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 eth1
> 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
>
> what do you think....
Under RH5.x and RH6.x static routes are configured by either
linuxconf or the file /etc/sysconfig/static-routes. Take a look
at the script /etc/sysconfig/network-scripts/ifup-routes.
If you are using linuxconf, then I can't help you.
If you are not, then create the static-routes file something like this:
eth0 host 140.203.1.130 netmask 255.255.255.255
The first field is the name of the interface that this route
will go through. The remainder is all the other arguments
to a 'route' command (less the '-' in -host or -net) so the
above line corresponds to
# route add -host 140.203.1.130 netmask 255.255.255.255 eth0
There should not be any space before the interface name at the
beginning of the line.
If you bring up the eth0 network via the Redhat scripts (i.e.
_not_ by doing 'ifconfig eth0 up') then this route will be added.
> am I also right in thinking that the kernel edits the table if
> it finds a particular network unreachable?
No. A routing daemon using one of the Internet routing protocols
(such as RIP, OSPF, etc) will talk to other routers and exchange
info about which networks are accessible and update the routing
table accordingly (by doing the equivalent of /sbin/route add
and /sbin/route del). The kernel itself won't.
Note that you probably _don't_ want to run a routing daemon.
Easily 99% of all scenarios can be handled simply without one.
And 99% of them won't need static routes either. A misconfigured
routing daemon can cause all sorts of grief.
For more info, take a look at the Linux Network Administator's
Guide (which you probably have installed in /usr/doc/LDP/nag)
for general networking info and the RedHat docs for the
Redhat-specific stuff. Alternatively, take a look through
etc/rc.d/init.d/network and the scripts in /etc/sysconfig/network-scripts.
Much can be learned.
Hope this helps.
Later,
Kenn
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:04:42 GMT