Why VM2 can't ping one machine?
by n00b_noob from LinuxQuestions.org on (#5F9G5)
Hello,
I created three VMs in the VirtualBox as below:
Code:VM1 (node1) : Two NICs (Internal Network, NAT)
VM2 (node2) : Two NICs (Internal Network, NAT)
VM3 (node3) : One NIC (Internal Network)VM1 can see VM2 and VM3, but VM2 just see VM1. In other words, VM2 and VM3 can't see each other!
On VM1:
Code:# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default _gateway 0.0.0.0 UG 101 0 0 enp0s8
10.0.3.0 0.0.0.0 255.255.255.0 U 101 0 0 enp0s8
192.168.1.0 0.0.0.0 255.255.255.0 U 100 0 0 enp0s3And:
Code:# ping node2
PING node2 (192.168.1.10) 56(84) bytes of data.
64 bytes from node2 (192.168.1.10): icmp_seq=1 ttl=64 time=0.462 ms
64 bytes from node2 (192.168.1.10): icmp_seq=2 ttl=64 time=0.619 ms
64 bytes from node2 (192.168.1.10): icmp_seq=3 ttl=64 time=0.659 ms
^C
--- node2 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 0.462/0.580/0.659/0.085 msAnd:
Code:# ping node3
PING 192.168.1.4 (192.168.1.4) 56(84) bytes of data.
64 bytes from 192.168.1.4: icmp_seq=1 ttl=64 time=0.469 ms
64 bytes from 192.168.1.4: icmp_seq=2 ttl=64 time=0.654 ms
64 bytes from 192.168.1.4: icmp_seq=3 ttl=64 time=0.624 ms
^C
--- 192.168.1.4 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2032ms
rtt min/avg/max/mdev = 0.469/0.582/0.654/0.081 msOn VM2:
Code:# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.0.3.2 0.0.0.0 UG 101 0 0 enp0s8
10.0.3.0 0.0.0.0 255.255.255.0 U 101 0 0 enp0s8
192.168.1.0 0.0.0.0 255.255.255.0 U 100 0 0 enp0s3And:
Code:# ping node1
PING node1 (192.168.1.3) 56(84) bytes of data.
64 bytes from node1 (192.168.1.3): icmp_seq=1 ttl=64 time=0.233 ms
64 bytes from node1 (192.168.1.3): icmp_seq=2 ttl=64 time=0.473 ms
64 bytes from node1 (192.168.1.3): icmp_seq=3 ttl=64 time=0.586 ms
^C
--- node1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2034ms
rtt min/avg/max/mdev = 0.233/0.430/0.586/0.147 msAnd:
Code:# ping node3
PING 192.168.1.4 (192.168.1.4) 56(84) bytes of data.Why? Is the route table wrong on VM2?
Thank you.


I created three VMs in the VirtualBox as below:
Code:VM1 (node1) : Two NICs (Internal Network, NAT)
VM2 (node2) : Two NICs (Internal Network, NAT)
VM3 (node3) : One NIC (Internal Network)VM1 can see VM2 and VM3, but VM2 just see VM1. In other words, VM2 and VM3 can't see each other!
On VM1:
Code:# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default _gateway 0.0.0.0 UG 101 0 0 enp0s8
10.0.3.0 0.0.0.0 255.255.255.0 U 101 0 0 enp0s8
192.168.1.0 0.0.0.0 255.255.255.0 U 100 0 0 enp0s3And:
Code:# ping node2
PING node2 (192.168.1.10) 56(84) bytes of data.
64 bytes from node2 (192.168.1.10): icmp_seq=1 ttl=64 time=0.462 ms
64 bytes from node2 (192.168.1.10): icmp_seq=2 ttl=64 time=0.619 ms
64 bytes from node2 (192.168.1.10): icmp_seq=3 ttl=64 time=0.659 ms
^C
--- node2 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 0.462/0.580/0.659/0.085 msAnd:
Code:# ping node3
PING 192.168.1.4 (192.168.1.4) 56(84) bytes of data.
64 bytes from 192.168.1.4: icmp_seq=1 ttl=64 time=0.469 ms
64 bytes from 192.168.1.4: icmp_seq=2 ttl=64 time=0.654 ms
64 bytes from 192.168.1.4: icmp_seq=3 ttl=64 time=0.624 ms
^C
--- 192.168.1.4 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2032ms
rtt min/avg/max/mdev = 0.469/0.582/0.654/0.081 msOn VM2:
Code:# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.0.3.2 0.0.0.0 UG 101 0 0 enp0s8
10.0.3.0 0.0.0.0 255.255.255.0 U 101 0 0 enp0s8
192.168.1.0 0.0.0.0 255.255.255.0 U 100 0 0 enp0s3And:
Code:# ping node1
PING node1 (192.168.1.3) 56(84) bytes of data.
64 bytes from node1 (192.168.1.3): icmp_seq=1 ttl=64 time=0.233 ms
64 bytes from node1 (192.168.1.3): icmp_seq=2 ttl=64 time=0.473 ms
64 bytes from node1 (192.168.1.3): icmp_seq=3 ttl=64 time=0.586 ms
^C
--- node1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2034ms
rtt min/avg/max/mdev = 0.233/0.430/0.586/0.147 msAnd:
Code:# ping node3
PING 192.168.1.4 (192.168.1.4) 56(84) bytes of data.Why? Is the route table wrong on VM2?
Thank you.