I have a home LAN where all internal IP addresses are in the rang 192.169.0.0-254.However, on one of those computers I have setup a CentOS VM, which currently seems to be set to 10.0.2.1.So the VM can ping the host (192.169.0.1), but the host can't ping the VM (10.0.2.1).Why is that?  Does the VM need to be in the same IP range as the rest of the LAN?  If so, how do I do that?  If no, what needs to be done so I ping the VM from the host?At the moment the VM is using the NAT option, should it be set to Bridged?
Does my VM need to be on the same LAN IP range to ping?
ubuntu;networking;centos;virtualbox
The NAT network option of VirtualBox creates a virtual network (DHCP is emulated for example) such that the guest can communicate with the outside world. The outside world (including your host machine) cannot contact your guest machine though since it does not have a dedicated IP address.This has nothing to do with routes or IP ranges, its just how NAT (Network Address Translation) works. The guest packets that leave your machine have the same source IP address as your host.If you want to be able to ping the guest, you indeed need to configure bridged networking instead of NAT. Alternatively, you can forward ports.