Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

CentOS 5, i manually added a static route to an ip to use the second network interface like so:

ip route add 123.456.7.89/32 via 192.168.10.101 dev eth1

is there a way to make this change be persistent upon reboot without adding it to startup script /etc/rc.d/rc.local ?

Thanks

share|improve this question

migrated from stackoverflow.com Feb 1 '10 at 13:13

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer

Yes. Add the line

123.456.7.89/32 via 192.168.10.101 dev eth1

to /etc/sysconfig/netowrk-scripts/route-eth1 as shown here: http://www.centos.org/docs/5/html/5.1/Deployment_Guide/s1-networkscripts-static-routes.html.

BTW, this was the very first hit from googling “CentOS route”

share|improve this answer
    
thanks, much appreciated. I did a lot of googling but it seems I skip this one, way too many tabs opened :) –  Dragos Feb 1 '10 at 13:09
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.