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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Default Gateway

Status
Not open for further replies.

Tony2Finger

Vendor
Apr 18, 2003
92
When I reboot the system everything is good.

But if I do a service network stop then start I goes to a different gateway.

in rc.local I have
route add -net 192.168.20.0/24 gw xxx.xxx.xxx.39

Do I make an entry in ifup-route?
Thanks in advance.

 
rc.local is executed late when you boot, not when a service is restarted.

Your subject says "Default Gateway", but what you ask is a static routing question. Either depends on your distribution, but mine follow these rules:

For the default gateway, you should have a line like "GATEWAY=x.x.x.39" in /etc/sysconfig/network.

For static routes, you should put them in /etc/sysconfig/network-scripts/route-<if> like "192.168.20.0/14 x.x.x.39".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top