Is the route command permanent?

Discussion in 'Linux Networking' started by Anthony Ewell, Jun 24, 2003.

  1. Hi All,

    I realize the answer to this question is to reboot my computer, run
    the "route" command, and see for myself, but my computer is a server and
    the network users would be very, very annoyed.

    Queston: I just added a static route with the "route" command on
    my Red Hat 7.2 server. Is this route now permanent or do I need to also
    stick the same route command in my rc.local to refresh it every time I reboot
    (which is not very often)?

    Also, is there some kind of .conf file I could stick the route command in?
    (That way my tape backup will catch it.) I have "routed" on the server.

    Many thanks,
    --Tony
     
    Anthony Ewell, Jun 24, 2003
    #1
    1. Advertisements

  2. Persistent static routes should be specified in /etc/sysconfig/static-routes.
     
    Andrei Ivanov, Jun 25, 2003
    #2
    1. Advertisements

  3. Anthony Ewell

    Bill Unruh Guest

    (Anthony Ewell) writes:

    ]Hi All,

    ] I realize the answer to this question is to reboot my computer, run
    ]the "route" command, and see for myself, but my computer is a server and
    ]the network users would be very, very annoyed.

    ] Queston: I just added a static route with the "route" command on
    ]my Red Hat 7.2 server. Is this route now permanent or do I need to also
    ]stick the same route command in my rc.local to refresh it every time I reboot
    ](which is not very often)?

    No it is not permanant. However, in /etc/sysconfig/network-scripts (or
    /etc/sysconfig/static-routes) is a place you can put routes you want to
    bring up each time. Of course you could also just put the command at the
    end of /etc/rc.d/rc.local
     
    Bill Unruh, Jun 25, 2003
    #3
  4. In newer RedHat versions, they don't use static-routes, but rather a file
    named according to the interface.

    /etc/sysconfig/network-scripts/route-eth0

    with syntax:

    192.168.0.0/24 via 192.168.0.101

    ken k
     
    Kenneth A Kauffman, Jun 25, 2003
    #4
  5. Hi Ken,

    Thank you!

    Do you know what version Red Hat switched to this method on?

    --Tony
     
    Anthony Ewell, Jun 26, 2003
    #5
  6. Both RHL 7.2 and 7.3 still use /etc/sysconfig/static-routes file.
     
    Andrei Ivanov, Jun 26, 2003
    #6
  7. That means they switched at 8+. I couldn't remember re: 7.2 and 7.3.

    ken k
     
    Kenneth A Kauffman, Jun 27, 2003
    #7
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.