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

What is the load balancing strategy for vsphere port groups and vswitch

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

Share

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

This article introduces how the load balancing strategy of vsphere port group and vswitch is, the content is very detailed, interested friends can refer to it, I hope it can be helpful to you.

1. For the network in Esxi, the physical network card is called vmnic0, and the virtual switch is numbered by vSwitch0. The default system creates a vSwitch0 switch, and each switch can be composed of one or more pieces of vmnic.

2. The virtual switch in Esxi is logically distinguished by port group (Port Group). Different port groups have different functions, and Esxi has three port groups for different functions.

① console (Service Console): the communication interface used to connect to the Esxi host must have an IP address, commonly known as vswif, and the first console port is vswif0.

② ESXi kernel (VMKernel): for advanced Esxi functions, such as vMotion,HA,FT (Fault Tolerance), commonly known as vmk, the first is vmk0.

③ virtual machine communication port group (Virtual Machine): the port used to communicate to the virtual machine. These ports may be connected to several connected virtual interactive machines, or they may be connected to real physical switches.

There can be multiple port groups on a vSwitch.

3. If a group and failover policy is configured on a standard switch, the policy is propagated to all port groups in the switch. If you configure a policy on a standard port group, the policy replaces the policy inherited from the switch.

4. NIC teaming refers to the merging of multiple physical network cards into a single network interface for use by a single device (such as Exsi), which ensures that when there is a problem with one network card, the system can continue routine tasks through another network card.

5. The relationship between vSwitch and physical network card

A vSwitch requires at least one physical network card, but there can be three port groups on one vSwitch at the same time, and multiple vSwitch cannot use the same physical network card.

6. VLAN components

The concept of VLAN has nothing to do with virtual machines or physical machines, but mainly divides networks and security-related services. For vSphere to support vlan, physical devices must support vlan. You can set the VLAN number in the attribute when creating a port group.

7. The network card on VM

① vlance Nic, on a host that does not have vmware tool installed, has only basic networking functions and no more configuration.

② vmxnet network card. After installing vmware tool, the network card in vm becomes a vmxnet network card. This is a high-performance network card with more configuration options.

Esxi you can set a switch for each Nic. If your virtual switch is for virtual machines, that is, the port group is for virtual machine communication port groups, there are two ways for different network segments:

Both ① network cards are bound to a virtual switch, but the virtual switch is divided into vlan.

② creates two virtual switches with different network segments, one switch and one physical network card.

Configuration step

1 in vSphere Web Client, navigate to the host.

2 on the Management tab, click Network, and then select the virtual switch.

3 navigate to the grouping and failover policy of a standard switch or standard port group.

Option operation

Standard switch

A Select the switch from the list.

"b Click Edit Settings, and then select grouping and failover."

Standard port group

A Select the switch where the port group is located.

B from the switch topology diagram, select the standard port group and click Edit Settings.

C Select grouping and failover.

D Select the alternative next to the policy you want to replace.

4 from the load balancing drop-down menu, specify how the virtual switch balances outbound traffic between physical network cards within the group.

Option description

Routing based on the source virtual port:

Select the uplink based on the virtual port ID on the switch. When a virtual switch selects an uplink for a virtual machine or VMkernel adapter, it always forwards traffic through the same uplink for that virtual machine or VMkernel adapter.

Note:

If the EtherChannel of the switch is not tied, it is based on the source port by default.

Routing based on IP hash:

Uplinks are selected based on the source and destination IP address hashes of each packet. For non-IP packets, the switch uses this data in the appropriate fields to calculate the hash value. IP-based grouping requires that the physical switch be configured with an Ethernet channel.

Note:

When the switch is bound with EtherChannel, the load balancing policy is set to be based on ip hash, so the virtual switch also needs to match it, so it should also be set to IP hash. The number of EtherChannel of the switch is limited. For example, some switches have 512. After adjusting the upper limit, it will be changed to 1024, but the number of internal ports will be reduced from 32 to 16.

Routing based on the source MAC hash:

The uplink is selected based on the hash of the source Ethernet.

Routing based on physical network card load:

Can be used for distributed port groups or distributed ports. Select the uplink based on the current load of the physical network adapter connected to the port group or port. If the uplink remains busy for 75% or more for 30 seconds, the host agent switch moves part of the virtual machine traffic to a physical adapter with available capacity.

Use an explicit failover sequence:

In the list of active adapters, always use the foremost uplink to pass the failover detection condition. This option does not perform any actual load balancing.

Note: the load balancing policy of the port group does not take effect or intermittently. You can delete the port group (also deleted in the virtual machine), and then rebuild the portgroup to match the correct VLAN information and choose the correct load balancing policy to solve the weird problem of the network.

5 from the drop-down menu of network failover detection, select the method of virtual switch for failover detection.

Option description

Link state only:

Depends only on the link state provided by the network adapter. This option can be used to detect faults, such as cable removal and physical switch power failures.

Beacon detection:

Issue and listen for beacon probes on all network cards in the group and use this information in conjunction with link status to determine link failures. ESXi sends beacon packets once a second. The Nic must be in an active / active or active / standby configuration because NICs in the "unused" state do not join beacon detection.

6 from the Notification switch drop-down menu, select whether the standard switch or Distributed Switch notifies the physical switch in the event of a failover.

Note: set this option to No if connected virtual machines use Microsoft network load balancing in unicast mode. There is no problem when network load balancing runs in multicast mode.

7 from the recovery drop-down menu, select whether the physical adapter will return to active state after recovery from the failure.

If recovery is set to Yes (default selection), the adapter returns to the active task immediately after recovery and replaces the standby adapter that takes its place, if any.

If the recovery for the standard port is set to no, the failed adapter remains inactive after recovery until another currently active adapter fails and must be replaced.

8 specify how to use the uplinks in the network card group in the event of a failover by configuring the failover order list.

If you want to use some uplinks and retain other uplinks in case of an emergency if the uplinks in use fail, use the up arrow or down arrow keys to move those uplinks to another group.

Option description

Active adapter: if the network adapter connection is operational and active, continue to use the uplink.

Standby adapter: if one of the active physical adapters is down, this uplink is used.

Unused adapters: do not use this uplink.

9 Click OK.

On the vsphere port group and vswitch load balancing strategy is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

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

Servers

Wechat

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

12
Report