Network communication method, device and storage medium based on cloud network
By adopting leaf spine network structure and static routing mechanism in non-stack mode cross-device dynamic aggregation network, the problem of too many address mapping table entries on the switch is solved, and normal network traffic transmission and load balancing of multiple IP addresses of the server are achieved. .
Patent Information
- Application Number
- CN202410718480.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-06-04
AI Technical Summary
In the non-stack mode cross-device dynamic aggregation networking scheme, there are too many address mapping table entries on the switch, resulting in scale and stability issues, and it is impossible to achieve normal network traffic of multiple IP addresses of the server by configuring static network segments or dynamic network segments. transmission.
Using the leaf spine network structure, the target leaf switch obtains a static route corresponding to multiple IP addresses of the target server. The static route includes a static route prefix with multiple IP addresses. The next hop is the interface IP address of the target server and determines the Is the connection between the target server and the target leaf switch normal? If it is normal, the static route will be transmitted to the spinal switch and network traffic will be transmitted according to the load balancing policy.
It realizes normal network traffic transmission of non-stacked cross-device aggregation network, avoids the problem of excessive address mapping table entries, and ensures load balancing and link disaster recovery of network traffic transmission.
Smart Images

Figure CN118487993B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of computer and network communication technology, and in particular, to a network communication method, device and storage medium based on a cloud network. Background Art
[0002] Existing cloud network networking solutions can be divided into stacking mode cross-device dynamic aggregation networking solutions and non-stacking mode cross-device dynamic aggregation networking solutions. In the stacking mode cross-device dynamic aggregation networking solution, multiple switch devices are connected together through cables and virtualized into one device, while in the non-stacking mode cross-device dynamic aggregation networking solution, switches are independent of each other and the control plane is decoupled.
[0003] In the stacking mode cross-device dynamic aggregation networking solution, the server is connected to multiple switches in the stacking mode. If the server needs multiple IP addresses, you only need to configure a static network segment or dynamic network segment on the multiple switches in the stacking mode, and its next hop points to the server's interface IP address. However, in the non-stacked mode cross-device dynamic aggregation networking solution, the server is connected to multiple independent switches. If the server needs multiple IP addresses, it cannot be achieved by configuring a static network segment or dynamic network segment. It is usually necessary to configure the address mapping table entries of each IP address on the switch, resulting in too many address mapping table entries on the switch, which brings scale and stability problems. Summary of the invention
[0004] The embodiments of the present disclosure provide a network communication method, device and storage medium based on a cloud network to overcome the problem of too many address mapping table entries on a switch in a non-stacked mode cross-device dynamic aggregation networking solution.
[0005] In a first aspect, an embodiment of the present disclosure provides a network communication method based on a cloud network, wherein the cloud network adopts a leaf-spine network structure, wherein the leaf-spine network structure includes a plurality of spine switches and a plurality of leaf switches, wherein any leaf switch is a non-stackable switch and is respectively connected to each spine switch, and each server is connected to at least two leaf switches, wherein the method includes:
[0006] Obtain a static route corresponding to multiple IP addresses of a target server connected to a target leaf switch; wherein the static route includes a static route prefix unified by the multiple IP addresses, and the next hop is the interface IP address of the target server; the target leaf switch is any one of the multiple leaf switches;
[0007] Determine whether the connection between the target server and the target leaf switch is normal;
[0008] If it is determined that the connection between the target server and the target leaf switch is normal, the static route is transmitted to each spine switch, so that after each spine switch receives the network traffic whose destination route matches the static route, it is transmitted to the target leaf switch according to the load balancing strategy, and the target leaf switch transmits the network traffic to the target server.
[0009] In a second aspect, an embodiment of the present disclosure provides a network communication device based on a cloud network, wherein the cloud network adopts a leaf-spine network structure, wherein the leaf-spine network structure includes a plurality of spine switches and a plurality of leaf switches, wherein any leaf switch is a non-stackable switch and is respectively connected to each spine switch, and each server is connected to at least two leaf switches, wherein the network communication device is any target leaf switch among the plurality of leaf switches, and wherein the network communication device includes:
[0010] An acquisition unit, configured to acquire a static route corresponding to a plurality of IP addresses of a target server connected to the target leaf switch; wherein the static route includes a static route prefix unified by the plurality of IP addresses, and the next hop is an interface IP address of the target server;
[0011] A sensing unit, used to determine whether the connection between the target server and the target leaf switch is normal;
[0012] A communication unit is used to transmit the static route to each spine switch if it is determined that the connection between the target server and the target leaf switch is normal, so that each spine switch receives the network traffic whose destination route matches the static route and transmits it to the target leaf switch according to the load balancing strategy, and the target leaf switch transmits the network traffic to the target server.
[0013] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor and a memory;
[0014] The memory stores computer-executable instructions;
[0015] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the cloud network-based network communication method as described in the first aspect and various possible designs of the first aspect.
[0016] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the cloud network-based network communication method described in the first aspect and various possible designs of the first aspect is implemented.
[0017] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, comprising computer execution instructions. When a processor executes the computer execution instructions, it implements the cloud network-based network communication method as described in the first aspect and various possible designs of the first aspect.
[0018] The network communication method, device and storage medium based on cloud network provided by the embodiment of the present disclosure obtain a static route corresponding to multiple IP addresses of the target server connected to the target leaf switch through any non-stacked target leaf switch in the leaf-spine network structure, wherein the static route includes a static route prefix that unifies multiple IP addresses, and the next hop is the interface IP address of the target server; judge whether the connection between the target server and the target leaf switch is normal; if it is determined that the connection between the target server and the target leaf switch is normal, the static route is transmitted to each spine switch, so that each spine switch receives the network traffic that matches the destination route and the static route and transmits it to the target leaf switch according to the load balancing strategy, and the target leaf switch transmits the network traffic to the target server. By configuring a static route prefix for multiple IP addresses of the target server and sensing whether the connection between the target server and the target leaf switch is normal, normal network traffic transmission of the non-stacked cross-device aggregation network can be achieved, avoiding too many address mapping table entries in the leaf switch and the spine switch, and also ensuring load balancing and link disaster recovery in the network traffic transmission process. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0020] Figure 1 An example diagram of a network architecture of a cloud network-based network communication method provided in one embodiment of the present disclosure;
[0021] Figure 2 A schematic diagram of a network communication method based on a cloud network according to an embodiment of the present disclosure;
[0022] Figure 3 A structural block diagram of a cloud network-based network communication device provided in one embodiment of the present disclosure;
[0023] Figure 4 A schematic diagram of the hardware structure of an electronic device provided in one embodiment of the present disclosure. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0025] Compared with the traditional stacking dynamic aggregation networking solution, the non-stackable cross-device dynamic aggregation networking solution has the following advantages:
[0026] 1) The switches are independent of each other, the control plane is decoupled, and the operation and maintenance risks are reduced;
[0027] 2) There is no need to synchronize address mapping entries (such as MAC / ARP / ND entries) between switches;
[0028] 3) Active-active is possible without the need for interconnection links between switches;
[0029] The following additional functions are required:
[0030] 1) The server is required to support dual-sending Address Resolution Protocol (ARP) and / or Neighbor Discovery (ND) requests, that is, sending them to multiple switches connected to it at the same time;
[0031] 2) In the spine-leaf network structure, the leaf switches are imported into the spine switches through ARP / ND to Border Gateway Protocol (BGP) routing to achieve load sharing.
[0032] In the stacking mode cross-device dynamic aggregation networking solution, the server is connected to multiple switches in the stacking mode. If the server needs multiple IP addresses, you only need to configure a static network segment or a dynamic network segment on the multiple switches in the stacking mode, and its next hop points to the interface IP address of the server.
[0033] In the non-stacked cross-device dynamic aggregation networking solution, the server is connected to multiple independent switches. If the server needs multiple IP addresses, it cannot be achieved by configuring a static network segment or a dynamic network segment due to the current technical implementation. The reason is that the leaf switches connected to the server are independent of each other. If a static network segment or a dynamic network segment is configured on the leaf switch, it will be uploaded to the spine switch, but the spine switch cannot sense whether the connection between the leaf switch and the server is normal. If the connection is abnormal, the spine switch will still need to send the network traffic sent to the server to the leaf switch with an abnormal connection to the server, resulting in the loss of this part of the network traffic. Therefore, it is usually necessary to configure the address mapping table entries for each IP address on the switch.
[0034] In one solution, multiple IP addresses of a server independently send ARP and / or ND requests to the leaf switch connected to the server, and are imported into each spine switch through ARP / ND to BGP routing. For example, assuming that each leaf switch is connected to 40 servers and each server requires 256 IP addresses, then the address mapping table entries (ARP / ND table entries) of each leaf switch are 40*256=10240 entries. If each spine switch in a group of spine switches is connected to 32 leaf switches, then the routing table entries required for each spine switch are 10240*32=327680, resulting in too many address mapping table entries on the switch, causing scale and stability problems.
[0035] In order to solve the above technical problems, the present invention provides a network communication method based on a cloud network, which obtains a static route corresponding to multiple IP addresses of a target server connected to the target leaf switch through any non-stacked target leaf switch in the leaf-spine network structure, wherein the static route includes a static route prefix that unifies multiple IP addresses, and the next hop is the interface IP address of the target server; judges whether the connection between the target server and the target leaf switch is normal; if it is determined that the connection between the target server and the target leaf switch is normal, the static route is transmitted to each spine switch, so that each spine switch receives the network traffic that matches the destination route and the static route and transmits it to the target leaf switch according to the load balancing strategy, and the target leaf switch transmits the network traffic to the target server. By configuring a static route prefix for multiple IP addresses of the target server and sensing whether the connection between the target server and the target leaf switch is normal, normal network traffic transmission of a non-stacked cross-device aggregation network can be achieved, avoiding too many address mapping table entries in the leaf switch and the spine switch, and also ensuring load balancing and link disaster recovery during the network traffic transmission process.
[0036] The cloud network-based network communication method provided by the present disclosure is applied to a non-stacked cross-device aggregation network, such as Figure 1The spine network structure (Spine-Leaf) shown includes a spine switch and multiple leaf switches, any leaf switch is a non-stackable switch (no connection between leaf switches), and is connected to each spine switch respectively, and each server is connected to at least two leaf switches. The execution subject of the network communication method based on the cloud network disclosed in the present invention is any target leaf switch among multiple leaf switches, and a static route corresponding to multiple IP addresses of the target server connected to the target leaf switch can be obtained, wherein the static route includes a static route prefix unified by multiple IP addresses, and the next hop is the interface IP address of the target server; it is determined whether the connection between the target server and the target leaf switch is normal; if it is determined that the connection between the target server and the target leaf switch is normal, the static route is transmitted to each spine switch, so that each spine switch receives the network traffic that matches the destination route and the static route, and transmits it to the target leaf switch according to the load balancing strategy, and the target leaf switch transmits the network traffic to the target server.
[0037] The cloud network-based network communication method disclosed in the present invention will be described in detail below in conjunction with specific embodiments.
[0038] refer to Figure 2 , Figure 2 A flow chart of a network communication method based on a cloud network provided in an embodiment of the present disclosure. In the method of this embodiment, the cloud network adopts a spine-leaf network structure, wherein the spine-leaf network structure includes multiple spine switches and multiple leaf switches, any leaf switch is a non-stackable switch, and is connected to each spine switch respectively, and each server is connected to at least two leaf switches. The method of this embodiment can be applied to a target leaf switch in the spine-leaf network structure, and the target leaf switch is any one of the multiple leaf switches. The network communication method based on the cloud network includes:
[0039] S201. Obtain a static route corresponding to multiple IP addresses of the target server connected to the target leaf switch; wherein the static route includes a unified static route prefix of the multiple IP addresses, and the next hop is the interface IP address of the target server; the target leaf switch is any one of the multiple leaf switches.
[0040] In this embodiment, the target server is any server connected to the target leaf switch. If the target server requires multiple IP addresses, a static route corresponding to multiple IP addresses can be configured on each target leaf switch connected to the target server. The static routes corresponding to the multiple IP addresses include a unified static route prefix, and the next hop is a static route of the interface IP address of the target server, wherein the interface of the target server is an aggregation (Bond) interface connected to at least two target leaf switches. The purpose of the static route prefix is that the network traffic that matches the target route and the static route prefix can all be sent to the target server.
[0041] For example, if the target server needs 256 addresses based on the first Internet Protocol, and the target server is connected to two target leaf switches, then both target leaf switches need to configure static routes based on the first Internet Protocol corresponding to multiple IPR addresses of the target server, where the first Internet Protocol can be IPv4, that is, the target server needs 256 IPv4 addresses, then a static route with a prefix of / 24 and a next hop being the IP address of the aggregate interface of the target server can be configured; if the target server needs 256 addresses based on the second Internet Protocol, and the target server is connected to two target leaf switches, then both target leaf switches need to configure static routes based on the second Internet Protocol corresponding to multiple IPR addresses of the target server, where the second Internet Protocol can be IPv6, that is, the target server needs 256 IPv6 addresses, then a static route with a prefix of / 120 and a next hop being the IP address of the aggregate interface of the target server can be configured. In addition, there is no conflict between the target server's requirements based on the first Internet Protocol address and based on the second Internet Protocol address, that is, the target leaf switch can also simultaneously configure static routes of the network based on the first Internet Protocol and static routes of the network based on the second Internet Protocol corresponding to multiple IP addresses. Of course, the first Internet Protocol is not limited to IPv4, and the second Internet Protocol is not limited to IPv6. In addition, this embodiment can also support more Internet protocols at the same time, for example, supporting the third Internet Protocol and the fourth Internet Protocol on the basis of the first Internet Protocol and the second Internet Protocol.
[0042] S202: Determine whether the connection between the target server and the target leaf switch is normal.
[0043] In this embodiment, the target leaf switch can sense whether the connection between the target server and the target leaf switch is normal, that is, determine whether the next hop in the static route is reachable, and then use it to inform each spine switch whether it can transmit data to the target server through the target leaf switch, so as to avoid data loss caused by each spine switch still transmitting data to the target server through the target leaf switch after the connection between the target server and the target leaf switch is abnormal.
[0044] Optionally, the target leaf switch determines whether the connection between the target server and the target leaf switch is normal, specifically, whether the address resolution (Address Resolution Protocol, ARP) and / or neighbor discovery (Neighbor Discovery, ND) request sent by the target server is received; if the target leaf switch receives the ARP and / or ND request sent by the target server, it is determined that the connection between the target server and the target leaf switch is normal. Among them, the judgment of whether to receive the ARP and / or ND request sent by the target server can be made in real time or at a specific interval. If the ARP and / or ND request sent by the target server is not received within a preset time, it is determined that the connection between the target server and the target leaf switch is abnormal. Among them, the ARP request is for the IPv4 (that is, the first Internet Protocol mentioned above) network, and is used to resolve the IP address into a MAC address. The ND request is for the IPv6 (that is, the second Internet Protocol) network, and can be used to resolve the IP address into a MAC address, and can also be used for reachability detection, etc.
[0045] Optionally, if the target leaf switch only receives the ARP request sent by the target server, it is determined that the IPv4 network connection between the target server and the target leaf switch is normal; or, if the target leaf switch only receives the ND request sent by the target server, it is determined that the IPv6 network connection between the target server and the target leaf switch is normal; or, if the target leaf switch receives the ARP request and the ND request sent by the target server, it is determined that both the IPv4 network and the IPv6 network connections between the target server and the target leaf switch are normal.
[0046] Optionally, if the target leaf switch receives an ARP and / or ND request sent by the target server, the host address mapping table entry (ARP / ND table entry) of the target leaf switch will contain an ARP / ND table entry (address resolution and / or neighbor discovery address mapping table entry) corresponding to the target server. The ARP / ND table entry is a mapping table between an IP address and a MAC address. Therefore, it can be determined whether there is an ARP / ND table entry corresponding to the target server in the ARP / ND table entry of the target leaf switch. If so, it is determined that the ARP and / or ND request sent by the target server has been received. Furthermore, if there is an ARP table entry corresponding to the target server, it is determined that the ARP request sent by the target server has been received. If there is an ND table entry corresponding to the target server, it is determined that the ND request sent by the target server has been received.
[0047] S203. If it is determined that the connection between the target server and the target leaf switch is normal, the static route is transmitted to each spine switch, so that each spine switch receives the network traffic whose destination route matches the static route and transmits it to the target leaf switch according to the load balancing strategy, and the target leaf switch transmits the network traffic to the target server.
[0048] In this embodiment, if it is determined that the connection between the target server and the target leaf switch is normal, the above-mentioned static route can be dynamically transmitted to each spine switch.
[0049] Optionally, the static routes can be converted into Border Gateway Protocol (BGP) routes and transmitted to each spine switch, where BGP routes are used for dynamic, flexible and scalable route management of each spine switch. Specifically, the BGP routes can be transmitted to the BGP process of each spine switch and added to the BGP table. Based on the BGP table, the spine switch can understand the network topology information, perform route selection, etc.
[0050] Furthermore, after each spine switch receives the above-mentioned static route, it can know which target leaf switches are normally connected to the target server. When each spine switch receives network traffic whose destination route matches the static route (that is, network traffic that needs to be sent to the target server), it can transmit the network traffic to the target leaf switch that is normally connected to the target server according to the load balancing strategy, and then these target leaf switches transmit the network traffic to the target server, where the network traffic can be any message or data that needs to be sent to the target server.
[0051] For example, Figure 1Taking the Spine-Leaf network structure shown as an example, server 1 is the target server, which is connected to leaf switch 1-1 and leaf switch 1-2, and each leaf switch 1-1 and leaf switch 1-2 are connected to spine switches 1 to 4 respectively. A static route corresponding to multiple IP addresses of server 1 is configured on leaf switch 1-1 and leaf switch 1-2. If server 1 is connected to leaf switch 1-1 and leaf switch 1-2 normally, leaf switch 1-1 and leaf switch 1-2 transmit the static route of server 1 to spine switches 1 to 4 respectively, so that spine switches 1 to 4 know that server 1 is connected to leaf switch 1-1 and leaf switch 1-2 normally.
[0052] Assuming that server 3 needs to transmit network traffic to server 1, and server 3 is normally connected to leaf switch 2-1 and leaf switch 2-2, the network traffic is transmitted to spine switches 1~4 through leaf switch 2-1 and leaf switch 2-2 according to the load balancing strategy. For example, half of the network traffic is transmitted through leaf switch 2-1 and is evenly divided into 4 parts and transmitted to spine switches 1~4 respectively, and the other half of the network traffic is transmitted through leaf switch 2-2 and is also evenly divided into 4 parts and transmitted to spine switches 1~4 respectively; and spine switches 1~4 all know that server 1 is normally connected to leaf switch 1-1 and leaf switch 1-2, that is, server 1 can be reached through leaf switch 1-1 and leaf switch 1-2. Therefore, spine switches 1~4 transmit their respective received network traffic to server 1 through leaf switch 1-1 and leaf switch 1-2 according to the load balancing strategy. For example, spine switch 1 divides the network traffic it receives into 2 parts and transmits them to leaf switch 1-1 and leaf switch 1-2 respectively, and then leaf switch 1-1 and leaf switch 1-2 transmit it to server 1, and then server 1 transmits it to a specific IP address. The above process is a load balancing state.
[0053] Among them, it should be noted that the server can sense that the connection with the leaf switch is normal. In the process of server 3 transmitting network traffic to spine switches 1~4 through leaf switches 2-1 and leaf switches 2-2 according to the load balancing strategy, if server 3 senses that the connection with leaf switch 2-1 and leaf switch 2-2 is normal, the load balancing strategy is executed. If server 3 senses that the connection with leaf switch 2-1 is normal and the connection with leaf switch 2-2 is abnormal, the network traffic is transmitted to spine switches 1~4 through leaf switch 2-1.
[0054] In addition, based on any of the above embodiments, if it is determined that the connection between the target server and the target leaf switch is abnormal, the target leaf switch can dynamically revoke the static route from each spine switch so that each spine switch stops transmitting the network traffic whose destination route matches the static route to the target leaf switch after receiving it.
[0055] For example, in the above Figure 1 In the example of the Spine-Leaf network structure shown, if the connection between server 1 and one of the leaf switches 1-1 and 1-2 is normal, and the other connection is abnormal, for example, the connection between server 1 and leaf switch 1-1 is normal, and the connection between server 1 and leaf switch 1-2 is abnormal, then leaf switch 1-1 can transmit the static route of server 1 to spine switches 1 to 4 respectively, so that spine switches 1 to 4 know that the connection between server 1 and leaf switch 1-1 is normal, and leaf switch 1-2 can revoke the static route of server 1 from spine switches 1 to 4 respectively, so that spine switches 1 to 4 know that the connection between server 1 and leaf switch 1-2 is abnormal;
[0056] Furthermore, it is also assumed that server 3 needs to transmit network traffic to server 1, and server 3 is connected normally with leaf switch 2-1 and leaf switch 2-2, and transmits network traffic to spine switches 1-4 as above; spine switches 1-4 all know that server 1 is connected normally with leaf switch 1-1, and abnormally with leaf switch 1-2, that is, server 1 can only be reached through leaf switch 1-1, so spine switches 1-4 transmit their received network traffic to server 1 through leaf switch 1-1, and stop transmitting to server 1 through leaf switch 1-2, and further transmit to a specific IP address by server 1. The above process is a disaster recovery state.
[0057] In addition, if it is determined that the connections between all target leaf switches connected to the target server and the target server are abnormal, for example, in the above example, the connections between server 1 and leaf switches 1-1 and 1-2 are abnormal, then each spine switch cannot transmit network traffic to the target server through any target leaf switch, that is, the target server is in an unavailable state.
[0058] The network communication method based on cloud network provided in this embodiment obtains a static route corresponding to multiple IP addresses of the target server connected to the target leaf switch through any non-stacked target leaf switch in the leaf-spine network structure, wherein the static route includes a static route prefix that unifies multiple IP addresses, and the next hop is the interface IP address of the target server; determines whether the connection between the target server and the target leaf switch is normal; if it is determined that the connection between the target server and the target leaf switch is normal, the static route is transmitted to each spine switch, so that each spine switch receives the network traffic that matches the destination route and the static route and transmits it to the target leaf switch according to the load balancing strategy, and the target leaf switch transmits the network traffic to the target server. By configuring a static route prefix for multiple IP addresses of the target server and sensing whether the connection between the target server and the target leaf switch is normal, normal network traffic transmission of the non-stacked cross-device aggregation network can be achieved, avoiding too many address mapping table entries in the leaf switch and the spine switch, and also ensuring load balancing and link disaster recovery in the network traffic transmission process.
[0059] On the basis of any of the above embodiments, when it is determined that the connection between the target server and the target leaf switch is normal and the static route is transmitted to each spine switch, if it is determined that the IPv4 network connection between the target server and the target leaf switch is normal, the IPv4 network static routes corresponding to the multiple IP addresses of the target server are transmitted to each spine switch, so that each spine switch can know that the IPv4 network connection between the target server and the target leaf switch is normal; and / or, if it is determined that the IPv6 network connection between the target server and the target leaf switch is normal, the IPv6 network static routes corresponding to the multiple IP addresses of the target server are transmitted to each spine switch, so that each spine switch can know that the IPv6 network connection between the target server and the target leaf switch is normal.
[0060] Further, after the target leaf switch transmits the IPv4 network static routes corresponding to the multiple IP addresses of the target server to each spine switch, if each spine switch receives IPv4 network traffic whose destination route matches the above IPv4 network static routes (that is, the IPv4 network traffic that needs to be sent to the target server), each spine switch transmits the received IPv4 network traffic to the target leaf switch according to the load balancing strategy, and the target leaf switch transmits it to the target server; and / or, after the target leaf switch transmits the IPv6 network static routes corresponding to the multiple IP addresses of the target server to each spine switch, if each spine switch receives IPv6 network traffic whose destination route matches the above IPv6 network static routes (that is, the IPv6 network traffic that needs to be sent to the target server), each spine switch transmits the received IPv6 network traffic to the target leaf switch according to the load balancing strategy, and the target leaf switch transmits it to the target server. The process described in this embodiment is similar to the above embodiment, except that IPv4 network traffic and IPv6 network traffic are distinguished.
[0061] On the basis of any of the above embodiments, when the target leaf switch determines whether the connection between the target server and the target leaf switch is normal, the target leaf switch can also set the activation status of the static route according to the judgment result of whether the connection between the target server and the target leaf switch is normal. For example, if the connection between the target server and the target leaf switch is normal, the static route is set to an activated state; if the connection between the target server and the target leaf switch is abnormal, the static route is set to an inactivated state; further, whether to transmit the static route to each spine switch or whether to revoke the static route from each spine switch can be controlled according to the activation status of the static route. Specifically, if the static route is in an activated state, the static route is transmitted to each spine switch; if the static route is in an inactivated state, the static route is revoked from each spine switch.
[0062] Corresponding to the cloud network-based network communication method of the above embodiment, Figure 3 A block diagram of a cloud network-based network communication device provided for an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. The cloud network adopts a leaf-spine network structure, which includes multiple spine switches and multiple leaf switches. Any leaf switch is a non-stackable switch and is connected to each spine switch respectively. Each server is connected to at least two leaf switches. The network communication device is any target leaf switch among the multiple leaf switches. Figure 3 The cloud network-based network communication device 300 includes: an acquisition unit 301, a perception unit 302, and a communication unit 303.
[0063] The acquisition unit 301 is used to acquire a static route corresponding to multiple IP addresses of the target server connected to the target leaf switch; wherein the static route includes a static route prefix unified by the multiple IP addresses, and the next hop is the interface IP address of the target server;
[0064] A sensing unit 302 is used to determine whether the connection between the target server and the target leaf switch is normal;
[0065] The communication unit 303 is used to transmit the static route to each spine switch if it is determined that the connection between the target server and the target leaf switch is normal, so that each spine switch receives the network traffic whose destination route matches the static route and transmits it to the target leaf switch according to the load balancing strategy, and the target leaf switch transmits the network traffic to the target server.
[0066] In one or more embodiments of the present disclosure, the communication unit 303 is further configured to:
[0067] If it is determined that the connection between the target server and the target leaf switch is abnormal, the static route is revoked from each spine switch so that each spine switch stops transmitting the network traffic whose destination route matches the static route to the target leaf switch after receiving it.
[0068] In one or more embodiments of the present disclosure, when determining whether the connection between the target server and the target leaf switch is normal, the sensing unit 302 is configured to:
[0069] Determining whether an address resolution and / or neighbor discovery request sent by the target server is received;
[0070] If the address resolution and / or neighbor discovery request sent by the target server is received, it is determined that the connection between the target server and the target leaf switch is normal.
[0071] In one or more embodiments of the present disclosure, when determining whether an address resolution and / or neighbor discovery request sent by the target server is received, the sensing unit 302 is configured to:
[0072] It is determined whether there is an address resolution and / or neighbor discovery address mapping entry corresponding to the target server in the host address mapping table entry. If so, it is determined that an address resolution and / or neighbor discovery request sent by the target server is received.
[0073] In one or more embodiments of the present disclosure, when the sensing unit 302 receives an address resolution and / or neighbor discovery request sent by the target server and determines that the connection between the target server and the target leaf switch is normal, it is configured to:
[0074] If only the address resolution request sent by the target server is received, it is determined that the first Internet Protocol network connection between the target server and the target leaf switch is normal; or
[0075] If only the neighbor discovery request sent by the target server is received, it is determined that the second Internet Protocol network connection between the target server and the target leaf switch is normal; or
[0076] If the address resolution request and the neighbor discovery request sent by the target server are received, it is determined that the connection based on the first Internet Protocol network and the connection based on the second Internet Protocol network between the target server and the target leaf switch are normal.
[0077] In one or more embodiments of the present disclosure, when the communication unit 303 determines that the connection between the target server and the target leaf switch is normal, the static route is transmitted to each spine switch, and is used to:
[0078] If it is determined that the first Internet Protocol network connection between the target server and the target leaf switch is normal, the first Internet Protocol network static routes corresponding to the multiple IP addresses of the target server are transmitted to each spine switch; and / or
[0079] If it is determined that the second Internet Protocol network connection between the target server and the target leaf switch is normal, the second Internet Protocol network static routes corresponding to the multiple IP addresses of the target server are transmitted to each spine switch.
[0080] In one or more embodiments of the present disclosure, the communication unit 303 is further configured to:
[0081] After transmitting the first Internet Protocol network-based static routes corresponding to the multiple IP addresses of the target server to each spine switch, receiving the first Internet Protocol network-based traffic whose destination routes transmitted by each spine switch according to the load balancing strategy match the first Internet Protocol network-based static routes, and transmitting the first Internet Protocol network-based traffic to the target server; and / or
[0082] After transmitting the second Internet Protocol network-based static routes corresponding to the multiple IP addresses of the target server to each spine switch, the second Internet Protocol network-based traffic whose destination routes transmitted by each spine switch according to the load balancing strategy match the second Internet Protocol network-based static routes is received, and the second Internet Protocol network-based traffic is transmitted to the target server.
[0083] In one or more embodiments of the present disclosure, when transmitting the static route to each spine switch, the communication unit 303 is used to:
[0084] The static routes are converted into border gateway protocol routes and then transmitted to each spine switch.
[0085] In one or more embodiments of the present disclosure, the sensing unit 302 is further configured to:
[0086] Based on the judgment result of whether the connection between the target server and the target leaf switch is normal, the activation state of the static route is set, and the activation state is used to indicate that the static route is transmitted to each spine switch, or the static route is revoked from each spine switch.
[0087] The device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be repeated here.
[0088] refer to Figure 4 , which shows a schematic diagram of the structure of an electronic device 400 suitable for implementing the embodiment of the present disclosure, and the electronic device 400 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0089] like Figure 4As shown, the electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 to a random access memory (RAM) 403. Various programs and data required for the operation of the electronic device 400 are also stored in the RAM 403. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0090] Typically, the following devices may be connected to the I / O interface 405: an input device 406 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 400 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0091] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 409, or installed from the storage device 408, or installed from the ROM402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0092] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0093] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0094] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.
[0095] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0096] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0097] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".
[0098] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0099] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0100] In a first aspect, according to one or more embodiments of the present disclosure, a network communication method based on a cloud network is provided, wherein the cloud network adopts a leaf-spine network structure, wherein the leaf-spine network structure includes a plurality of spine switches and a plurality of leaf switches, wherein any leaf switch is a non-stackable switch and is respectively connected to each spine switch, and each server is connected to at least two leaf switches, wherein the method includes:
[0101] Obtain a static route corresponding to multiple IP addresses of a target server connected to a target leaf switch; wherein the static route includes a static route prefix unified by the multiple IP addresses, and the next hop is the interface IP address of the target server; the target leaf switch is any one of the multiple leaf switches;
[0102] Determine whether the connection between the target server and the target leaf switch is normal;
[0103] If it is determined that the connection between the target server and the target leaf switch is normal, the static route is transmitted to each spine switch, so that after each spine switch receives the network traffic whose destination route matches the static route, it is transmitted to the target leaf switch according to the load balancing strategy, and the target leaf switch transmits the network traffic to the target server.
[0104] According to one or more embodiments of the present disclosure, the method further includes:
[0105] If it is determined that the connection between the target server and the target leaf switch is abnormal, the static route is revoked from each spine switch so that each spine switch stops transmitting the network traffic whose destination route matches the static route to the target leaf switch after receiving it.
[0106] According to one or more embodiments of the present disclosure, the determining whether the connection between the target server and the target leaf switch is normal includes:
[0107] Determining whether an address resolution and / or neighbor discovery request sent by the target server is received;
[0108] If the address resolution and / or neighbor discovery request sent by the target server is received, it is determined that the connection between the target server and the target leaf switch is normal.
[0109] According to one or more embodiments of the present disclosure, the determining whether the address resolution and / or neighbor discovery request sent by the target server is received includes:
[0110] It is determined whether there is an address resolution and / or neighbor discovery address mapping entry corresponding to the target server in the host address mapping table entry. If so, it is determined that an address resolution and / or neighbor discovery request sent by the target server is received.
[0111] According to one or more embodiments of the present disclosure, if an address resolution and / or neighbor discovery request sent by the target server is received, determining that the connection between the target server and the target leaf switch is normal includes:
[0112] If only the address resolution request sent by the target server is received, it is determined that the first Internet Protocol network connection between the target server and the target leaf switch is normal; or
[0113] If only the neighbor discovery request sent by the target server is received, it is determined that the second Internet Protocol network connection between the target server and the target leaf switch is normal; or
[0114] If the address resolution request and the neighbor discovery request sent by the target server are received, it is determined that the connection based on the first Internet Protocol network and the connection based on the second Internet Protocol network between the target server and the target leaf switch are normal.
[0115] According to one or more embodiments of the present disclosure, if it is determined that the connection between the target server and the target leaf switch is normal, transmitting the static route to each spine switch includes:
[0116] If it is determined that the first Internet Protocol network connection between the target server and the target leaf switch is normal, the first Internet Protocol network static routes corresponding to the multiple IP addresses of the target server are transmitted to each spine switch; and / or
[0117] If it is determined that the second Internet Protocol network connection between the target server and the target leaf switch is normal, the second Internet Protocol network static routes corresponding to the multiple IP addresses of the target server are transmitted to each spine switch.
[0118] According to one or more embodiments of the present disclosure, the method further includes:
[0119] After transmitting the first Internet Protocol network-based static routes corresponding to the multiple IP addresses of the target server to each spine switch, receiving the first Internet Protocol network-based traffic whose destination routes transmitted by each spine switch according to the load balancing strategy match the first Internet Protocol network-based static routes, and transmitting the first Internet Protocol network-based traffic to the target server; and / or
[0120] After transmitting the second Internet Protocol network-based static routes corresponding to the multiple IP addresses of the target server to each spine switch, the second Internet Protocol network-based traffic whose destination routes transmitted by each spine switch according to the load balancing strategy match the second Internet Protocol network-based static routes is received, and the second Internet Protocol network-based traffic is transmitted to the target server.
[0121] According to one or more embodiments of the present disclosure, transmitting the static route to each spine switch includes:
[0122] The static routes are converted into border gateway protocol routes and then transmitted to each spine switch.
[0123] According to one or more embodiments of the present disclosure, the method further includes:
[0124] Based on the judgment result of whether the connection between the target server and the target leaf switch is normal, the activation state of the static route is set, and the activation state is used to indicate that the static route is transmitted to each spine switch, or the static route is revoked from each spine switch.
[0125] In a second aspect, according to one or more embodiments of the present disclosure, a network communication device based on a cloud network is provided, wherein the cloud network adopts a leaf-spine network structure, wherein the leaf-spine network structure includes a plurality of spine switches and a plurality of leaf switches, wherein any leaf switch is a non-stackable switch and is respectively connected to each spine switch, and each server is connected to at least two leaf switches, wherein the network communication device is any target leaf switch among the plurality of leaf switches, and wherein the network communication device includes:
[0126] An acquisition unit, configured to acquire a static route corresponding to a plurality of IP addresses of a target server connected to the target leaf switch; wherein the static route includes a static route prefix unified by the plurality of IP addresses, and the next hop is an interface IP address of the target server;
[0127] A sensing unit, used to determine whether the connection between the target server and the target leaf switch is normal;
[0128] A communication unit is used to transmit the static route to each spine switch if it is determined that the connection between the target server and the target leaf switch is normal, so that each spine switch receives the network traffic whose destination route matches the static route and transmits it to the target leaf switch according to the load balancing strategy, and the target leaf switch transmits the network traffic to the target server.
[0129] According to one or more embodiments of the present disclosure, the communication unit is further configured to:
[0130] If it is determined that the connection between the target server and the target leaf switch is abnormal, the static route is revoked from each spine switch so that each spine switch stops transmitting the network traffic whose destination route matches the static route to the target leaf switch after receiving it.
[0131] According to one or more embodiments of the present disclosure, when the sensing unit determines whether the connection between the target server and the target leaf switch is normal, it is used to:
[0132] Determining whether an address resolution and / or neighbor discovery request sent by the target server is received;
[0133] If the address resolution and / or neighbor discovery request sent by the target server is received, it is determined that the connection between the target server and the target leaf switch is normal.
[0134] According to one or more embodiments of the present disclosure, when the perception unit determines whether an address resolution and / or neighbor discovery request sent by the target server is received, it is used to:
[0135] It is determined whether there is an address resolution and / or neighbor discovery address mapping entry corresponding to the target server in the host address mapping table entry. If so, it is determined that an address resolution and / or neighbor discovery request sent by the target server is received.
[0136] According to one or more embodiments of the present disclosure, when the perception unit receives an address resolution and / or neighbor discovery request sent by the target server and determines that the connection between the target server and the target leaf switch is normal, it is used to:
[0137] If only the address resolution request sent by the target server is received, it is determined that the first Internet Protocol network connection between the target server and the target leaf switch is normal; or
[0138] If only the neighbor discovery request sent by the target server is received, it is determined that the second Internet Protocol network connection between the target server and the target leaf switch is normal; or
[0139] If the address resolution request and the neighbor discovery request sent by the target server are received, it is determined that the connection based on the first Internet Protocol network and the connection based on the second Internet Protocol network between the target server and the target leaf switch are normal.
[0140] According to one or more embodiments of the present disclosure, when the communication unit determines that the connection between the target server and the target leaf switch is normal, the static route is transmitted to each spine switch, and is used to:
[0141] If it is determined that the first Internet Protocol network connection between the target server and the target leaf switch is normal, the first Internet Protocol network static routes corresponding to the multiple IP addresses of the target server are transmitted to each spine switch; and / or
[0142] If it is determined that the second Internet Protocol network connection between the target server and the target leaf switch is normal, the second Internet Protocol network static routes corresponding to the multiple IP addresses of the target server are transmitted to each spine switch.
[0143] According to one or more embodiments of the present disclosure, the communication unit is further configured to:
[0144] After transmitting the first Internet Protocol network-based static routes corresponding to the multiple IP addresses of the target server to each spine switch, receiving the first Internet Protocol network-based traffic whose destination routes transmitted by each spine switch according to the load balancing strategy match the first Internet Protocol network-based static routes, and transmitting the first Internet Protocol network-based traffic to the target server; and / or
[0145] After transmitting the second Internet Protocol network-based static routes corresponding to the multiple IP addresses of the target server to each spine switch, the second Internet Protocol network-based traffic whose destination routes transmitted by each spine switch according to the load balancing strategy match the second Internet Protocol network-based static routes is received, and the second Internet Protocol network-based traffic is transmitted to the target server.
[0146] According to one or more embodiments of the present disclosure, when the communication unit transmits the static route to each spine switch, it is used to:
[0147] The static routes are converted into border gateway protocol routes and then transmitted to each spine switch.
[0148] According to one or more embodiments of the present disclosure, the sensing unit is further configured to:
[0149] Based on the judgment result of whether the connection between the target server and the target leaf switch is normal, the activation state of the static route is set, and the activation state is used to indicate that the static route is transmitted to each spine switch, or the static route is revoked from each spine switch.
[0150] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: at least one processor and a memory;
[0151] The memory stores computer-executable instructions;
[0152] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the cloud network-based network communication method as described in the first aspect and various possible designs of the first aspect.
[0153] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer execution instructions. When a processor executes the computer execution instructions, the cloud network-based network communication method described in the first aspect and various possible designs of the first aspect is implemented.
[0154] In a fifth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, comprising computer execution instructions. When a processor executes the computer execution instructions, the cloud network-based network communication method as described in the first aspect and various possible designs of the first aspect is implemented.
[0155] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0156] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0157] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A network communication method based on a cloud network, characterized in that: The cloud network adopts a leaf-spine network structure, the leaf-spine network structure includes multiple spine switches and multiple leaf switches, any leaf switch is a non-stackable switch and is respectively connected to each spine switch, each server is connected to at least two leaf switches, and the method includes: Obtain a static route corresponding to multiple IP addresses of a target server connected to a target leaf switch; wherein the static route includes a static route prefix unified by the multiple IP addresses, and the next hop is the interface IP address of the target server; the target leaf switch is any one of the multiple leaf switches; Determine whether the connection between the target server and the target leaf switch is normal; If it is determined that the connection between the target server and the target leaf switch is normal, the static route is transmitted to each spine switch, so that after each spine switch receives the network traffic whose destination route matches the static route, it is transmitted to the target leaf switch according to the load balancing strategy, and the target leaf switch transmits the network traffic to the target server.
2. The method according to claim 1, characterized in that The method further comprises: If it is determined that the connection between the target server and the target leaf switch is abnormal, the static route is revoked from each spine switch so that each spine switch stops transmitting the network traffic whose destination route matches the static route to the target leaf switch after receiving it.
3. The method according to claim 1 or 2, characterized in that: The determining whether the connection between the target server and the target leaf switch is normal includes: Determining whether an address resolution and / or neighbor discovery request sent by the target server is received; If the address resolution and / or neighbor discovery request sent by the target server is received, it is determined that the connection between the target server and the target leaf switch is normal.
4. The method according to claim 3, characterized in that The determining whether the address resolution and / or neighbor discovery request sent by the target server is received includes: It is determined whether there is an address resolution and / or neighbor discovery address mapping entry corresponding to the target server in the host address mapping table entry. If so, it is determined that an address resolution and / or neighbor discovery request sent by the target server is received.
5. The method according to claim 3, characterized in that: If the address resolution and / or neighbor discovery request sent by the target server is received, determining that the connection between the target server and the target leaf switch is normal includes: If only the address resolution request sent by the target server is received, it is determined that the first Internet Protocol network connection between the target server and the target leaf switch is normal; or If only the neighbor discovery request sent by the target server is received, it is determined that the second Internet Protocol network connection between the target server and the target leaf switch is normal; or If the address resolution request and the neighbor discovery request sent by the target server are received, it is determined that the connection based on the first Internet Protocol network and the connection based on the second Internet Protocol network between the target server and the target leaf switch are normal.
6. The method according to claim 5, characterized in that If it is determined that the connection between the target server and the target leaf switch is normal, transmitting the static route to each spine switch includes: If it is determined that the first Internet Protocol network connection between the target server and the target leaf switch is normal, the first Internet Protocol network static routes corresponding to the multiple IP addresses of the target server are transmitted to each spine switch; and / or If it is determined that the second Internet Protocol network connection between the target server and the target leaf switch is normal, the second Internet Protocol network static routes corresponding to the multiple IP addresses of the target server are transmitted to each spine switch.
7. The method according to claim 6, characterized in that The method further comprises: After transmitting the first Internet Protocol network-based static routes corresponding to the multiple IP addresses of the target server to each spine switch, receiving the first Internet Protocol network-based traffic whose destination routes transmitted by each spine switch according to the load balancing strategy match the first Internet Protocol network-based static routes, and transmitting the first Internet Protocol network-based traffic to the target server; and / or After transmitting the second Internet Protocol network-based static routes corresponding to the multiple IP addresses of the target server to each spine switch, the second Internet Protocol network-based traffic whose destination routes transmitted by each spine switch according to the load balancing strategy match the second Internet Protocol network-based static routes is received, and the second Internet Protocol network-based traffic is transmitted to the target server.
8. The method according to claim 1 or 2, characterized in that: The transmitting the static route to each spine switch includes: The static routes are converted into border gateway protocol routes and then transmitted to each spine switch.
9. The method according to claim 1 or 2, characterized in that: The method further comprises: Based on the judgment result of whether the connection between the target server and the target leaf switch is normal, the activation state of the static route is set, and the activation state is used to indicate that the static route is transmitted to each spine switch, or the static route is revoked from each spine switch.
10. A network communication device based on a cloud network, characterized in that: The cloud network adopts a leaf-spine network structure, which includes multiple spine switches and multiple leaf switches, any leaf switch is a non-stackable switch and is respectively connected to each spine switch, each server is connected to at least two leaf switches, and the network communication device is any target leaf switch among the multiple leaf switches, and the network communication device includes: An acquisition unit, configured to acquire a static route corresponding to a plurality of IP addresses of a target server connected to the target leaf switch; wherein the static route includes a static route prefix unified by the plurality of IP addresses, and the next hop is an interface IP address of the target server; A sensing unit, used to determine whether the connection between the target server and the target leaf switch is normal; A communication unit is used to transmit the static route to each spine switch if it is determined that the connection between the target server and the target leaf switch is normal, so that each spine switch receives the network traffic whose destination route matches the static route and transmits it to the target leaf switch according to the load balancing strategy, and the target leaf switch transmits the network traffic to the target server.
11. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the method according to any one of claims 1 to 9 is implemented.
13. A computer program product, characterized in that The method comprises computer-executable instructions, and when a processor executes the computer-executable instructions, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Network flow control method and switch device
CN106982179A
Method and device for improving high availability of network
CN111030926A
