Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Manage Hyper-V virtual network

2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

1.1 manage virtual network

Can you run Hyper-V? A number of virtual networks are created on the server to provide various communication channels For example, you can create a network to provide the following communication channels:

Only communication between virtual machines. This type of virtual network is called a private network.

Virtualize the communication between the server and the virtual machine. This type of virtual network is called an internal network.

Communication between virtual machines and the physical network by creating an association with the physical network adapter on the virtualized server. This type of virtual network is called an external network.

You can use the Virtual Network Manager to add, delete, and modify virtual networks. The virtual network manager is available from the Hyper-V manager.

Note: if you connect the virtual network to a physical network adapter that uses static settings, such as static IP addresses, and IPv6 is not disabled, the new connection will override the static settings. The network connection will be lost before the static settings are reapplied to the physical network adapter.

As shown in the figure, opening the network connection of the physical machine with the Hyper-V role, you can see the change of the network connection after the installation of Hyper-V. The local connection of the original network card is no longer bound to the TCP/IP protocol, but only bound to the Microsoft virtual network switch protocol. 3. The physical machine uses the IP address of the connection to communicate with other computers in the network.

1.1.1 example: create and use an internal network

Test objectives:

The following will create an internal network to enable virtual machines and physical communications.

The virtual machine Server1 needs to communicate with the physical machine, using the 172.16.0.0 255.255.255.0 network segment, put it into VLAN 2, and the IP address assignment is shown in the figure.

The virtual machine Server2 needs to communicate with the physical machine, using the 172.16.1.0 255.255.255.0 network segment, put it into VLAN 3, and the IP address assignment is shown in the figure.

After completing the configuration, Server1 can communicate with the virtual network of the physical machine to connect the IP address of office1, and Server2 can communicate with the IP address of the virtual network connected to Office2 of the physical machine.

Note: using different VLAN numbers, you can isolate the network from the data link layer and isolate webcasts.

Test steps:

1. Open the local connection to the physical machine and observe the number and name of network connections.

two。 Open the Hyper-V management tool and click Virtual Network Manager.

3. In the open virtual network manager, select "New Virtual Network", select "Internal" for the network type, and click "add".

4. Enter the virtual network name office1, select "Virtual LAN identity of the user's parent partition", enter 2, and click "apply".

5. Open the Virtual Network Manager again, select "New Virtual Network", select "Internal", and click "add".

6. Enter the name of the new network Office2, select "Virtual LAN identity of the user's parent partition", enter 3, and click "apply".

7. If you open the network connection of the physical machine in the figure, you can see that there are two more Office1 and Office2 network devices. The figure specifies the IP address of Office1 and Office2.

8. Click to open Server1, as shown in the picture, and click "File" à "Settings".

9. In the Server1 Settings dialog box that appears, select "Network Adapter", select "Office1" for the network, select "enable Virtual LAN identity", enter 2, and click "OK".

10. Set the IP address of Server1 172.16.0.2, subnet mask 255.255.255.0, and gateway 172.16.0.1.

11. Testing the connection to the physical machine Office1, ping 172.16.0.1 found that it was open.

twelve。 As shown in the figure, assign the Server2 network adapter to the Office2 network, select "enable virtual LAN identity", enter 3, and click "OK".

13. Log in to Server2, enter 172.16.1.2, subnet mask 255.255.255.0, gateway 172.16.1.1.

14. Testing the connection to the physical machine Office2 on Server2, ping 172.16.1.1 found that it was working.

1.1.2 example: create and use a private network

Test objectives:

The communication between virtual machine Server1 and Server2 is realized by creating a private network. Server1 and Server2 do not need to communicate with physical machines, nor do they need to communicate with other computers in the network.

Put these two virtual machines into VLAN 4.

Steps:

15. Open the Hyper-V management tool and click Virtual Network Manager.

16. In the virtual network manager that opens, select "New Virtual Network", select "Private" for the network type, and click "add".

17. Enter the virtual network name PrivateNet, select Private Virtual Machine Network, and click apply.

18. Change the settings of Server1 to assign the network adapter to the PrivateNet network, select "use virtual VLAN identity", enter VLAN number 4, and click "OK".

19. Change the settings of Server2 to assign the network adapter to the PrivateNet network, select "use virtual VLAN identity", enter VLAN number 4, and click "OK".

20. Open the Network and sharing Center on Server2 and enable File sharing as shown. This allows Server1 ping to communicate with Server2.

21. As shown in the figure, Ping 172.16.0.3 on Server1, and the network is found to be open.

1.1.3 example: create and use an external network

Test objectives:

Connect the network of the virtual machine to the switch in the network.

Allow the switch to connect to the Internet.

Steps:

twenty-two。 Change the settings for Server1 to assign network adaptation to the Broadcom NetXtreme 57xx Gigabit Controller- virtual network.

23. Change the Server2 settings to assign network adaptation to the Broadcom NetXtreme 57xx Gigabit Controller- Virtual Network.

1.1.4 example: assign a virtual machine to a different VLAN

Test objectives:

As shown in the figure, if you have two virtual machines on the physical machine and your network has two VLAN, you plan to put the virtual machine Server1 on VLAN10 and the Server2 on VLAN 11, and the router is responsible for inter-VLAN routing and Internet connectivity.

Steps:

24. The switch port connected to the physical machine is set as the trunk link, and the switch port connected to the router is configured as the trunk link.

25. The interface on the router that connects the switch trunk link and configures subinterfaces to act as gateways for VLAN 10 and VLAN 11.

twenty-six。 Change the Server1 settings to assign network adaptation to the Broadcom NetXtreme 57xx Gigabit Controller- virtual network, select "enable virtual VLAN identity", enter VLAN ID 10, and click "OK".

twenty-seven。 Set the IP address, subnet mask, and gateway of Server1 to the VLAN 10 segment.

twenty-eight。 Change the Server2 settings to assign network adaptation to the Broadcom NetXtreme 57xx Gigabit Controller- virtual network, select "enable virtual VLAN identity", enter VLAN ID 11, and click "OK".

twenty-nine。 Set the IP address, subnet mask, and gateway of Server2 to the VLAN 11 segment.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report