- 论坛徽章:
- 0
|
主机A上的路由配置信息:
# netstat -rn
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ---------- ---------
default 192.168.2.1 UG 1 2
192.168.2.0 192.168.2.111 U 1 1 pcn1
127.0.0.1 127.0.0.1 UH 4 198 lo0
# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
pcn1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
inet 192.168.2.111 netmask ffffff00 broadcast 192.168.2.255
ether 0:c:29:2e:76:c8
主机B上的路由信息:
# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
vmxnet0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.1.120 netmask ffffff00 broadcast 192.168.1.255
ether 0:c:29:e1:86:d2
vmxnet1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
inet 192.168.2.1 netmask ffffff00 broadcast 192.168.2.255
ether 0:c:29:e1:86:dc
# netstat -rn
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ---------- ---------
default 192.168.1.1 UG 1 15
192.168.1.0 192.168.1.120 U 1 3 vmxnet0
192.168.2.0 192.168.2.1 U 1 1 vmxnet1
224.0.0.0 192.168.1.120 U 1 0 vmxnet0
127.0.0.1 127.0.0.1 UH 4 233 lo0
怎么样配置能让192.168.2.111 ping通192.168.1.1
现在192.168.2.111 ping 192.168.1.120正常
谢谢! |
|