Add a default gateway
route add default gw 10.0.0.1
This will add a temporary route that will clear after reboot. To set the
default gateway betwen reboots edit /etc/sysconfig/network with the following
line
GATEWAY=10.0.0.1
Add a static route
route add -net 192.168.100.0 netmask 255.255.255.0 eth0
This will route all traffic toward this subnet to the eth0 interface
Manually add a static non gateway route
route add -net 10.8.100.0 netmask 255.255.255.0 gw 10.0.16.140
you can add stuff to the file /etc/sysconfig/static-routes
to make stuff start on boot
The syntax is a bit different than the route command. Check the file
/etc/sysconfig/network-scripts/ifup-route to see the syntax it's using.
© 2007 Village Elder | About this site | Contact | RSS | Back to top
Design by Andreas Viklund | Serendipity Template by Carl