1827881 Members
1326 Online
109969 Solutions
New Discussion

Re: Static routes

 
JBR
Frequent Advisor

Static routes

Hi, I´ve a Blade BL20p with RHEL3 Update 3 and multiple NICs. When I disconnect and connect the cable for one NIC the associated routes to this NIC disappears but when the connection is restored the routes never appears.

It´s true that I can try to put the file "/etc/sysconfig/network-scripts/route-eth0" to restore the routes for this interface. But when I´ve vlans for this interface, I need to put mulitple files like "/etc/sysconfig/network-scripts/route-eth0.vlanid"?
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: Static routes

If you restart the network:

service network restart

The default route configuration in /etc/sysconfig/network-scripts

should re-establish routes.

I'm not sure abut the route-eth0.vlanid trick, but you should try it on a test box. It really can't hurt to give it a try on a non-production server.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
JBR
Frequent Advisor

Re: Static routes

Thanks Steven, but if you try to restart the network service, Itis possible that the others NICs lose their links? or not?

My problem is that rarely only one NIC at time lose his link, and the associated routes for this interface disappear. I only need to restore the routes for this interface, vlans included....

Thanks in advance
Ivan Ferreira
Honored Contributor

Re: Static routes

You can selectively control the network interfaces using

ifup ifname
ifdown ifname

And i think that you need to configure the routes for every network interface configuration file. And according to the ifup script, the file should be named ifcfg-vlan* and probably, route-vlan*.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Ross Minkov
Esteemed Contributor

Re: Static routes

Interface specific static routes are searched in /etc/sysconfig/network-scripts/route-${INTERFACE}. There is also a
global file /etc/sysconfig/static-routes. This file is used for non interface-specific static-routes.

Example for a static route defined in /etc/sysconfig/network-scripts/route-${INTERFACE}:

123.4.5.6/25 via 123.8.7.8

I use "service network restart" very often and never had problems. You can even issue this over a ssh connection and keep your connection, although it might be smart to have a console connection handy just in case.

HTH,
Ross