2012年(101)
分类: LINUX
2012-06-12 21:45:49
route add -net 10.1.114.0 netmask 255.255.255.0 gw 192.168.1.1
发往10.1.114.0网段的必须经过192.168.1.1网关
[root@ztone ~]# route add -net 10.1.112.0 netmask 255.255.255.0 gw 192.168.1.1
[root@ztone ~]# ping 10.1.112.231
PING 10.1.112.231 (10.1.112.231) 56(84) bytes of data.
64 bytes from 10.1.112.231: icmp_seq=1 ttl=128 time=5.72 ms
64 bytes from 10.1.112.231: icmp_seq=2 ttl=128 time=0.915 ms
route add -net 10.36.8.0 netmask 255.255.255.0 gw 192.168.1.1
删除
[root@ztone ~]# route del -net 10.1.114.0 netmask 255.255.255.0 gw 192.168.1.1 dev eth1