LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] static routing

[ILUG] static routing

Kenn Humborg kenn at avalon.wombat.ie
Tue Oct 12 01:20:46 IST 1999


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





More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell