1

Recently, I noticed that my virtual machine gateway IP address is xxx.xxx.xxx.2 instead of xxx.xxx.xxx.1, as the gateway IP address for normal machines is xxx.xxx.xxx.1 . But that's not the case for virtual machines. My connection is in NAT with the host machine. Can anyone please explain to me why this is the case?

My virtual machine:

My virtual machine

Host Machine:

Host Machine

2
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Commented Jul 15, 2022 at 17:27
  • The two images you provided are on totally different subnets, one uses 10.x.x.x and the other uses 192.168.x.x Commented Jul 15, 2022 at 17:34

1 Answer 1

0

The VM is inside the network 10.0.2.x while the host is in 192.168.8.x.

This is because the virtual machine product that you are using has created a virtual router for all the VMs, with a DHCP server that allocates addresses in the sub-network of 10.0.2.x. This virtual router interfaces to your local network via the host.

I can't answer why the developers of the virtual machine product chose to setup the gateway as 10.0.2.2 rather than 10.0.2.1, except to guess that 10.0.2.1 is used for a virtual modem that interfaces to the physical router. But that's only a guess, as the developer's choice is not publicly documented.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .