@
AllenHua 十分感谢,想问下是两个机子都要添加静态路由吗?
1. 我先在 B 机上设置了,但还是 ping 不通:
```
[root@test]# ip route add 192.168.32.0/23 dev eth0
[root@test]# ping 192.168.32.10
PING 192.168.32.10 (192.168.32.10): 56 data bytes
--- 192.168.32.10 ping statistics ---
85 packets transmitted, 0 packets received, 100% packet loss
[root@test]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.254.0 U 0 0 0 eth0
192.168.32.0 * 255.255.254.0 U 0 0 0 eth0
```
2. 然后我在 A 机也测试一下 ping ,也是不行:
```
[root@test]# ping 192.168.1.15
PING 192.168.1.15 (192.168.1.15): 56 data bytes
ping: sendto: Network is unreachable
```
3.最后我也在 A 机上尝试设置 route ,但是却失败了:
```
[root@test]# ip route add 192.168.1.0/23 dev eth0
RTNETLINK answers: Invalid argument
[root@test]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.32.0 * 255.255.254.0 U 0 0 0 eth0
```