For Adding Permanent route on Linux server please follow the following steps.
1. vi /etc/sysconfig/static-routes
#Static route configuration file.
# Add a static route for destination 192.168.0.0, netmask 255.255.255.0
# through gateway 10.0.0.1 on eth1
# eth1 net 192.168.0.0 netmask 255.255.255.0 gw 10.0.0.1
# Add a static route for destination 192.168.1.0, netmask 255.255.255.0
# through gateway 10.0.1.1 on any device that is acceptable.
# any net 192.168.1.0 netmask 255.255.255.0 gateway 10.0.1.1
any net 172.20.0.0 netmask 255.255.0.0 gateway 172.20.0.1
2. Service network restart
No comments:
Post a Comment