- Is the route command permanent?

PDA

View Full Version : Is the route command permanent?


Anthony Ewell
07-24-2004, 06:02 PM
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
aewell@gbis.com

Andrei Ivanov
07-24-2004, 06:02 PM
Anthony Ewell <aewell@gbis.com> wrote:
> 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)?

Persistent static routes should be specified in /etc/sysconfig/static-routes.

--
andrei

Bill Unruh
07-24-2004, 06:02 PM
aewell@gbis.com (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

Kenneth A Kauffman
07-24-2004, 06:03 PM
"Bill Unruh" <unruh@string.physics.ubc.ca> wrote in message
news:bdavdr$l3s$1@nntp.itservices.ubc.ca...
> aewell@gbis.com (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
>

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

Anthony Ewell
07-24-2004, 06:03 PM
> 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
>

Hi Ken,

Thank you!

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

--Tony


--
-------------------------
I Fish. Therefore, I am.
-------------------------

Andrei Ivanov
07-24-2004, 06:04 PM
Anthony Ewell <aewell@gbis.com> wrote:
>>
>> /etc/sysconfig/network-scripts/route-eth0
>
> Do you know what version Red Hat switched to this method on?

Both RHL 7.2 and 7.3 still use /etc/sysconfig/static-routes file.

--
andrei

Kenneth A Kauffman
07-24-2004, 06:05 PM
"Andrei Ivanov" <iva@racoon.riga.lv> wrote in message
news:bdfh1o$s7ujk$1@ID-128882.news.dfncis.de...
> Anthony Ewell <aewell@gbis.com> wrote:
> >>
> >> /etc/sysconfig/network-scripts/route-eth0
> >
> > Do you know what version Red Hat switched to this method on?
>
> Both RHL 7.2 and 7.3 still use /etc/sysconfig/static-routes file.
>
> --
> andrei

That means they switched at 8+. I couldn't remember re: 7.2 and 7.3.

ken k