Skip to contentSkip to conversation

IFUP scripts

LARTC [email protected] 2 participants 3 messages Aug 18, 2003

lore
Share & tools
lore
#0 lore raw

Hi,
can someone tell me the script to hook my routing commands into so that after my ethernet interface has gone down and subsequently been started again the routes are restored. I have been looking at ifup in the /etc/sysconfig/network scripts directory.

Many thanks

Paul

-----------------------------------------
Email provided by http://www.ntlhome.com/

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#1 lore raw
Quoted 4 lines · Le lun 18/08/2003 à 23:36, [email protected] a écrit :

Hi,
can someone tell me the script to hook my routing commands into so that after my ethernet interface has gone down and subsequently been started again the routes are restored.

you can use the keyword : up
iface ...

     network
     up ip route add 192.168.1.0L/24 .....

more detail on "man interfaces" ;-)

Quoted 4 lines

I have been looking at ifup in the /etc/sysconfig/network scripts directory.

Many thanks

Signature · 2 lines
Eric Leblond
Gnufw is Not a User mode FireWall : http://www.gnufw.org
#2 lore raw
In reply to [email protected]

Many thanks

I added my routes to file /etc/sysconfig/static-routes They initially failed as the calling script /etc/sysconfig/network-scripts/ifup-routes. was using the route command not the ip route command. So I changed the ifup-routes script to use ip route. Note I used the ip route replace command.
All seems to work now.

Paul

Quoted 7 lines

From: "Tarek W." <[email protected]>
Date: 2003/08/18 Mon PM 10:16:06 GMT
To: [email protected]
Subject: Re: [LARTC] IFUP scripts

Quoted 27 lines

in case ur talking about RHL, I usually spike my /etc/rc.d/init.d/network at the end of the start section, that way I can override any unwanted routing rules the ifup scripts inject into my tables, especially useful if u have several nics on the same subnet

Quoted 18 lines · On Tue, 2003-08-19 at 00:36, [email protected] wrote:

Hi,
can someone tell me the script to hook my routing commands into so that after my ethernet interface has gone down and subsequently been started again the routes are restored. I have been looking at ifup in the /etc/sysconfig/network scripts directory.

Many thanks

Paul

-----------------------------------------
Email provided by http://www.ntlhome.com/

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

-----------------------------------------
Email provided by http://www.ntlhome.com/

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/