A port configuration method and device applied to an SDN network
By obtaining the operation instructions of the SDN controller in the SDN network and configuring the ports of the secondary leaf switches to match VLANs, the broadcast storm problem is solved, and the stability and efficiency of network communication are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA MOBILE GROUP SICHUAN
- Filing Date
- 2022-05-07
- Publication Date
- 2026-05-29
AI Technical Summary
In SDN networks, frequent broadcast messages can cause broadcast storms, affecting the normal operation of server network cards and virtual switches, and may even cause server crashes, threatening the normal operation of network communication.
By obtaining the operation instructions from the SDN controller, the physical server identifier of the target virtual machine is determined, and the port of the target virtual machine is configured on the second-level leaf switch to ensure that the VLAN configuration between the second-level leaf switch and the server matches, thus avoiding the arbitrary forwarding of broadcast messages.
This effectively avoids broadcast storms, protects the server's network interface card and virtual switch from broadcast impacts, and ensures the stability and efficiency of network communication.
Smart Images

Figure CN117061460B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communications, and more particularly to a port configuration method and apparatus for SDN networks. Background Technology
[0002] With the advent of the 5G (5th Generation Mobile Communication Technology) era and the transformation of network informatization, the deployment of service network elements is evolving from traditional specialized hardware to cloud-based Network Functions Virtualization (NFV). To enable the elastic deployment of cloud-based NFV, Software Defined Networking (SDN) technology needs to achieve automated deployment of cloud networks. SDN controllers provide orchestration and forwarding control services for physical switches / routers or virtual switches connected to computing nodes, enabling service translation from the cloud network to the underlying network and guiding forwarding devices to perform traffic forwarding. Within the cloud resource pool, they are critical network components.
[0003] In existing SDN networks, when a broadcast message is sent from the network side or the virtual machine side, because each physical port has a corresponding Virtual Local Area Network (VLAN) sub-port, the broadcast message will be broadcast on all ports of the switch backplane / secondary LEAF (leaf switch). If there are many virtual machines on the server, a large number of broadcast sources, and each broadcast source virtual machine (VM) sends broadcast messages frequently, the number of broadcast messages in the network will increase dramatically, becoming a broadcast storm. This will severely impact the server's network interface card (NIC) and the OpenVS switch (OVS) on the server. In extreme cases, it can cause the server to crash and the virtual switch (OVS) to hang, posing a significant threat to normal network communication.
[0004] How to reduce the negative impact of packet forwarding on network functions in SDN networks is the technical problem that this application aims to solve. Summary of the Invention
[0005] The purpose of this application is to provide a port configuration method for SDN networks to solve the problem of packet forwarding affecting network functions in SDN networks.
[0006] Firstly, a port configuration method for SDN networks is provided, including:
[0007] Obtain the operation instructions from the SDN controller to configure the ports of the first-level leaf switch, wherein the operation instructions are used to configure the ports of the target virtual machine on the first-level leaf switch;
[0008] The configuration information for configuring the port of the first-level leaf switch and the physical server identifier where the target virtual machine is located are determined according to the operation instructions.
[0009] The target port of the secondary leaf switch to which the physical server identifier is pre-associated and the identification information of the secondary leaf switch are determined, and the secondary leaf switch is communicatively connected to the primary leaf switch;
[0010] Access the second-level leaf switch according to the identification information of the second-level leaf switch, and configure the port of the target virtual machine on the second-level leaf switch according to the configuration information.
[0011] Secondly, a port configuration device for SDN networks is provided, comprising:
[0012] The acquisition module acquires the operation instructions of the SDN controller to perform configuration on the ports of the first-level leaf switch. The operation instructions are used to configure the ports of the target virtual machine on the first-level leaf switch.
[0013] The first determining module determines the configuration information for configuring the port of the first-level leaf switch and the physical server identifier where the target virtual machine is located, based on the operation instruction.
[0014] The second determining module determines the target port of the secondary leaf switch pre-associated with the physical server identifier and the identification information of the secondary leaf switch, wherein the secondary leaf switch is communicatively connected to the primary leaf switch;
[0015] The configuration module accesses the secondary leaf switch based on the identification information of the secondary leaf switch, and configures the port of the target virtual machine on the secondary leaf switch according to the configuration information.
[0016] Thirdly, an electronic device is provided, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the method of the first aspect.
[0017] Fourthly, a computer-readable storage medium is provided on which a computer program is stored, which, when executed by a processor, implements the steps of the method of the first aspect.
[0018] In this embodiment, the SDN controller obtains the operation instructions for configuring the ports of the primary leaf switch; based on the operation instructions, it determines the configuration information for configuring the ports of the primary leaf switch and the physical server identifier where the target virtual machine resides; it determines the target port of the secondary leaf switch pre-associated with the physical server identifier and the identifier information of the secondary leaf switch; it accesses the secondary leaf switch based on the identifier information of the secondary leaf switch, so as to configure the port of the target virtual machine on the secondary leaf switch according to the configuration information. This solution enables the configuration between the secondary leaf switch and the server to match the configuration between the secondary leaf switch and the primary leaf switch, and enables packet forwarding based on the configuration, avoiding the negative impact of packet broadcasting on network performance. Attached Figure Description
[0019] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings:
[0020] Figure 1a This is a schematic diagram of the basic architecture of an SDN network.
[0021] Figure 1b This is a diagram illustrating broadcast message forwarding in an SDN network.
[0022] Figure 2a This is one of the flowcharts of a port configuration method applied to an SDN network according to an embodiment of the present invention.
[0023] Figure 2b This is a schematic diagram of an SDN network architecture that applies the port configuration method of the present invention to an SDN network.
[0024] Figure 3 This is a second flowchart of a port configuration method applied to an SDN network, according to an embodiment of the present invention.
[0025] Figure 4 This is the third flowchart of an embodiment of the present invention, a port configuration method applied to an SDN network.
[0026] Figure 5a This is the fourth flowchart of an embodiment of the present invention, a port configuration method applied to an SDN network.
[0027] Figure 5b This is a schematic diagram illustrating the virtual machine port creation process involving a secondary LEAFdriver, which is an embodiment of the present invention and applies to a port configuration method for SDN networks.
[0028] Figure 6aThis is the fifth flowchart of an embodiment of the present invention, a port configuration method applied to an SDN network.
[0029] Figure 6b This is a schematic diagram illustrating the virtual machine port deletion process involving a secondary LEAFdriver, as an embodiment of the present invention, of a port configuration method applied to an SDN network.
[0030] Figure 7a This is the sixth flowchart of an embodiment of the present invention, a port configuration method applied to an SDN network.
[0031] Figure 7b This is a schematic diagram of a virtual machine port migration process involving a secondary LEAFdriver, which is an embodiment of the present invention and applies to a port configuration method for SDN networks.
[0032] Figure 8 This is a schematic diagram of a port configuration device applied to an SDN network, according to an embodiment of the present invention. Detailed Implementation
[0033] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. The drawing numbers in this application are only used to distinguish the various steps in the solution and are not used to limit the execution order of the various steps. The specific execution order is as described in the specification.
[0034] First, the architecture of SDN networks will be introduced. Figure 1a This paper illustrates a basic architecture of an SDN network. At the forwarding layer, it adopts a DCGW-SPINE-LEAF network topology, where DC stands for Domain Controller, GW stands for Gateway, SPINE stands for Spine Switch, and LEAF stands for Leaf Switch.
[0035] The compute nodes (physical servers) are connected to the LEAF switch. The core of the control layer is the SDNC (Software-Defined Network Controller), i.e., the SDN controller. Above the controller is the VIM (Editor), which (OPENSTACK is a typical VIM) implements service provisioning by calling the northbound interface of the SDNC. The controller accepts calls from the VIM, combines the network services to be provided with managed network resources and configuration information, translates them into the yang model of the forwarding devices, and performs corresponding configurations for the corresponding LEAF and DC GW.
[0036] Servers connected to LEAF also come in different forms, generally divided into rack servers ( Figure 1a The leftmost server in the middle) and blade servers ( Figure 1a The difference lies in the type of server (the intermediate server). In the former, the network interface card (NIC) is directly connected to the LEAF port via fiber optic cable or Ethernet cable; in the latter, it's a blade server, providing high-density integration. For example, 16 blades can be integrated into a single chassis, with a backplane switch configured to aggregate the NICs of the blades. After aggregation, the backplane switches connect to the LEAF switch. Thus, from an SDN perspective, rack servers can perceive the ports of each server; however, for blade servers, due to the aggregation via the backplane switch, SDN can only perceive one aggregation port on the backplane switch and cannot perceive the actual ports of each blade.
[0037] Besides the presence of a switching backplane on blade servers, another possibility is that, based on actual needs, a third-party Layer 2 aggregation switch has been added between the LEAF and the server (which could be rack-mounted or blade-mounted). Figure 1a The connection status of the rightmost server in the image.
[0038] for Figure 1a The access configurations of the middle and right-side servers can be categorized into one type, characterized by a "secondary LEAF" device between the LEAF and the servers. To ensure normal communication before and after operations such as creating, deleting, migrating, and regenerating VM ports on the computing servers, VLAN trunk configuration needs to be performed on the secondary LEAF switch in advance, i.e.:
[0039] 1) Configure VLAN1-VLAN4095 on the uplink port of the second-level LEAF;
[0040] 2) The secondary LEAF connects to the downlink port of each server and is configured with VLAN1-VLAN4095;
[0041] In this way, no matter how the virtual machine's port is migrated or where it is created, there will always be a corresponding VLAN on the secondary LEAF, ensuring the normal forwarding of packets sent / received by the VM and guaranteeing normal VM communication.
[0042] This configuration method has the following drawbacks:
[0043] Because the uplink and downlink ports are configured with VLAN Trunk mode from 1 to 4095, when a broadcast message, such as an Address Resolution Protocol (ARP) request message, is sent from the network side or the virtual machine side, the broadcast message will be broadcast on all ports of the switch backplane / secondary LEAF because each physical port has a corresponding VLAN sub-port.
[0044] Figure 1b A schematic diagram of broadcast message forwarding in an SDN network is shown. For Figure 1b In the left chassis, broadcast messages sent from the network side are broadcast through the secondary LEAF, and all blade servers will receive the broadcast message, even if some servers do not need to receive this ARP request.
[0045] Similarly, for the above Figure 1b In the right chassis of the image, VM3 initiated a broadcast request. This request passed through the secondary LEAF and was simultaneously sent to the network side and other virtual machines. Ultimately, the broadcast message reached all servers. Thus, if there aren't many broadcast sources, even if a server receives several broadcast messages, it won't cause serious consequences. However, if there are a large number of virtual machines on the server, a huge number of broadcast sources, and each broadcast source VM sending broadcast messages very frequently, the number of broadcast messages in the network will increase dramatically, creating a broadcast storm. This will severely impact the server's network interface card (NIC) and the OVS (Optical Visual Studio) on the server. In extreme cases, it can cause the server to crash and OVS to hang, posing a significant threat to normal network communication.
[0046] To address the problems in the prior art, embodiments of this application provide a port configuration method applied to SDN networks, such as... Figure 2a As shown, it includes:
[0047] S21: Obtain the operation instruction from the SDN controller to configure the port of the first-level leaf switch. The operation instruction is used to configure the port of the target virtual machine on the first-level leaf switch.
[0048] To facilitate the explanation of this solution, the following is based on... Figure 2bThe SDN network architecture shown is illustrated below. Each step in this embodiment can be controlled and executed by a secondary LEAF driver component, which can be co-located with the controller or deployed independently. This component can monitor operations such as the creation, deletion, migration, and regeneration of virtual machine ports, and obtain the corresponding VLAN information. It then configures, deletes, and updates the VLAN information on the corresponding secondary LEAF ports as needed.
[0049] The execution entity, the secondary LEAF driver component, in this embodiment can obtain information about the SDN controller (i.e., ...) through methods such as listening. Figure 2b SDNC in the middle) to the first-level leaf switch (i.e. Figure 2b The LEAF1 in the configuration module executes configuration instructions, which represent the specific operations that the SDN controller instructs the first-level leaf switches to perform. Typically, these instructions contain the information required to execute the operation, enabling the configuration of the target virtual machine's port on the first-level leaf switch.
[0050] S22: Determine the configuration information for configuring the port of the first-level leaf switch and the physical server identifier where the target virtual machine is located according to the operation instruction.
[0051] In this step, the above operation instructions can be parsed. The parsed content may include the specific operation type to be performed, configuration information (such as VLAN information), the physical server identifier where the target virtual machine is located, and other information.
[0052] The specific operations performed can include virtual machine port creation, deletion, migration, and rebirth. The physical server identifier of the target virtual machine is used to mark and distinguish different physical servers. In practical applications, this physical server identifier can be a server ID (Identity document).
[0053] S23: Determine the target port of the secondary leaf switch pre-associated with the physical server identifier and the identifier information of the secondary leaf switch, wherein the secondary leaf switch is communicatively connected to the primary leaf switch.
[0054] The association between the physical server identifier and the secondary leaf switch can be preset, for example, by setting and recording the association in advance through a data table or other means. In this step, the physical server identifier determined in the above steps is searched in the preset data table to determine the target port of the earpiece leaf switch pre-associated with the physical server identifier and the identifier information of the earpiece leaf switch.
[0055] In practical applications, the identification information of the secondary leaf switch can specifically be the management plane IP of the secondary leaf switch. This management plane IP can also be pre-set and stored through a data table or other means, and can be queried and determined in this step.
[0056] S24: Access the secondary leaf switch according to the identification information of the secondary leaf switch, and configure the port of the target virtual machine on the secondary leaf switch according to the configuration information.
[0057] In this step, the second-level leaf switch is accessed based on its identification information, and the VLAN information is configured on the corresponding port of the second-level leaf switch, thereby enabling the port configuration of the target virtual machine.
[0058] It should be noted that SDN solutions are divided into software SDN and hardware SDN solutions. The core of the software SDN solution is that the SDNC directly controls the virtual switch (OVS) on the server. The core of the hardware SDN solution is that SDN only controls the LEAF switch, not the OVS software switch. The forwarding behavior of the OVS is simply controlled by the VIM. The OVS only provides Layer 2 forwarding functionality and does not provide Layer 3 routing or other more advanced functions. This embodiment illustrates the hardware SDN solution scenario.
[0059] This solution can perform correct control on the target port, ensuring that downlink packets from the leaf switch and uplink packets from the server can be correctly forwarded through the corresponding VLAN. It does not require broadcasting received messages, thus avoiding broadcast storms and reducing the negative impact on switch performance.
[0060] Based on the solutions provided in the above embodiments, optionally, such as Figure 3 As shown, before S23, it also includes:
[0061] S31: Receive pre-configured association information, which includes the physical server identifier and the physical connection relationship of the ports of the secondary leaf switch.
[0062] In this embodiment, the association information between the physical server identifier and the port of the secondary leaf switch can be pre-configured, and this association information includes the physical connection relationship. For example, using... Figure 2b Taking the connection relationship shown as an example, the pre-configured association information can be stored in the form of TOPO entries. For example, the imported TOPO entries include the following:
[0063] Serial Number entry 1 LEAF1-(P1) Level 2 LEAF1(P2-1)-Server1 2 LEAF1-(P1) Level 2 LEAF1(P2-2)-Server2 3 LEAF1-(P1) Level 2 LEAF1(P2-3)-Server3
[0064] Step S23 above includes:
[0065] S32: Determine the target port of the secondary leaf switch pre-associated with the physical server identifier and the identifier information of the secondary leaf switch based on the pre-configured association information.
[0066] In this step, a query can be performed based on the physical server identifier within the pre-configured association information to determine the target port of the secondary leaf switch and the identifier information of the secondary leaf switch. For example, assuming the physical server identifier is "Server2", a query based on this identifier within the pre-configured association information will yield a TOPO entry "LEAF1-(P1)Secondary LEAF1(P2-2)-Server2", where the identifier information of the secondary leaf switch is "Secondary LEAF1" and the target port of the secondary leaf switch is "P2-2".
[0067] The solution provided in this application allows for the pre-configuration of the association between switches and servers. In practical applications, the required information can be obtained by looking up a table. The pre-configured association information can be easily stored, transferred, and modified, facilitating adjustments and backups of the association relationships. In practical applications, it can efficiently determine the information corresponding to the physical server identifier, thus improving port configuration efficiency.
[0068] Based on the solutions provided in the above embodiments, optionally, such as Figure 4 As shown, before S24, it also includes:
[0069] S41: Obtain the management address of the secondary leaf switch corresponding to the identification information of the secondary leaf switch.
[0070] The identification information of the secondary leaf switch corresponds to a management address that can be a pre-defined management plane IP address. The mapping between this identification information and the management address can also be stored in a table format. For example, the mapping is as follows:
[0071] Level 2 LEAF ID Management IP Level 2 LEAF1 IP1 Level 2 IP2 Level 2 LEAF3 IP3
[0072] In this step, the corresponding management plane IP, i.e. the management address of the corresponding secondary leaf switch, can be determined by searching a preset table based on the identification information of the secondary leaf switch.
[0073] S42: Obtain the configuration command corresponding to the management address of the secondary leaf switch according to the configuration information. The configuration command is used to control the secondary leaf switch to perform an operation that matches the configuration information.
[0074] In practical applications, since the configuration commands for different leaf switches may differ, in order to effectively configure the secondary leaf switches, this step obtains the configuration command corresponding to the management address of the secondary leaf switch based on the configuration information.
[0075] The configuration commands corresponding to the management addresses of the secondary leaf switches can also be pre-stored in a table and determined through querying in this step. For example, the correspondence between the management addresses and configuration commands of the secondary leaf switches can be as follows:
[0076]
[0077]
[0078] By determining the configuration command corresponding to the management address of the secondary leaf switch, the configuration command adapted to the secondary leaf switch can be obtained, which facilitates the configuration of the secondary leaf switch with a valid configuration command in subsequent steps.
[0079] Optionally, different configuration information can correspond to different configuration commands. For example, after determining the configuration command corresponding to the second-level leaf switch, the specific configuration command is determined based on the actual operation to be performed as represented by the configuration information.
[0080] Step S24 above includes:
[0081] S43: Access the second-level leaf switch according to the identification information of the second-level leaf switch, so as to configure the port of the target virtual machine on the second-level leaf switch according to the configuration information through the configuration command.
[0082] After obtaining the configuration command corresponding to the secondary leaf switch, access the secondary leaf switch according to its identification information, and configure the port of the target virtual machine on the secondary leaf switch according to the format or rules of the configuration command, thereby performing effective port configuration on the secondary leaf switch.
[0083] The solution provided in this application enhances the effectiveness of port configuration by obtaining the configuration commands of the secondary leaf switch, thus avoiding the problem of incompatibility between the commands and the switch when executing port configuration.
[0084] Based on the solution provided in the above embodiments, optionally, the operation instructions for the SDN controller to configure the ports of the first-level leaf switch include at least one of the following: port creation instruction, port deletion instruction, port migration instruction, and port update instruction.
[0085] The following section will further elaborate on various operation commands with examples.
[0086] Based on the solutions provided in the above embodiments, optionally, such as Figure 5a As shown, the operation instructions include port creation instructions;
[0087] Step S24 above includes:
[0088] S51: Access the secondary leaf switch according to the identification information of the secondary leaf switch, and create the port of the target virtual machine on the secondary leaf switch according to the configuration information.
[0089] In this embodiment, the port creation command is used to perform a port creation operation on the leaf switch. Figure 5b The process of creating a virtual machine port involving a secondary LEAF driver is illustrated.
[0090] exist Figure 5b The process shown includes the following steps:
[0091] Step S501: Users can pre-configure the TOPO relationship between the server, secondary LEAF, and LEAF switch. For specific configuration methods, please refer to the example above, which will not be repeated here.
[0092] Step S502: The secondary leaf driver stores the user-defined associations and provides them for subsequent steps to retrieve at any time.
[0093] Step S503: Users can create a virtual machine port (vnic) via VIM. SDNC receives the relevant call information through the northbound interface, which may include the ID, type, server ID, network ID, etc.
[0094] Step S504: SDNC assigns a VLAN tag to the vNIC based on the compute node server ID and network ID.
[0095] Step S505: The controller feeds back the VLAN tag value to the VIM;
[0096] Step S506: VIM onto the server and configure the relevant VLANs for the virtual machine vNIC.
[0097] Step S507: VIM initiates an update operation for the virtual machine vNIC. The update operation is also a necessary step for the virtual machine vNIC to come online.
[0098] Step S508: The controller queries the port of the LEAF switch corresponding to the vNIC based on the relevant information.
[0099] Step S509: The controller configures the VLANs for the corresponding ports of the LEAF switch.
[0100] Step S510: The secondary LEAF driver listens to the relevant operations of the SDNC controller, obtains the corresponding server ID, VLAN value, vNIC ID, and queries the information stored in step S502 to obtain the secondary LEAF ID, management plane IP, port information, configuration command CMD, and implements VLAN configuration on the corresponding port.
[0101] The solution provided in this application embodiment ensures that the VLANs on the secondary LEAF downlink port and the VLANs configured on the server, as well as the VLANs on the secondary LEAF uplink port and the VLANs on the LEAF downlink port, are correctly mapped. Both downlink packets from the LEAF side and uplink packets sent from the server can be forwarded through this VLAN, enabling external communication of the virtual machine.
[0102] The solution provided in this application embodiment is created on demand on the secondary LEAF based on the creation of the virtual machine port. It will not arbitrarily forward the received broadcast messages, thus avoiding the occurrence of broadcast storms and protecting the server's network card and OVS from broadcast impacts.
[0103] Based on the solutions provided in the above embodiments, optionally, such as Figure 6a As shown, the operation instructions include port deletion instructions;
[0104] Step S24 above includes:
[0105] S61: Access the second-level leaf switch according to the identification information of the second-level leaf switch, and delete the port of the target virtual machine on the second-level leaf switch according to the configuration information.
[0106] In this embodiment, the port deletion command is used to perform a port deletion operation on the leaf switch. Figure 6b The process of deleting a virtual machine port involving a secondary LEAF driver is illustrated.
[0107] exist Figure 6b The process shown includes the following steps:
[0108] Step S601: The user can send a command to VIM to delete the virtual machine port;
[0109] Step S602: The VIM configures the VLAN on the network card of the compute node according to the user's instructions;
[0110] Step S603: VIM sends instructions to SDNC and the secondary leaf driver to delete the virtual machine port vnic;
[0111] Step S604: Configure VLANs on the corresponding switch ports via SDNC;
[0112] Step S605: The secondary LEAF driver listens for the virtual machine port deletion operation of the SDNC controller, obtains the corresponding server ID, VLAN value, vNIC ID, and queries the stored information to obtain the secondary LEAF ID, management plane IP, port information, configuration command CMD, and performs VLAN deletion on the corresponding port.
[0113] The solution provided in this application deletes the VLANs on the secondary LEAF downlink port and the VLANs on the server, as well as the VLANs on the secondary LEAF uplink port and the LEAF downlink port. Unlike existing technologies that configure 1-4095 VLANs at once and then leave them undeleted regardless of their use, this invention prevents the arbitrary forwarding of received broadcast messages, avoiding broadcast storms and protecting the server's network card and OVS from broadcast impacts.
[0114] Based on the solutions provided in the above embodiments, optionally, such as Figure 7a As shown, the operation instructions include port migration instructions;
[0115] Step S24 above includes:
[0116] S71: Access the second-level leaf switch according to the identification information of the second-level leaf switch, so as to create the port of the target virtual machine on the second-level leaf switch according to the configuration information and delete the original port associated with the port of the target virtual machine.
[0117] In this embodiment, the port migration command is used to perform port migration operations on the leaf switch. Figure 7b The virtual machine port migration process involving the secondary LEAF driver is illustrated. In this embodiment, the new port is configured first, and then the old port is deleted to achieve port migration.
[0118] exist Figure 7b The process shown includes the following steps:
[0119] Steps S701-S702: Same as steps S501-S502 in the above embodiment.
[0120] Steps S703-S709: Same as steps S503-S509 in the above embodiment;
[0121] Step S710: Same as step S510 in the above embodiment;
[0122] Steps S711-S714: Same as steps S601-S604 in the above embodiment;
[0123] Step S715: Same as step S605 in the above embodiment.
[0124] The solution provided in this application uses a secondary leaf driver to monitor the relevant operations of the SDN controller. In conjunction with the controller, it configures the corresponding VLANs on the secondary LEAF switches, ensuring automated and on-demand VLAN configuration on the secondary LEAF switches between the LEAF and the server. This effectively controls the flooding of broadcast messages, avoids broadcast storms, and protects the server network card and OVS from the impact of broadcast storms, thereby protecting the normal communication of services.
[0125] This embodiment enables fully automated network configuration, requiring no manual intervention during service provisioning, reducing the probability of errors from manual configuration and improving network operation and maintenance efficiency. Furthermore, the solution provided in this application embodiment can interface with multiple third-party secondary LEAF switches, not only without limiting the model or number of secondary LEAFs, but also providing programmable logical configuration that automatically adapts to device models, achieving truly decoupled programmable logic implementation.
[0126] To address the problems existing in the prior art, this application also provides a port configuration device 80 applied to an SDN network, such as... Figure 8 As shown, it includes:
[0127] The acquisition module 81 acquires the operation instructions of the SDN controller to perform configuration on the port of the first-level leaf switch. The operation instructions are used to configure the port of the target virtual machine on the first-level leaf switch.
[0128] The first determining module 82 determines the configuration information for configuring the port of the first-level leaf switch and the physical server identifier where the target virtual machine is located, according to the operation instruction.
[0129] The second determining module 83 determines the target port of the secondary leaf switch pre-associated with the physical server identifier and the identification information of the secondary leaf switch, wherein the secondary leaf switch is communicatively connected to the primary leaf switch;
[0130] The configuration module 84 accesses the secondary leaf switch according to the identification information of the secondary leaf switch, and configures the port of the target virtual machine on the secondary leaf switch according to the configuration information.
[0131] The apparatus provided in this application obtains an operation instruction from the SDN controller to configure a port on a primary leaf switch; determines the configuration information for configuring the port on the primary leaf switch and the identifier of the physical server where the target virtual machine resides based on the operation instruction; determines the target port of the secondary leaf switch pre-associated with the physical server identifier and the identifier information of the secondary leaf switch; and accesses the secondary leaf switch based on the identifier information of the secondary leaf switch to configure the port of the target virtual machine on the secondary leaf switch according to the configuration information. This solution enables the configuration between the secondary leaf switch and the server to match the configuration between the secondary leaf switch and the primary leaf switch, and enables packet forwarding based on the configuration, avoiding the negative impact of packet broadcasting on network performance.
[0132] In this application, the modules in the apparatus provided can also implement the method steps provided in the method embodiments. Alternatively, the apparatus provided in this application may include other modules besides those described above to implement the method steps provided in the method embodiments. Furthermore, the apparatus provided in this application can achieve the technical effects achievable by the method embodiments.
[0133] Preferably, the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the various processes of the above-described embodiment of a port configuration method applied to an SDN network and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0134] This invention also provides a computer-readable storage medium storing a computer program. When executed by a processor, this computer program implements the various processes of the aforementioned port configuration method embodiment applied to an SDN network, achieving the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0135] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0136] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more blocks of the flowchart illustrations and / or one or more blocks of the block diagrams.
[0137] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.
[0138] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.
[0139] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0140] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0141] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0142] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0143] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0144] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A port configuration method for SDN networks, characterized in that, include: Obtain the operation instructions from the SDN controller to configure the ports of the first-level leaf switch, wherein the operation instructions are used to configure the ports of the target virtual machine on the first-level leaf switch; The configuration information for configuring the port of the first-level leaf switch and the physical server identifier where the target virtual machine is located are determined according to the operation instructions. The target port of the secondary leaf switch to which the physical server identifier is pre-associated and the identification information of the secondary leaf switch are determined, and the secondary leaf switch is communicatively connected to the primary leaf switch; Access the second-level leaf switch according to the identification information of the second-level leaf switch, and configure the port of the target virtual machine on the second-level leaf switch according to the configuration information.
2. The method as described in claim 1, characterized in that, Before determining the target port of the secondary leaf switch to which the physical server identifier is pre-associated and the identifier information of the secondary leaf switch, the process also includes: Receive pre-configured association information, which includes the physical server identifier and the physical connection relationship of the ports of the secondary leaf switch; The determination of the target port of the secondary leaf switch pre-associated with the physical server identifier and the identifier information of the secondary leaf switch includes: The target port of the second-level leaf switch pre-associated with the physical server and the identification information of the second-level leaf switch are determined based on the pre-configured association information.
3. The method as described in claim 1, characterized in that, Before accessing the secondary leaf switch based on its identification information and configuring the port of the target virtual machine on the secondary leaf switch according to the configuration information, the method further includes: Obtain the management address of the secondary leaf switch corresponding to the identification information of the secondary leaf switch; The configuration command corresponding to the management address of the secondary leaf switch is obtained according to the configuration information. The configuration command is used to control the secondary leaf switch to perform an operation that matches the configuration information. The process of accessing the secondary leaf switch based on its identification information, and configuring the port of the target virtual machine on the secondary leaf switch according to the configuration information, includes: Access the second-level leaf switch according to the identification information of the second-level leaf switch, and configure the port of the target virtual machine on the second-level leaf switch according to the configuration information through the configuration command.
4. The method according to any one of claims 1 to 3, characterized in that, The SDN controller's configuration instructions for the ports of the first-level leaf switch include at least one of the following: Port creation command, port deletion command, port migration command, port update command.
5. The method as described in claim 4, characterized in that, The operation instructions include port creation instructions; The process of accessing the secondary leaf switch based on its identification information, and configuring the port of the target virtual machine on the secondary leaf switch according to the configuration information, includes: Access the secondary leaf switch according to the identification information of the secondary leaf switch, and create the port of the target virtual machine on the secondary leaf switch according to the configuration information.
6. The method as described in claim 4, characterized in that, The operation instructions include port deletion instructions; The process of accessing the secondary leaf switch based on its identification information, and configuring the port of the target virtual machine on the secondary leaf switch according to the configuration information, includes: Access the second-level leaf switch according to the identification information of the second-level leaf switch, and delete the port of the target virtual machine on the second-level leaf switch according to the configuration information.
7. The method as described in claim 4, characterized in that, The operation instructions include port migration instructions; The process of accessing the secondary leaf switch based on its identification information, and configuring the port of the target virtual machine on the secondary leaf switch according to the configuration information, includes: Access the second-level leaf switch according to the identification information of the second-level leaf switch, so as to create the port of the target virtual machine on the second-level leaf switch according to the configuration information and delete the original port associated with the port of the target virtual machine.
8. A port configuration device for SDN networks, characterized in that, include: The acquisition module acquires the operation instructions of the SDN controller to perform configuration on the ports of the first-level leaf switch. The operation instructions are used to configure the ports of the target virtual machine on the first-level leaf switch. The first determining module determines the configuration information for configuring the port of the first-level leaf switch and the physical server identifier where the target virtual machine is located, based on the operation instruction. The second determining module determines the target port of the secondary leaf switch pre-associated with the physical server identifier and the identification information of the secondary leaf switch, wherein the secondary leaf switch is communicatively connected to the primary leaf switch; The configuration module accesses the secondary leaf switch based on the identification information of the secondary leaf switch, and configures the port of the target virtual machine on the secondary leaf switch according to the configuration information.
9. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method as described in any one of claims 1 to 7.