Switch port adjustment method, device, equipment and readable storage medium

By determining the port adjustment method of the physical switch and the virtual switch in the virtualization platform, the physical switch port is automatically configured, which solves the problem of inflexible configuration in the existing technology and improves the stability and flexibility of the network.

CN119135637BActive Publication Date: 2025-10-03JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411375057.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-10-03
Estimated Expiration
2044-09-29

AI Technical Summary

Technical Problem

Existing technologies cannot achieve flexible configuration of physical switch ports, resulting in abnormal communication between virtual machines and hosts. Experienced network engineers are required to plan the layout of virtual and physical network topologies in advance, which cannot be changed at any time.

Method used

By determining the physical host, physical switch and virtual switch in the virtualization platform, using the physical network card to receive port adjustment messages, determining the physical switch information based on the messages, and adjusting the physical switch port mode and data packet maximum transmission unit value according to the LAN type under the virtual switch, automatic configuration of the physical switch and virtual switch is achieved.

Benefits of technology

It realizes automatic configuration of physical switch ports, reduces network communication anomalies, improves network flexibility and stability, and reduces dependence on experienced engineers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119135637B_ABST
    Figure CN119135637B_ABST
Patent Text Reader

Abstract

The present invention discloses a switch port adjustment method, apparatus, device, and readable storage medium, which are applied to the field of intelligent configuration, including: determining the physical switch information corresponding to each physical network card based on a port adjustment message; determining the port mode type corresponding to the physical switch based on the virtual local area network under the set virtual switch, and adjusting the port of the physical switch based on the port mode type; adjusting the maximum transmission unit value of the data packet of the physical switch port and the maximum transmission unit value of the data packet of the physical network card corresponding to the physical switch based on the maximum transmission unit value of the port data packet of the set virtual switch. The present invention links the physical switch, virtual switch, and physical host through a virtualization platform, and can automatically identify and configure the physical switch and physical network card configuration required by the virtual switch on the virtualization platform, thereby reducing the occurrence of network communication anomalies caused by physical switch configuration problems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to intelligent configuration, and in particular to a switch port adjustment method, device, equipment and readable storage medium. Background Art

[0002] VLANs (Virtual Local Area Networks) created by virtual switches require coordination with physical switch ports for proper communication. Improper physical switch port configuration can lead to cross-host communication anomalies when virtual machines use these VLANs. Therefore, experienced network engineers must plan the virtual and physical network topologies in advance, as these cannot be changed at any time. Existing virtualization platforms manage physical switches for simple display and configuration.

[0003] It can be seen that how to implement the configuration of physical switch ports is a technical problem that those skilled in the art urgently need to solve. Summary of the Invention

[0004] In view of this, an object of the present invention is to provide a switch port adjustment method, apparatus, device and readable storage medium, which solve the technical problem that physical switch port configuration cannot be implemented in the prior art.

[0005] To solve the above technical problems, the present invention provides a switch port adjustment method, comprising:

[0006] Determine a physical host, a physical switch, and a virtual switch in a virtualization platform; wherein a physical network card of the physical host is associated with the virtual switch as an uplink; create a virtual machine and a virtual network card in the physical host, wherein the network used by the virtual network card is a virtual local area network under the physical switch;

[0007] Receiving a port adjustment message through the physical network card, and determining physical switch information corresponding to each physical network card according to the port adjustment message; wherein the physical switch information is information that determines the correspondence between the physical network card and the physical switch port;

[0008] Determine the port mode type corresponding to the physical switch according to the virtual local area network under the set virtual switch, and adjust the port of the physical switch according to the port mode type;

[0009] Adjusting the maximum transmission unit value of the data packet of the physical switch port according to the set maximum transmission unit value of the port data packet of the virtual switch;

[0010] A physical network card corresponding to the physical switch is determined based on the physical switch information, and a maximum transmission unit value of a data packet of the physical network card corresponding to the physical switch is kept consistent with the adjusted maximum transmission unit value of the data packet of the physical switch.

[0011] On the one hand, the physical switch information includes the physical switch name, physical switch port number, maximum transmission unit value of the physical switch port data packet, and the corresponding physical host name and physical network card name;

[0012] Accordingly, the switch port adjustment method further includes:

[0013] The physical switch name and the physical switch port number corresponding to the physical network card are determined according to the physical switch information, so as to connect the physical switch to the corresponding physical network card.

[0014] On the one hand, determining the port mode type corresponding to the physical switch according to the virtual local area network under the set virtual switch includes:

[0015] If a virtual network card is connected to a virtual local area network, determining that the port mode type corresponding to the physical switch is a first mode; wherein the first mode is a mode for carrying a virtual local area network data flow;

[0016] If multiple virtual network cards are connected to the same virtual local area network, it is determined that the port mode type corresponding to the physical switch is a second mode; wherein the second mode is a mode for carrying multiple virtual local area network data flows.

[0017] In one aspect, the switch port adjustment method further includes:

[0018] Identify the physical network card binding mode of the physical host under the virtual switch;

[0019] The aggregation mode of the physical switch is determined according to the physical network card binding mode.

[0020] On the one hand, determining the aggregation mode of the physical switch according to the physical network card binding mode includes:

[0021] When the physical network card binding mode is the first physical network card binding mode, determining that the aggregation mode of the physical switch is aggregation forced non-negotiation; wherein the physical network card binding mode is a load sharing rotation mode, and the first aggregation forced non-negotiation is a mode of forming an aggregate link by bundling multiple physical ports together without using negotiation;

[0022] When the physical network card binding mode is the second physical network card binding mode, determining that the aggregation mode of the physical switch is a bundling mode; wherein the second physical network card binding mode is an active / standby mode;

[0023] When the physical network card binding mode is the third physical network card binding mode, determining that the aggregation mode of the physical switch is an aggregation forced non-negotiation mode based on a hash transmission strategy; wherein the third physical network card binding mode is a method of using an exclusive OR operation to generate a hash value for load balancing;

[0024] When the physical network card binding mode is the fourth physical network card binding mode, determining that the aggregation mode of the physical switch is an aggregation forced non-negotiation mode under a redundancy mechanism; wherein the fourth physical network card binding mode is that all data packets will be broadcast from all interfaces;

[0025] When the physical network card binding mode is the fifth physical network card binding mode, determining that the aggregation mode of the physical switch is an aggregation mode based on the link aggregation control protocol; wherein the fifth physical network card binding mode supports the mode of the IEEE802.3ad protocol;

[0026] When the physical network card binding mode is the sixth physical network card binding mode, determining that the aggregation mode of the physical switch is a mode based on a load balancing algorithm;

[0027] When the physical network card binding mode is the seventh physical network card binding mode, the aggregation mode of the physical switch is determined to be a mode based on an address load balancing algorithm.

[0028] In one aspect, the switch port adjustment method further includes:

[0029] Detect the port data flow size of each physical switch and physical network card;

[0030] Determine a port whose port data flow rate is greater than the maximum port data flow rate as a target port;

[0031] Using load balancing technology to distribute the traffic of the target port to the network card whose data traffic is not greater than the maximum port data traffic;

[0032] Alternatively, it is determined to add a new physical network card and use the new physical network card to handle the traffic.

[0033] On the one hand, before determining the physical host, physical switch, and virtual switch in the virtualization platform, the method further includes:

[0034] Setting a first physical network card and a second physical network card on a first physical host of a virtualization platform, and setting a third physical network card and a fourth physical network card on a second physical host;

[0035] Adding the first physical network card, the second physical network card, the third physical network card, and the fourth physical network card as uplinks to the virtual switch;

[0036] Connecting the first physical network card to the first port of the physical switch, connecting the second physical network card to the second physical network card of the physical switch, connecting the third physical network card to the third port of the physical switch, and connecting the fourth physical network card to the fourth physical network card of the physical switch;

[0037] Determine setting of aggregation mode for the first physical network card and the second physical network card on the first physical host on the virtual switch;

[0038] Determine to set the third physical network card and the fourth physical network card in an active / standby mode on the virtual switch.

[0039] An embodiment of the present invention further provides a physical switch port adjustment device, comprising:

[0040] A virtual node determination module is configured to determine a physical host, a physical switch, and a virtual switch in a virtualization platform; wherein the physical network card of the physical host is associated with the virtual switch as an uplink; and a virtual machine and a virtual network card are created within the physical host, wherein the network used by the virtual network card is a virtual local area network under the physical switch.

[0041] a physical switch information determination module, configured to receive a port adjustment message through the physical network card, and determine the physical switch information corresponding to each physical network card according to the port adjustment message; wherein the physical switch information is information determining the correspondence between the physical network card and the physical switch port;

[0042] A port mode type determination module is used to determine the port mode type corresponding to the physical switch according to the virtual local area network under the set virtual switch, and adjust the port of the physical switch according to the port mode type;

[0043] A maximum transmission unit value adjustment module, configured to adjust the maximum transmission unit value of the data packet of the physical switch port according to the set maximum transmission unit value of the port data packet of the virtual switch;

[0044] The physical network card information setting module is used to determine the physical network card corresponding to the physical switch based on the physical switch information, and keep the maximum transmission unit value of the data packet of the physical network card corresponding to the physical switch consistent with the adjusted maximum transmission unit value of the data packet of the physical switch.

[0045] An embodiment of the present invention further provides a physical switch port adjustment device, comprising:

[0046] memory for storing computer programs;

[0047] The processor is configured to execute the computer program to implement the steps of the above-mentioned physical switch port adjustment method.

[0048] This embodiment of the present invention further provides a readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned physical switch port adjustment method are implemented.

[0049] The present invention also provides a computer program product, comprising a computer program / instruction, which implements the steps of the above-mentioned physical switch port adjustment method when executed by a processor.

[0050] The purpose of the embodiments of the present invention is to provide a switch port adjustment method, apparatus, device and readable storage medium, which can solve the technical problem of being unable to configure the ports of a physical switch.

[0051] To solve the above technical problems, an embodiment of the present invention provides a switch port adjustment method, which may include: determining a physical host, a physical switch and a virtual switch in a virtualization platform; wherein the physical network card of the physical host is associated with the virtual switch as an uplink; creating a virtual machine and a virtual network card in the physical host, and the network used by the virtual network card is the virtual local area network under the physical switch; receiving a port adjustment message through the physical network card, and determining the physical switch information corresponding to each physical network card according to the port adjustment message; wherein the physical switch information is information for determining the correspondence between the physical network card and the physical switch port; according to the set virtual local area network under the virtual switch, determining the port mode type corresponding to the physical switch, and adjusting the port of the physical switch according to the port mode type; adjusting the maximum transmission unit value of the data packet of the physical switch port according to the maximum transmission unit value of the port data packet of the set virtual switch; determining the physical network card corresponding to the physical switch based on the physical switch information, and keeping the maximum transmission unit value of the data packet of the physical network card corresponding to the physical switch consistent with the maximum transmission unit value of the adjusted physical switch data packet.

[0052] It can be seen from the above technical solution that the beneficial effect of the present invention is that: the physical switch, virtual switch and physical host are linked together by using a virtualization platform, and the physical switch and physical network card configuration required for the virtual switch created by the virtualization platform can be automatically identified and configured, reducing the occurrence of network communication anomalies caused by physical switch configuration problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0054] Figure 1 A flow chart of a physical switch port adjustment method provided by an embodiment of the present invention;

[0055] Figure 2 An example flow chart of a method for automatically adjusting physical switch ports on a virtualization platform provided by an embodiment of the present invention;

[0056] Figure 3 A schematic diagram of the deployment of a physical host, a physical switch, and a virtual switch provided in an embodiment of the present invention;

[0057] Figure 4 A schematic structural diagram of a switch port adjustment device provided by an embodiment of the present invention;

[0058] Figure 5 A structural diagram of a physical switch port adjustment provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0059] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.

[0060] The terms "including" and "having," as used in the present description and accompanying drawings, and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements and may include steps or elements that are not listed.

[0061] VLANs (Virtual Local Area Networks) created by virtual switches require coordination with physical switch ports for proper communication. Improper physical switch port configuration can lead to cross-host communication anomalies when virtual machines use these VLANs. Therefore, experienced network engineers must plan the virtual and physical network topologies in advance, as these cannot be changed at any time. Existing virtualization platforms manage physical switches for simple display and configuration.

[0062] In order to enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0063] Next, a flowchart of a physical switch port adjustment method provided by an embodiment of the present invention is described in detail. Figure 1 An embodiment of the present invention provides a method for adjusting a physical switch port, which may include:

[0064] S101, determining a physical host, a physical switch, and a virtual switch in a virtualization platform; wherein the physical network card of the physical host is associated with the virtual switch as an uplink; creating a virtual machine and a virtual network card in the physical host, and the network used by the virtual network card is the virtual local area network under the physical switch.

[0065] The execution entity of this embodiment is an electronic device, but this embodiment is not limited to a specific electronic device. For example, the electronic device in this embodiment can be a computer, or it can also be a virtual machine. The virtualization platform in this embodiment uses software technology to abstract the hardware resources of a physical computer (such as the CPU (central processing unit), memory, storage, and network), thereby creating multiple isolated virtual environments or virtual machines. Each virtual machine can run its own operating system and applications as if it were an independent physical machine. This technology maximizes the utilization of hardware resources and improves system flexibility and efficiency. In this embodiment, the physical host, physical switch, and virtual switch are created on the virtualization platform. In a virtualized environment, a virtual switch (vSwitch) is a technology that implements the Layer 2 (and even some Layer 3) networking functions of a physical switch through software. It allows communication between virtual machines (VMs) and between virtual machines and external networks. The physical network card acts as an uplink, connecting the virtual switch to the external physical network. Virtual machines and virtual network cards are created within the physical host, and the virtual network card selects the network under the virtual switch.

[0066] It should be further explained that before determining the physical host, physical switch and virtual switch in the virtualization platform, it can also include: setting the first physical network card and the second physical network card on the first physical host of the virtualization platform, and setting the third physical network card and the fourth physical network card on the second physical host; adding the first physical network card, the second physical network card, the third physical network card and the fourth physical network card as uplinks to the virtual switch; connecting the first physical network card to the first port of the physical switch, the second physical network card to the second physical network card of the physical switch, the third physical network card to the third port of the physical switch, and the fourth physical network card to the fourth physical network card of the physical switch; determining the setting of the aggregation mode for the first physical network card and the second physical network card on the first physical host on the virtual switch; determining the setting of the master-slave mode for the third physical network card and the fourth physical network card on the virtual switch. This embodiment provides a specific setting method for the physical host, physical switch and virtual switch on the virtualization platform, which improves the accuracy of the setting of the physical host, physical switch and virtual switch.

[0067] It should be further explained that the above-mentioned physical switch information includes the physical switch name, physical switch port number, maximum transmission unit value of the physical switch port data packet, and the corresponding physical host name and physical network card name; accordingly, the above-mentioned switch port adjustment method may also include: determining the physical switch name and physical switch port number corresponding to the physical network card based on the physical switch information to connect the physical switch with the corresponding physical network card. For example, physical network card 1 is connected to the eth-0-1 port of the physical switch, and physical network card 2 is connected to the eth-0-2 port, where eth is the network interface naming method. This embodiment can accurately connect the physical switch and the physical network card through the physical switch information, and set the accurate physical switch port.

[0068] S102: Receive a port adjustment message through the physical network card, and determine the physical switch information corresponding to each physical network card according to the port adjustment message; wherein the physical switch information is information that determines the correspondence between the physical network card and the physical switch port.

[0069] The port adjustment message in this embodiment may be an LLDP message, which is a data packet used by the Link Layer Discovery Protocol (LLDP) to exchange information between network devices. The primary function of LLDP messages is to establish and maintain neighbor relationships between network devices, enabling them to identify each other and exchange information. By sending and receiving LLDP messages, devices can understand each other's existence, status, and capabilities, enabling better collaboration. For example, the LLDP message information in this embodiment may confirm the name, port number, and MTU (Maximum Transmission Unit) value of the physical switch to which each physical network interface card is connected.

[0070] S103: Determine the port mode type corresponding to the physical switch according to the virtual local area network under the set virtual switch, and adjust the port of the physical switch according to the port mode type.

[0071] The virtualization platform in this embodiment obtains the VLAN network ID created under the created virtual switch, and can call the physical switch background command according to the set VLAN network ID to modify the port mode of the corresponding physical switch, for example, to the TRUNK type (a physical link used to transmit multiple VLAN (virtual local area network) data streams) and allow the VLAN ID (only then it is allowed to pass).

[0072] It should be further explained that the above-mentioned determination of the port mode type corresponding to the physical switch based on the virtual LAN under the set virtual switch may include:

[0073] S1031: If a virtual network card is connected to a virtual local area network (VLAN), determine that the port mode type corresponding to the physical switch is a first mode; wherein the first mode is a mode for carrying a virtual local area network data flow;

[0074] S1032: If multiple virtual network cards are connected to the same virtual local area network (VLAN), determine that the port mode type corresponding to the physical switch is a second mode; wherein the second mode is a mode for carrying multiple virtual local area network data flows.

[0075] In this embodiment, when a virtual network card is connected to a virtual local area network (VLAN), the corresponding port mode type on the physical switch should be the first mode. First mode means that the port carries data flows from only one VLAN. This means that in this mode, the physical switch port only allows packets belonging to that VLAN to pass through, thereby ensuring data security and isolation. This mode is typically used in single VLAN scenarios to simplify network management and security control. When multiple virtual network cards are connected to the same VLAN, the corresponding port mode type on the physical switch should be the second mode. Second mode means that the port can carry data flows from multiple VLANs. This means that in this mode, the physical switch port allows packets from multiple VLANs to pass through, enabling communication and data exchange between different VLANs. This mode is typically used in scenarios requiring cross-VLAN communication to meet more complex network requirements. In this embodiment, the first mode can be ACCESS mode, and the second mode can be TRUNK mode. ACCESS mode, also known as access mode, is a switch port configuration method. In ACCESS mode, a port can belong to only one VLAN (virtual local area network) and can only pass data frames from that VLAN. That is to say, when a data frame is sent from a device to the ACCESS mode port of the switch, the switch will check the VLAN tag of the data frame. If it is the same as the VLAN to which the port belongs, it will be allowed to pass; otherwise, the data frame will be discarded. This mode is usually used to connect terminal devices such as computers and printers, because they usually only need to access one VLAN. TRUNK mode: also known as trunk mode or aggregation mode, is another way to configure the switch port. In TRUNK mode, the port can allow data frames from multiple VLANs to pass through, and can forward data frames between different VLANs. This means that when a data frame is sent from a device to the TRUNK mode port of the switch, the switch will not check the VLAN tag of the data frame, but will directly forward it to another VLAN. This mode is usually used to connect network devices such as routers and other switches to achieve communication and data exchange between different VLANs. This embodiment can meet the different needs of users and improve user experience by setting different modes.

[0076] S104: Adjust the maximum transmission unit value of the data packet of the physical switch port according to the set maximum transmission unit value of the data packet of the port of the virtual switch.

[0077] In this embodiment, the MTU value of the created virtual switch can be obtained, and then the physical switch command can be called to reconfigure the MTU of the corresponding port to be consistent.

[0078] S105 , determining a physical network card corresponding to the physical switch based on the physical switch information, and making the maximum transmission unit value of the data packet of the physical network card corresponding to the physical switch consistent with the adjusted maximum transmission unit value of the data packet of the physical switch.

[0079] In this embodiment, a host command is called to reconfigure the physical network card MTU to be consistent.

[0080] It should be further explained that the switch port adjustment method may also include: identifying the physical network card binding mode of the physical host under the virtual switch; and determining the aggregation mode of the physical switch based on the physical network card binding mode. This embodiment can optimize the distribution and transmission path of network traffic by identifying the physical network card binding mode and adjusting the aggregation mode of the physical switch accordingly, thereby reducing network latency and increasing data transmission rate.

[0081] It should be further explained that the above-mentioned determination of the aggregation mode of the physical switch according to the physical network card binding mode may include: when the physical network card binding mode is the first physical network card binding mode, determining that the aggregation mode of the physical switch is aggregation forced non-negotiation; wherein the physical network card binding mode is a load sharing rotation mode, and the first aggregation forced non-negotiation is a mode of forming an aggregation link by bundling multiple physical ports together without using negotiation; when the physical network card binding mode is the second physical network card binding mode, determining that the aggregation mode of the physical switch is the bundling mode; wherein the second physical network card binding mode is the master-slave mode; when the physical network card binding mode is the third physical network card binding mode, determining that the aggregation mode of the physical switch is the aggregation forced non-negotiation mode based on the hash transmission strategy; wherein the third physical network card binding mode is to use A method for load sharing using an XOR operation to generate a hash value; when the physical network card binding mode is the fourth physical network card binding mode, determining the aggregation mode of the physical switch to be an aggregation forced non-negotiation mode under a redundancy mechanism; wherein, the fourth physical network card binding mode is that all data packets will be broadcast from all interfaces; when the physical network card binding mode is the fifth physical network card binding mode, determining the aggregation mode of the physical switch to be an aggregation mode based on the Link Aggregation Control Protocol; wherein, the fifth physical network card binding mode is a mode that supports the IEEE802.3ad protocol; when the physical network card binding mode is the sixth physical network card binding mode, determining the aggregation mode of the physical switch to be a mode based on a load balancing algorithm; when the physical network card binding mode is the seventh physical network card binding mode, determining the aggregation mode of the physical switch to be a mode based on an address load balancing algorithm. The IEEE802.3ad protocol in this embodiment is also called LACP (Link Aggregation Control Protocol), which is a data link layer protocol used to combine multiple physical links to create an aggregated link. In this embodiment (the first physical NIC bonding mode), Mode = 0 (balance-rr) indicates round-robin load balancing, which works with the switch's forced non-negotiation mode for aggregation. Mode = 1 (the second physical NIC bonding mode) (active-backup) indicates active-backup mode, where only one NIC is active and the other is standby. In this case, if the switch is configured for bonding, it will not work properly because half of the packets sent to both NICs will be discarded. Mode = 2 (the third physical NIC bonding mode) (balance-xor) indicates XOR hash load balancing, which works with the switch's forced non-negotiation mode for aggregation. (xmit_hash_policy is required.)Mode 3 (the fourth physical NIC bonding mode) (broadcast) indicates that all packets are sent from all interfaces. This is unbalanced and only has redundancy mechanisms... and works with the switch's forced non-negotiation aggregation mode. Mode 4 (the fifth) (802.3ad) indicates support for the 802.3ad protocol and works with the switch's LACP aggregation mode (requires xmit_hash_policy). Mode 5 (the sixth) (balance-tlb) selects a slave for transmission based on each slave's load, and uses the slave whose turn it is for reception. Mode 6 (the seventh physical NIC bonding mode) (balance-alb) primarily handles received load through ARP negotiation in the IPv4 context. The driver of this policy intercepts ARP channel association requests sent by the local system and overwrites the original address of the slave device with the hardware address of one of the devices. This embodiment can implement different aggregation methods and load balancing strategies through different physical NIC bonding modes.

[0082] It should be further explained that the switch port adjustment method described above may also include: detecting the port data flow volume of each physical switch and physical network interface card; determining as a target port a port whose port data flow volume exceeds the maximum port data flow volume; utilizing load balancing technology to distribute the target port's flow volume to network interfaces whose port data flow volume does not exceed the maximum port data flow volume; or determining to add a new physical network interface card and utilizing the new physical network interface card to handle the flow volume. This embodiment may also provide a timely alert when a port exceeds the maximum port data flow volume. This embodiment may utilize professional network monitoring tools or software to monitor the port data flow volume of each physical switch and physical network interface card in real time, and determine which ports' data flow volume exceeds the threshold based on a preset maximum port data flow volume threshold. For ports exceeding the maximum port data flow volume, two measures may be taken: first, utilizing load balancing technology to distribute the target port's flow volume to other network interfaces whose port data flow volume does not exceed the maximum port data flow volume; second, adding a new physical network interface card to handle the flow volume. This method can effectively address network congestion and latency issues and improve network performance and stability. By monitoring and managing port data flow volume in real time, potential issues can be promptly identified and addressed.

[0083] It should be further explained that the above-mentioned physical switch port adjustment method, after determining the physical network card corresponding to the physical switch based on the physical switch information and maintaining the maximum transmission unit value of the data packets of the physical network card corresponding to the physical switch consistent with the adjusted maximum transmission unit value of the data packets of the physical switch, may further include: receiving communication traffic from the current physical network card, performing security checks on the communication traffic using a traffic detection method, determining the traffic detection results, and when the traffic detection results indicate the presence of attack traffic, obtaining logs related to the attack traffic, creating an attack profile based on the logs, identifying the attack source, determining the attack target based on the logs, and maintaining the physical hosts, physical switches, and virtual switches on the virtualization platform based on the attack targets. This embodiment receives communication traffic from the current physical network card using professional network monitoring tools or software. Then, using the traffic detection method, performing security checks on the communication traffic to determine whether attack traffic exists. If attack traffic exists, obtaining logs related to the attack traffic, and creating an attack profile based on the logs. The attack profile can identify the attack source and determine the attack target. Finally, based on the attack target, maintaining the physical hosts, physical switches, and virtual switches on the virtualization platform to repair vulnerabilities and prevent further attacks. This invention can effectively improve network security and stability. By real-time monitoring and management of physical network card communication traffic and performing security checks, potential security issues can be promptly identified and measures taken to address them. At the same time, log analysis and attack profiling can be used to accurately identify attack sources and targets, allowing targeted protective measures to be taken. Furthermore, maintaining the physical hosts, physical switches, and virtual switches on the virtualization platform can further improve network performance and security.

[0084] A physical switch port adjustment method provided by an embodiment of the present invention may include: S101, determining a physical host, a physical switch, and a virtual switch in a virtualization platform; wherein the physical network card of the physical host is associated with the virtual switch as an uplink; creating a virtual machine and a virtual network card in the physical host, and the network used by the virtual network card is the virtual local area network under the physical switch; S102, receiving a port adjustment message through the physical network card, and determining the physical switch information corresponding to each physical network card according to the port adjustment message; wherein the physical switch information is information for determining the correspondence between the physical network card and the physical switch port; S103, determining the port mode type corresponding to the physical switch according to the set virtual local area network under the virtual switch, and adjusting the port of the physical switch according to the port mode type; S104, adjusting the maximum transmission unit value of the data packet of the physical switch port according to the maximum transmission unit value of the port data packet of the set virtual switch; S105, determining the physical network card corresponding to the physical switch based on the physical switch information, and keeping the maximum transmission unit value of the data packet of the physical network card corresponding to the physical switch consistent with the maximum transmission unit value of the adjusted physical switch data packet. The embodiment of the present invention uses a virtualization platform to link the physical switch, virtual switch and physical host. The physical switch and physical network card configuration required by the virtual switch created by the virtualization platform can be automatically identified and configured, reducing the occurrence of network communication anomalies caused by physical switch configuration problems.

[0085] In order to make the present invention easier to understand, please refer to Figure 2 , Figure 2 An example flow chart of a method for automatically adjusting physical switch ports on a virtualization platform provided by an embodiment of the present invention may specifically include:

[0086] S201: Create a physical host, a physical switch, and a virtual switch on a virtualization platform, and add a physical network card of the physical host as an uplink to the virtual switch.

[0087] For easier understanding, please refer to Figure 3 , Figure 3 A schematic diagram of a physical host, physical switch, and virtual switch deployment provided by an embodiment of the present invention, Figure 3, it can be seen that physical hosts A and B and the physical switch have been added to the virtualization platform. Physical host A has NIC 1 (physical NIC) and NIC 2, while physical host B has NIC 1 and NIC 2. NICs 1 and 2 on both hosts A and B are added to the virtual switch as uplinks. NIC 1 on physical host is connected to port eth-0-1 on the physical switch, and NIC 2 to port eth-0-2. NIC 1 on physical host is connected to port eth-0-3 on the physical switch, and NIC 2 to port eth-0-4. NICs 1 and 2 on physical host A are configured in Linux bond mode 4 (aggregation mode) on the virtual switch. NICs 1 and 2 on physical host B are configured in Linux bond mode 1 (active / standby mode) on the virtual switch, with NIC 1 serving as the active NIC.

[0088] S202: Create a VLAN network under the virtual switch, and create a virtual machine and a virtual network card in the physical host. The network used by the virtual network card is the VLAN network under the virtual switch.

[0089] S203: Receive LLDP messages through the physical network card, confirm the name, port number, and maximum transmission unit value of the physical switch connected to each physical network card, and create a database table to record in the platform database.

[0090] The database table in this embodiment may be in the form of Table 1, which is a database table provided by an embodiment of the present invention.

[0091] Table 1 A database table

[0092]

[0093] S204: Determine the physical switch and port number corresponding to the physical network card according to the recorded database table.

[0094] S205, obtaining the VLAN network ID under the created virtual switch, calling the physical switch background command, changing the port mode of the corresponding physical switch to the TRUNK type, and allowing the VLAN ID to pass.

[0095] Specific modifications to this embodiment, such as Figure 3As shown in the figure, the virtual switch is configured with an MTU value of 1800 and a VLAN network with VLAN ID 20. The virtualization platform identifies that the bonding mode of NIC 1 / 2 on host A under the virtual switch is mode 4 and determines that port aggregation on the physical switch is required. It calls a command to add ports eth-0-1 and eth-0-2 to the aggregation group agg1. The bonding mode of NIC 1 / on host B is determined to be mode 1, so aggregation is not required and no task is triggered. The virtualization platform identifies that the virtual switch MTU is 1800 and calls the physical switch command to change the MTU of the agg1 aggregation group to 1800 and the MTU of eth-0-3 and eth-0-4 to 1800. The virtualization platform also calls the host command to synchronously change the MTU of network adapters 1 / 2 of host A and 1 / 2 of host B to 1800. The virtualization platform identifies the service network with VLAN ID 20 created on the virtual switch and configures the port mode of the agg1 aggregation group, eth-0-3, and eth-0-4 on the physical switch to trunk, allowing VLAN 20 to pass.

[0096] S206: Obtain the maximum transmission unit value of the data packet of the created virtual switch, and call a host command to keep the maximum transmission unit value of the data packet of the physical network card consistent with the maximum transmission unit value of the data packet of the virtual switch.

[0097] S207: When it is determined that the uplink is in a multi-network card bonding mode, a corresponding port aggregation group is created according to the bonding mode.

[0098] The multi-NIC bonding mode in this embodiment corresponds to the physical NIC bonding mode mentioned above. For example, Linux bondmode4 requires configuring a port aggregation group on the physical switch side. This embodiment can also use the virtualization platform to sense the traffic of each physical switch port and respond to the physical machine NIC corresponding to the port with higher traffic. For example, in Figure 3 As shown in the figure, this embodiment performs a high-traffic stress test on two virtual machines. Because the network card of host B is in active-standby mode, the bandwidth of network card 1 of host B will be fully loaded. At this time, the platform detects that the traffic load of physical switch port eth-0-3 has reached 90% of the network card's maximum transmission value, triggering an excessive pressure alarm for network card 1 of host B. This embodiment can be horizontally expanded based on the resource usage of physical devices, without the need to frequently add physical devices.

[0099] The embodiment of the present invention links the physical switch to make automatic configuration from aspects such as virtual switch configuration VLAN network, physical network card binding mode, MTU configuration, etc., so that the physical switch network can flexibly adapt to virtualized network resources.

[0100] The switch port adjustment device provided by an embodiment of the present invention is introduced below. The switch port adjustment device described below and the switch port adjustment method described above can be referenced to each other.

[0101] Figure 4 A schematic structural diagram of a switch port adjustment device provided in an embodiment of the present invention may include:

[0102] The virtual node determination module 100 is configured to determine a physical host, a physical switch, and a virtual switch in a virtualization platform; wherein the physical network card of the physical host is associated with the virtual switch as an uplink; and a virtual machine and a virtual network card are created within the physical host, wherein the network used by the virtual network card is a virtual local area network (VLAN) under the physical switch.

[0103] A physical switch information determination module 200 is configured to receive a port adjustment message through the physical network card and determine the physical switch information corresponding to each physical network card according to the port adjustment message; wherein the physical switch information is information that determines the correspondence between the physical network card and the physical switch port;

[0104] The port mode type determination module 300 is used to determine the port mode type corresponding to the physical switch according to the virtual local area network under the set virtual switch, and adjust the port of the physical switch according to the port mode type;

[0105] The maximum transmission unit value adjustment module 400 is used to adjust the maximum transmission unit value of the data packet of the physical switch port according to the set maximum transmission unit value of the port data packet of the virtual switch;

[0106] The physical network card information setting module 500 is used to determine the physical network card corresponding to the physical switch based on the physical switch information, and keep the maximum transmission unit value of the data packet of the physical network card corresponding to the physical switch consistent with the adjusted maximum transmission unit value of the data packet of the physical switch.

[0107] Furthermore, based on the above embodiment, the physical switch information includes the physical switch name, the physical switch port number, the maximum transmission unit value of the physical switch port data packet, and the corresponding physical host name and physical network card name;

[0108] Accordingly, the switch port adjustment device may further include:

[0109] The connection module is used to determine the physical switch name and the physical switch port number corresponding to the physical network card according to the physical switch information, so as to connect the physical switch with the corresponding physical network card.

[0110] Further, based on any of the above embodiments, the port mode type determination module 300 may include:

[0111] A first mode determining unit is configured to determine, if a virtual network card is connected to a virtual local area network, that the port mode type corresponding to the physical switch is a first mode; wherein the first mode is a mode for carrying a virtual local area network data flow;

[0112] The second mode determining unit is configured to determine that the port mode type corresponding to the physical switch is a second mode if multiple virtual network cards are connected to the same virtual local area network; wherein the second mode is a mode for carrying multiple virtual local area network data flows.

[0113] Furthermore, based on any of the above embodiments, the switch port adjustment device may further include:

[0114] A physical network card binding mode determination module, configured to identify the physical network card binding mode of the physical host under the virtual switch;

[0115] The aggregation mode determining module is used to determine the aggregation mode of the physical switch according to the physical network card binding mode.

[0116] Furthermore, based on the above embodiment, the aggregation mode determination module may include:

[0117] a first physical network card binding mode implementation unit, configured to, when the physical network card binding mode is the first physical network card binding mode, determine that the aggregation mode of the physical switch is aggregation forced non-negotiation; wherein the physical network card binding mode is a load sharing rotation mode, and the first aggregation forced non-negotiation is a mode of forming an aggregate link by bundling multiple physical ports together when negotiation is not used;

[0118] A second physical network card binding mode implementation unit is configured to determine that the aggregation mode of the physical switch is a bundling mode when the physical network card binding mode is the second physical network card binding mode; wherein the second physical network card binding mode is an active / standby mode;

[0119] a third physical network card binding mode implementation unit, configured to, when the physical network card binding mode is the third physical network card binding mode, determine that the aggregation mode of the physical switch is an aggregation forced non-negotiation mode based on a hash transmission strategy; wherein the third physical network card binding mode is a method of using an exclusive OR operation to generate a hash value for load balancing;

[0120] a fourth physical network card binding mode implementation unit, configured to, when the physical network card binding mode is the fourth physical network card binding mode, determine that the aggregation mode of the physical switch is an aggregation forced non-negotiation mode under a redundancy mechanism; wherein the fourth physical network card binding mode is that all data packets are broadcast from all interfaces;

[0121] a fifth physical network card binding mode implementation unit, configured to, when the physical network card binding mode is the fifth physical network card binding mode, determine that the aggregation mode of the physical switch is an aggregation mode based on the link aggregation control protocol; wherein, the fifth physical network card binding mode supports a mode of the IEEE802.3ad protocol;

[0122] a sixth physical network card binding mode implementation unit, configured to, when the physical network card binding mode is the sixth physical network card binding mode, determine that the aggregation mode of the physical switch is a mode based on a load balancing algorithm;

[0123] The seventh physical network card binding mode implementation unit is configured to, when the physical network card binding mode is the seventh physical network card binding mode, determine that the aggregation mode of the physical switch is a mode based on an address load balancing algorithm.

[0124] Furthermore, based on any of the above embodiments, the switch port adjustment device may further include:

[0125] Traffic detection module, used to detect the port data traffic size of each physical switch and physical network card;

[0126] A judgment module, configured to determine a port whose port data flow rate is greater than a maximum port data flow rate as a target port;

[0127] A load balancing module, configured to distribute the traffic of the target port to a network card whose traffic is not greater than the maximum port data traffic by using load balancing technology;

[0128] Add a physical network card module, used to determine or add a new physical network card, and use the new physical network card to handle traffic.

[0129] Furthermore, based on any of the above embodiments, the switch port adjustment device may further include:

[0130] A virtualization module, configured to set a first physical network card and a second physical network card on a first physical host of the virtualization platform, and set a third physical network card and a fourth physical network card on a second physical host;

[0131] an uplink determining module, configured to add the first physical network card, the second physical network card, the third physical network card, and the fourth physical network card as uplinks to the virtual switch;

[0132] a network card connection module, configured to connect the first physical network card to the first port of the physical switch, connect the second physical network card to the second physical network card of the physical switch, connect the third physical network card to the third port of the physical switch, and connect the fourth physical network card to the fourth physical network card of the physical switch;

[0133] An aggregation mode setting module, configured to determine an aggregation mode setting for the first physical network card and the second physical network card on the first physical host on the virtual switch;

[0134] The active / standby mode setting module is configured to determine active / standby mode settings for the third physical network card and the fourth physical network card on the virtual switch.

[0135] It should be noted that the order of the modules and units in the above switch port adjustment device can be changed without affecting the logic.

[0136] Figure 4 The description of the features in the corresponding embodiment can be found in Figure 4 The relevant descriptions of the corresponding embodiments will not be repeated here one by one.

[0137] The switch port adjustment device provided by an embodiment of the present invention may include: a virtual node determination module 100, configured to determine a physical host, a physical switch, and a virtual switch in a virtualization platform; wherein a physical network card of the physical host is associated with the virtual switch as an uplink; creating a virtual machine and a virtual network card within the physical host, wherein the network used by the virtual network card is a virtual local area network under the physical switch; a physical switch information determination module 200, configured to receive a port adjustment message through the physical network card and determine physical switch information corresponding to each physical network card based on the port adjustment message; wherein the physical switch information is information that determines the correspondence between the physical network card and the physical switch port; The port mode type determination module 300 is used to determine the port mode type corresponding to the physical switch based on the virtual local area network under the set virtual switch, and adjust the port of the physical switch according to the port mode type; the maximum transmission unit value adjustment module 400 is used to adjust the maximum transmission unit value of the data packet of the physical switch port according to the maximum transmission unit value of the port data packet of the set virtual switch; the physical network card information setting module 500 is used to determine the physical network card corresponding to the physical switch based on the physical switch information, and keep the maximum transmission unit value of the data packet of the physical network card corresponding to the physical switch consistent with the maximum transmission unit value of the data packet of the physical switch after adjustment. The embodiment of the present invention uses a virtualization platform to link the physical switch, the virtual switch and the physical host. The physical switch and physical network card configuration required for the virtual switch created by the virtualization platform can be automatically identified and configured, reducing the occurrence of network communication anomalies caused by physical switch configuration problems.

[0138] A physical switch port adjustment device provided by an embodiment of the present invention is introduced below. The physical switch port adjustment device described below and the physical switch port adjustment method described above can refer to each other.

[0139] Figure 5 A schematic diagram of a physical switch port adjustment structure provided by an embodiment of the present invention is shown as follows: Figure 5 As shown, the physical switch port adjustment device includes: a memory 60 for storing a computer program;

[0140] The processor 61 is configured to implement the steps of the physical switch port adjustment method of the above embodiment when executing a computer program.

[0141] The physical switch port adjustment device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer, or a desktop computer.

[0142] The processor 61 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 61 may be implemented using at least one of the following hardware forms: a digital signal processing (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor 61 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 61 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing content required to be displayed on the display screen. In some embodiments, the processor 61 may also include an artificial intelligence (AI) processor for handling computational operations related to machine learning.

[0143] The memory 60 may include one or more computer-readable storage media, which may be non-transitory. The memory 60 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 60 is at least used to store the following computer program 601, wherein, after the computer program is loaded and executed by the processor 61, it can implement the relevant steps of the XXXXXX method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 60 may also include an operating system 602 and data 603, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 602 may include Windows, Unix, Linux, etc. The data 603 may include but is not limited to physical switch port adjustment data, etc.

[0144] In some embodiments, the physical switch port adjustment device may further include a display screen 62 , an input / output interface 63 , a communication interface 64 , a power supply 65 , and a communication bus 66 .

[0145] Those skilled in the art will understand that Figure 5 The structure shown in the figure does not constitute a limitation on the physical switch port adjustment device, and may include more or fewer components than shown in the figure.

[0146] It is understood that if the physical switch port adjustment method in the above-mentioned embodiment is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the current technology, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the various embodiments of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), an electrically erasable programmable ROM, a register, a hard drive, a removable disk, a CD-ROM, a magnetic disk, or an optical disk.

[0147] Based on this, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned physical switch port adjustment method are implemented.

[0148] Based on this, an embodiment of the present invention further provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned physical switch port adjustment method when executed by a processor.

[0149] The above describes in detail the switch port adjustment method, apparatus, device, and readable storage medium provided by the embodiments of the present invention. The various embodiments are described in a progressive manner throughout this specification, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between the various embodiments can be referenced for reference. The apparatus disclosed in the embodiments corresponds to the method disclosed in the embodiments, so the description is relatively brief. For relevant details, refer to the method description.

[0150] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0151] The above describes in detail the switch port adjustment method, apparatus, device, and readable storage medium provided by the present invention. This document uses specific examples to illustrate the principles and implementation methods of the present invention. The above examples are intended only to facilitate understanding of the method and core concepts of the present invention. It should be noted that those skilled in the art will be able to make various improvements and modifications to the present invention without departing from the principles of the present invention, and such improvements and modifications fall within the scope of protection of the claims of the present invention.

Claims

1. A physical switch port adjustment method, characterized in that: include: Determine a physical host, a physical switch, and a virtual switch in a virtualization platform; wherein a physical network card of the physical host is associated with the virtual switch as an uplink; create a virtual machine and a virtual network card in the physical host, wherein the network used by the virtual network card is a virtual local area network under the physical switch; Receiving a port adjustment message through the physical network card, and determining physical switch information corresponding to each physical network card according to the port adjustment message; wherein the physical switch information is information that determines the correspondence between the physical network card and the physical switch port; Determine the port mode type corresponding to the physical switch according to the virtual local area network under the set virtual switch, and adjust the port of the physical switch according to the port mode type; Adjusting the maximum transmission unit value of the data packet of the physical switch port according to the set maximum transmission unit value of the port data packet of the virtual switch; A physical network card corresponding to the physical switch is determined based on the physical switch information, and a maximum transmission unit value of a data packet of the physical network card corresponding to the physical switch is kept consistent with the adjusted maximum transmission unit value of the data packet of the physical switch.

2. The switch port adjustment method according to claim 1, wherein: The physical switch information includes the physical switch name, physical switch port number, maximum transmission unit value of the physical switch port data packet, and the corresponding physical host name and physical network card name; Accordingly, the switch port adjustment method further includes: The physical switch name and the physical switch port number corresponding to the physical network card are determined according to the physical switch information, so as to connect the physical switch to the corresponding physical network card.

3. The switch port adjustment method according to claim 1, wherein: The step of determining the port mode type corresponding to the physical switch according to the virtual local area network under the set virtual switch includes: If a virtual network card is connected to a virtual local area network, determining that the port mode type corresponding to the physical switch is a first mode; wherein the first mode is a mode for carrying a virtual local area network data flow; If multiple virtual network cards are connected to the same virtual local area network, it is determined that the port mode type corresponding to the physical switch is a second mode; wherein the second mode is a mode for carrying multiple virtual local area network data flows.

4. The switch port adjustment method according to claim 1, wherein: The switch port adjustment method further includes: Identify the physical network card binding mode of the physical host under the virtual switch; The aggregation mode of the physical switch is determined according to the physical network card binding mode.

5. The switch port adjustment method according to claim 4, characterized in that: Determining the aggregation mode of the physical switch according to the physical network card bonding mode includes: When the physical network card binding mode is the first physical network card binding mode, determining that the aggregation mode of the physical switch is aggregation forced non-negotiation; wherein the physical network card binding mode is a load sharing rotation mode, and the first aggregation forced non-negotiation is a mode of forming an aggregate link by bundling multiple physical ports together without using negotiation; When the physical network card binding mode is the second physical network card binding mode, determining that the aggregation mode of the physical switch is a bundling mode; wherein the second physical network card binding mode is an active / standby mode; When the physical network card binding mode is the third physical network card binding mode, determining that the aggregation mode of the physical switch is an aggregation forced non-negotiation mode based on a hash transmission strategy; wherein the third physical network card binding mode is a method of using an exclusive OR operation to generate a hash value for load balancing; When the physical network card binding mode is the fourth physical network card binding mode, determining that the aggregation mode of the physical switch is an aggregation forced non-negotiation mode under a redundancy mechanism; wherein the fourth physical network card binding mode is that all data packets will be broadcast from all interfaces; When the physical network card binding mode is the fifth physical network card binding mode, determining that the aggregation mode of the physical switch is an aggregation mode based on the link aggregation control protocol; wherein the fifth physical network card binding mode supports the mode of the IEEE802.3ad protocol; When the physical network card binding mode is the sixth physical network card binding mode, determining that the aggregation mode of the physical switch is a mode based on a load balancing algorithm; When the physical network card binding mode is the seventh physical network card binding mode, the aggregation mode of the physical switch is determined to be a mode based on an address load balancing algorithm.

6. The switch port adjustment method according to claim 1, wherein: The switch port adjustment method further includes: Detect the port data flow size of each physical switch and physical network card; Determine a port whose port data flow rate is greater than the maximum port data flow rate as a target port; Using load balancing technology to distribute the traffic of the target port to the network card whose data traffic is not greater than the maximum port data traffic; Alternatively, it is determined to add a new physical network card, and use the new physical network card to undertake the traffic.

7. The switch port adjustment method according to claim 1, characterized in that: Before determining the physical host, physical switch, and virtual switch in the virtualization platform, the method further includes: Setting a first physical network card and a second physical network card on a first physical host of a virtualization platform, and setting a third physical network card and a fourth physical network card on a second physical host; Adding the first physical network card, the second physical network card, the third physical network card, and the fourth physical network card as uplinks to the virtual switch; Connecting the first physical network card to the first port of the physical switch, connecting the second physical network card to the second physical network card of the physical switch, connecting the third physical network card to the third port of the physical switch, and connecting the fourth physical network card to the fourth physical network card of the physical switch; Determine setting of aggregation mode for the first physical network card and the second physical network card on the first physical host on the virtual switch; Determine to set the third physical network card and the fourth physical network card in an active / standby mode on the virtual switch.

8. A physical switch port adjustment device, characterized in that: include: A virtual node determination module is configured to determine a physical host, a physical switch, and a virtual switch in a virtualization platform; wherein the physical network card of the physical host is associated with the virtual switch as an uplink; and a virtual machine and a virtual network card are created within the physical host, wherein the network used by the virtual network card is a virtual local area network under the physical switch. a physical switch information determination module, configured to receive a port adjustment message through the physical network card, and determine the physical switch information corresponding to each physical network card according to the port adjustment message; wherein the physical switch information is information determining the correspondence between the physical network card and the physical switch port; A port mode type determination module is used to determine the port mode type corresponding to the physical switch according to the virtual local area network under the set virtual switch, and adjust the port of the physical switch according to the port mode type; A maximum transmission unit value adjustment module, configured to adjust the maximum transmission unit value of the data packet of the physical switch port according to the set maximum transmission unit value of the port data packet of the virtual switch; The physical network card information setting module is used to determine the physical network card corresponding to the physical switch based on the physical switch information, and keep the maximum transmission unit value of the data packet of the physical network card corresponding to the physical switch consistent with the adjusted maximum transmission unit value of the data packet of the physical switch.

9. A physical switch port adjustment device, characterized in that: include: memory for storing computer programs; A processor is configured to execute the computer program to implement the steps of the physical switch port adjustment method according to any one of claims 1 to 7.

10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the physical switch port adjustment method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Techniques and system for operating virtual switches in a virtualized computing environment

    CN102821021A

  • Port state configuration method and network equipment

    CN110719219A