Set up vswitch in Hyper V

In order to do private networking, ideally you would use Hyper-V virtual switches to bind an interface in each of the guest VM’s to the same logical switch. You can do so with any locally routed convention.

You can configure each VM to make use of an IP in the 192.168.0.x range such as:

VM1 192.168.0.10
VM2 192.168.0.11
VM3 192.168.0.12

If you leave 192.168.0.1 open it can be set as the gateway on the virtual switch for outbound traffic that would use Network Address Translation to a public IP bound to the primary network interface.

You can also use other private network allocations such as a 10. range of your choice with VM’s using 10.0.0.1, 10.0.0.2, etc. They would all be able to see and ping each other provided they are connected to the same Hyper-V virtual switch.

The specific steps tend to change with small updates over time but Microsoft has details on the setup available from documentation at:
https://social.technet.microsoft.com/wiki/contents/articles/3140.create-networks-with-vmm-2012.aspx and https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/connect-to-network which is a general “Quick Start” for insight into the process.

If a single VM needs public access and local access it will need two interfaces. One will be bridged to the primary (public) interface on the physical host and the second can use the same local IP range as the other VM’s when connected to a local vSwitch.