I have a Virtual Machine One in inner network 192.168.1.0 with ip address 192.168.1.1 and Machine Two in inner network 192.168.2.0 with ip 192.168.2.2. Both have enp0s3 interface. How could I ping 192.168.1.1 from machine with ip 192.168.2.2? I executed a following command: route add -net 192.168.2.0/29 gw 192.168.1.1 enp0s3 on Machine one but I have a 100% packet loss and Destination host is unreachable when I ping 192.168.1.1 from 192.168.2.2. And when machine one tries to ping machine two I have a same output..(I executed route add -net 192.168.1.0/29 gw 192.168.2.2 enp0s3 on machine two)
Asked
Active
Viewed 326 times
1 Answers
0
You say these are virtual machines. It is probable that it is the virtualization layer that does not permit the machines to communicate.
For example, both the networks may be NATed, in which case the internal IPs are hidden from machines not in that network.
Depending on what you are trying to do here (and remember that this site is for managing information technology systems in a business environment; other sites will be more appropriate for learning Linux networking), it may make sense to open ports in your NAT, or put all the machines in the same network, or configure the networks without NAT, or have a common NAT upstream from the two networks in question.

Law29
- 3,557
- 1
- 16
- 28