Thursday, 13 March 2008

Adding routes automaticly when booting

If you add a static route for your network you have probably noticed that it disappears when you reboot. This can get annoying as you need to re-add it every time.

To have the route added by default every time you boot add the route to the file /etc/sysconfig/network/routes in the form:
Destination    Gateway    Netmask   Device
So if you want all traffic to the subnet to go through gateway you would use:
Note that device isn't required. If you omit it route will try and figure out the device by your Ethernet device’s settings.

If you want to set a default gateway use the destination of

No comments:

Post a Comment