萬盛學電腦網

 萬盛學電腦網 >> 網絡應用技術 >> 應用教程 >> 雙網卡添加路由規則實例

雙網卡添加路由規則實例

  [root@localhost ~]# vi /etc/sysconfig/network-scripts/wtrouter.sh

  route del -net 121.101.xxx.xxx netmask 255.255.255.192 dev eth1

  route del -net 169.254.0.0  netmask 255.255.0.0 dev eth1

  如果需要添加網卡路由,下面添加上

  route add -net 172.18.2.0 netmask 255.255.255.0 dev eth0

  route add -net 172.18.1.0 netmask 255.255.255.0 dev eth0

  記得添加到開機啟動裡面

  vi /etc/rc.d/rc.local

  /etc/sysconfig/network-scripts/wtrouter.sh


copyright © 萬盛學電腦網 all rights reserved