[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN116074231B - Message forwarding path determining method, device, network equipment and storage medium - Google Patents

Message forwarding path determining method, device, network equipment and storage medium Download PDF

Info

Publication number
CN116074231B
CN116074231B CN202211697900.7A CN202211697900A CN116074231B CN 116074231 B CN116074231 B CN 116074231B CN 202211697900 A CN202211697900 A CN 202211697900A CN 116074231 B CN116074231 B CN 116074231B
Authority
CN
China
Prior art keywords
hop
ecmp
message
forwarded
forwarding
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.)
Active
Application number
CN202211697900.7A
Other languages
Chinese (zh)
Other versions
CN116074231A (en
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.)
Suzhou Centec Communications Co Ltd
Original Assignee
Suzhou Centec Communications Co Ltd
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 Suzhou Centec Communications Co Ltd filed Critical Suzhou Centec Communications Co Ltd
Priority to CN202211697900.7A priority Critical patent/CN116074231B/en
Publication of CN116074231A publication Critical patent/CN116074231A/en
Application granted granted Critical
Publication of CN116074231B publication Critical patent/CN116074231B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/54Organization of routing tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing
    • 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

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 a method, a device, network equipment and a storage medium for determining a message forwarding path, and the method, the device, the network equipment and the storage medium are used for receiving a message to be forwarded; step by step, obtaining the next jump list item of the message to be forwarded; the next-hop table entry comprises a next-hop table entry type and a next-hop table entry address of a sub-level; the next hop list item type comprises automatic protection switching APS and equal cost multi-path route ECMP; determining a corresponding next-hop forwarding path according to the type and the address of the next-hop table item of each level; the all next hop forwarding paths form forwarding paths of the messages to be forwarded, and the messages to be forwarded are forwarded through the forwarding paths. The scheme realizes isomorphic design of the next-hop table entry by adding the type of the next-hop table entry into the next-hop table entry, and the information formats of any two next-hop table entries are compatible and matched, so that flexible nesting cascade of APS and ECMP is facilitated, and further, the reliability of a network is improved and the bandwidth of the network is increased.

Description

Message forwarding path determining method, device, network equipment and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, a network device, and a storage medium for determining a packet forwarding path.
Background
In the prior art, with the continuous increase of network scale demands, the technology of network equipment software and hardware is rapidly developed. The network device completes the data interaction between the user client and the data server by forwarding the message or the data packet. Due to limited forwarding capability of the network device, message or data packet forwarding timeout often occurs, and more serious, part of the message or data packet is discarded.
However, network device packet loss is a very serious network problem, which directly affects the user experience. At present, a common technical means for improving the forwarding reliability of a network device, such as an automatic protection switching (Automatic Protection Switching, abbreviated as APS) technology, improves the network reliability by automatically switching a main working path and a standby working path, and allows the network device to automatically recover from a fault.
In addition, equal-cost multipath routing (ECMP) technology is also often used to increase transmission bandwidth or improve network reliability, which includes multiple ECMP members, and increases transmission bandwidth by transmitting different messages through each ECMP member, thereby improving network resource utilization.
Although automatic protection switching or equal cost multi-path routing is often used to improve the transmission bandwidth and reliability of network devices, two redundant backup techniques of automatic protection switching and equal cost multi-path routing cannot achieve flexible nested use.
Disclosure of Invention
Therefore, an object of the present invention is to provide a method, an apparatus, a network device, and a storage medium for determining a packet forwarding path, which can implement isomorphic design of a next-hop table entry by adding a next-hop table entry type to the next-hop table entry, and the information formats of any two next-hop table entries are compatible and matched, so that flexible nesting cascade of APS and ECMP is facilitated, and further, network reliability and network bandwidth are improved.
In order to achieve the above object, the technical scheme adopted by the embodiment of the invention is as follows:
In a first aspect, the present invention provides a method for determining a packet forwarding path, applied to a network device, where the method includes:
receiving a message to be forwarded;
Step by step, obtaining the next jump list item of the message to be forwarded; the next-hop table entry comprises a next-hop table entry type and a next-hop table entry address of a sub-level; the next hop list item type comprises automatic protection switching APS and equal cost multi-path routing ECMP;
Determining a corresponding next-hop forwarding path according to the type of the next-hop table entry and the address of the next-hop table entry of each level;
and all the next hop forwarding paths form forwarding paths of the message to be forwarded, and the message to be forwarded is forwarded through the forwarding paths.
In an optional embodiment, the step of obtaining the next hop entry of the to-be-forwarded packet step by step includes:
Acquiring a forwarding table of the message to be forwarded; the forwarding table is used for recording the type of the first-stage next-hop table entry and the address of the first-stage next-hop table entry;
Determining a first-stage next-hop table item according to the first-stage next-hop table item type and the first-stage next-hop table item address; the first-stage next-hop table entry is one of next-hop table entries;
and obtaining the next-hop list item of the message to be forwarded step by step according to the first-stage next-hop list item.
In an alternative embodiment, in the case that the type of the next hop table entry is APS, the step of determining a corresponding next hop forwarding path according to the next hop table entry of each stage includes:
Acquiring a path identifier in the next-hop table entry; the path identifier is used for representing whether the message to be forwarded is forwarded through a standby path;
And determining a corresponding next hop forwarding path according to the path identifier.
In an optional embodiment, in a case that the type of the next hop table entry is ECMP, the step of determining a corresponding next hop forwarding path according to the next hop table entry of each stage includes:
According to the message to be forwarded, calculating to obtain an ECMP hash value;
determining a target ECMP member according to the ECMP hash value and the member number of the ECMP group in the next hop list item; the ECMP group includes at least one ECMP member;
And determining a corresponding next hop forwarding path according to the target ECMP member.
In an alternative embodiment, when the type of the next-hop entry in the previous stage is APS and the next-hop entry in the next stage is ECMP, the step of determining the corresponding next-hop forwarding path according to the next-hop entry in each stage includes:
Acquiring a father path identifier in an APS table; the APS table refers to the next-hop table item with the type of the next-hop table item being APS; the father path identifier is one of the path identifiers;
Determining a parent forwarding path according to the parent path identifier; the father forwarding path refers to a forwarding path from an APS table to a next-hop table item of a next stage of the message to be forwarded;
Reading the type of the next-hop table entry in an APS table to obtain the type of the next-hop table entry of the next stage as ECMP;
According to the message to be forwarded, calculating to obtain an ECMP hash value;
Determining a target ECMP member according to the ECMP hash value and the number of ECMP group members in an ECMP table; the ECMP table refers to the next-hop table item with the type of the next-hop table item being ECMP; the ECMP group includes at least one ECMP member;
determining a corresponding sub forwarding path according to the target ECMP member; the sub-forwarding path is one of the forwarding paths.
In a second aspect, the present invention provides a packet forwarding path determining apparatus, applied to a network device, where the apparatus includes:
the receiving module is used for receiving the message to be forwarded;
The decision module is used for acquiring the next-hop list item of the message to be forwarded step by step; the next-hop table entry comprises a next-hop table entry type and a next-hop table entry address of a sub-level; the next hop list item type comprises automatic protection switching APS and equal cost multi-path routing ECMP; determining a corresponding next-hop forwarding path according to the type of the next-hop table entry and the address of the next-hop table entry of each level; and all the next hop forwarding paths form forwarding paths of the message to be forwarded, and the message to be forwarded is forwarded through the forwarding paths.
In an alternative embodiment, the decision module is specifically configured to:
Acquiring a forwarding table of the message to be forwarded; the forwarding table is used for recording the type of the first-stage next-hop table entry and the address of the first-stage next-hop table entry; determining a first-stage next-hop table item according to the first-stage next-hop table item type and the first-stage next-hop table item address; the first-stage next-hop table entry is one of next-hop table entries; and obtaining the next-hop list item of the message to be forwarded step by step according to the first-stage next-hop list item.
In an alternative embodiment, in the case that the next hop entry type is APS, the choice module is specifically configured to:
Acquiring a path identifier in the next-hop table entry; the path identifier is used for representing whether the message to be forwarded is forwarded through a standby path; and determining a corresponding next hop forwarding path according to the path identifier.
In a third aspect, the present invention provides a network device comprising a memory for storing a computer program and a processor for executing the method of determining a forwarding path of a message according to any of the previous embodiments when the computer program is invoked.
In a fourth aspect, the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method for determining a forwarding path of a message according to any of the previous embodiments.
Compared with the prior art, the method, the device, the network equipment and the storage medium for determining the message forwarding path provided by the embodiment of the invention receive the message to be forwarded; step by step, obtaining the next jump list item of the message to be forwarded; the next-hop table entry comprises a next-hop table entry type and a next-hop table entry address of a sub-level; the next hop list item type comprises automatic protection switching APS and equal cost multi-path route ECMP; determining a corresponding next-hop forwarding path according to the type and the address of the next-hop table item of each level; the all next hop forwarding paths form forwarding paths of the messages to be forwarded, and the messages to be forwarded are forwarded through the forwarding paths. The scheme realizes isomorphic design of the next-hop table entry by adding the type of the next-hop table entry into the next-hop table entry, and the information formats of any two next-hop table entries are compatible and matched, so that flexible nesting cascade of APS and ECMP is facilitated, and further, the reliability of a network is improved and the bandwidth of the network is increased.
In order to make the above objects, features and advantages of the present invention more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of determining a forwarding path of a message according to an embodiment of the present invention.
Fig. 2 shows a schematic flow chart of a sub-step of step S101 in fig. 1.
Fig. 3 shows a schematic diagram of a next hop entry isomorphic design.
Fig. 4 shows a schematic diagram of a next-hop table entry cascade of the first-level next-hop table entry type ECMP.
Fig. 5 shows a schematic diagram of a next hop table entry cascade of the first level next hop table entry type APS.
Fig. 6 shows a schematic diagram of ECMP member cascade APS backup.
Fig. 7 shows a block diagram of a packet forwarding path determining apparatus 200 according to an embodiment of the present invention.
Fig. 8 shows a block schematic diagram of a network device according to an embodiment of the present invention.
Icon: 100-a network device; 110-memory; a 120-processor; 130-a communication module; 200-a message forwarding path determining device; 201-a receiving module; 202-choice module.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present invention.
It is noted that relational terms such as "first" and "second", and the like, are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the prior art, the redundancy backup technology of automatic protection switching and equal-cost multipath routing is generally adopted to improve the reliability and the utilization rate of network resources, so as to solve the problem of packet loss of network equipment. However, the application of multi-level nesting through automatic protection switching and equal cost multi-path routing is still not broken through in the market at present.
Based on the above, the embodiment of the invention provides a method, a device, a network device and a storage medium for determining a message forwarding path. The isomorphic design of the next-hop table entry is realized by adding the type of the next-hop table entry into the next-hop table entry, and the information formats of any two next-hop table entries are compatible and matched, so that flexible nested cascading of APS and ECMP is facilitated, and further, the reliability of a network is improved and the bandwidth of the network is increased.
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 shows a flow chart of determining a packet forwarding path according to an embodiment of the present invention, and the method includes the following steps:
step S101, receiving a message to be forwarded.
In the embodiment of the invention, a user plans a network forwarding scheme in combination with an actual application, and generates a cascading next-hop table item of the network equipment according to the network forwarding scheme of the user. And after the network equipment receives the message to be forwarded, forwarding the message according to the cascade next-hop table entry of the network equipment.
Step S102, obtaining the next-hop list item of the message to be forwarded step by step.
Wherein the next-hop table entry comprises a next-hop table entry type and a next-hop table entry address of the sub-level; the next hop entry types include automatic protection switching APS and equal cost multipath routing ECMP.
In the embodiment of the invention, after the network equipment receives the message to be forwarded, the next-hop list item of the message to be forwarded is acquired step by step, the information formats of the next-hop list items of different types may have different, in order to realize cascading next-hop forwarding, the method and the device perform isomorphic design on the next-hop table entries, and add the type field of the next-hop table entry into the next-hop table entries, so that the analysis of the next-hop table entries of different types is realized, and the compatible matching of the information formats of any two next-hop table entries is further realized.
Step S103, determining a corresponding next-hop forwarding path according to the type and the address of the next-hop table entry of each level.
In the embodiment of the invention, the next-hop table entry of the next stage can be obtained according to the next-hop table entry address recorded in the next-hop table entry of the previous stage, the type of the next-hop table entry of the next stage can be known according to the type of the next-hop table entry recorded in the next-hop table entry of the previous stage, the corresponding information format analysis is carried out according to the type, and the corresponding next-hop forwarding path is determined according to the analyzed information.
Step S104, all the next hop forwarding paths form forwarding paths of the message to be forwarded, and the message to be forwarded is forwarded through the forwarding paths.
In the embodiment of the invention, after all forwarding paths are obtained according to the cascaded next-hop table entries, the message to be forwarded received by the network equipment is forwarded through the forwarding paths, and finally is output by the output port.
In summary, the method for determining a message forwarding path according to the embodiment of the present invention receives a message to be forwarded; step by step, obtaining the next jump list item of the message to be forwarded; the next-hop table entry comprises a next-hop table entry type and a next-hop table entry address of a sub-level; the next hop list item type comprises automatic protection switching APS and equal cost multi-path route ECMP; determining a corresponding next-hop forwarding path according to the type and the address of the next-hop table item of each level; the all next hop forwarding paths form forwarding paths of the messages to be forwarded, and the messages to be forwarded are forwarded through the forwarding paths. The scheme realizes isomorphic design of the next-hop table entry by adding the type of the next-hop table entry into the next-hop table entry, and the information formats of any two next-hop table entries are compatible and matched, so that flexible nesting cascade of APS and ECMP is facilitated, and further, the reliability of a network is improved and the bandwidth of the network is increased.
Optionally, in practical application, the address and type of the next-hop table entry of the first stage are recorded in the forwarding table, and the forwarding table needs to be acquired before the next-hop message is forwarded. Referring to fig. 2 on the basis of fig. 1, the substeps of step S101 may include:
Step S1021, a forwarding table of the message to be forwarded is obtained.
The forwarding table is used for recording the type of the first-stage next-hop table entry and the address of the first-stage next-hop table entry.
In the embodiment of the invention, before forwarding the message through cascading the next-hop table entry, a forwarding table is required to be acquired first, and the address of the first-stage next-hop table entry and the type of the first-stage next-hop table entry are acquired through the forwarding table.
Step S1022, determining the first-stage next-hop table item according to the first-stage next-hop table item type and the first-stage next-hop table item address.
Wherein the first-stage next-hop entry is one of the next-hop entries.
In the embodiment of the invention, a first-stage next-hop table item is obtained according to the first-stage next-hop table item address, first-stage next-hop table item information is analyzed according to the first-stage next-hop table item type, relevant information of a first-stage next-hop forwarding path is obtained from the first-stage next-hop table item information, and the next-stage next-hop table item type and the next-stage next-hop table item address.
Step S1023, obtaining the next-hop list item of the message to be forwarded step by step according to the first-stage next-hop list item.
In the embodiment of the invention, in order to improve the network transmission reliability and the network resource utilization rate, the network service bandwidth is increased, the message is forwarded by adopting a cascade next-hop scheme in which APS and ECMP are flexibly nested, and the address of the next-hop table entry and the type of the next-hop table entry of the previous stage are recorded, so that the next-hop table entry can be acquired step by step, and the information of the next-hop table entry is analyzed according to the type of the next-hop table entry. And then determining the next hop forwarding path according to the next hop table item information of each level.
Optionally, in practical application, APS technology may be used to improve reliability of next hop forwarding of the network. In the case where the next hop entry type is APS, step S103 in fig. 1 may include:
And obtaining the path identification in the next-hop table entry.
The path identifier is used for representing whether the message to be forwarded is forwarded through the standby path.
And determining a corresponding next hop forwarding path according to the path identifier.
In this embodiment of the present invention, when the type of the next-hop table entry is APS, the primary path information and the backup path information are recorded in the next-hop table entry, and the next-hop forwarding path of the packet is selected according to the path identifier.
In order to realize flexible nesting of APS and ECMP, isomorphic design is carried out on different next-hop table entries. Taking fig. 3 as an example, fig. 3 shows a schematic diagram of a next-hop entry isomorphic design. Assuming that the next-hop entry of the APS type is defined as DsAPS table, the next-hop entry of the ECMP type is defined as DsECMPGroup table, and the next-hop entry of the base type is defined as DsDest table. And analyzing the next-hop table entries of different types according to the type of the next-hop table entry, so that the APS and the ECMP can realize flexible nested cascading of the next-hop table entries.
As one implementation, adding the next-hop entry type to the next-hop entry index destinationwhich has a structure { dsType [1:0], tablePtr [18:0]/destmap [18:0] }, wherein the size of the index destinationis 21 bits, and the destination [20:19] is used for storing the next-hop entry type; destination [18:0] is used to store the port address or next-level next-hop entry address. When dsType is 0, the destination low 19 bits store out the port address, denoted by destmap; when dsType is 1, storing the address of the next hop entry DsDest of the next stage in the lower 19 bits of destination, which indicates that the next hop forwarding needs to be continued; when dsType is 2, storing the address of the next hop entry DsAPS of the next stage in the lower 19 bits of destination, which indicates that the next hop forwarding needs to be continued; when dsType is 3, the destination low 19 bits store the address of the next hop entry DsECMPGroup of the next stage, indicating that the next hop forwarding needs to be continued.
Specifically, dsDest tables may include the fields destination20:0 and nexthopPtr:19, from which the specific meaning of the lower 19 bits of destination20:19 is determined. When the destination [20:19] is 0, it indicates that the destination low 19 bits store the output port address of the message, and at this time nexthopPtr [19:0] stores the editing information of the next-hop message. In this case, the message is edited by using the format of the editing information of the next-hop message, and then forwarded out through the output port. When the destination [20:19] is not 0, it is indicated that the address of the next-hop entry of the next stage is stored in the lower 19 bits of the destination.
It should be noted that, when the destination [20:19] is 0, the edit information of the next hop message is read nexthopPtr to obtain. In other cases, nexthopPtr will not typically be read.
Specifically, dsAPS tables may include field degradation_w [20:0], field nexthopPtr _w [19:0], field degradation_p [20:0], field nexthopPtr _p [19:0], and field protection_en [0]. The field protect_en is a path identifier, and is used to indicate whether the message to be forwarded is forwarded through the standby path. When the protect_en is 0, the selection of the active path forwarding message is indicated, and the field destination_w [20:0] and the field nexthopPtr _w [19:0] are used to record the next hop information of the active path. When the protect_en is 1, the selection of the alternate path forwarding message is indicated, and the fields destinationp [20:0] and nexthopPtr _p [19:0] are used to record the next hop information of the alternate path. The manner of using the destinationw and the destinationp is similar to that of destinationand the manner of using nexthopPtr _w and nexthopPtr _p is similar to that of nexthopPtr, and will not be described here again.
Specifically, dsECMPGroup tables may include the field destination20:0 and the field mem_num. Where the field mem_num indicates the number of ECMP members in the ECMP group. Assuming that the destination [20:19] in DsECMPGroup table can only be 1, the next-hop entry type representing ECMP member can only be DsDest table. Then destination 18:0 is used to record the start address of ECMP member table DsDest.
Optionally, in practical application, ECMP technology may be used to increase network bandwidth and improve network resource utilization. In the case where the next hop entry type is ECMP, step S103 in fig. 1 may include:
And calculating to obtain the ECMP hash value according to the message to be forwarded.
And determining the target ECMP member according to the ECMP hash value and the member number of the ECMP group in the next hop table entry.
Wherein the ECMP group includes at least one ECMP member.
And determining a corresponding next hop forwarding path according to the target ECMP member.
In the embodiment of the invention, when the type of the next-hop table entry is ECMP, the message is indicated to be forwarded by the ECMP group in the next hop. And calculating an ECMP hash value of the message to be forwarded, determining a target ECMP member for forwarding the message according to the ECMP hash value and the member number of the ECMP group, and finally determining a corresponding next hop forwarding path according to the target ECMP member address recorded in the next hop list item.
Alternatively, in practical applications, cascading next hop forwarding may be implemented using APS and ECMP flexible nesting. In the case where the next-hop entry of the previous stage is APS and the next-hop entry of the next stage is ECMP, step S103 in fig. 1 may include:
The parent path identification in the APS table is obtained.
Wherein, the APS table refers to the next-hop table item with the type of the next-hop table item being APS; the parent path identifier is one of the path identifiers.
And determining the father forwarding path according to the father path identification.
The parent forwarding path refers to a forwarding path from the APS table to a next hop table entry of a next stage of a message to be forwarded.
And reading the type of the next-hop table entry in the APS table, and obtaining the type of the next-hop table entry of the next stage as ECMP.
And calculating to obtain the ECMP hash value according to the message to be forwarded.
The target ECMP member is determined based on the ECMP hash value and the number of ECMP group members in the ECMP table.
Wherein, the ECMP table refers to the next-hop table item with the type of the next-hop table item being ECMP; the ECMP group includes at least one ECMP member.
And determining a corresponding sub forwarding path according to the target ECMP member.
Wherein the sub-forwarding path is one of forwarding paths.
In the embodiment of the invention, the APS cascade ECMP mode is adopted to carry out next hop forwarding, an APS table is analyzed according to the type of the next hop table, whether a standby path is used for forwarding the message is determined according to the path identifier in the APS table, if the standby path is determined to be used for carrying out the next hop forwarding of the message, the type of the next hop table entry and the address of the next hop table entry recorded in the standby path are acquired, and the next hop table entry of the next hop table entry is acquired according to the address of the next hop table entry of the next hop. Analyzing the next-stage next-hop list item according to the next-stage next-hop list item type ECMP, calculating an ECMP hash value of the message to be forwarded, determining a target ECMP member participating in the next-hop forwarding of the message according to the ECMP hash value and the number of ECMP members, and finally obtaining the next-hop list item of the target ECMP member according to the next-hop list item address of the target ECMP member recorded in the ECMP list, thereby realizing the subsequent cascade next-hop forwarding of the message.
As an embodiment, taking fig. 4 and fig. 5 as examples, fig. 4 shows a schematic diagram of a next-hop table entry cascade in which the first-stage next-hop table entry is APS, and fig. 5 shows a schematic diagram of a next-hop table entry cascade in which the first-stage next-hop table entry is ECMP. It can be seen from fig. 4 and fig. 5 that isomorphic design of the next-hop table entry is achieved by adding the type of the next-hop table entry into the next-hop table entry, and after isomorphic design, information formats of any two next-hop table entries are compatible and matched, so that flexible nested cascading of APS and ECMP is facilitated. The master and slave member information of the APS may be recorded as a final output port, a next ECMP or a next APS, and the member information of the ECMP may be the final output port, the next ECMP or the next APS. According to the network deployment requirement, the next hop list item can be flexibly nested whether the APS or the ECMP, so that cascading next hop forwarding is realized, and the network reliability and the network resource utilization rate are improved.
Specifically, in a network including a tunnel, for example, in an application of a data center network, different redundancy backup technologies are adopted for different network layers or different message forwarding paths of a OverLay network or a UnderLay network according to service requirements, so that the reliability of the network is greatly improved and the network bandwidth is greatly increased.
As an embodiment, an application of the ECMP of the data center is illustrated as an example, as shown in fig. 6. Assuming that the uplink outlet of the data center is a group of ECMP, 4 ECMP members are all used, in order to prevent the member outlets of the ECMP from being disconnected to cause network failure, a cascade APS mode is adopted to add a backup outlet for each ECMP member.
According to the next-hop entry type destination [20:19] recorded in the forwarding table, it can be known that the next-hop entry type of the forwarding message is ECMP, and the ECMP hash value of the message can be calculated in the message entry processing engine according to the characteristic field of the message, and then the ECMP table, that is, the DsECMPGroup table described above, is read through the next-hop entry address destination [18:0] recorded in the forwarding table. And then determining the target ECMP member through a member decision algorithm, for example, summing the ECMP hash value of the message over the number of ECMP members, and determining the target ECMP member according to the sum result. Reading a next-hop table entry DsDest of the target ECMP member according to the next-hop table entry address of the target ECMP member recorded in the ECMP table, knowing that the type of the next-hop table entry is APS according to a destination [20:19] field in the DsDest table, obtaining the next-hop table entry address according to a destination [18:0] field in the DsDest table, and reading the APS table according to the next-hop table entry address, namely the DsAPS table. The next hop forwarding path is determined from the path identification detect _ en field in the DsAPS table. If the protection_en is 0, the active path is selected to forward the message, and the final output port and the next hop editing information of the message are obtained according to the fields destination_w and nexthopPtr _w of the active path information. When the protection_en is 1, selecting a standby path to forward the message, and acquiring the final output port and the next hop editing information of the message according to the fields destination_p and nexthopPtr _p of the standby path information.
It should be noted that, whether the next hop forwarding type of the ECMP member is APS or ECMP, the next hop entry related information of the next level needs to be obtained by accessing the next hop entry DsDest table of the ECMP member.
Therefore, isomorphic design of the next-hop table entry is realized by adding the type of the next-hop table entry into the next-hop table entry, and the information formats of any two next-hop table entries are compatible and matched, so that flexible nesting cascade of APS and ECMP is facilitated, and further, the reliability of a network is improved and the bandwidth of the network is increased.
Based on the same inventive concept, the embodiment of the present invention further provides a message forwarding path determining device, referring to fig. 7, fig. 7 shows a block schematic diagram of a message forwarding path determining device 200 according to the embodiment of the present invention. The message forwarding path determining device 200 is applied to network equipment, and the network message forwarding path determining device 200 comprises a receiving module 201 and a choosing module 202.
A receiving module 201, configured to receive a message to be forwarded.
A decision module 202, configured to obtain a next-hop table entry of a message to be forwarded step by step; the next-hop table entry comprises a next-hop table entry type and a next-hop table entry address of a sub-level; the next hop list item type comprises automatic protection switching APS and equal cost multi-path route ECMP; determining a corresponding next-hop forwarding path according to the type and the address of the next-hop table item of each level; the all next hop forwarding paths form forwarding paths of the messages to be forwarded, and the messages to be forwarded are forwarded through the forwarding paths.
Optionally, the decision module 202 is specifically configured to obtain a forwarding table of the message to be forwarded; the forwarding table is used for recording the type of the first-stage next-hop table entry and the address of the first-stage next-hop table entry; determining a first-stage next-hop table item according to the first-stage next-hop type and the first-stage next-hop type; the first-stage next-hop table entry is one of the next-hop table entries; and obtaining the next-hop list item of the message to be forwarded step by step according to the first-stage next-hop list item.
Optionally, in the case that the type of the next-hop table entry is APS, the decision module 202 is specifically configured to obtain a path identifier in the next-hop table entry; the path identifier is used for representing whether the message to be forwarded is forwarded through the standby path; and determining a corresponding next hop forwarding path according to the path identifier.
Optionally, in the case that the type of the next hop table entry is ECMP, the decision module 202 is specifically configured to calculate, according to the message to be forwarded, an ECMP hash value; determining a target ECMP member according to the ECMP hash value and the member number of the ECMP group in the next hop list item; the ECMP group includes at least one ECMP member; and determining a corresponding next hop forwarding path according to the target ECMP member.
Optionally, if the type of the next-hop entry of the previous stage is APS and the next-hop entry of the next stage is ECMP, the decision module 202 is specifically configured to obtain a parent path identifier in the APS table; the APS table refers to a next-hop table entry whose next-hop table entry type is APS; the father path identifier is one of the path identifiers; determining a father forwarding path according to the father path identification; the father forwarding path refers to the forwarding path from the APS table to the next-hop table item of the next stage of the message to be forwarded; reading the type of the next-hop table entry in the APS table to obtain the type of the next-hop table entry of the next stage as ECMP; according to the message to be forwarded, calculating to obtain an ECMP hash value; determining a target ECMP member according to the ECMP hash value and the number of ECMP group members in the ECMP table; the ECMP table refers to a next-hop table item with the type of the next-hop table item being ECMP; the ECMP group includes at least one ECMP member; determining a corresponding sub forwarding path according to the target ECMP member; the sub-forwarding path is one of the forwarding paths.
Referring to fig. 8, a block diagram of a network device 100 according to an embodiment of the invention is shown. The network device 100 includes a memory 110, a processor 120, and a communication module 130. The memory 110, the processor 120, and the communication module 130 are electrically connected directly or indirectly to each other to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines.
Wherein the memory 110 is used for storing programs or data. The Memory 110 may be, but is not limited to, random access Memory (Random Access Memory, RAM), read Only Memory (ROM), programmable Read Only Memory (Programmable Read-Only Memory, PROM), erasable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), electrically erasable Read Only Memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc.
The processor 120 is used to read/write data or programs stored in the memory 110 and perform corresponding functions. For example, the method for determining a forwarding path of a message disclosed in the above embodiments may be implemented when a computer program stored in the memory 110 is executed by the processor 120.
The communication module 130 is used for establishing a communication connection between the network device 100 and other communication terminals through a network, and for transceiving data through the network.
It should be understood that the architecture shown in fig. 8 is merely a schematic diagram of the architecture of the network device 100, and that the network device 100 may also include more or fewer components than shown in fig. 8, or have a different configuration than shown in fig. 8. The components shown in fig. 8 may be implemented in hardware, software, or a combination thereof.
The embodiment of the present invention further provides a computer readable storage medium, on which a computer program is stored, where the computer program is executed by the processor 120 to implement the method for determining a forwarding path of a message disclosed in the foregoing embodiments.
In summary, the method, the device, the network equipment and the storage medium for determining the message forwarding path provided by the embodiment of the invention receive the message to be forwarded; step by step, obtaining the next jump list item of the message to be forwarded; the next-hop table entry comprises a next-hop table entry type and a next-hop table entry address of a sub-level; the next hop list item type comprises automatic protection switching APS and equal cost multi-path route ECMP; determining a corresponding next-hop forwarding path according to the type and the address of the next-hop table item of each level; the all next hop forwarding paths form forwarding paths of the messages to be forwarded, and the messages to be forwarded are forwarded through the forwarding paths. The scheme realizes isomorphic design of the next-hop table entry by adding the type of the next-hop table entry into the next-hop table entry, and the information formats of any two next-hop table entries are compatible and matched, so that flexible nesting cascade of APS and ECMP is facilitated, and further, the reliability of a network is improved and the bandwidth of the network is increased.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus embodiments described above are merely illustrative, for example, of the flowcharts and block diagrams in the figures that illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present invention may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for determining a forwarding path of a message, the method being applied to a network device, the method comprising:
receiving a message to be forwarded;
Step by step, obtaining the next jump list item of the message to be forwarded; the next-hop table entry comprises a next-hop table entry type and a next-hop table entry address of a sub-level; the next hop list item type comprises automatic protection switching APS and equal cost multi-path routing ECMP;
Determining a corresponding next-hop forwarding path according to the type of the next-hop table entry and the address of the next-hop table entry of each level;
and all the next hop forwarding paths form forwarding paths of the message to be forwarded, and the message to be forwarded is forwarded through the forwarding paths.
2. The method for determining a forwarding path of a packet according to claim 1, wherein the step of obtaining the next-hop entry of the packet to be forwarded step by step includes:
Acquiring a forwarding table of the message to be forwarded; the forwarding table is used for recording the type of the first-stage next-hop table entry and the address of the first-stage next-hop table entry;
Determining a first-stage next-hop table item according to the first-stage next-hop table item type and the first-stage next-hop table item address; the first-stage next-hop table entry is one of next-hop table entries;
and obtaining the next-hop list item of the message to be forwarded step by step according to the first-stage next-hop list item.
3. The method for determining a forwarding path of a packet according to claim 1, wherein, in the case that the type of the next-hop entry is APS, the step of determining a corresponding next-hop forwarding path according to the next-hop entries of each stage includes:
Acquiring a path identifier in the next-hop table entry; the path identifier is used for representing whether the message to be forwarded is forwarded through a standby path;
And determining a corresponding next hop forwarding path according to the path identifier.
4. The method for determining a forwarding path of a packet according to claim 1, wherein, in the case that the type of the next-hop entry is ECMP, the step of determining a corresponding next-hop forwarding path according to the next-hop entries of each stage includes:
According to the message to be forwarded, calculating to obtain an ECMP hash value;
determining a target ECMP member according to the ECMP hash value and the member number of the ECMP group in the next hop list item; the ECMP group includes at least one ECMP member;
And determining a corresponding next hop forwarding path according to the target ECMP member.
5. The method for determining a forwarding path of a packet according to any one of claims 1 to 4, wherein, when the type of the next-hop entry in the previous stage is APS and the next-hop entry in the next stage is ECMP, the step of determining a corresponding next-hop forwarding path according to the next-hop entry in each stage includes:
Acquiring a father path identifier in an APS table; the APS table refers to the next-hop table item with the type of the next-hop table item being APS; the father path identifier is one of the path identifiers;
Determining a parent forwarding path according to the parent path identifier; the father forwarding path refers to a forwarding path from an APS table to a next-hop table item of a next stage of the message to be forwarded;
Reading the type of the next-hop table entry in an APS table to obtain the type of the next-hop table entry of the next stage as ECMP;
According to the message to be forwarded, calculating to obtain an ECMP hash value;
Determining a target ECMP member according to the ECMP hash value and the number of ECMP group members in an ECMP table; the ECMP table refers to the next-hop table item with the type of the next-hop table item being ECMP; the ECMP group includes at least one ECMP member;
determining a corresponding sub forwarding path according to the target ECMP member; the sub-forwarding path is one of the forwarding paths.
6. A message forwarding path determining apparatus, applied to a network device, the apparatus comprising:
the receiving module is used for receiving the message to be forwarded;
The decision module is used for acquiring the next-hop list item of the message to be forwarded step by step; the next-hop table entry comprises a next-hop table entry type and a next-hop table entry address of a sub-level; the next hop list item type comprises automatic protection switching APS and equal cost multi-path routing ECMP; determining a corresponding next-hop forwarding path according to the type of the next-hop table entry and the address of the next-hop table entry of each level; and all the next hop forwarding paths form forwarding paths of the message to be forwarded, and the message to be forwarded is forwarded through the forwarding paths.
7. The message forwarding path determining apparatus according to claim 6, wherein the decision module is configured to obtain a forwarding table of the message to be forwarded; the forwarding table is used for recording the type of the first-stage next-hop table entry and the address of the first-stage next-hop table entry; determining a first-stage next-hop table item according to the first-stage next-hop table item type and the first-stage next-hop table item address; the first-stage next-hop table entry is one of next-hop table entries; and obtaining the next-hop list item of the message to be forwarded step by step according to the first-stage next-hop list item.
8. The message forwarding path determining apparatus according to claim 6, wherein the decision module is configured to obtain a path identifier in the next-hop table entry if the next-hop table entry type is APS; the path identifier is used for representing whether the message to be forwarded is forwarded through a standby path; and determining a corresponding next hop forwarding path according to the path identifier.
9. A network device, characterized in that the network device comprises a memory for storing a computer program and a processor for executing the message forwarding path determining method according to any of claims 1-5 when the computer program is invoked.
10. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the message forwarding path determination method according to any of claims 1-5.
CN202211697900.7A 2022-12-28 2022-12-28 Message forwarding path determining method, device, network equipment and storage medium Active CN116074231B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211697900.7A CN116074231B (en) 2022-12-28 2022-12-28 Message forwarding path determining method, device, network equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211697900.7A CN116074231B (en) 2022-12-28 2022-12-28 Message forwarding path determining method, device, network equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116074231A CN116074231A (en) 2023-05-05
CN116074231B true CN116074231B (en) 2024-10-25

Family

ID=86179549

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211697900.7A Active CN116074231B (en) 2022-12-28 2022-12-28 Message forwarding path determining method, device, network equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116074231B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102523160A (en) * 2011-12-15 2012-06-27 盛科网络(苏州)有限公司 Chip implementing method and system for quick switching in linear protection of Ethernet
CN104539561A (en) * 2014-12-29 2015-04-22 盛科网络(苏州)有限公司 Chip debugging method and device based on message processing information

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012175425A (en) * 2011-02-22 2012-09-10 Mitsubishi Electric Corp Relay device and relay method
US9270601B2 (en) * 2013-04-01 2016-02-23 Broadcom Corporation Path resolution for hierarchical load distribution
CN109936508A (en) * 2017-12-19 2019-06-25 中国移动通信集团公司 A kind of processing method and processing device of network congestion
CN109347623B (en) * 2018-10-18 2022-09-09 苏州盛科通信股份有限公司 Method and device for session maintenance in link load balancing application
CN111327535B (en) * 2018-12-13 2023-03-24 深圳市中兴微电子技术有限公司 Message forwarding method and device and forwarding equipment
CN109639557B (en) * 2019-02-11 2021-11-26 北京百度网讯科技有限公司 Method, device and system for network communication
CN113315699B (en) * 2021-05-17 2022-05-17 Ut斯达康通讯有限公司 Multi-master multi-standby fast rerouting system and method for distinguishing priority

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102523160A (en) * 2011-12-15 2012-06-27 盛科网络(苏州)有限公司 Chip implementing method and system for quick switching in linear protection of Ethernet
CN104539561A (en) * 2014-12-29 2015-04-22 盛科网络(苏州)有限公司 Chip debugging method and device based on message processing information

Also Published As

Publication number Publication date
CN116074231A (en) 2023-05-05

Similar Documents

Publication Publication Date Title
CN107819828B (en) Data transmission method and device, computer equipment and storage medium
US20160352578A1 (en) System and method for adaptive paths locator for virtual network function links
US7031253B1 (en) Method and apparatus for computing a path through specified elements in a network
CN109039919B (en) Forwarding path determining method, device, system, computer equipment and storage medium
US20200120029A1 (en) In-band telemetry congestion control system
US9537747B2 (en) Publish/subscribe overlay network control system
CN101971563A (en) Method and apparatus for providing full logical connectivity in mpls networks
US7616584B2 (en) Minimizing single points of failure in paths with mixed protection schemes
CN106059791B (en) Link switching method of service in storage system and storage device
CN108683617B (en) Message distribution method and device and distribution switch
CN110380960B (en) Backup path determining method, device, network equipment and storage medium
US20180241636A1 (en) Multi-Tier Fault Tolerant Network Design With Quality of Service Considerations
CN109981768A (en) I/o multipath planning method and equipment in distributed network storage system
CN104917681A (en) System and method for packet forwarding using a conjunctive normal from strategy in a content-centric network
CN113973026A (en) Site interconnection method, central controller and route reflector
CN112130758B (en) Data reading request processing method and system, electronic equipment and storage medium
CN110784339B (en) LACP message overtime fault detection method and device, and electronic equipment
CN102833173A (en) Network device and tunnel adaptation method
CN116074231B (en) Message forwarding path determining method, device, network equipment and storage medium
CN107172113B (en) Processing method and device in abnormal service call
US11695856B2 (en) Scheduling solution configuration method and apparatus, computer readable storage medium thereof, and computer device
CN116939035A (en) Data processing method, device, electronic equipment and storage medium
CN107948233B (en) Method for processing write request or read request, switch and control node
CN103731486A (en) Method, device and system for forwarding data in trunking system
CN112351050A (en) Method, device, communication equipment and storage medium for mirroring data stream

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
GR01 Patent grant
GR01 Patent grant