Linux 輕鬆上手 架設 CentOS 6.4 DNS+FTP –(九)、補充 設定重開機自動執行路由

Linux 輕鬆上手 架設 CentOS 6.4 DNS+FTP –(九)、補充 設定重開機自動執行路由

1. 新增靜態路由

1. route add -net 192.168.68.0 netmask 255.255.255.248 gw 192.168.99.251 eth0

2. 寫入路由到啟動檔中(以防止重開路由不見)

1. vi /etc/rc.d/rc.local

2. route add -net 192.168.68.0 netmask 255.255.255.248 gw 192.168.99.251 eth0

route add -net 192.168.110.0 netmask 255.255.255.0 gw 192.168.100.252 eth1

route add -net 192.168.3.0 netmask 255.255.255.0 gw 192.168.100.252 eth1

route add -net 10.2.10.0 netmask 255.255.255.0 gw 192.168.100.252 eth1

route add -net 192.168.120.0 netmask 255.255.255.0 gw 192.168.100.252 eth1

route add -net 192.168.132.0 netmask 255.255.255.0 gw 192.168.100.1 eth1

route add -net 192.168.24.0 netmask 255.255.255.0 gw 192.168.100.254 eth1