Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

route boot configuration

Status
Not open for further replies.

pollux0

IS-IT--Management
Mar 20, 2002
262
US
Can someone please explain how the route table is built during bootup. My Redhat box has two interfaces but everytime i reboot the default route gets set to go out eth1. I want it to go out eth0

I know how to manually set up eth0 as the default route using the route commands.It will not stay after a reboot.

thanks
 
Add the command you type manually to this file....
/etc/rc.d/rc.local
 
What ip address do you set on your gateway ip address (router ip address or what)?
You can set your gateway IP address using IP address eth0.
I am not clear.What do you want to do?
Maybe i misundertood your question.
Good luck ....:)
 
When my computer boots the route table looks like this ( i have cut the flags and metric out and replaced with dashes):
********************************************
10.0.0.0-*-255.255.255.0-eth1
169.254.0.0-*-255.255.0.0-eth1
127.0.0.0-255.0.0.0-lo
default-10.0.0.1-0.0.0.0-eth1
********************************************
I need it to look like this:
********************************************
10.0.0.0-*-255.255.255.0-eth0
169.254.0.0-*-255.255.0.0-eth0
127.0.0.0-255.0.0.0-lo
default-10.0.0.1-0.0.0.0-eth0
********************************************
This is the first computer I have used that used eth1 as the default route. All others I have used have eth0 as the default route after installing the computer.

I have read that suggestion before(/etc/rc.d/rc.local). This seems like the "flakey" way to do it. Isnt there some kind of formal place for routing instructions on boot?



 
how did you get the route tables to display?

"This seems like the "flakey" way to do it."
You mean
This seems like the "farley" way to do it.
 
What version of Red Hat are you running? If its pre-RH90, then you can add you static routes to /etc/sysconfig/static-routes. If your using RH90, then your static routes go in /etc/sysconfig/networking/devices/eth0.route and eth1.route.


Your default route normally goes in /etc/sysconfig/network as GATEWAY=x.x.x.x. Since you want to force this out a certain interface, put it in /etc/sysconfig/network-scripts/ifcfg-eth0.


ChrisP
RHCE, LPIC-1, CCNA, CNE, MCSE, +10 others
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top