[go: up one dir, main page]

CN115550247A - Equivalent route management method, switch system and storage medium - Google Patents

Equivalent route management method, switch system and storage medium Download PDF

Info

Publication number
CN115550247A
CN115550247A CN202110727949.1A CN202110727949A CN115550247A CN 115550247 A CN115550247 A CN 115550247A CN 202110727949 A CN202110727949 A CN 202110727949A CN 115550247 A CN115550247 A CN 115550247A
Authority
CN
China
Prior art keywords
next hop
group
switch
ecmp
hardware table
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110727949.1A
Other languages
Chinese (zh)
Inventor
林宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN202110727949.1A priority Critical patent/CN115550247A/en
Priority to PCT/CN2022/099866 priority patent/WO2023273937A1/en
Publication of CN115550247A publication Critical patent/CN115550247A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • H04L45/245Link aggregation, e.g. trunking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/14Routing performance; Theoretical aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • H04L45/243Multipath using M+N parallel active paths
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9057Arrangements for supporting packet reassembly or resequencing

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides an equivalent routing management method, switches, a switch system and a storage medium, wherein before writing the next hop of a next hop group into an ECMP group hardware table, each switch in a cross-device link aggregation switch system sorts the next hop in the next hop group of the equivalent routing ECMP according to the same system sharing sorting rule, so that the next hop in the next hop group of the ECMP is sorted according to the same system sharing sorting rule, the sequence of each next hop in the next hop group in the ECMP group hardware table of each switch of the cross-device link aggregation switch system can be the same, the problem that data messages of the same data stream are out of order or even lack at a target communication device side due to processing of different servers can be avoided, the reliability and stability of data stream transmission can be improved, and the communication quality can be enhanced.

Description

Equivalent routing management method, switch system and storage medium
Technical Field
The embodiments of the present invention relate to, but are not limited to, the field of communications, and in particular, to, but not limited to, an equivalent routing management method, a switch system, and a storage medium.
Background
Two switches in the cross-device link aggregation switch system independently calculate routes, and formed ECMPs (Equal Cost Multi-paths) are the same, but because the next hop sequence of the two switches ECMPs cannot be guaranteed, a situation that data packets of the same data flow are forwarded to different downstream servers is very easy to occur, and service processing of different servers is different, so that a situation that the data packets of the data flow are out of order when reaching a target communication device may occur.
Disclosure of Invention
The embodiment of the invention provides an equivalent routing management method, a switch system and a storage medium, and solves the technical problems that: the problem of data message disorder at the target communication equipment side caused by the fact that different switches in a cross-equipment link aggregation switch system forward messages of the same data flow to different downstream servers is solved.
The embodiment of the invention provides an equivalent routing management method, which comprises the following steps: sorting next hops in a next hop group of the equivalent routing ECMP according to a system common sorting rule, wherein the system common sorting rule is a sorting rule commonly adopted by all switches in the cross-equipment link aggregation switch system when sorting all next hops in the next hop group; and writing the next hop in the next hop group into an ECMP group hardware table according to the sequencing result, wherein the ECMP group hardware table is used for determining the next hop of the data message when the switch transmits the data message.
The embodiment of the invention also provides a switch, which comprises a processor, a memory and a communication bus; the communication bus is used for realizing connection communication between the processor and the memory; the processor is configured to execute one or more programs stored in the memory to implement the steps of the equivalent route management method described above.
The embodiment of the invention also provides a cross-device link aggregation switch system which comprises two switches, wherein the switches are respectively in communication connection with the target communication device through the intermediate communication device, and the communication links from the two switches to the target communication device comprise equivalent links.
Embodiments of the present invention further provide a storage medium, where the storage medium stores an equivalent route management program, and the equivalent route management program may be executed by one or more processors to implement the steps of the equivalent route management method.
According to the equivalent routing management method, the switch system and the storage medium provided by the embodiment of the invention, because the switch in the cross-device link aggregation switch system sorts the next hop in the next hop group of the equivalent routing ECMP according to the system shared sorting rule before writing the next hop in the next hop group into the ECMP group hardware table, and then writes the next hop group in the ECMP group hardware table according to the sorting result, and the system shared sorting rule adopted by the switch sorting is the same as the sorting rule adopted by other switches in the cross-device link aggregation switch system for sorting the next hop group, the next hop in the ECMP next hop group is sorted according to the same system shared sorting rule, so that the sequence of each next hop in the next hop group in the cross-device link aggregation switch system is the same as that of the other switches in the cross-device link aggregation switch system, the same export next hop is selected when the data messages of the same data flow are forwarded by different switches, the data messages are forwarded to the same switch in the ECMP group hardware table, and the problem of data flow loss caused by the same data flow is avoided, and the communication reliability of the data flow is improved.
Additional features and corresponding advantages of the invention are set forth in the description which follows, and it is understood that at least some of the advantages will be apparent from the description of the invention.
Drawings
Fig. 1 is a schematic diagram of a communication system shown in a first embodiment of the present invention;
fig. 2 is a schematic diagram illustrating forwarding of data packets of the same data flow across switches of a device link aggregation switch system in the related art according to a first embodiment of the present invention;
fig. 3 is a schematic flowchart of an equivalent routing management method according to an embodiment of the present invention;
fig. 4 is a schematic diagram illustrating that a switch forwards a data packet of the same data flow in a cross-device link aggregation switch system according to an embodiment of the present invention;
fig. 5 is a schematic flowchart of a hardware table of an application ECMP group of the switch according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a processing flow of the switch after sensing a failed next hop according to an embodiment of the present invention;
fig. 7 is a schematic diagram of another processing flow of the switch after sensing a failed next hop according to the first embodiment of the present invention;
fig. 8 is a flowchart illustrating an equivalent routing management method according to a second embodiment of the present invention;
fig. 9 is a schematic diagram of a hardware structure of a switch provided in the third embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention are described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The first embodiment is as follows:
referring to fig. 1, fig. 1 shows a communication system 1 including a cross-device link aggregation switch system 10, an upstream gateway device 11, a downstream server 12, and a user terminal 13, where the cross-device link aggregation switch system 10 is in communication connection with the upstream gateway device 11 on one hand, and with the user terminal 13 through the downstream server 12 on the other hand.
Included in cross device link aggregation switch system 10 is a first switch a and a second switch B. The first switch a includes an ingress port A0 and four egress ports, A1, A2, A3, and A4, respectively, and the second switch B also includes an ingress port B0 and four egress ports, B1, B2, B3, and B4, respectively. The downstream server 12 includes four servers, S1, S2, S3, and S4, whose IP addresses are 10.10.10.1, 10.10.10.2, 10.10.10.3, and 10.10.10.4, respectively. The four output ports of the first switch a are respectively in communication connection with the four servers, and the four output ports of the second switch B are also respectively in communication connection with the four servers, so that in the communication system 1, an equivalent link is formed between the cross-device link aggregation switch system 10 and the user device. As can be seen from fig. 1, the first switch a has the correspondence shown in table 1:
TABLE 1
Figure BDA0003138213280000021
Figure BDA0003138213280000031
There is a correspondence in the second switch B as shown in table 2:
TABLE 2
Outlet port IP address Server
B1 10.10.10.1 S1
B2 10.10.10.2 S2
B3 10.10.10.3 S3
B4 10.10.10.4 S4
Obviously, the contents of the next hop entries written into the ECMP group hardware table by the first switch a and the second switch B are consistent, but due to the different writing orders of the different switches, the ordering of the next hop in the ECMP group hardware table of the different switches is different, for example, the order in the ECMP group hardware table in the first switch a is as shown in table 3:
TABLE 3
Figure BDA0003138213280000032
And the sequence in the second switch B is shown in table 4:
TABLE 4
Figure BDA0003138213280000033
In this case, if the data packet a of a data flow is forwarded to the first switch a and the second switch B, respectively, and the two switches determine that the data packet of the data flow a should be forwarded from the first next hop in the hardware table of the ECMP group after applying the same load balancing algorithm calculation, please refer to fig. 2, the first switch a will forward the corresponding data packet to the server S1 based on A1-10.10.10.1 (indicated by the thick solid line in fig. 2), and the second switch B will forward the corresponding data packet to the server S2 based on B2-10.10.10.2 (indicated by the thick dotted line in fig. 2).
Because the service processing of the server S1 and the server S2 are different, it is difficult to ensure that the data packets received first are transmitted to the user terminal 13 first and then the received data packets are transmitted to the user terminal 13 later between the servers, in this case, the data packets of the same data stream a will have a problem of disorder at the user terminal 13 side, and even if one of the two servers selected by the two switches has a fault, the data packets will have a problem of certainty at the user terminal 13 side.
Based on this, the present embodiment provides an equivalent routing management method, please refer to the flow diagram of the equivalent routing management method shown in fig. 3:
s302: and sorting the next hop in the next hop group of the ECMP according to a system common sorting rule.
It can be understood that although there is an equivalent route between the first switch a and the user terminal 13 in fig. 1, if there is only one switch, the problem of forwarding the data packets of the same data flow to different downstream servers 12 does not occur, and therefore, the equivalent route management method in this embodiment is mainly applied in a cross-device link aggregation scenario, and the equivalent route management method can be executed by a switch in the cross-device link aggregation switch system.
After the switch determines the next hop group of the ECMP, the next hops in the next hop group may be sorted according to a system common sorting rule, it needs to be noted that, in the cross-device link aggregation switch system, each switch will sort the next hop group, and in order to ensure that the switches can write the next hops in the next hop group into the ECMP group hardware table in the same order finally, it needs to ensure that each switch uses the same sorting rule to sort the next hops in the next hop group, so in this embodiment, the system common sorting rule used by the switch to sort the next hops in the next hop group is the same as the sorting rule used by other switches in the cross-device link aggregation switch system to which the switch belongs.
In some examples of this embodiment, the system-shared ordering rule may be negotiated and determined by each switch, and in still other examples, the system-shared ordering rule may be pre-configured in each switch. In an example of this embodiment, each switch is communicatively connected to the same management device, and the management device may transmit the system-common ordering rule to each switch.
In some examples of this embodiment, the system common ordering rule may be set based on the IP addresses corresponding to the next hops, for example, the IP addresses corresponding to the next hops are ordered from small to large, or the IP addresses corresponding to the next hops are ordered from large to small. In other examples, the system common ordering rule may be set according to the device identifiers corresponding to the next hops, for example, the ordering is performed in an order from small to large according to the device identifiers corresponding to the next hops. In some examples, each downstream device individually establishes a communication connection with the cross-device link aggregation switch system, and in these examples, the system common ordering rule may be to order the devices and switches corresponding to the next hop, for example, continuing with fig. 1 as an example, if the servers S1, S2, S3, and S4 individually establish a communication connection with the cross-device link aggregation switch system 10, the next hop corresponding to the server S1 should be arranged at the top, and the next hop corresponding to the server S4 should be arranged at the bottom. It is needless to say that, as long as it is ensured that each switch uses the same sorting rule to sort the next hop in the cross-device link aggregation switch system, the specific form of the sorting rule shared by the system is not limited in this embodiment.
S304: and writing the next hop in the next hop group into an ECMP group hardware table according to the sorting result.
After the switch finishes sorting each next hop in the ECMP next hop group, a sorting result may be obtained, and then the switch may write each next hop into the ECMP group hardware table according to the sorting result, so that after receiving a data packet in a subsequent process, a next hop corresponding to the data packet is determined according to the ECMP group hardware table.
Because the sequence of writing the next hop into the hardware table of the ECMP group by each switch in the cross-device link aggregation switch system is the same, in the data transmission process, even if the data packets of the same data flow are forwarded to different switches, as long as the switches distribute the packets to the output ports according to the same load balancing algorithm, it can be ensured that the data packets of the same data flow are forwarded to the same downstream device. For example, referring to fig. 4, assuming that the packets of one data flow B are forwarded to a first switch a and a second switch B, which perform load balancing by using a hash algorithm, and the hash value calculated for the data flow B is 3, which indicates that the received data packet of the data flow B should be forwarded according to the 3 rd next hop in the ECMP group hardware table, the first switch a forwards the data packet of the data flow B to the server S3 through its own egress port A3 (indicated by a bold solid line in fig. 4), and the second switch B also forwards the data packet of the data flow B to the server S3 through its own egress port B3 (indicated by a bold dashed line in fig. 4).
After writing the next hop in the next hop group into the ECMP group hardware table according to the sorting result, the switch may forward the data packet by using the ECMP group hardware table, for example, please refer to a flowchart shown in fig. 5:
s502: and calculating the destination IP address of the received data message according to a Hash algorithm so as to select the next hop for the data message from the ECMP group hardware table.
In this embodiment, the Hash (Hash) algorithm mainly determines a next hop for a data packet according to a next hop load balancing principle based on a destination IP address of the data packet, optionally, when the switch performs ECMP routing on the data packet, the switch performs Hash calculation on the destination IP address of the data packet, and then determines an egress next hop corresponding to the data packet in an ECMP group hardware table using the Hash calculation value.
S504: and forwarding the data message through the selected next hop.
After determining the next hop of the egress, the switch may send the data packet out using the corresponding next hop of the egress.
It can be understood that, after each switch in the cross-device link aggregation switch system sequentially writes the next hop in the next-hop group into the ECMP group hardware table, there is a high possibility that the next-hop group may also change, for example, an equivalent link may have a new member added, or some member or members in the equivalent link fail, in these cases, the ECMP group hardware table of the switch also needs to be updated, and each switch in the cross-device link aggregation switch system may need to reorder the next hops before updating the ECMP group hardware table:
for example, in some scenarios, members need to be added to the next hop group, that is, a new next hop needs to be added to the next hop group, the switch may continue to reorder each next hop in the original next hop group and the new next hop according to the system common ordering rule, and after the ordering is completed, the switch may update the ECMP group hardware table according to the result of the reordering. It can be understood that, in the process of updating the ECMP group hardware table, the switch may compare the sequence number of each next hop in the ECMP group hardware table and the sequence number of each next hop in the reordering result, and only rewrite the next hop with a changed sequence number, for example, assuming that the original sequence of each next hop in the ECMP group hardware table is A1, A3, A4, and A7, and the reordering result after adding the member A5 is A1, A3, A4, A5, and A7, the switch may not change the first three next hops in the ECMP group hardware table, but write the original position of A7 into A5, and then write into A7. It should be appreciated that other switches in the cross-device link aggregation switch system will perform the add procedure in the same manner when sensing that a new next hop needs to be added. In addition, the system shared ordering rule used by each switch to order the next hop group for the first time may be the same as or different from the system shared ordering rule used by each switch in the process of adding a new next hop, as long as each switch in the system uses the same ordering rule at the same stage.
In other scenarios, the next hop group may have a failed next hop due to a member failure in the equivalent link, and in some examples, the switch may directly remove the failed next hop from the next hop group, reorder the remaining valid next hops, and then update the ECMP group hardware table according to the result of the reordering. However, it is understood that, since the switch is most likely to be transmitting data when the next hop of failure occurs, many data packets are allocated by the switch according to the ECMP group hardware table, in which case if the switch directly updates the ECMP group hardware table, some of the allocated data packets will be lost. In order to reduce packet loss and improve stability and reliability of data transmission, in some examples of this embodiment, the switch may perform processing according to the flow shown in fig. 6:
s602: and selecting one invalid next hop in the hardware table of the ECMP group from the valid next hops of the next hop group according to a common selection rule of the system.
When the switch senses that the next hop in the next hop group is invalid, the switch can immediately select one invalid next hop in the hardware table of the replacement ECMP group from other valid next hops in the next hop group according to a common selection rule of the system, and the selected valid next hop (for convenience of introduction, the selected valid next hop is denoted as a temporary next hop) is used for temporarily replacing the invalid next hop in the hardware table of the ECMP group to finish the forwarding work of the data message, so that the problem of packet loss caused by suddenly interrupting the forwarding work of the data message at each output port of the switch can be avoided.
The "system common selection rule" is similar to the "system common ordering rule" and is a selection rule commonly used among the switches of the inter-device link aggregation switch system, so that, in this embodiment, after each switch senses that a wireless next hop occurs in a next hop group, a temporary next hop is selected from the remaining valid next hops according to the same selection rule, thereby ensuring that data packets of the same data flow are not forwarded to different downstream devices.
In some examples, when selecting the temporary next hop, the switch may select based on the IP address of the valid next hop, that is, the system common selection rule is set based on the IP address corresponding to the next hop, for example, in some examples, the system common selection rule requires the switch to select, as the temporary next hop, one having the largest IP address value from each valid next hop; in other examples, the system common selection rule requires that the one with the smallest IP address value be selected from among the valid next hops as the temporal next hop. In some examples, the system common selection rule may be set based on a current ordering in the ECMP group hardware table, for example, the system common selection rule requires that a next hop ranked first after an invalid next hop is removed from the ECMP group hardware table as a temporal next hop, or that a next hop ranked last after an invalid next hop is removed from the ECMP group hardware table as a temporal next hop. It is needless to say that, as long as it is ensured that each switch uses the same selection rule in the cross-device link aggregation switch system, a specific form of the selection rule shared by the system is not limited in this embodiment.
S604: and reordering the effective next hops in the next hop group according to a system common ordering rule.
It can be understood that, when the temporary next hop is written into the location of the original failed next hop in the ECMP group hardware table, the temporary next hop in the ECMP group hardware table occurs twice, for example, assuming that the next hop corresponding to A3 in the four egress ports A1, A2, A3, and A4 fails, and then the next hop corresponding to A4 is selected as the temporary next hop, the next hop corresponding to A1, A2, A4, and A4 is written in the ECMP group hardware table and thus the next hop corresponding to A4 bears duplicate data packet forwarding work, which results in load imbalance. Therefore, in order to balance the load, the switch should update the hardware table of the ECMP group after the invalid next hop is removed, so that the switch can reorder the remaining valid next hops according to the system common ordering rule after the invalid next hop is removed.
S606: and updating the ECMP group hardware table according to the reordering result.
After reordering, the switch may update the ECMP group hardware table according to the result of the reordering, which is similar to the updating of the ECMP group hardware table in the process of adding the next hop, and the switch may compare the sequence number of each next hop in the ECMP group hardware table and the sequence number of each next hop in the result of the reordering, and only rewrite the next hop with a changed sequence number, for example, assuming that the sequence of each next hop in the ECMP group hardware table is A1, A3, A4, and A7, and after A4 fails, the result of the reordering is A1, A3, and A7, the switch may not change the first two next hops in the ECMP group hardware table, but write the original position of A4 into A7, and delete the last next hop in the original ECMP group hardware table.
It should be appreciated that other switches in the cross-device link aggregation switch system will perform the update procedure in the same manner when sensing that the next hop has failed. In addition, the system shared ordering rule used by each switch to order the next hop group for the first time may be the same as or different from the system shared ordering rule used by each switch in the process of removing the failed next hop, as long as each switch in the system uses the same ordering rule at the same stage.
It can be understood that, if a next hop is originally arranged at the end position in the ECMP group hardware table, that is, the next hop is the end next hop of the next hop group, after the next hop fails, the sorting result obtained after the other valid next hops in the next hop group are sorted according to the system common sorting rule does not change, and therefore, the switch updates the ECMP group hardware table and does not affect the data packet forwarding of other next hops. Therefore, in this case, the switch may not choose to replace the failed next hop in the ECMP group hardware table with the temporary next hop, but delete the next hop from the ECMP group hardware table directly upon sensing that the next hop has failed. Therefore, in some examples of this embodiment, the switch will deal with the failure of the next hop in the hardware table of the ECMP group according to the flow shown in fig. 7:
s702: the switch senses that a next hop in the ECMP group hardware table has failed.
S704: the switch determines whether the failed next hop is the end next hop in the ECMP group hardware table.
If the determination result is yes, the switch performs S706, otherwise the switch performs S708.
S706: the switch deletes the failed next hop directly from the ECMP group hardware table.
When the switch determines that the failed next hop is listed at the end of the ECMP group hardware table, it may delete the failed next hop directly in the ECMP group hardware table.
S708: and selecting one invalid next hop in the hardware table of the ECMP group from the valid next hops of the next hop group according to a common selection rule of the system.
S710: and reordering the effective next hops in the next hop group according to a system common ordering rule.
S712: and updating the ECMP group hardware table according to the reordering result.
For details of S708-S712, please refer to the corresponding description of fig. 6, which is not repeated herein.
The equivalent route management method provided by the embodiment of the invention has the advantages that when each switch in the cross-device link aggregation switch system writes each next hop of the next hop group into the ECMP group hardware table, the switches are not independent, the switches can uniformly sequence each next hop of the next hop group according to the same system shared sequencing rule, and then write the next hop according to the same sequence, so that the sequence of the same next hop in the ECMP group hardware tables of different switches can be ensured to be consistent, the data messages of the same data flow can be ensured to be forwarded to the same downstream device by different switches, the problems of disorder, missing and the like of the data flow data messages caused by the difference of the service processing of the downstream devices can be further avoided, the reliability and the stability of data transmission are improved, and the data transmission quality is enhanced.
Example two:
in order to make the advantages and details of the foregoing equivalent route management method clearer for those skilled in the art, the present embodiment will further describe the management scheme with reference to an example, please refer to a flowchart of the equivalent route management method shown in fig. 8:
s802: and configuring the ECMP in the cross-device link aggregation switch system to form a next hop group of the ECMP.
In this embodiment, the cross-device link aggregation switch system is configured by two switches, which are communicatively connected to an upstream gateway device and a plurality of downstream servers through different egress ports, and the plurality of servers are communicatively connected to the user terminal. By configuring the communication connection relationship of the switches, the ECMP can be formed in the cross-device link aggregation switch system, and the next hop group of the ECMP can be formed.
S804, sorting the next hop in the next hop group according to the system common sorting rule to obtain a first sorting result.
In this embodiment, the system-shared ordering rule adopted by the switch is to order the IP addresses of the next-hop devices in the next-hop group from small to large. Therefore, after the switch acquires an Address Resolution Protocol (ARP) entry, the next hop may be sorted according to the IP Address of each next hop device in the ARP entry, and for distinguishing the sorting result of subsequent reordering, the sorting result obtained by the switch excluding the next hop of the next hop group is recorded as a "first sorting result".
S806: and writing the next hop in the next hop group into an ECMP group hardware table according to the first sequencing result.
And after the first sequencing result is obtained, the switch writes the next hops in the next hop group into the ECMP group hardware table one by one according to the first sequencing result.
S808: it is monitored whether there is a new next hop that needs to be added to the set of next hops.
If yes, executing step S810, otherwise, waiting for a period of time and continuing to execute step S808.
S810: and sequencing the new next hop and the original members in the next hop group according to a system common sequencing rule to obtain a second sequencing result.
If it is determined that a new next hop needs to be added to the next hop group, the switch may reorder, together with the new next hop, each member in the original next hop group, in this embodiment, the rule for reordering the switch is also a system common ordering rule used for the initial ordering, and an obtained reordering result is a second ordering result.
S812: and updating the ECMP group hardware table according to the second sorting result.
After the second sorting result is obtained, the switch may update the ECMP group hardware table according to the second sorting result, for example, the switch may compare the second sorting result with the current sorting of each next hop in the ECMP group hardware table, and rewrite only the next hop with a changed sequence number.
It can be understood that after the hardware table of the ECMP group is updated according to the second sorting result, it may be continuously monitored whether there is a new next hop that needs to be added to the next hop group, that is, S808 is performed.
S814: and monitoring whether the next hop failure exists in the next hop group.
If yes, executing step S816, otherwise, waiting for a period of time and continuing to execute step S814.
S816: and judging whether the failure next hop is the tail end next hop of the ECMP group hardware table.
If yes, go to step S818, otherwise go to step S820.
S818: and directly deleting the failure next hop from the ECMP group hardware table.
Because the failure is the tail end next hop in the hardware table of the ECMP group, the direct deletion of the failure next hop does not affect the sequencing of other next hops, namely the data message forwarding of other next hops, and therefore the switch directly deletes the next hop from the hardware table of the ECMP group.
It is to be appreciated that after removing the stale next hop from the ECMP group hardware table, execution may continue with S814.
S820: and selecting the temporary next hop from the effective next hops of the next hop group according to a system common selection rule.
If the switch determines that the current failed next hop is not the end next hop in the ECMP group hardware table, in order to reduce packet loss as much as possible, the switch may first select one of the currently remaining valid next hops as a temporary next hop that temporarily takes over the work of the failed next hop.
S822: and writing the temporary next hop into the position of the invalid next hop in the hardware table of the ECMP group.
After determining the temporary next hop, the switch may write the temporary next hop to a location of the failed next hop in the hardware table of the ECMP group, so that the temporary next hop replaces the failed next hop.
S824: and after the invalid next hop is removed, re-sorting the residual valid next hop to obtain a third sorting result.
Subsequently, in order to avoid a long-time high load of the temporary next hop, the switch may reorder the valid next hops in the next hop group except the invalid next hop, thereby obtaining a third ordering result.
S826: and updating the ECMP group hardware table according to the third sorting result.
When the ECMP group hardware table is updated according to the third sorting result, the switch may compare the sequence number of each next hop in the ECMP group hardware table with the sequence number of each next hop in the sorting result, and rewrite only the next hop with a changed sequence number, for example, assuming that the original sequence of each next hop in the ECMP group hardware table is A1, A2, A3, and A4, and after A2 fails, the result of the reordering is A1, A3, and A4, the switch may write the original position of A2 into A3 instead of changing the first next hop in the ECMP group hardware table, write the original position of A3 into A4, and delete the last next hop A4 in the original ECMP group hardware table.
It is to be understood that after the ECMP group hardware table is updated according to the third sorting result, S814 may be continuously executed.
The equivalent routing management method provided by the embodiment ensures the consistency of data forwarding and processing of the downstream server, avoids data stream disorder, can effectively reduce packet loss and errors of network transmission, and can improve the stability and reliability of the network.
Example three:
the present embodiments provide a storage medium including volatile or non-volatile, removable or non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, computer program modules or other data. Storage media includes, but is not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash Memory or other Memory technology, CD-ROM (Compact disk Read-Only Memory), digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer.
The storage medium may store one or more computer programs that can be read, compiled, and executed by one or more processors, and in this embodiment, the storage medium may store an equivalent routing management program that can be executed by one or more processors to implement the process of the switch in any equivalent routing management method described in the foregoing embodiments.
The present embodiments also provide a computer program product comprising a computer readable means on which a computer program as shown above is stored. The computer readable means in this embodiment may include a computer readable storage medium as shown above. For example, the computer program product includes a switch, and as shown in fig. 9, the switch 90 includes a processor 91, a memory 92, and a communication bus 93 for connecting the processor 91 and the memory 92, wherein the memory 92 may be the aforementioned storage medium storing the equivalent route management program.
The processor 91 may sort the next hop in the next hop group of the equal-cost route ECMP according to a system shared sorting rule, and then write the next hop in the next hop group into an ECMP group hardware table according to a sorting result, where the ECMP group hardware table is used for determining the next hop of the data packet when the switch performs data packet transmission. The system shared ordering rule is an ordering rule commonly adopted by each switch in the cross-device link aggregation switch system when ordering each next hop in the next hop group, that is, the system shared ordering rule adopted by the switch 90 is the same as the ordering rule adopted by other switches in the cross-device link aggregation switch system when ordering each next hop in the next hop group. In this way, the switch 90 and other switches in the cross-device link aggregation switch system to which the switch belongs can ensure that each next hop of the next hop group is written in the ECMP group hardware table according to the same sequence, and further ensure that when the next hop of the data packet distribution outlet is allocated according to the same load balancing algorithm, the data packets of the same data flow can be allocated to the same downstream device, thereby avoiding disorder of the data packets.
In some examples of this embodiment, after writing the next hop in the next hop group into the ECMP group hardware table according to the sorting result, if there is a failed next hop in the next hop group, the processor 91 selects a failed next hop in the ECMP group hardware table from the valid next hops in the next hop group according to the system shared selection rule, reorders the valid next hops in the next hop group according to the system shared sorting rule, and updates the ECMP group hardware table according to the result of the reordering. The system common selection rule is the same as the selection rule by which other switches in the cross device link aggregation switch system select a valid next hop for replacing a failed next hop.
In some examples, the processor 91 selects a next hop from the valid next hops in the next hop group according to the system common selection rule before the failed next hop in the replacement ECMP group hardware table, and determines that the failed next hop is ordered before the end next hop in the ECMP group hardware table.
In some examples, the processor 91 may delete the failed next hop from the ECMP group hardware table if it is determined that the failed next hop is the end next hop of the ECMP group hardware table.
Optionally, the system common selection rule comprises: one is selected based on the IP address of the valid next hop in the set of next hops.
In some examples, after writing the next hop in the next hop group into the ECMP group hardware table according to the sorting result, the processor 91, when the next hop group needs to add a new next hop, reorders the new next hop and each next hop in the next hop group according to the system common sorting rule, and updates the ECMP group hardware table according to the reordering result.
It is understood that, in some examples, after the processor 91 writes the next hop in the next hop group into the ECMP group hardware table according to the sorting result, the destination IP address of the received data packet may be calculated according to a hash algorithm, so as to select the next hop for the data packet from the ECMP group hardware table according to the calculation result, and then forward the data packet through the selected next hop.
For details of the method for implementing the equal cost route management by the processor 91 executing the equal cost route management degree, please refer to the description of the foregoing embodiments, which will not be described herein.
The embodiment also provides a cross-device link aggregation switch system, which includes at least two switches, where the switches may be communicatively connected to a target communication device through an intermediate network device including, but not limited to, a server, and an equivalent link exists in a communication link between the switches and the target communication device. Alternatively, the target communication device may be a user terminal, a server, or the like. In some examples of this embodiment, exactly two switches are included in the cross device link aggregation switch system.
In the cross-device link aggregation switch system provided in this embodiment, before writing the next hop of the next hop group into the ECMP group hardware table, the switch ranks the next hop in the next hop group of the equal-cost route ECMP according to the system shared ranking rule, and then writes the next hop group in the ECMP group hardware table according to the ranking result, and the system shared ranking rule adopted by the switch ranking is the same as the ranking rule adopted by other switches in the cross-device link aggregation switch system to rank the next hop group, so that when the switch forwards the data packet of the same data stream, the same system shared ranking rule is used to rank the next hop in the ECMP next hop group, and the sequence of each next hop in the next hop group in the ECMP group in the cross-device link aggregation switch system is the same as the sequence in the ECMP group hardware table of each switch, so that the switch can select the same egress next hop and forward the data packet to the same downstream server, thereby avoiding the problem that the data packet of the same data stream is processed by different switches, and improving the reliability of communication at the side of the communication device, and even facilitating the increase of the data stream.
It will be apparent to those skilled in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software (which may be implemented as computer program code executable by a computing device), firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit.
In addition, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, computer program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Thus, the present invention is not limited to any specific combination of hardware and software.
The foregoing is a more detailed description of embodiments of the present invention, and the present invention is not to be considered limited to such descriptions. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.

Claims (10)

1. An equivalent routing management method, comprising:
sorting next hops in a next hop group of the equivalent routing ECMP according to a system common sorting rule, wherein the system common sorting rule is a sorting rule commonly adopted by all switches in the cross-equipment link aggregation switch system when sorting all next hops in the next hop group;
and writing the next hop in the next hop group into an ECMP group hardware table according to the sequencing result, wherein the ECMP group hardware table is used for determining the next hop of the data message when the switch transmits the data message.
2. The equivalent routing management method according to claim 1, wherein after writing the next hop in the next hop group into an ECMP group hardware table according to the sorting result, the method further comprises:
under the condition that a failure next hop exists in the next hop group, selecting one from effective next hops of the next hop group to replace the failure next hop in the ECMP group hardware table according to a system common selection rule, wherein the system common selection rule is a selection rule commonly adopted when each switch in the cross-equipment link aggregation switch system selects the effective next hop for replacing the failure next hop;
reordering the effective next hops in the next hop group according to the system common ordering rule;
and updating the ECMP group hardware table according to the result of the reordering.
3. The equivalent route management method according to claim 2, wherein before selecting one of the valid next hops of the next hop group according to the system common selection rule to replace the failed next hop in the hardware table of the ECMP group, further comprising:
determining that the order of the failed next hop in the ECMP set hardware table is before an end next hop.
4. The equivalent route management method according to claim 3, further comprising:
deleting the failed next hop from the ECMP group hardware table if the failed next hop is determined to be the end next hop of the ECMP group hardware table.
5. The equivalent route management method according to claim 3, wherein the system common selection rule is set based on an IP address corresponding to the valid next hop in the set of next hops.
6. The equivalent routing management method according to claim 1, wherein after writing the next hop in the next hop group into an ECMP group hardware table according to the sorting result, the method further comprises:
when the next hop group needs to be added with a new next hop, reordering the new next hop and each next hop in the next hop group according to the system common ordering rule;
and updating the ECMP group hardware table according to the result of the reordering.
7. The equivalent routing management method according to any one of claims 1 to 6, wherein after writing the next hop in the next hop group into an ECMP group hardware table according to the sorting result, further comprising:
calculating a destination IP address of the received data message according to a Hash algorithm, and selecting a next hop for the data message from the ECMP group hardware table according to a calculation result;
and forwarding the data message through the selected next hop.
8. A switch comprising a processor, a memory, and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute one or more programs stored in the memory to implement the steps of the equivalent route management method according to any one of claims 1 to 7.
9. A cross device link aggregation switch system comprising two switches according to claim 8, each communicatively coupled to a target communication device via an intermediate communication device, and wherein the communication links of the two switches to the target communication device include equivalent links.
10. A storage medium storing an equivalent routing management program executable by one or more processors to perform the steps of the equivalent routing management method according to any one of claims 1 to 7.
CN202110727949.1A 2021-06-29 2021-06-29 Equivalent route management method, switch system and storage medium Pending CN115550247A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110727949.1A CN115550247A (en) 2021-06-29 2021-06-29 Equivalent route management method, switch system and storage medium
PCT/CN2022/099866 WO2023273937A1 (en) 2021-06-29 2022-06-20 Equal cost multi-path routing management method, switch, switch system, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110727949.1A CN115550247A (en) 2021-06-29 2021-06-29 Equivalent route management method, switch system and storage medium

Publications (1)

Publication Number Publication Date
CN115550247A true CN115550247A (en) 2022-12-30

Family

ID=84691213

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110727949.1A Pending CN115550247A (en) 2021-06-29 2021-06-29 Equivalent route management method, switch system and storage medium

Country Status (2)

Country Link
CN (1) CN115550247A (en)
WO (1) WO2023273937A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115955434B (en) * 2023-03-14 2023-05-30 苏州浪潮智能科技有限公司 ECMP group failure recovery method and device, electronic equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102201964B (en) * 2010-03-22 2014-02-05 杭州华三通信技术有限公司 Method for realizing rapid path switching and apparatus thereof
US8769148B1 (en) * 2010-07-30 2014-07-01 Google Inc. Traffic distribution over multiple paths in a network
CN103078804B (en) * 2012-12-28 2015-07-22 福建星网锐捷网络有限公司 Method and device for processing equivalent multipath list as well as network equipment
CN108632144A (en) * 2017-03-17 2018-10-09 华为数字技术(苏州)有限公司 The method and apparatus for transmitting flow

Also Published As

Publication number Publication date
WO2023273937A1 (en) 2023-01-05

Similar Documents

Publication Publication Date Title
US10693765B2 (en) Failure protection for traffic-engineered bit indexed explicit replication
US9654384B2 (en) Asymmetrical link aggregation
CN109981458A (en) A kind of method, network node and the system of determining message forwarding path
CN110417569B (en) Network link fault processing method and tunnel endpoint equipment
US10826823B2 (en) Centralized label-based software defined network
WO2010018755A1 (en) Transport control server, network system, and transport control method
EP2995048A1 (en) Configuring forwarding information
US20210176161A1 (en) System and method of processing in-place adjacency updates
US11962485B2 (en) Selecting and deduplicating forwarding equivalence classes
CN106059791A (en) Business link switching method and storage device in storage system
US9729350B1 (en) Maintaining packet order in network flows over an autonomous network
US20250047590A1 (en) Packet Sending Method, Network Device, and Communication System
US20170012869A1 (en) Forwarding table management in computer networks
CN110768917B (en) Message transmission method and device
WO2023246161A1 (en) Policy routing implementation method and device, and storage medium
CN115550247A (en) Equivalent route management method, switch system and storage medium
US11582095B2 (en) Systems and methods for convergence of network traffic after an interruption of a network device's link
CN113595919A (en) Load sharing method and device
CN107181678B (en) Method and device for route convergence
US10110474B2 (en) Updating interface list of multi-link group
US20220210024A1 (en) Topology partition detection
CN113810276A (en) Segment routing fault processing method and device, electronic equipment and storage medium
CN108390780B (en) Method and apparatus for processing information
CN115514700A (en) A method, device and device for determining a backup path between node devices
WO2020221416A1 (en) Method and apparatus for selecting a communication device of a plurality of communication devices for communication packet processing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination