Network configuration for Hyper-V virtual machines and hosts
Mode 1, shared type
This approach is to share the virtual network inside Hyper-V with the external network. Makes the interior a private network. The type that belongs to Nat. (I don't know if that's right)
Advantages:
- Relatively private network, good security
- Private network does not occupy the public IP
Disadvantages:
1, can only outward connection, cannot from outward inside the connection.
Configuration method:
- Open Control Panel \ Network and internet\ Network connections
- Set the Ip,dns for local area connection. So the host is already able to surf the Internet.
- Open the Local Area Connection Status page and add the network for Hyper-V in the share.
This will share the network. Note that the shared network default IP is 192.168.137.1
How to use:
The new virtual machine uses local Area Connection-virtual network.
IP set to 192.168.137.*
The gateway is set to 192.168.137.1
Method 2, Network Bridge mode
This approach is to bridge the virtual network inside Hyper-V to the external network. make the internal and external IP all on one network segment.
Advantages:
- Even if it is a wireless network, can also be bridged (seemingly default Hyper-V can not connect the wireless card, only in this way)
- IP in a network segment, good connectivity, convenient configuration.
Disadvantages:
- Need to occupy multiple IPs
- Poor security
Configuration method:
- Open Control Panel \ Network and internet\ Network connections
- First, the local network card will have a "local connection-network card model", Hyper-V installation will have a "local connection 2-virtual network", select the two networks, right-click on the "Bridge."
- Set the IP, DNS of the bridge, and change it to the previously locally connected IP, DNS.
How to use:
The new virtual machine uses local Area Connection-virtual network. IP is set to the machine on the host network segment.
Network configuration for Hyper-V virtual machines and hosts