LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-11-2010, 08:23 PM   #1
digger86
LQ Newbie
 
Registered: Jun 2009
Location: Oregon
Distribution: SLES, HPUX, SOLARIS
Posts: 24

Rep: Reputation: 0
How to make persistent iproutes using iproute2


I would like to have the below lines loaded at bootup and anytime the network is restarted (if possible).

Code:
ip rule add from 10.8.64.137 table T1
ip route add default 10.8.64.129 dev eth0 table T1
ip route add 10.8.64.128/27 dev eth0  src 10.8.64.137 table T1
ip route flush cache
I am using SuSE 11

Thanks

Last edited by digger86; 06-11-2010 at 10:00 PM. Reason: solved
 
Old 06-11-2010, 10:31 PM   #2
digger86
LQ Newbie
 
Registered: Jun 2009
Location: Oregon
Distribution: SLES, HPUX, SOLARIS
Posts: 24

Original Poster
Rep: Reputation: 0
Solved

Never mind I figured it out.

man ifcfg explains that there is an option POST_UP_SCRIPT. So in /etc/sysconfig/network/ifcfg-eth3 I added:

Code:
POST_UP_SCRIPT='/etc/sysconfig/network/scripts/ifup-route.eth3'
I also added:

Code:
POST_DOWN_SCRIPT='/etc/sysconfig/network/scripts/ifdown-route.eth3'
There is still some cleanup I need to do thought it looks like the " ip rule add from" is running 2x's.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Red Hat VNC - how to make non persistent ? prollocks Red Hat 2 04-03-2010 08:33 PM
[Knoppix] How to make a Persistent USB in 6.2 JmaJeremy Linux - Distributions 5 12-17-2009 03:49 PM
Can I make Nautilus have a persistent clipboard? Game_boy Linux - Software 4 10-21-2007 08:53 AM
How does one make a static route persistent in AIX? artasse AIX 2 11-22-2006 02:51 PM
iproute2 make troble e1000 Slackware 1 01-08-2004 02:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration