Results 1 to 5 of 5
Hi ,
I setup routing table.
Code:
[root@]# ip route show table 2
xx.xx.xx.xx/28 dev eth2 scope link src xx.ip.xx.ip
default via xx.gw.xx.gw dev eth2
[root@]# ip route show table ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 06-08-2012 #1Just Joined!
- Join Date
- Jan 2011
- Posts
- 44
Routing table gone after ifdown
Hi ,
I setup routing table.
however, when I issue command ifdown eth2, the routing table 2 is gone.Code:[root@]# ip route show table 2 xx.xx.xx.xx/28 dev eth2 scope link src xx.ip.xx.ip default via xx.gw.xx.gw dev eth2 [root@]# ip route show table 1 yy.yy.yy.yy/28 dev eth1 scope link src yy.ip.yy.ip default via yy.gw.yy.gw dev eth1
but table 1 still existCode:[root@]# ip route show table 2 [root@]# ip route show table 2 [root@]# ip route show table 2
I added ip route as follows.
I also add the ip route on /etc/rc.local so it will load when system restart.Code:ip route add xx.xx.xx.xx/28 dev eth1 src xx.ip.xx.ip table IGA ip route add default via xx.gw.xx.gw table IGA ip route add yy.yy.yy.yy/28 dev eth2 src yy.ip.yy.ip table BTL ip route add default via xx.gw.xx.gw table BTL
Is there a way to fix this issue? even I issue ifdown eth2, the routing table will not get lost.
Please advice
Thanks!
- 06-08-2012 #2
Posting the same question over and over again is not going to get you an answer any faster. You should keep posting to the same thread that way all the question about this topic are together so the next person searching will find all the answers in one location instead of having to read 5+ posts.
Now to answer your question. Table 2 to is tied to eth2. When you power down eth2 the route is no longer available thus it is removed from the routing table.
- 06-08-2012 #3Just Joined!
- Join Date
- Jun 2012
- Posts
- 3
/etc/rc.local is just a bad place to employ routing information these days.
Didn't I tell you, in response to a different post of yours, the following?
"Use rule-ethX and route-ethX files in /etc/sysconfig/network-scripts/
blog.mc-thias.org/?title=routing-with-linux-when-using&more=1&c=1&tb=1&pb=1"
- 06-09-2012 #4Just Joined!
- Join Date
- Jun 2012
- Posts
- 2
It looks like what you've done is temporary static routing. I think what you're looking to do is persistent/permanent static routing.
gstewart hit the nail on the head, but for clarity, below is a url with examples of setting up both temporary and persistent static routing. Sadly, I had to break the url with a space due to my post count.
www linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch03_:_Linux_Networking#Adding_Tempo rary_Static_Routes
Hope that helps further.
- 06-10-2012 #5Just Joined!
- Join Date
- Jan 2011
- Posts
- 44
Thanks Everyone for all your post and help. REally appreciated it very much. and Sorry for any inconvenience caused and double post.


1Likes
Reply With Quote
