Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Routing table gone after ifdown

    Hi ,

    I setup routing table.

    [root@]# ip route show table 2
    xx.xx.xx.xx/28 dev eth2  scope link  src xx.ip.xx.ip
    default via dev eth2
    [root@]# ip route show table 1
    yy.yy.yy.yy/28 dev eth1  scope link  src yy.ip.yy.ip
    default via dev eth1
    however, when I issue command ifdown eth2, the routing table 2 is gone.

    [root@]# ip route show table 2
    [root@]# ip route show table 2
    [root@]# ip route show table 2
    but table 1 still exist

    I added ip route as follows.
    ip route add xx.xx.xx.xx/28 dev eth1 src xx.ip.xx.ip table IGA
    ip route add default via table IGA
    ip route add yy.yy.yy.yy/28 dev eth2 src yy.ip.yy.ip table BTL
    ip route add default via table BTL
    I also add the ip route on /etc/rc.local so it will load when system restart.

    Is there a way to fix this issue? even I issue ifdown eth2, the routing table will not get lost.

    Please advice


  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    The Keystone State
    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.


    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #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/"

  4. $spacer_open
  5. #4
    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 rary_Static_Routes

    Hope that helps further.

  6. #5
    Thanks Everyone for all your post and help. REally appreciated it very much. and Sorry for any inconvenience caused and double post.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts