Switch port adjustment method, device and equipment and readable storage medium
The method automates physical switch port configuration in virtualization platforms, addressing manual configuration challenges and enhancing network stability and flexibility by using LLDP messages and optimizing switch settings.
Patent Information
- Application Number
- CN202411375057.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-09-29
AI Technical Summary
Existing virtualization platforms require manual, expert planning of physical switch port configurations, which cannot be dynamically adjusted, leading to potential network anomalies when virtual machines use VLAN networks.
A method and device for automatically configuring physical switch ports by determining physical hosts, switches, and virtual switches, using LLDP messages to identify switch information, adjusting port modes and MTU values, and optimizing aggregation modes to ensure consistent network card configurations.
This approach reduces network communication anomalies by enabling automatic identification and configuration of physical switch settings, improving network stability and flexibility in virtualized environments.
Smart Images

Figure CN119135637A_ABST
Abstract
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] The VLAN (Virtual Local Area Network) network created by the virtual switch needs to cooperate with the port of the physical switch to communicate normally. If the physical switch port is configured incorrectly, it will cause abnormal cross-host communication when the virtual machine uses the VLAN network. Therefore, experienced network engineers are required to plan the layout of virtual and physical network topologies in advance, which cannot be changed at any time. The existing virtualization platform manages 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 technical personnel in this field need to solve urgently. Summary of the invention
[0004] In view of this, an object of the present invention is to provide a switch port adjustment method, device, equipment and readable storage medium, which solves the technical problem that physical switch port configuration cannot be implemented in the prior art.
[0005] In order 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, and 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 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;
[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 port of the physical switch 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 maximum transmission unit value of the data packet of the physical switch after adjustment.
[0011] On the one hand, 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;
[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 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] On the one hand, 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 XOR operation to generate a hash value for load sharing;
[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 broadcasted 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 a link aggregation control protocol; wherein the fifth physical network card binding mode supports a 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] On the one hand, 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] Or decide 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, the physical switch and the virtual switch in the virtualization platform, the method further includes:
[0034] A first physical network card and a second physical network card are set on a first physical host of the virtualization platform, and a third physical network card and a fourth physical network card are set on the second physical host;
[0035] 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;
[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 to set the aggregation mode of 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 active / standby mode on the virtual switch.
[0039] The embodiment of the present invention further provides a physical switch port adjustment device, comprising:
[0040] A virtual node determination module is used 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; a virtual machine and a virtual network card are created in the physical host, and 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 for 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, 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;
[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 maximum transmission unit value of the data packet of the adjusted physical switch.
[0045] The embodiment of the present invention further provides a physical switch port adjustment device, including:
[0046] Memory for storing computer programs;
[0047] The processor is used 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, device, equipment and readable storage medium, which can solve the technical problem that the port of the physical switch cannot be configured.
[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 a 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, thereby 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 briefly introduces 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 paying 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 a physical switch port under a virtualization platform provided by an embodiment of the present invention;
[0056] Figure 3 A schematic diagram of a physical host, a physical switch and a virtual switch deployment provided by an embodiment of the present invention;
[0057] Figure 4 A schematic diagram of the structure of a switch port adjustment device provided by an embodiment of the present invention;
[0058] Figure 5 A structural schematic diagram of a physical switch port adjustment provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0060] The terms "including" and "having" in the specification of the present invention and the above-mentioned drawings, as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may include steps or units that are not listed.
[0061] The VLAN (Virtual Local Area Network) network created by the virtual switch needs to cooperate with the port of the physical switch to communicate normally. If the physical switch port is configured incorrectly, it will cause abnormal cross-host communication when the virtual machine uses the VLAN network. Therefore, experienced network engineers are required to plan the layout of virtual and physical network topologies in advance, which cannot be changed at any time. The existing virtualization platform manages physical switches for simple display and configuration.
[0062] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0063] Next, a flow chart of a physical switch port adjustment method provided by an embodiment of the present invention is described in detail. Figure 1 A physical switch port adjustment method provided by an embodiment of the present invention may include:
[0064] S101, determining 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 in the physical host, and the network used by the virtual network card is a virtual local area network under the physical switch.
[0065] The execution subject of this embodiment is an electronic device, and this embodiment does not limit the specific electronic device. For example, the electronic device in this embodiment can be a computer, or the electronic device in this embodiment can also be a virtual machine. The virtualization platform in this embodiment is a method of abstracting the hardware resources (such as CPU (central processing unit), memory, storage and network) of a physical computer using software technology to create multiple isolated virtual environments or virtual machines. Each virtual machine can run its own operating system and applications as if they were independent physical machines. This technology can maximize the use of hardware resources and improve the flexibility and efficiency of the system. 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 second layer (or even part of the third layer) network function of a physical switch by software. It allows communication between virtual machines (VMs) and between virtual machines and external networks. The physical network card is used as an uplink to connect the virtual switch to the external physical network. Create a virtual machine and a virtual network card in the physical host, and the virtual network card chooses to use 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 of 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 of 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, the physical switch and the virtual switch on the virtualization platform, which improves the accuracy of the setting of the physical host, the physical switch and the virtual switch.
[0067] It should be further explained that the above-mentioned physical switch information includes the physical switch name of the physical switch, 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; 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 according to the physical switch information, so as 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 naming method of the network interface. 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, receiving a port adjustment message through a 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 for determining a correspondence between a physical network card and a 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 main function of the LLDP message is to establish and maintain neighbor relationships between network devices so that they can recognize and exchange information with each other. By sending and receiving LLDP messages, devices can understand each other's existence, status, and capabilities, so as to work better together. For example, the LLDP message information in this embodiment can confirm the name, port number, and MTU value (Maximum Transmission Unit) of the physical switch to which each physical network card is connected.
[0070] S103, determining the port mode type corresponding to the physical switch according to the virtual local area network under the set virtual switch, and adjusting 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 modify it to the TRUNK type (a physical link for transmitting multiple VLAN (virtual local area network) data streams) and allow the VLAN id (to allow it to pass).
[0072] It should be further explained that, the above-mentioned determination of the port mode type corresponding to the physical switch according to 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, 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, 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, the port mode type corresponding to the physical switch should be the first mode. The first mode means that the port only carries the data flow of one virtual local area network. This means that in this mode, the port of the physical switch only allows data packets belonging to the VLAN to pass, thereby ensuring the security and isolation of the data. This mode is usually used in the case of a single VLAN to achieve simple management and security control of the network. When multiple virtual network cards are connected to the same virtual local area network, the port mode type corresponding to the physical switch should be the second mode. The second mode means that the port can carry data flows of multiple virtual local area networks. This means that in this mode, the port of the physical switch allows data packets of multiple VLANs to pass, thereby achieving communication and data exchange between different VLANs. This mode is usually used in scenarios where cross-VLAN communication is required to meet more complex network requirements. The first mode in this embodiment can be ACCESS mode, and the second mode can be TRUNK mode. ACCESS mode: also known as access mode, is a configuration method of the switch port. In ACCESS mode, the port can only belong to one VLAN (virtual local area network) and can only pass data frames of the 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 the user experience by setting different modes.
[0076] S104, adjusting the maximum transmission unit value of the data packet of the port of the physical switch 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 according to the physical network card binding mode. This embodiment can optimize the distribution and transmission path of network traffic by identifying the binding mode of the physical network card and adjusting the aggregation mode of the physical switch accordingly, thereby reducing network delay and improving 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 aggregated 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 by generating a hash value using an XOR operation; 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 redundant mechanism; wherein the fourth physical network card binding mode is that all data packets will be broadcasted 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 (first physical network card binding mode) Mode=0(balance-rr) indicates load sharing round-robin, which cooperates with the aggregation forced non-negotiation mode of the switch. Mode=1 (second physical network card binding mode) (active-backup) indicates active-standby mode, where only one network card is active (main) and the other is standby (backup). At this time, if the switch is equipped with bundling, it will not work properly because half of the packets sent by the switch to the two network cards are discarded. Mode=2 (third physical network card binding mode) (balance-xor) indicates XOR Hash load sharing, which cooperates with the aggregation forced non-negotiation mode of the switch. (xmit_hash_policy is required).Mode=3 (the fourth physical network card binding mode) (broadcast) means that all packets are sent from all interfaces. This is unbalanced, and there is only a redundancy mechanism... and the aggregation forced non-negotiation mode of the switch is coordinated. Mode=4 (the fifth) (802.3ad) means that the 802.3ad protocol is supported, and it cooperates with the aggregation LACP mode of the switch (xmit_hash_policy is required). Mode=5 (the sixth) (balance-tlb) selects the slave for sending according to the load of each slave, and uses the slave whose turn is currently when receiving. Mode=6 (the seventh physical network card binding mode) (balance-alb) In the case of IPV4, this strategy mainly processes the received load through ARP negotiation. The driver of this strategy intercepts the channel joint request sent by ARP in the local system, and uses one of the device hardware addresses to overwrite the original address of the slave device. This embodiment can achieve different aggregation methods and different load balancing strategies through different physical network card binding modes.
[0082] It should be further explained that the switch port adjustment method may also include: detecting the port data flow size of each physical switch and physical network card; determining the port whose port data flow size is greater than the maximum port data flow as the target port; using load balancing technology to distribute the flow of the target port to the network card whose data flow is not greater than the maximum port data flow; or determining to add a new physical network card, and using the new physical network card to undertake the flow. This embodiment can also issue a timely alarm when the port exceeds the maximum port data flow. This embodiment can monitor the port data flow of each physical switch and physical network card in real time through professional network monitoring tools or software, and determine which ports have exceeded the data flow threshold according to the preset maximum port data flow threshold. For these ports that exceed the maximum port data flow, two measures can be taken: one is to use load balancing technology to distribute the flow of the target port to other network cards that do not exceed the maximum port data flow; the other is to add a new physical network card to undertake the flow. This method can effectively solve network congestion and delay problems and improve network performance and stability. By real-time monitoring and management of port data flow, potential problems can be discovered in time and measures can be taken to solve them.
[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 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, can also include: receiving the communication traffic of the current physical network card, using the traffic detection method to perform security detection on the communication traffic, determining the traffic detection result, when the traffic detection result is that there is attack traffic, obtaining logs related to the attack traffic, performing attack profiling based on the logs, identifying the attack source, determining the attack target based on the logs, and maintaining the physical host, physical switch and virtual switch on the virtualization platform based on the attack target. This embodiment receives the communication traffic of the current physical network card through a professional network monitoring tool or software. Then, the communication traffic is security detected using the traffic detection method to determine whether there is attack traffic. If there is attack traffic, logs related to the attack traffic are obtained, and attack profiling is performed based on the logs. Through the attack profiling, the attack source can be identified and the attack target can be determined. Finally, the physical host, physical switch and virtual switch on the virtualization platform are maintained based on the attack target to repair vulnerabilities and prevent further attacks. The present invention can effectively improve the security and stability of the network. By real-time monitoring and management of the communication traffic of the physical network card and performing security detection, potential security issues can be discovered in a timely manner and measures can be taken to deal with them. At the same time, log analysis and attack profiling can be used to accurately identify the attack source and determine the attack target so as to take targeted protective measures. In addition, maintenance of the physical host, physical switch and virtual switch on the virtualization platform can further improve the performance and security of the network.
[0084] A method for adjusting a physical switch port 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 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 in the physical host, and the network used by the virtual network card is a virtual local area network under the physical switch; S102, 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 for determining the correspondence between the physical network card and the physical switch port; S103, determining a port mode type corresponding to the physical switch according to the virtual local area network under the set virtual switch, and adjusting the port of the physical switch according to the port mode type; S104, adjusting the maximum transmission unit value of a 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 a 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, the virtual switch and the physical host. The physical switch and the physical network card configuration required for the virtual switch created by the virtualization platform can be automatically identified and configured, thereby 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 a physical switch port under a virtualization platform provided by an embodiment of the present invention may specifically include:
[0086] S201, creating a physical host, a physical switch and a virtual switch on a virtualization platform, and adding 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, a physical switch, and a virtual switch deployment provided by an embodiment of the present invention, from Figure 3, it can be seen that physical hosts A / B and physical switches have been added to the virtualization platform. Physical host A has NIC 1 (physical NIC) and NIC 2, and physical host B has NIC 1 and NIC 2. NIC 1 and NIC 2 of physical hosts A and B are added to the virtual switch as uplinks. Physical host NIC 1 is connected to the physical switch eth-0-1 port, and NIC 2 is connected to the eth-0-2 port. Physical host NIC 1 is connected to the physical switch eth-0-3 port, and NIC 2 is connected to the eth-0-4 port. NIC 1 and NIC 2 on physical host A are in Linux bond mode 4 (aggregation mode) on the virtual switch. NIC 1 and NIC 2 on physical host B are in Linux bond mode 1 (active / standby mode) on the virtual switch. NIC 1 is the active NIC.
[0088] S202, creating a VLAN network under the virtual switch, creating a virtual machine and a virtual network card in the physical host, wherein the network used by the virtual network card is the VLAN network under the virtual switch.
[0089] S203, receiving LLDP messages through the physical network card, confirming the name, port number, and maximum transmission unit value of the physical switch connected to each physical network card, and establishing 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, determining the physical switch and port number corresponding to the physical network card according to the recorded database table.
[0094] S205, obtaining the id of the VLAN network 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] The specific modifications of this embodiment are as follows: Figure 3As shown in the figure, the virtual switch is configured with an mtu value of 1800, and a VLAN network with a VLAN ID of 20 is created. The virtualization platform identifies that the binding mode of the network card 1 / 2 of host A under the virtual switch is mode4, and determines that port aggregation configuration on the physical switch side is required. The command is called to add ports eth-0-1 and eth-0-2 to the agg1 aggregation group; it is determined that the binding mode of the network card 1 / on host B is mode1, and aggregation is not required, and no task is triggered. The virtualization platform recognizes that the mtu of the virtual switch is 1800, calls the physical switch command to change the mtu of the agg1 aggregation group to 1800, and changes the mtu of eth-0-3 and eth-0-4 to 1800; calls the host command to synchronously change the mtu of host A's network card 1 / 2 and host B's network card 1 / 2 to 1800. The virtualization platform recognizes that the service network with VLAN ID 20 has been created under the virtual switch. After judgment, it configures the port mode of the agg1 aggregation group, eth-0-3, and eth-0-4 under the physical switch to trunk, and allows VLAN 20 to pass.
[0096] S206, obtaining the maximum transmission unit value of the data packet of the created virtual switch, and calling the 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-NIC binding mode, a corresponding port aggregation group is created according to the binding mode.
[0098] The multi-NIC bonding mode in this embodiment corresponds to the physical NIC bonding mode described above. For example, Linux bondmode4 requires the configuration of 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 In the figure shown, this embodiment performs a large traffic stress test on two virtual machines. Since 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 maximum transmission value of the network card, triggering an alarm for excessive pressure on network card 1 of host B. This embodiment can perform horizontal expansion according to 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 VLAN network configuration of the virtual switch, physical network card binding mode, and MTU configuration, so that the physical switch network can flexibly adapt to virtualized network resources.
[0100] The switch port adjustment device provided by the 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 referred to each other.
[0101] Figure 4 A schematic diagram of the structure of a switch port adjustment device provided by an embodiment of the present invention may include:
[0102] The virtual node determination module 100 is used to determine the physical host, physical switch and virtual switch in the virtualization platform; wherein the physical network card of the physical host is associated with the virtual switch as an uplink; a virtual machine and a virtual network card are created in the physical host, and the network used by the virtual network card is a virtual local area network under the physical switch;
[0103] The physical switch information determination module 200 is used to receive the 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 for determining 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 port of the physical switch according to the maximum transmission unit value of the port data packet of the set 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] Further, based on the above embodiment, the physical switch information includes a physical switch name, a physical switch port number, a maximum transmission unit value of a physical switch port data packet, and a corresponding physical host name and a physical network card name;
[0108] Correspondingly, 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 determination unit is used to determine that the port mode type corresponding to the physical switch is a first mode if a virtual network card is connected to a virtual local area network; wherein the first mode is a mode for carrying a virtual local area network data flow;
[0112] The second mode determination unit is used 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] Further, based on any of the above embodiments, the switch port adjustment device may further include:
[0114] A physical network card binding mode determination module, used to identify the physical network card binding mode of the physical host under the virtual switch;
[0115] The aggregation mode determination module is used to determine the aggregation mode of the physical switch according to the physical network card binding mode.
[0116] Further, based on the above embodiment, the above aggregation mode determination module may include:
[0117] A first physical network card binding mode implementation unit, configured to determine that the aggregation mode of the physical switch is aggregation forced non-negotiation when the physical network card binding mode is the first physical network card binding mode; 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 when no negotiation is used;
[0118] A second physical network card binding mode implementation unit is used to determine that the aggregation mode of the physical switch is a bundling mode when the physical network card binding mode is a 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 determine that the aggregation mode of the physical switch is an aggregation forced non-negotiation mode based on a hash transmission strategy when the physical network card binding mode is the third physical network card binding mode; wherein the third physical network card binding mode is a method for load sharing by using an XOR operation to generate a hash value;
[0120] A fourth physical network card binding mode implementation unit, used for determining that the aggregation mode of the physical switch is an aggregation forced non-negotiation mode under a redundancy mechanism when the physical network card binding mode is the fourth physical network card binding mode; wherein the fourth physical network card binding mode is that all data packets will be broadcasted from all interfaces;
[0121] A fifth physical network card binding mode implementation unit, used for determining that the aggregation mode of the physical switch is an aggregation mode based on the link aggregation control protocol when the physical network card binding mode is the fifth physical network card binding mode; 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 determine 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 sixth physical network card binding mode;
[0123] The seventh physical network card binding mode implementation unit is used to determine that the aggregation mode of the physical switch is a mode based on an address load balancing algorithm when the physical network card binding mode is the seventh physical network card binding mode.
[0124] Further, based on any of the above embodiments, the switch port adjustment device may further include:
[0125] A flow detection module is used to detect the port data flow size of each physical switch and physical network card;
[0126] A judgment module, used for determining 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, used to distribute the traffic of the target port to the network card whose data 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] Further, based on any of the above embodiments, the switch port adjustment device may further include:
[0130] A virtualization module, used to set a first physical network card and a second physical network card on a first physical host of a virtualization platform, and to set a third physical network card and a fourth physical network card on a second physical host;
[0131] An uplink determination 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, used 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, used to determine the setting of the aggregation mode of 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 used to determine the 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 switch port adjustment device can be changed without affecting the logic.
[0136] Figure 4 The description of the features in the corresponding embodiments 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 the embodiment of the present invention may include: a virtual node determination module 100, which is used 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; a virtual machine and a virtual network card are created in the physical host, and 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, which is used 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 for determining 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 according to the virtual LAN 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 port of the physical switch 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 adjusted physical switch data packet. The embodiment of the present invention uses a virtualization platform to link the physical switch, the virtual switch and the physical host, 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 abnormalities 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 be referred to each other.
[0139] Figure 5 A schematic diagram of a physical switch port adjustment structure provided by an embodiment of the present invention, such as 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] Among them, the processor 61 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 61 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and 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), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 61 may also include an artificial intelligence (AI) processor, which is used to process computing 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. 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 and 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 less components than shown in the figure.
[0146] It is understandable that if the physical switch port adjustment method in the above embodiment is implemented in the form of 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 is essentially or the part that contributes to the current technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, magnetic disk or optical disk and other media that can store program codes.
[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 is a detailed introduction to a switch port adjustment method, device, equipment and readable storage medium provided by an embodiment of the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part 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 composition and steps of each example have been generally described in the above description according to function. 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 to be beyond the scope of the present invention.
[0151] The above is a detailed introduction to a switch port adjustment method, device, equipment and readable storage medium provided by the present invention. This article uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.
Claims
1. A method for adjusting a physical switch port, 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, and 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 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; 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 port of the physical switch 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 maximum transmission unit value of the data packet of the physical switch after adjustment.
2. The switch port adjustment method according to claim 1, characterized in that: 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; 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 to connect the physical switch to the corresponding physical network card.
3. The switch port adjustment method according to claim 1, characterized in that: 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, characterized in that: 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 binding 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 XOR operation to generate a hash value for load sharing; 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 broadcasted 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 a link aggregation control protocol; wherein the fifth physical network card binding mode supports a 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, characterized in that: 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, the physical switch and the virtual switch in the virtualization platform, the method further includes: A first physical network card and a second physical network card are set on a first physical host of the virtualization platform, and a third physical network card and a fourth physical network card are set on the second physical host; 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; 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 to set the aggregation mode of 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 active / standby mode on the virtual switch.
8. A physical switch port adjustment device, characterized in that: include: A virtual node determination module is used 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; a virtual machine and a virtual network card are created in the physical host, and 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 for 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, 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; 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 maximum transmission unit value of the data packet of the adjusted physical switch.
9. A physical switch port adjustment device, characterized in that: include: Memory for storing computer programs; A processor, 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
Preventing Leaks Among Private Virtual Local Area Network Ports Due to Configuration Changes in a Headless Mode
US20130301425A1
Method, apparatus and system for transmitting data
US20210120076A1
