A Virtual Machine (VM) can be connected into the local network as another machine connected to the router. To do it, I will mention the steps for VirtualBox but the same can be achieved for other products.
Go to Settings -> Network and enable a new and single Network Adapter, attached to “Bridged Adapter” in the interface
Now make sure that the VM is using DHCP. Take a look at the file
/etc/network/interface and it should have the
eth0 interface as autostart and DHCP configured.
The next time you boot the machine,
ifconfig will show you an address like 192.168.x.x in
More information about VM networking at the VirtualBox manual.