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 DeviceSo if you want all traffic to the subnet 192.168.2.0 to go through gateway 192.168.1.1 you would use:
192.168.2.0 192.168.1.1 255.255.255.0Note 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 0.0.0.0
No comments:
Post a comment