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:


If you leave 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,, 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: and 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.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.