learn_solaris 发表于 2012-03-13 10:15

请教一个 solaris路由添加和删除的问题

为什么我使用了route add -host 132.119.250.100192.168.100.2 -interface ce1命令以后,路由表自动添加了一条路由,但并不是到主机132.119.250.100而是到网络0.2.24.0
现在想删掉删不掉,有人能帮忙解决一下不?




-bash-3.00# netstat -rn

Routing Table: IPv4
Destination         Gateway         FlagsRef   Use   Interface
-------------------- -------------------- ----- ----- ---------- ---------
default            59.36.0.81         UG      1   550689         
0.2.40.0             192.168.100.2      U         1         20 ce1      
59.0.0.0             59.36.0.82         U         1   225388 ce0      
192.168.1.0          192.168.1.8          U         1         11 ce0:1   
192.168.100.0      192.168.100.2      U         1      124 ce1      
224.0.0.0            59.36.0.82         U         1          0 ce0      
127.0.0.1            127.0.0.1            UH      3    4087292 lo0      
-bash-3.00# route add -host 132.119.250.100 192.168.100.1 -interface ce1
add net 132.119.250.100: gateway 192.168.100.1: Network is unreachable
-bash-3.00# netstat -rn

Routing Table: IPv4
Destination         Gateway         FlagsRef   Use   Interface
-------------------- -------------------- ----- ----- ---------- ---------
default            59.36.0.81         UG      1   550691         
0.2.40.0             192.168.100.2      U         1         20 ce1      
59.0.0.0             59.36.0.82         U         1   225388 ce0      
192.168.1.0          192.168.1.8          U         1         11 ce0:1   
192.168.100.0      192.168.100.2      U         1      124 ce1      
224.0.0.0            59.36.0.82         U         1          0 ce0      
127.0.0.1            127.0.0.1            UH      3    4087300 lo0      
-bash-3.00# ping 132.119.126.130
no answer from 132.119.126.130
-bash-3.00# route add -host 132.119.250.100 192.168.100.2 -interface ce1
add net 132.119.250.100: gateway 192.168.100.2
-bash-3.00# netstat -rn

Routing Table: IPv4
Destination         Gateway         FlagsRef   Use   Interface
-------------------- -------------------- ----- ----- ---------- ---------
default            59.36.0.81         UG      1   550693         
0.2.40.0             192.168.100.2      U         1          0 ce1      
0.2.40.0             192.168.100.2      U         1         20 ce1      
59.0.0.0             59.36.0.82         U         1   225388 ce0      
192.168.1.0          192.168.1.8          U         1         11 ce0:1   
192.168.100.0      192.168.100.2      U         1      124 ce1      
224.0.0.0            59.36.0.82         U         1          0 ce0      
127.0.0.1            127.0.0.1            UH      6    4087353 lo0      
-bash-3.00#
-bash-3.00#

非凡公子 发表于 2012-03-13 22:35

route add 132.230.10.0 -netmask 255.255.255.0 192.169.1.254

milujite 发表于 2012-03-14 11:21

-host,host前没“-"吧
页: [1]
查看完整版本: 请教一个 solaris路由添加和删除的问题