- 论坛徽章:
- 0
|
192.168.1.1 192.168.1.25 192.168.2.1 192.168.2.10
INTERNET----------ROUTER--------------------------V_PC1--------------------------V_PC2
V_PC1、V_PC2都是虚拟系统,系统的本身地址为192.168.1.2
V_PC1的网络配置
eth0 Link encap:Ethernet HWaddr 00:0C:29:94:E9:EB
inet addr:192.168.1.25 Bcast:192.168.1.255 Mask:255.255.255.0
eth1 Link encap:Ethernet HWaddr 00:0C:29:94:E9:F5
inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
V_PC1的iptables配置
iptables -t nat -nvL
Chain POSTROUTING (policy ACCEPT 12 packets, 851 bytes)
pkts bytes target prot opt in out source destination
1 84 SNAT all -- * * 192.168.2.10 0.0.0.0/0 to:192.168.1.125
iptables -nvL
Chain INPUT (policy ACCEPT 3588 packets, 278K bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 453 packets, 384K bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 2998 packets, 409K bytes)
pkts bytes target prot opt in out source destination
在V_PC2上ping 192.168.1.1 和192.168.1.100(是真实的机器,不是虚拟机),ping不通,在V_PC1上能看到192.168.2.10转换成192.168.1.125。当但就是没有回应报文,是不是192.168.1.1广播arp请求,但查不到192.168.1.125的mac表导致ping不通192.168.1.1啊。怎么设置才可以ping通192.168.1.1或.100啊 |
|