CN113132222A - Message forwarding method, message forwarding equipment and computer readable storage medium - Google Patents

Message forwarding method, message forwarding equipment and computer readable storage medium Download PDF

Info

Publication number
CN113132222A
CN113132222A CN201911422705.1A CN201911422705A CN113132222A CN 113132222 A CN113132222 A CN 113132222A CN 201911422705 A CN201911422705 A CN 201911422705A CN 113132222 A CN113132222 A CN 113132222A
Authority
CN
China
Prior art keywords
node
forwarding
next hop
forwarding table
link
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.)
Granted
Application number
CN201911422705.1A
Other languages
Chinese (zh)
Other versions
CN113132222B (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201911422705.1A priority Critical patent/CN113132222B/en
Publication of CN113132222A publication Critical patent/CN113132222A/en
Application granted granted Critical
Publication of CN113132222B publication Critical patent/CN113132222B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/28Routing or path finding of packets in data switching networks using route fault recovery
    • 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

Abstract

The application discloses a message forwarding method, message forwarding equipment and a computer readable storage medium, which are used for forwarding a BIER message. The method comprises the steps that a first node acquires a plurality of forwarding tables of an ECMP from the first node to a second node, the ECMP comprises a plurality of equal cost paths, and each equal cost path corresponds to the plurality of forwarding tables one by one; in response to a first link between a first next hop node of the first node and the first node failing, the first node refreshes the first forwarding table according to the second next hop node, and prevents refreshing of forwarding tables other than the first forwarding table among the plurality of forwarding tables. And forwarding the BIER message based on the refreshed first forwarding table and forwarding tables except the first forwarding table in the plurality of forwarding tables, wherein the second next-hop node is a next-hop node without failure of links between the plurality of next-hop nodes and the first node. The method and the device effectively reduce the influence on the multicast flow and reduce packet loss or multiple packets.

Description

Message forwarding method, message forwarding equipment and computer readable storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for forwarding a packet, and a computer-readable storage medium.
Background
The Bit Indexed Explicit Replication (BIER) technology based on Bit index is a multicast technology, in the BIER technology, a BIER Forwarding Router identifier (BFR-id) is configured for each edge node device in a network, and configuration information of the edge node device is flooded in the network in a flooding manner through an Internal Gateway Protocol (IGP), so that each node in the network can determine which device each BFR-id identifies. In addition, each node in the network establishes a forwarding table through the information flooded by the control plane IGP, and each node can forward the packet of the BIER by using the forwarding table on the forwarding plane.
Disclosure of Invention
The embodiment of the application provides a message forwarding method, a message forwarding device and a computer readable storage medium, which are used for solving the problems provided by the related technology, and the technical scheme is as follows:
in one aspect, a method for forwarding a BIER packet is provided, where the method is used to forward a BIER packet and includes: the first node acquires a plurality of forwarding tables of an ECMP from the first node to the second node, wherein the ECMP comprises a plurality of equivalent paths, each equivalent path corresponds to one forwarding table, and each forwarding table in the plurality of forwarding tables comprises an identifier of a next hop node of the first node on the corresponding equivalent path. In response to a first link between a first next hop node of the first node and the first node failing, the first node determines a second next hop node of the first node, wherein the link between the second next hop node and the first node does not fail, the first link is a portion of a first equivalent path, the second link is a portion of a second equivalent path, and the plurality of equivalent paths includes the first equivalent path and the second equivalent path. The first node refreshes a first forwarding table according to the second next hop node and prevents refreshing forwarding tables except the first forwarding table in the plurality of forwarding tables, the first forwarding table corresponds to the first equivalent path, and the refreshed first forwarding table comprises the identifier of the second next hop node. And then, the first node forwards the BIER message based on the refreshed first forwarding table and forwarding tables except the first forwarding table in the plurality of forwarding tables.
For the case of the BIER ECMP, when a first link between a first next hop node of a first node and the first node fails, a first forwarding table corresponding to a first equivalent path where the first link is located is refreshed, and refreshing of forwarding tables other than the first forwarding table in a plurality of forwarding tables is prevented, so that the influence on multicast traffic is effectively reduced, and packet loss or multiple packets are reduced.
In an exemplary embodiment, the second next hop node is a next hop node of the first nodes, except for the first next hop node, which is used the least number of times. And refreshing the first forwarding table by selecting the second next-hop node with the least use times, so that the load is more balanced.
In an exemplary embodiment, in the next hop node of the first node, in addition to the first next hop node, there are a plurality of next hop nodes with the smallest number of uses, and the second next hop node is the next hop node with the smallest number of uses and the largest or smallest sequence number, in addition to the first next hop node, among the next hop nodes of the first node.
In an exemplary embodiment, after the first node refreshes the first forwarding table according to the second next-hop node, the method further includes: starting a first timer for timing; before the timing of the first timer is finished, an old forwarding table is adopted to forward a BIER message and establish a new forwarding table, the old forwarding table is a forwarding table used by the first node before the first link is recovered, the new forwarding table is the forwarding table established after the first link is recovered, and the first timer indicates that the establishment of the new forwarding table is finished before the timing of the first timer is finished; and after the first timer finishes timing, switching the old forwarding table to the new forwarding table, and forwarding the BIER message according to the new forwarding table.
In an exemplary embodiment, the starting the first timer comprises: starting a second timer for timing; after the second timer finishes timing, starting the first timer to time. The second timer may be configured to time the time used by the old forwarding table, that is, perform timing re-optimization, and start the first timer after the second timer finishes timing to establish a new forwarding table in order to avoid load imbalance.
In an exemplary embodiment, after switching the old forwarding table to the new forwarding table, the method further comprises: and deleting the old forwarding table. And the old forwarding table is deleted to save the storage space.
There is also provided a message forwarding apparatus, configured to forward a BIER message, where the apparatus includes:
an obtaining module, configured to obtain multiple forwarding tables of an equal cost multipath ECMP from a first node to a second node, where the ECMP includes multiple equal cost paths, the multiple equal cost paths correspond to the multiple forwarding tables one to one, and each of the multiple forwarding tables includes an identifier of a next hop node of the first node on the corresponding equal cost path;
a determining module, configured to determine a second next hop node of a first node in response to a first link between the first next hop node of the first node and the first node failing, where a second link between the second next hop node of the first node and the first node does not fail, the first link is a part of a first equivalent path, the second link is a part of a second equivalent path, and the equivalent paths include the first equivalent path and the second equivalent path;
a refreshing module, configured to refresh a first forwarding table according to the second next hop node, and the first node prevents refreshing forwarding tables other than the first forwarding table in the plurality of forwarding tables, where the first forwarding table corresponds to the first equivalent path, and the refreshed first forwarding table includes an identifier of the second next hop node;
and the forwarding module is used for forwarding the BIER message based on the refreshed first forwarding table and the forwarding tables except the first forwarding table in the plurality of forwarding tables.
In an exemplary embodiment, the second next hop node is a next hop node, which is used the least number of times, among the next hop nodes of the first node, except for the first next hop node.
In an exemplary embodiment, the second next hop node is a next hop node, which is used for the first node, and has the lowest number of times and the largest or smallest sequence number, except for the first next hop node.
In an exemplary embodiment, the apparatus further comprises:
the timing module is used for starting a first timer to time;
a processing module, configured to forward a BIER packet and establish a new forwarding table by using an old forwarding table before timing of the first timer is ended, where the old forwarding table is a forwarding table used by the first node before the first link is recovered, the new forwarding table is an established forwarding table after the first link is recovered, and the first timer indicates that establishment of the new forwarding table is completed before timing of the first timer is ended; after the first timer finishes timing, switching the old forwarding table to the new forwarding table;
and the forwarding module is also used for forwarding the BIER message according to the new forwarding table.
In an exemplary embodiment, the timing module is configured to start a second timer; after the second timer finishes timing, starting the first timer to time.
In an exemplary embodiment, the processing module is further configured to delete the old forwarding table.
There is also provided a packet forwarding apparatus, including: the message forwarding method comprises a memory and a processor, wherein at least one instruction is stored in the memory, and the at least one instruction is loaded and executed by the processor so as to realize any message forwarding method.
There is also provided a computer readable storage medium having stored therein at least one instruction which is loaded and executed by a processor to implement the message forwarding method as described in any of the above.
There is provided another communication apparatus including: a transceiver, a memory, and a processor. Wherein the transceiver, the memory and the processor communicate with each other via an internal connection path, the memory is configured to store instructions, and the processor is configured to execute the instructions stored by the memory to control the transceiver to receive signals and control the transceiver to transmit signals, and when the processor executes the instructions stored by the memory, to cause the processor to perform the method of the first aspect or any of the possible embodiments of the first aspect.
In an exemplary embodiment, the processor is one or more, and the memory is one or more.
As an example embodiment, the memory may be integrated with the processor or provided separately from the processor.
In a specific implementation process, the memory may be a non-transient memory, such as a Read Only Memory (ROM), which may be integrated on the same chip as the processor, or may be separately disposed on different chips.
There is provided a computer program (product) comprising: computer program code which, when run by a computer, causes the computer to perform the method of the above aspects.
There is provided a chip comprising a processor for retrieving from a memory and executing instructions stored in the memory, so that a communication device in which the chip is installed performs the method of the above aspects.
Providing another chip comprising: the system comprises an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected through an internal connection path, the processor is used for executing codes in the memory, and when the codes are executed, the processor is used for executing the method in the aspects.
Drawings
Fig. 1 is a schematic diagram of a network topology provided in an embodiment of the present application;
FIG. 2 is a schematic diagram of a BIER head structure provided in an embodiment of the present application;
fig. 3 is a schematic diagram of BIER-MPLS encapsulation forwarding provided in an embodiment of the present application;
fig. 4 is a schematic diagram of a network topology provided in an embodiment of the present application;
fig. 5 is a schematic diagram of a network topology provided in an embodiment of the present application;
fig. 6 is a schematic diagram of a network topology provided in an embodiment of the present application;
fig. 7 is a flowchart of a message forwarding method provided in the embodiment of the present application;
FIG. 8 is a schematic diagram of a timing process provided by an embodiment of the present application;
fig. 9 is a flowchart of a message forwarding method provided in the embodiment of the present application;
fig. 10 is a schematic structural diagram of a message forwarding apparatus according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a message forwarding apparatus according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a message forwarding device according to an embodiment of the present application.
Detailed Description
The terminology used in the description of the embodiments section of the present application is for the purpose of explanation only of the examples of the present application and is not intended to be limiting of the present application.
The BIER technology is a multicast technology, in which each edge node device in the network is configured with a BFR-id, for example, with a value between 1 to 256. Configuration information of each edge node device in the network is flooded in the network by means of IGP flooding, and such information flooded with IGP is called BIER information. By means of flooding, each node in the network can determine which device each BFR-id identifies.
Fig. 1 is a schematic diagram of a network in which IGP floods BIER information, and edge node devices in the network include A, D, E and F. As shown in fig. 1, edge node devices A, D, E and F are configured with BFR-id values of 4, 1, 2, and 3, respectively. The BFR-id value of each edge node device will be flooded by IGP. Illustratively, each edge node device sends a control plane packet to other node devices in the network, where the control plane packet includes flooding information, and the flooding information includes a BFR-id of the edge node device, an Internet Protocol (IP) address, and encapsulation information. Wherein the encapsulation information includes an encapsulation type. For example, the flooding information of the edge node device a may carry the BFR-id, the IP address, and the encapsulation type of the edge node device a, which are multi-protocol label switching (MPLS), and the MPLS label allocated on the corresponding edge node device a. The node B and the node C are used as intermediate nodes, and BFR-id does not need to be configured, so that the BFR-id in the flooding information of the control plane message sent by the node B and the node C is correspondingly filled with 0. The flooding information of the control plane packets of the node B and the node C further includes other information, such as the IP address and the encapsulation information of the node.
In addition, each node in the network establishes a forwarding table through the information flooded by the control plane IGP, and each node can forward a BIER message on the forwarding plane by using the forwarding table, where the BIER message includes a multicast data message encapsulated by the BIER. The BIER encapsulation format can be referred to as the specification of BIER header format in request for comment (RFC) 8296, and the header format of BIER is the key to implementing BIER on the forwarding plane (chip). As shown in fig. 2, the BIER header contains a 32-bit (4-byte) BIER-Label or BIER forwarding table identifier (big-ID) value, where the first 20 bits are the Label value or the big-ID value, and the last 12 bits are other information of the Label, including Traffic Class (TC), S bit and Time To Live (TTL). The BIER header also includes 64-bit (8-byte) other fields including a delimiter (Nibble), a version (Ver), a bit string length (bitslength, BSL), an Entropy value (Entropy), a detection (OAM), a reservation (Rsv), a differentiated services field code (DSCP), a protocol (Proto), a BIER forwarding header node router identification (BFIR-id), etc., and also includes a bit string (BitString). The length of the BitString can be 64bit/128bit/256bit/… and the like. The BIER-Label or BFR-ID values can be used to determine the length of the BitString.
Each Bit in the field BitString is used to identify a certain BIER forwarding edge node router (BFER), for example, a lower (rightmost) Bit of the BitString is used to identify that the next hop node is a node corresponding to BFR-id 1. The 2 nd Bit from right to left in BitString is used to identify the node corresponding to BFR-id 2. The forwarding table entry according to which the forwarding plane forwards determines which next hop nodes the BIER message is to be sent to according to BitString in the BIER message. And under the condition that a plurality of bits correspond to the same next hop node, only one BIER message is sent to the next hop node.
Taking the example that each node shown in fig. 1 establishes a BIER forwarding table, a neighbor in the forwarding table may be a directly connected neighbor in the network topology, or a non-directly connected neighbor, for example, a non-directly connected neighbor calculated according to section 6.9 of RFC 8279. For edge node device a, the neighbor of edge node device a includes node B. In the network topology shown in fig. 1, since the next-hop nodes of the BFER node whose BFR-id is 1/2/3 are all node bs, the neighbor table entry of the edge node device a is established:
the neighbor (Nbr) ═ B, and the Forwarding Bit Mask (FBM) ═ 0111.
Where each bit in the FBM represents an edge node device. If there are more edge node devices, the edge node devices may be divided into different sets. For multiple sets, the FBM consists of a bit string for multiple sets. For example, there are 512 edge node devices in the network topology, the 512 edge node devices are divided into 2 sets with Set equal to 0 and Set equal to 1, and one Set employs 256-bit strings, so that the neighboring FBM may be composed of 2 256-bit strings, which correspond to the bit string with Set equal to 0 and the bit string with Set equal to 1, respectively.
For the neighbor table entry of the edge node device a, when the 1/2/3 th bit from right to left in the BIER message is 1, the BIER message is sent to the neighbor node B. When the 4 th bit from right to left in the BIER message is 1 (for example, the BIER message sent from the node B to the node a), the entry indicates that the BIER message is sent to the node a. In fig. 1, the BIER packet is sent to node a itself using the a flag.
For node B, the neighbors of node B include edge node device a, node C, and edge node device E. Since the next hop of BFER nodes whose BFR-id is 1/2 are all the node C, BFR-id is 3, the BFER node whose id is 4 is the edge node device E, BFR-id is the edge node device a, the neighbor table entry of the node B is established:
Nbr=C,FBM=0011。
Nbr=E,FBM=0100。
Nbr=A,FBM=1000。
for node C, the neighbor nodes of node C include node B, edge node device E, edge node device F, and edge node device D. Since the BFER node whose BFR-id is 1 is the edge node device D, BFR-id is 2 is the next hop node whose BFER node whose edge node device F, BFR-id is 3 is the BFER node whose edge node device E, BFR-id is 4 is the node B, the neighbor table entry of the node C is established:
Nbr=D,FBM=0001。
Nbr=F,FBM=0010。
Nbr=E,FBM=0100。
Nbr=B,FBM=1000。
for edge node device D, the neighbor nodes of edge node device D include node C. Since the next hop node of the BFER node whose BFR-id is 2/3/4 is node C, the neighbor table entry of the edge node device D is established:
Nbr=C,FBM=1110。
for edge node device E, the neighbor nodes of edge node device E include node B and node C. Since the next-hop node of the BFER node whose BFR-id is 1/2 is the next-hop node of the BFER node whose node C, BFR-id is 4 is the node B, the neighbor table entry of the edge node device E is established:
Nbr=B,FBM=1000。
Nbr=C,FBM=0011。
for edge node device F, the neighbor nodes of edge node device F include node C. Since the next hop node of the BFER node whose BFR-id is 1/3/4 is node C, the neighbor table entry of the edge node device F is established:
Nbr=C,FBM=1101。
in the network shown in fig. 1, a node that receives a BIER packet will strip off the BIER header and forward the BIER header according to an original multicast packet, where the packet forwarding process is as follows:
after receiving an Internet Protocol (IP) multicast packet, the node a encapsulates a BIER header. For example, in FIG. 1, BitString where node A encapsulates the BIER header is 0111. Node a then forwards the message according to BIER forwarding table Nbr ═ B and FBM ═ 0111. The BIER message is sent to the neighbor node B according to the forwarding table. And the node B receives the BIER message, and determines that the BIER message needs to be respectively sent to two neighbors of the node C and the node E according to the BitString-0111. When sending to node C, node B performs AND operation on BitString in BIER message AND FBM field of entry of forwarding table Nbr ═ C. As shown in fig. 1, BitString in the BIER message received by the node B is 0111, AND the FBM field of the entry of Nbr ═ C in the forwarding table of the node B is 0011, so that the AND result is 0011, AND the node B changes BitString in the BIER message to 0011 AND sends the changed BitString to the node C. Similarly, when node B sends BIER message to node E, it will change BitString in BIER message to 0100 and send it. After receiving the BIER packet, the node E determines that the BIER packet is to be sent to the node E (itself) according to the BIER packet BitString 0100, so that the BIER header is decapsulated, and then the BIER header is forwarded according to an inner-layer IP packet, for example, which may be sent to a multicast Receiver (RCV) of the node E in fig. 1. After receiving the BIER message sent by the node B, the node C determines that the BIER message needs to be sent to the node D and the node F according to the BitString of 0011. And the node C changes the BitString in the BIER message to 0001 and then sends the message to the node D, and the node D decapsulates the BIER head and then forwards the message according to the inner layer IP message. For example, node D sends BIER message to RCV of node D in fig. 1. And the node C changes BitString in the BIER message into 0010 and then sends the BitString to the node F, and the node F decapsulates the BIER head and then forwards the BIER head according to the inner layer IP message. For example, the RSV that sends BIER messages to node F.
However, the above-mentioned process of establishing a forwarding table and forwarding a BIER packet according to the forwarding table, and for the case that a link is added in a network and a network topology changes, a problem of packet loss or multiple packets may occur in the BIER packet in the forwarding process. Take the example of adding a link between node 1 and node3 in the network topology shown in fig. 4. In the state before adding the link between node 1 and node3, the BIER forwarding table of node 1 is as follows:
{(Nbr=Node 1(Self),FBM=0001),
(Nbr=Node 2,FBM=0110)}
in the final state after adding the link of node 1 and node3, the BIER forwarding table of node 1 is as follows:
{(Nbr=Node 1(Self),FBM=0001),
(Nbr=Node 2,FBM=0010),
(Nbr=Node 3,FBM=0100)}
since the path of the Node3 changes, switching from the original Nbr Node2 to Nbr Node3 requires the FBM of the two entries Nbr Node2 and Nbr Node3 to be refreshed, and the two entries are not atomic operations but have been refreshed before. For example, in the process of reaching the final state, the entry of the Nbr Node2 may be refreshed by FBM 0010 and then added with the entry of the Nbr Node3, so that the packet sent to the Node3 may be lost when the entry of the Nbr Node3 is not added. Or, in the process of reaching the final state, the entry of the Nbr Node3 may be added first, and then the entry of the Nbr Node2 is refreshed with FBM 0010, so that the packet sent to the Node3 may generate multiple packets.
In the case of BIER ECMP, not only the packet loss due to link recovery or link addition, but also the packet loss or multiple packets due to link failure. In the BIER ECMP scenario shown in fig. 5, there are four equal paths B/R/G/P from node 1 to node 2/5/6/7/8, and the four nodes of neighbor B, R, G, P are the next-hop nodes of node 1 on the equal paths. Normally, the multiple forwarding tables of ECMP, i.e. the 4 forwarding tables for load sharing, are as follows:
BIFT 1:{(Nbr=B,FBM=1111 0010)}
BIFT 2:{(Nbr=R,FBM=1111 0010)}
BIFT 3:{(Nbr=G,FBM=1111 0010)}
BIFT 4:{(Nbr=P,FBM=1111 0010)}
for example, when 400 multicast streams are received from node 1, and node 1 encapsulates the BIER header and sends it to node 2/5/6/7/8, node 1 may generate an Entropy value for each multicast stream and fill it in the entry field of the BIER header, and the process of generating the Entropy value may be obtained by hashing (Hash) the source address and destination address of the multicast stream. When the encapsulated BIER message is forwarded, the node 1 determines, according to the entropy in the BIER header and the number of entries of the multiple entries for load sharing (in this example, the number of entries is 4), which BIFT table the message is to be forwarded according to. For example, a BIFT table may be obtained by dividing the entropy of the multicast stream by the number of entries and adding 1, and the final result is as follows:
after the entropy of the first group of 100 multicast streams is divided by the number of entries 4, the remainder result is 0, and the value of the remainder result plus 1 is 1, then the first group of 100 multicast streams is forwarded according to the BIFT1 table (i.e. through the neighbor B).
After the entropy values of the second group of 100 multicast streams are divided by the number of entries 4, the remainder result is 1, and the value of the remainder result plus 1 is 2, then the second group of 100 multicast streams are forwarded according to the BIFT2 table (i.e. through the neighbor R).
After the entropy values of the third group of 100 multicast streams are divided by the number of entries 4, the remainder result is 2, and the value of the remainder result plus 1 is 3, then the third group of 100 multicast streams is forwarded according to the BIFT3 table (i.e. through the neighbor G).
After the entropy values of the fourth group of 100 multicast streams are divided by the number of entries 4, the remainder result is 3, and the value of the remainder result plus 1 is 4, then the fourth group of 100 multicast streams are forwarded according to the BIFT4 table (i.e. through the neighbor P).
When the link between node 1 and neighbor B fails, then the 4bit entries forwarded by BIER become as follows:
BIFT 1:{(Nbr=R,FBM=1111 0010)}
BIFT 2:{(Nbr=G,FBM=1111 0010)}
BIFT 3:{(Nbr=P,FBM=1111 0010)}
BIFT 4:{(Nbr=R,FBM=1111 0010)}
it can be seen that each of the bit tables is changed, and the forwarding condition of the corresponding multicast stream is as follows:
for the first group of 100 multicast streams, the remainder result is 0, and the value of the remainder result plus 1 is 1, then the first group of 100 multicast streams is forwarded according to the BIFT1 table, that is, the first group of 100 multicast streams is forwarded from the neighbor B but is currently forwarded from the neighbor R.
For the second group of 100 multicast streams, the remainder result is 1, and the value obtained by adding 1 to the remainder result is 2, then the second group of 100 multicast streams is forwarded according to the BIFT2 table, that is, the second group of 100 multicast streams is originally forwarded from the neighbor R but is currently forwarded from the neighbor G.
And if the remainder result of the third group of 100 multicast streams is 2 and the value of the remainder result added with 1 is 3, the third group of 100 multicast streams is forwarded according to the BIFT3 table, namely the multicast streams are forwarded from the neighbor G originally but are forwarded from the neighbor P currently.
For the fourth group of 100 multicast streams, the remainder result is 3, and the value obtained by adding 1 to the remainder result is 4, then the fourth group of 100 multicast streams is forwarded according to the BIFT4 table, that is, the streams are originally forwarded from the neighbor P, but are now forwarded from the neighbor R.
As can be seen from the above-mentioned forwarding situation, because the link between the neighbor B and the node 1 fails, the link between the neighbor B and the node 1 is a part of the link of the B-equal cost path. On BIFT1, the neighbor B is refreshed to be the neighbor R, and the packet loss generated by the first group of 100 multicast streams is inevitable. However, on the big 2, the process of refreshing the forwarding table with BFR-id 2/5/6/7/8 from the neighbor R to the neighbor G is not an atomic operation, and therefore, a packet loss occurs, which means that the second group 100 of multicast streams originally forwarded from the neighbor R will generate a packet loss or multiple packets. Similarly, the third group of 100 multicast streams originally forwarded from the neighbor G and the fourth group of 100 multicast streams originally forwarded from the neighbor P may also generate packet loss or multiple packets.
In the BIER ECMP scenario shown in fig. 5, on each ECMP equivalent path, the next hop node of node 1 is a different next hop node device, and the next hop node device is a neighbor node of the first node; in practical application, on each ECMP equal-cost path, the next-hop node of the node 1 may also be a different interface of the same node device. As shown in fig. 6, node 1 to node2 has M, N, X, Y four different links as part of each equal cost path, the M, N, X, Y four different links being links between different interfaces of node 1 and neighboring node 21. Normally, the multiple forwarding tables of ECMP, i.e. the 4 forwarding tables for load sharing, are as follows:
BIFT 1:{(Nbr=21(link M),FBM=1111 0010)}
BIFT 2:{(Nbr=21(link N),FBM=1111 0010)}
BIFT 3:{(Nbr=21(link X),FBM=1111 0010)}
BIFT 4:{(Nbr=21(link Y),FBM=1111 0010)}
in addition to the case that the multiple next hop nodes of the node 1 shown in fig. 5 include multiple node devices, and the case that the multiple next hop nodes of the node 1 shown in fig. 6 include multiple interfaces of one node device, in the method provided in the embodiment of the present application, the multiple next hop nodes of the node 1 may include not only different node devices, but also different interfaces of the same node device. That is to say, in the method provided in the embodiment of the present application, the multiple next hop nodes of the node 1 include multiple node devices or multiple interfaces of one node device, and each node device in the multiple node devices includes one interface or multiple interfaces. No matter what the next hop node of the node 1 is, the method provided by the embodiment of the present application is applicable to these next hop nodes of the node 1.
In the packet forwarding method provided in the embodiment of the present application, a stable and preferential load sharing manner is adopted, and for a case where a link between a first next hop node and a first node fails, only a forwarding table corresponding to the first next hop node is refreshed, and forwarding tables corresponding to the next hop nodes where links between the remaining nodes and the first node do not fail are unchanged, so that a multicast stream of a non-failed link is not affected by a failed link. Referring to fig. 7, the method provided by the embodiment of the present application includes the following steps:
701: the first node acquires a plurality of forwarding tables of an ECMP from the first node to the second node, wherein the ECMP comprises a plurality of equivalent paths, the equivalent paths are in one-to-one correspondence with the forwarding tables, and each forwarding table in the forwarding tables comprises an identifier of a next hop node of the first node on the corresponding equivalent path.
In the embodiment of the present application, the first node may be a router or a switch. Illustratively, the first node has BIER protocol, BIER forwarding capability, and forwarding capability under BIER specific encapsulation, such as MPLS encapsulation, Ethernet (Ethernet) encapsulation, internet protocol version 6 (IPv 6) encapsulation, and the like. The embodiment of the application does not limit the encapsulation type of BIER forwarding. Before implementing the method provided by the embodiment of the present application, the first node in the network is configured with the load sharing enable of the BIER ECMP, that is, the first node in the method may be any node configured with the load sharing enable of the BIER ECMP before a link between a next-hop node of the first node and the first node fails.
The next hop node of the first node may be a plurality of node devices, each of the plurality of node devices may include an interface for communicating with the first node, or may include a plurality of interfaces for communicating with the first node, or a part of the plurality of node devices may include an interface for communicating with the first node, and a part of the node devices may include a plurality of interfaces for communicating with the first node. Taking the topology shown in fig. 5 as an example, the first node may be node 1, the ECMP equivalent path may be the next hop node of node 1 may be the neighboring node B/R/G/P, each of the neighboring node B/R/G/P and node 1 includes a link, the link between the neighboring node B and node 1 is called link B, and the link B is a part of the link on the B equivalent path. The link between the neighbor node R and the node 1 is called a link R, which is a part of the link on the R-equal cost path. The link between the neighboring node G and the node 1 is called a link G, which is a part of the link on the G-equal cost path. The link between the neighbor node P and the node 1 is called a link P, which is a part of the link on the P-equal cost path. There are four equal paths of B/R/G/P from node 1 to node 2/5/6/7/8. The load sharing of BIER ECMP configured for node 1 may be as follows:
Figure BDA0002352739600000081
as can be seen from the above configuration, under the conditions of sub-domain 0, bfr-id 1, bfr-prefix 1.1.1.1, stable-priority load sharing is used by the configuration of max-load-balance 4 stable-predicted grp 4. Under the conditions of sub-domain 1, bfr-id 1 and bfr-prefix 1.1.1.1, stable and preferential load sharing is used through the configuration of max-load-balance 3stable-preferred grp 3.
In addition, the next-interface and the next-hop are two configurations of the next-hop node, and which method is adopted to configure the next-hop node is not limited in the embodiment of the present application. For example, similarly, if the load sharing enable of the BIER ECMP is configured, and next-interface is adopted for the next-hop node configuration, the configuration information may also be as follows:
Figure BDA0002352739600000091
for another example, similarly, if the load sharing enable of the BIER ECMP is configured, and the next-hop nodes are configured by adopting next-hop, the configuration information may be as follows:
Figure BDA0002352739600000092
Figure BDA0002352739600000101
optionally, the next hop node of the first node may also be a plurality of interfaces of a node device, and a link is formed between the first node and each interface. Taking the topology shown in fig. 6 as an example, the first node may be node 1, the neighboring node 21 includes 4 interfaces, each interface may be a next-hop node of node 1, and then M, N, X, Y four links are included between node 1 and the neighboring node 21. M, N, X, Y four different links between node 1 and the neighboring node 21 are respectively part of the links of the corresponding equal cost path. The load sharing of BIER ECMP configured for node 1 may be as follows:
Figure BDA0002352739600000102
and aiming at the determined ECMP, under the condition that the next hop node of the first node is known, acquiring a plurality of forwarding tables of the ECMP, wherein the ECMP comprises a plurality of equivalent paths, and the plurality of equivalent paths are in one-to-one correspondence with the plurality of forwarding tables. Each of the plurality of forwarding tables includes an identification of a next hop node of the first node on the corresponding equal cost path and also includes an FBM. Since it is ECMP, the next hop node of the first node is different in the plurality of forwarding tables, but the FBMs are the same, for the case where the next hop node of the first node is a plurality of node devices. Still taking the topology shown in fig. 5 as an example, there are four equivalent paths B/R/G/P from node 1 to node 2/5/6/7/8, and the 4 forwarding tables for load sharing under normal conditions are as follows:
BIFT 1:{(Nbr=B,FBM=1111 0010)}
BIFT 2:{(Nbr=R,FBM=1111 0010)}
BIFT 3:{(Nbr=G,FBM=1111 0010)}
BIFT 4:{(Nbr=P,FBM=1111 0010)}
in the 4 forwarding tables, the BIFT1 corresponds to the B equal cost path, and the BIFT1 includes the FBM and the identifier of the neighbor B which is the next hop node of the first node on the corresponding B equal cost path. The BIFT2 corresponds to the R equal cost path, and the BIFT2 includes the FBM and the identifier that the next hop node of the first node is the neighbor R on the corresponding R equal cost path. The BIFT3 corresponds to the G equal cost path, and the BIFT3 includes the FBM and the identifier that the next hop node of the first node is the neighbor G on the corresponding G equal cost path. The BIFT4 corresponds to the P equal cost path, and the BIFT4 includes the FBM and the identifier that the next hop node of the first node is the neighbor P on the corresponding P equal cost path.
For another example, in a case where the next hop node of the first node is a plurality of interfaces of one node device, and the first node forms one link with each interface, the next hop node of the first node is the same and the links are different in the plurality of forwarding tables, but the FBMs are the same. Still taking the topology shown in fig. 6 as an example, node 1 to node2 have M, N, X, Y four equivalent paths, and normally 4 forwarding tables for load sharing are as follows:
BIFT 1:{(Nbr=21(link M),FBM=1111 0010)}
BIFT 2:{(Nbr=21(link N),FBM=1111 0010)}
BIFT 3:{(Nbr=21(link X),FBM=1111 0010)}
BIFT 4:{(Nbr=21(link Y),FBM=1111 0010)}
in the 4 forwarding tables, the BIFT1 corresponds to the M equal cost path, and the BIFT1 includes the FBM and the identifier of the link M corresponding to the neighbor 21, which is the next hop node of the first node on the M equal cost path. The BIFT2 corresponds to the N-equal cost path, and the BIFT2 includes the FBM and the identification of link N corresponding to the neighbor 21 as the next hop node of the first node on the N-equal cost path. The BIFT3 corresponds to the X equal cost path, and the BIFT3 includes the FBM and the identification of link X on the corresponding X equal cost path, where the next hop node of the first node is the neighbor 21. The BIFT4 corresponds to the Y-equal cost path, and the BIFT4 includes the FBM and the identification of link Y corresponding to the neighbor 21 as the next hop node of the first node on the Y-equal cost path.
702: in response to a first link between a first next hop node of the first node and the first node failing, the first node determines a second next hop node, a second link between the second next hop node and the first node failing, the first link being a portion of a first equivalent path and the second link being a portion of a second equivalent path, the plurality of equivalent paths including the first equivalent path and the second equivalent path.
In the exemplary embodiment, after a failure occurs in a link between a first next hop node of the plurality of next hop nodes of the first node and the first node, in order not to affect the multicast stream on the failed link, a link is selected from the non-failed links and the multicast stream is continuously transmitted. Thus, the first node determines the second next hop node. The second next hop node is a next hop node, which has no failure in a link with the first node, in the plurality of next hop nodes of the first node, that is, a second link between the second next hop node and the first node has no failure. The embodiment of the present application is not limited to a manner of determining the second next hop node, and the second next hop node includes, but is not limited to, the next hop node with the least number of uses, except for the first next hop node, among the next hop nodes that are the first nodes. For example, the first node selects, as the second next hop node, the next hop node that is used the least number of times from the next hop nodes of the first node on the equal cost path. Since the second next hop node has the least number of uses, the second next hop node can have more resources to forward the multicast stream than other next hop nodes having more uses.
In the case where there are two or more next hop nodes with the smallest number of uses, for example, 4 next hop nodes other than the first next hop node are taken as an example, the number of uses of the 4 next hop nodes is 2, 5, and 6, respectively, and since the number of uses 2 is the smallest number of uses and there are two next hop nodes with the number of uses 2, that is, there are two next hop nodes with the smallest number of uses, it is necessary to select one next hop node as the second next hop node from the two next hop nodes with the smallest number of uses.
The embodiment of the present application does not limit the manner of selecting the next hop node with the least number of usage times as the second next hop node, for example, for a plurality of next hop nodes of the first node, one next hop node may be randomly selected from a plurality of next hop nodes with the least number of usage times except for the first next hop node as the second next hop node. Other selection means than random selection may be used. Illustratively, selecting one next hop node as the second next hop node from a plurality of least frequently used next hop nodes other than the first next hop node comprises: and determining the identifier of each next hop node in response to the existence of more than two next hop nodes with the least use times except the first next hop node in the next hop nodes of the first node on the equivalent path, and selecting one next hop node from the more than two next hop nodes with the least use times as a second next hop node based on the identifier of each next hop node.
In an exemplary embodiment, the identifier of the next hop node is a sequence number of the next hop node, and the sequence number of the next hop node is used for indicating the sequence of the next hop node in a plurality of next hop nodes of the first node; based on the identifier of each next hop node, selecting one next hop node from more than two next hop nodes with the least use times as a second next hop node, comprising: and selecting the next hop node with the largest or smallest sequence number from more than two next hop nodes with the smallest use times as a second next hop node. That is, the second next hop node is the next hop node of the first node, except the first next hop node, which has the least number of uses and the largest or smallest sequence number.
Wherein, the sequence number of the next hop node of the first node can be configured in advance. For example, the method provided in the embodiment of the present application configures a sequence number of each next hop node of the first node in the equal cost multipath in sequence, and indicates the sequence of each next hop node by using the sequence number. Which next hop node to use may be selected subsequently in order.
703: the first node refreshes a first forwarding table according to a second next hop node and prevents refreshing forwarding tables except the first forwarding table in the plurality of forwarding tables, the first forwarding table corresponds to the first equivalent path, and the refreshed first forwarding table comprises an identifier of the second next hop node.
Still taking the network topology shown in fig. 5 as an example, the first node is node 1, and the next-hop nodes of node 1 on the multiple equal-cost paths are neighbor B, neighbor R, neighbor G, and neighbor P, respectively. For the case that the link between the neighbor B and the node 1 fails, after determining a second next-hop node from the next-hop nodes of the node 1 through the above 702, taking the second next-hop node as the neighbor R as an example, that is, the link between the node 1 and the neighbor B fails, the first forwarding table corresponding to the neighbor B is refreshed according to the neighbor R, while the second forwarding tables corresponding to the neighbor R, the neighbor G, and the neighbor P of the remaining non-failed links are prevented from being refreshed, that is, the second forwarding tables corresponding to the neighbor R, the neighbor G, and the neighbor P of the remaining non-failed links are not changed, the second forwarding tables are forwarding tables other than the first forwarding tables, and then the forwarding tables of the ECMP are refreshed as follows:
BIFT 1:{(Nbr=R,FBM=1111 0010)}
BIFT 2:{(Nbr=R,FBM=1111 0010)}
BIFT 3:{(Nbr=G,FBM=1111 0010)}
BIFT 4:{(Nbr=P,FBM=1111 0010)}
further, in response to that the link between the node 1 and the neighbor R fails again, the node 1 determines that the second next-hop node is the neighbor G and the neighbor P, respectively, and then the multiple forwarding entries of the ECMP are refreshed as follows:
BIFT 1:{(Nbr=G,FBM=1111 0010)}
BIFT 2:{(Nbr=P,FBM=1111 0010)}
BIFT 3:{(Nbr=G,FBM=1111 0010)}
BIFT 4:{(Nbr=P,FBM=1111 0010)}
still taking the network topology shown in fig. 6 as an example, the first node is node 1, and the plurality of equal cost paths include link M, link N, link X, and link Y from node 1 to the neighboring node 21. For the case that link M fails, after the second next hop node is determined by the above 702, taking the determined second next hop node as an interface corresponding to link N as an example, that is, the link M between the node 1 and the node 21 fails, the first forwarding table corresponding to link M is refreshed according to link M, and the forwarding tables corresponding to equivalent paths where the rest non-failed links are located are prevented from being refreshed. Namely, the second forwarding tables corresponding to the other non-failed links N, X and Y are not changed, and the second forwarding tables are the forwarding tables except the first forwarding table in the plurality of forwarding tables. Then the ECMP's multiple forwarding tables are refreshed as follows:
BIFT 1:{(Nbr=21(link N),FBM=1111 0010)}
BIFT 2:{(Nbr=21(link N),FBM=1111 0010)}
BIFT 3:{(Nbr=21(link X),FBM=1111 0010)}
BIFT 4:{(Nbr=21(link Y),FBM=1111 0010)}
further, in response to that link N between the node 1 and the neighbor 21 fails again, the determined second next hop node is an interface corresponding to link X and link Y, respectively, and then the multiple forwarding table entries of the ECMP are refreshed as follows:
BIFT 1:{(Nbr=21(link X),FBM=1111 0010)}
BIFT 2:{(Nbr=21(link Y),FBM=1111 0010)}
BIFT 3:{(Nbr=21(link X),FBM=1111 0010)}
BIFT 4:{(Nbr=21(link Y),FBM=1111 0010)}
704: and the first node forwards the BIER message based on the refreshed first forwarding table and the forwarding tables except the first forwarding table in the plurality of forwarding tables.
Still taking the topology structure shown in fig. 5 as an example, after the link between the neighbor B and the node 1 fails, the above method is adopted to refresh only the forwarding table corresponding to the equivalent path where the neighbor B is located, and to prevent the forwarding tables corresponding to the equivalent paths where the other non-failed links are located from being refreshed, so that the situations of packet loss or multiple packets of the non-failed link can be reduced.
After the link between the neighbor B and the node 1 is recovered from the failure, if there is no special processing in this process, the multicast stream on each BIFT table will also generate packet loss or multiple packets. In contrast, in the method provided in the embodiment of the present application, after the link between the neighbor B and the node 1 is recovered from the failure, each forwarding table entry may remain unchanged, that is, a Non-reversible manner is adopted. For example, still taking the topology shown in fig. 5 as an example, if the link between node 1 and neighbor B is restored, and the link between node 1 and neighbor R is restored, the forwarding table entry is still as follows:
BIFT 1:{(Nbr=G,FBM=1111 0010)}
BIFT 2:{(Nbr=P,FBM=1111 0010)}
BIFT 3:{(Nbr=G,FBM=1111 0010)}
BIFT 4:{(Nbr=P,FBM=1111 0010)}
after a period of link failure and link recovery, the load sharing may be uneven, for example, in the above situation, only 2 links are used in 4 BIFT tables. This is to maintain stability when a link fails or when a link is restored, but this method also causes uneven load sharing. In view of this, in the method provided in the embodiment of the present application, a mechanism of first establishing and then deleting is provided to optimize a used forwarding table. Illustratively, the first node, after refreshing the first forwarding table according to the second next-hop node, further comprises:
starting a first timer for timing; before the timing of the first timer is finished, an old forwarding table is adopted to forward a BIER message and establish a new forwarding table, the old forwarding table is a forwarding table used by the first node before the first link is recovered, the new forwarding table is a forwarding table established by the first node after the first link is recovered, and the first timer indicates that the establishment of the new forwarding table is finished before the timing of the first timer is finished; and after the first timer finishes timing, switching the old forwarding table to the new forwarding table, and forwarding the BIER message according to the new forwarding table.
It should be noted that the new forwarding table may be established before the first timer is started, or may be established after the first timer is started, or may be established while the first timer is started. Because the first timer indicates that the new forwarding table is established before the first timer finishes timing, the timing duration of the first timer is less than the establishment duration of the new forwarding table for the case that the new forwarding table is established before the first timer is started. Aiming at the condition of establishing a new forwarding table after a first timer is started, the timing duration of the first timer is longer than the establishment duration of the new forwarding table. For the situation that a new forwarding table is established while the first timer is started, the timing duration of the first timer may be equal to the establishment duration of the new forwarding table. The establishment duration of the new forwarding table is the time length from the moment when the new forwarding table is established to the moment when the new forwarding table is established.
Still taking the network topology shown in fig. 5 above as an example, the old forwarding table may be as follows:
BIFT 1:{(Nbr=G,FBM=1111 0010)}
BIFT 2:{(Nbr=P,FBM=1111 0010)}
BIFT 3:{(Nbr=G,FBM=1111 0010)}
BIFT 4:{(Nbr=P,FBM=1111 0010)}
because links where the neighbor P and the neighbor G are located in the old forwarding table are used more and the load is heavier, for load balancing, the new forwarding table established can be as follows:
BIFT 1:{(Nbr=B,FBM=1111 0010)}
BIFT 2:{(Nbr=R,FBM=1111 0010)}
BIFT 3:{(Nbr=G,FBM=1111 0010)}
BIFT 4:{(Nbr=P,FBM=1111 0010)}
taking the network topology shown in fig. 6 as an example, the old forwarding table may be as follows:
BIFT 1:{(Nbr=21(link X),FBM=1111 0010)}
BIFT 2:{(Nbr=21(link Y),FBM=1111 0010)}
BIFT 3:{(Nbr=21(link X),FBM=1111 0010)}
BIFT 4:{(Nbr=21(link Y),FBM=1111 0010)}
because the use of link X and link Y is more and the load is heavier in the old forwarding table, for load balancing, the new forwarding table established can be as follows:
BIFT 1:{(Nbr=21(link M),FBM=1111 0010)}
BIFT 2:{(Nbr=21(link N),FBM=1111 0010)}
BIFT 3:{(Nbr=21(link X),FBM=1111 0010)}
BIFT 4:{(Nbr=21(link Y),FBM=1111 0010)}
the first timer is adopted to indicate that the new forwarding table is established before the first timer finishes timing, so that the old forwarding table is switched to the new forwarding table after the new forwarding table is established, and packet loss or multiple packets caused by switching of the forwarding tables can be further reduced.
In this embodiment, the time for starting the first timer is not limited, and the first timer may be started after the first forwarding table is refreshed according to the second next hop node. The first timer may also be started after the first forwarding table is refreshed according to the second next hop node and the failed link is restored. In an exemplary embodiment, the method provided by the embodiment of the present application may further time the time used by the old forwarding table, and an automatic Re-optimization (Re-optimization) mechanism is provided to avoid the problem of load imbalance of the link due to the fact that the old forwarding table is used all the time. In contrast, in the embodiment of the present application, a second timer is adopted, and after the second timer finishes timing, the first timer is started to establish a new forwarding table. That is, starting the first timer comprises: starting a second timer for timing; and starting the first timer to count after the second timer counts.
The second timer is used for carrying out're-optimization' on the load sharing, and the uniformity of the load sharing is guaranteed. And when the second timer times out, the first timer is adopted to time so as to establish a new forwarding table, and when the first timer finishes timing, the old forwarding table is switched to the new forwarding table. Therefore, in the automatic re-optimization process, the method adopts the first construction and then deletion, so that no packet is lost in the re-optimization process, and further the method provided by the embodiment of the application forms a complete closed loop.
In the embodiment of the present application, the timing of starting the second timer is not limited. For example, the second timer may be started after the first forwarding table is refreshed according to the second next hop node. The second timer may also be started after the first forwarding table is refreshed according to the second next-hop node and the failed link is restored.
As shown in fig. 8, the process of using the first timer and the second timer may be that after the first timer finishes timing, and the old forwarding table is switched to the new forwarding table, taking the network structure shown in fig. 5 as an example, the forwarding table entry is restored to the following state:
BIFT 1:{(Nbr=B,FBM=1111 0010)}
BIFT 2:{(Nbr=R,FBM=1111 0010)}
BIFT 3:{(Nbr=G,FBM=1111 0010)}
BIFT 4:{(Nbr=P,FBM=1111 0010)}
taking the network structure shown in fig. 6 as an example, the forwarding table entry is restored to the following state:
BIFT 1:{(Nbr=21(link M),FBM=1111 0010)}
BIFT 2:{(Nbr=21(link N),FBM=1111 0010)}
BIFT 3:{(Nbr=21(link X),FBM=1111 0010)}
BIFT 4:{(Nbr=21(link Y),FBM=1111 0010)}
in an exemplary embodiment, after switching the old forwarding table to the new forwarding table, the old forwarding table and the new forwarding table both exist at the first node, and since the first link has been restored, the method further comprises: the old forwarding table is deleted. And the old forwarding table is deleted to save the storage space.
In the method provided in this embodiment of the present application, for a case where the first timer and the second timer are used, in addition to configuring the load sharing enable of the BIER ECMP of the first node and enabling the first node to have the load sharing function of the BIER ECMP, in an exemplary embodiment, the network administrator may further configure a timing duration of the first timer and a timing duration of the second timer. The configuration of the timing duration of the first timer and the second timer may be determined based on the self-capability of the first node, such as based on a Central Processing Unit (CPU) load of the first node, or may be set based on experience. The timing durations of the first timer and the second timer configured by different nodes may be the same or different, and this is not limited in this embodiment of the present application as long as it is ensured that the establishment of the new forwarding table is completed. For example, the configuration is as follows:
Figure BDA0002352739600000151
it should be noted that, in addition to the manner of configuring the timer, the re-optimization may be triggered manually, and the re-optimization manner in the embodiment of the present application is not limited. In addition, the link failure in the embodiment of the present application may be that a failure occurs in a next hop node of the first node, which results in a failure of a link between the next hop node of the first node and the first node. If the next hop node of the first node is a node device, the failure of the next hop node of the first node may be a failure of the node device, or a failure of an interface in the node device, which communicates with the first node. In summary, the embodiment of the present application does not limit the cause of the link failure. For the case of any link failure, the method provided by the embodiment of the present application can be applied.
To sum up, as shown in fig. 9, in the foregoing processes provided in this embodiment of the present application, when a next-hop node for load sharing changes, for example, from reachable to unreachable, or from unreachable to reachable, a link where the changed next-hop node is located may be regarded as a failed link when forwarding a BIER packet. Thereafter, it is determined whether stable priority load sharing is configured. If stable priority load sharing is configured, whether to use the method provided by the embodiment of the present application may be determined according to a change situation of the load sharing. And traversing the BIFT table aiming at the condition that stable priority load sharing is configured and the next hop node for load sharing is changed from reachable to unreachable, and if the BIFT table uses the fault link, determining a next hop node with the least use times from the available next hop nodes, namely the next hop nodes included by the non-fault link. And if the next hop node with the least use times is provided with a plurality of next hop nodes, selecting one next hop node according to the identifier of the next hop node to refresh the forwarding table corresponding to the equivalent path of the failed link. And aiming at the condition that stable priority load sharing is configured and the next hop node for load sharing is changed from unreachable to reachable, not refreshing each BIFT table and not traversing each BIFT table. And traversing the BIFT table aiming at the condition that stable priority load sharing is not configured, and sequentially selecting each next hop node from available next hop nodes to refresh the BIFT table.
When the link between the node 1 and the neighbor B fails, the method provided by the embodiment of the present application ensures that each 100 multicast flows of the original R-passing neighbor, G neighbor, and P neighbor are forwarded according to the original forwarding table, thereby minimizing the influence caused by the link failure. That is to say, in the case of BIER ECMP, in the case of a link failure, the method provided in the embodiment of the present application refreshes the first forwarding table corresponding to the equivalent path where the failed link is located, and prevents the forwarding table corresponding to the equivalent path where the non-failed link is located from being refreshed. That is to say, when a first link between a first next hop node of the first node and the first node fails, the first forwarding table corresponding to the first equivalent path where the first link is located is refreshed, and the forwarding tables except the first forwarding table in the plurality of forwarding tables are prevented from being refreshed, so that the influence on the multicast traffic is effectively reduced, and the packet loss or the packets are reduced.
An embodiment of the present application provides a packet forwarding apparatus, where the packet forwarding apparatus is configured to forward a BIER packet, and referring to fig. 10, the packet forwarding apparatus includes:
an obtaining module 1001, configured to obtain multiple forwarding tables of an equal cost multipath ECMP from a first node to a second node, where the ECMP includes multiple equal cost paths, the multiple equal cost paths are in one-to-one correspondence with the multiple forwarding tables, and each of the multiple forwarding tables includes an identifier of a next hop node of the first node on the corresponding equal cost path;
a determining module 1002, configured to determine, in response to a first link between a first next hop node of a first node and the first node failing, a second next hop node of the first node, where a second link between the second next hop node of the first node and the first node does not fail, the first link is a part of a first equivalent path, the second link is a part of a second equivalent path, and the multiple equivalent paths include the first equivalent path and the second equivalent path;
a refreshing module 1003, configured to refresh the first forwarding table according to the second next hop node, and the first node prevents refreshing forwarding tables, other than the first forwarding table, in the multiple forwarding tables, where the first forwarding table corresponds to the first equivalent path, and the refreshed first forwarding table includes an identifier of the second next hop node;
a forwarding module 1004, configured to forward the BIER packet based on the refreshed first forwarding table and forwarding tables, except the first forwarding table, in the plurality of forwarding tables.
In an exemplary embodiment, the second next hop node is a next hop node of the first nodes, except for the first next hop node, which is used the least number of times.
In an exemplary embodiment, the second next hop node is a next hop node of the first node, except for the first next hop node, which is used the least number of times and has the largest or smallest sequence number.
In an exemplary embodiment, referring to fig. 11, the apparatus further comprises:
a timing module 1005, configured to start a first timer to time;
a processing module 1006, configured to forward the BIER packet and establish a new forwarding table by using an old forwarding table before the timing of the first timer is ended, where the old forwarding table is a forwarding table used by the first node before the timing of the first timer is ended, and the first timer indicates that the establishment of the new forwarding table is completed before the timing of the first timer is ended; after the first timer finishes timing, switching the old forwarding table to the new forwarding table;
the forwarding module 1004 is further configured to forward the BIER packet according to the new forwarding table.
In an exemplary embodiment, the timing module 1005 is configured to start a second timer; and starting the first timer to count after the second timer counts.
In the exemplary embodiment, processing module 1006 is further configured to delete the old forwarding table.
According to the device provided by the embodiment of the application, when a first link between a first next hop node of a first node and the first node fails, a first forwarding table corresponding to a first equivalent path where the first link is located is refreshed, and refreshing of forwarding tables except the first forwarding table in a plurality of forwarding tables is prevented, so that the influence on multicast flow is effectively reduced, and packet loss or multiple packets are reduced.
In addition, the second next hop node with the least use times is selected to refresh the first forwarding table, so that the load is more balanced.
It should be understood that the apparatus provided in fig. 10 or fig. 11 is only illustrated by the division of the functional modules when the functions of the apparatus are implemented, and in practical applications, the functions may be distributed and performed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above. In addition, the apparatus and method embodiments provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
Fig. 12 is a schematic diagram of a hardware structure of a message forwarding device 1100 according to an embodiment of the present application. The message forwarding device 1100 shown in fig. 12 may perform the corresponding steps performed by the first node in the method of the above-described embodiment.
As shown in fig. 12, the message forwarding device 1100 includes a processor 1101, a memory 1102, an interface 1103, and a bus 1104. The interface 1103 may be implemented by a wireless or wired method, and specifically may be a network card. The processor 1101, memory 1102 and interface 1103 are connected by a bus 1104.
The interface 1103 may include a transmitter and a receiver for transceiving information between the message forwarding device 1100 and the second node in the above-described embodiments. For example, the interface 1103 is used to support receiving a BIER packet sent by a neighboring node. The processor 1101 is configured to execute the processing performed by the message forwarding apparatus 1100 in the foregoing embodiment. For example, the processor 1101 is configured to obtain a plurality of forwarding tables of an ECMP from a first node to a second node, where the ECMP includes a plurality of equal cost paths, each equal cost path is in one-to-one correspondence with the plurality of forwarding tables, and each of the plurality of forwarding tables includes an identifier of a next hop node of the first node on the corresponding equal cost path. In response to a failure of a first link between a first next hop node of the first node and the first node, the processor 1101 determines a second next hop node of the first node, wherein the link between the second next hop node and the first node is not failed, the first link is a portion of a first equivalent path, the second link is a portion of a second equivalent path, and the plurality of equivalent paths includes the first equivalent path and the second equivalent path. The processor 1101 refreshes the first forwarding table according to the second next hop node, and prevents refreshing forwarding tables other than the first forwarding table among the plurality of forwarding tables, where the first forwarding table corresponds to the first equivalent path, and the refreshed first forwarding table includes an identifier of the second next hop node. The processor 1101 then forwards the BIER message based on the refreshed first forwarding table and the forwarding tables other than the first forwarding table.
The processor 1101 and/or other processes for the techniques described herein. By way of example, the processor 1101 is configured to support steps 701 to 704 in fig. 7. Memory 1102 includes an operating system 11021 and application programs 11022 for storing programs, code, or instructions that when executed by a processor or hardware device may perform the processes of the method embodiments involving a message forwarding device. Alternatively, the Memory 1102 may include a Read-only Memory (ROM) and a Random Access Memory (RAM). Wherein, the ROM comprises a Basic Input/Output System (BIOS) or an embedded System; the RAM includes an application program and an operating system. When the message forwarding node device 1100 needs to be operated, the message forwarding node device 1100 is booted to enter a normal operation state by booting the BIOS that is solidified in the ROM or the bootloader in the embedded system. After the packet forwarding node device 1100 enters the normal operation state, the application program and the operating system in the RAM are operated, thereby completing the processing procedure related to the packet forwarding device in the method embodiment.
It is to be understood that fig. 12 shows only a simplified design of the message forwarding device 1100. In practical applications, the message forwarding node device may include any number of interfaces, processors, or memories.
It should be understood that the processor may be a Central Processing Unit (CPU), other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or any conventional processor or the like. It is noted that the processor may be an advanced reduced instruction set machine (ARM) architecture supported processor.
Further, in an alternative embodiment, the memory may include both read-only memory and random access memory, and provide instructions and data to the processor. The memory may also include non-volatile random access memory. For example, the memory may also store device type information.
The memory may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an electrically Erasable EPROM (EEPROM), or a flash memory. Volatile memory can be Random Access Memory (RAM), which acts as external cache memory. By way of example, and not limitation, many forms of RAM are available. For example, Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), double data rate synchronous SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct memory bus RAM (DR RAM).
There is also provided a computer readable storage medium having stored therein at least one instruction which is loaded and executed by a processor to implement the message forwarding method as described in any of the above.
The present application provides a computer program, which when executed by a computer, may cause the processor or the computer to perform the respective steps and/or procedures corresponding to the above-described method embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the procedures or functions described in accordance with the present application are generated, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk), among others.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (14)

1. A message forwarding method, wherein the method is used for forwarding an explicit copy BIER message based on a bit index, and the method comprises:
a first node acquires a plurality of forwarding tables of equal cost multi-path ECMP from the first node to a second node, wherein the ECMP comprises a plurality of equal cost paths, the equal cost paths are in one-to-one correspondence with the forwarding tables, and each forwarding table in the forwarding tables comprises an identifier of a next hop node of the first node on the corresponding equal cost path;
in response to a first link between a first next hop node of the first node and the first node failing, the first node determining a second next hop node of the first node, wherein a second link between the second next hop node of the first node and the first node does not fail, the first link is part of a first equivalent path, the second link is part of a second equivalent path, and the plurality of equivalent paths includes the first equivalent path and the second equivalent path;
the first node refreshes a first forwarding table according to the second next hop node, and the first node prevents refreshing forwarding tables except the first forwarding table in the plurality of forwarding tables, wherein the first forwarding table corresponds to the first equivalent path, and the refreshed first forwarding table comprises an identifier of the second next hop node;
and the first node forwards the BIER message based on the refreshed first forwarding table and the forwarding tables except the first forwarding table in the plurality of forwarding tables.
2. The method according to claim 1, wherein the second next hop node is a next hop node which is used the least number of times among next hop nodes of the first node, except for the first next hop node.
3. The method according to claim 2, wherein the second next hop node is a next hop node which is used the least number of times and has the largest or the smallest sequence number, except for the first next hop node, among the next hop nodes of the first node.
4. The method according to any of claims 1-3, wherein after the first node refreshes the first forwarding table according to the second next hop node, further comprising:
starting a first timer for timing;
before the timing of the first timer is finished, an old forwarding table is adopted to forward a BIER message and establish a new forwarding table, the old forwarding table is a forwarding table used by the first node before the first link is recovered, the new forwarding table is the forwarding table established after the first link is recovered, and the first timer indicates that the establishment of the new forwarding table is finished before the timing of the first timer is finished;
and after the first timer finishes timing, switching the old forwarding table to the new forwarding table, and forwarding the BIER message according to the new forwarding table.
5. The method of claim 4, wherein said initiating a first timer comprises:
starting a second timer for timing;
after the second timer finishes timing, starting the first timer to time.
6. The method of claim 4 or 5, wherein after switching the old forwarding table to the new forwarding table, the method further comprises: and deleting the old forwarding table.
7. A message forwarding apparatus, wherein the apparatus is configured to forward an explicit duplicate bit message based on a bit index, the apparatus comprising:
an obtaining module, configured to obtain multiple forwarding tables of an equal cost multipath ECMP from a first node to a second node, where the ECMP includes multiple equal cost paths, the multiple equal cost paths correspond to the multiple forwarding tables one to one, and each of the multiple forwarding tables includes an identifier of a next hop node of the first node on the corresponding equal cost path;
a determining module, configured to determine a second next hop node of a first node in response to a first link between the first next hop node of the first node and the first node failing, where a second link between the second next hop node of the first node and the first node does not fail, the first link is a part of a first equivalent path, the second link is a part of a second equivalent path, and the equivalent paths include the first equivalent path and the second equivalent path;
a refreshing module, configured to refresh a first forwarding table according to the second next hop node, and the first node prevents refreshing forwarding tables other than the first forwarding table in the plurality of forwarding tables, where the first forwarding table corresponds to the first equivalent path, and the refreshed first forwarding table includes an identifier of the second next hop node;
and the forwarding module is used for forwarding the BIER message based on the refreshed first forwarding table and the forwarding tables except the first forwarding table in the plurality of forwarding tables.
8. The apparatus according to claim 7, wherein the second next hop node is a next hop node that is used the least number of times among next hop nodes of the first node, except for the first next hop node.
9. The apparatus according to claim 8, wherein the second next hop node is a next hop node which is used the least number of times and has the largest or the smallest sequence number, among the next hop nodes of the first node, except for the first next hop node.
10. The apparatus of any of claims 7-9, further comprising:
the timing module is used for starting a first timer to time;
a processing module, configured to forward a BIER packet and establish a new forwarding table by using an old forwarding table before timing of the first timer is ended, where the old forwarding table is a forwarding table used by the first node before the first link is recovered, the new forwarding table is an established forwarding table after the first link is recovered, and the first timer indicates that establishment of the new forwarding table is completed before timing of the first timer is ended; after the first timer finishes timing, switching the old forwarding table to the new forwarding table;
and the forwarding module is also used for forwarding the BIER message according to the new forwarding table.
11. The apparatus of claim 10, wherein the timing module is configured to start a second timer; after the second timer finishes timing, starting the first timer to time.
12. The apparatus of claim 10 or 11, wherein the processing module is further configured to delete the old forwarding table.
13. A message forwarding device, characterized in that the message forwarding device comprises:
a memory and a processor, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the message forwarding method according to any one of claims 1 to 6.
14. A computer-readable storage medium having stored thereon at least one instruction which is loaded and executed by a processor to implement the message forwarding method of any of claims 1-6.
CN201911422705.1A 2019-12-31 2019-12-31 Message forwarding method, message forwarding equipment and computer readable storage medium Active CN113132222B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911422705.1A CN113132222B (en) 2019-12-31 2019-12-31 Message forwarding method, message forwarding equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911422705.1A CN113132222B (en) 2019-12-31 2019-12-31 Message forwarding method, message forwarding equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN113132222A true CN113132222A (en) 2021-07-16
CN113132222B CN113132222B (en) 2023-04-18

Family

ID=76769633

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911422705.1A Active CN113132222B (en) 2019-12-31 2019-12-31 Message forwarding method, message forwarding equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113132222B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150085635A1 (en) * 2013-09-17 2015-03-26 Cisco Technology, Inc. Migration support for bit indexed explicit replication
CN106209629A (en) * 2014-11-06 2016-12-07 瞻博网络公司 Bit index that is deterministic and that optimize explicitly replicates (BIER) and forwards
US20170093641A1 (en) * 2015-09-30 2017-03-30 Telefonaktiebolaget Lm Ericsson (Publ) Route refresh mechanism for border gateway protocol link state
CN110417674A (en) * 2019-07-26 2019-11-05 新华三技术有限公司合肥分公司 A kind of data traffic sharing method and device
CN110535761A (en) * 2019-09-30 2019-12-03 北京华三通信技术有限公司 Message forwarding method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150085635A1 (en) * 2013-09-17 2015-03-26 Cisco Technology, Inc. Migration support for bit indexed explicit replication
CN106209629A (en) * 2014-11-06 2016-12-07 瞻博网络公司 Bit index that is deterministic and that optimize explicitly replicates (BIER) and forwards
US20170093641A1 (en) * 2015-09-30 2017-03-30 Telefonaktiebolaget Lm Ericsson (Publ) Route refresh mechanism for border gateway protocol link state
CN110417674A (en) * 2019-07-26 2019-11-05 新华三技术有限公司合肥分公司 A kind of data traffic sharing method and device
CN110535761A (en) * 2019-09-30 2019-12-03 北京华三通信技术有限公司 Message forwarding method and device

Also Published As

Publication number Publication date
CN113132222B (en) 2023-04-18

Similar Documents

Publication Publication Date Title
US11533249B2 (en) Route processing method and apparatus, and data transmission method and apparatus
US11677587B2 (en) EVPN packet processing method, device, and system for mac learning via MAC/IP advertisement route
US11394644B2 (en) EVPN packet processing method, device, and system
CN112187647B (en) Message forwarding method, message forwarding equipment and computer readable storage medium
US8599685B2 (en) Snooping of on-path IP reservation protocols for layer 2 nodes
RU2493677C2 (en) Method and router for implementing mirroring
EP3923526A1 (en) Message forwarding method in network, network node and network system
US11477114B2 (en) Packet forwarding method and apparatus
TW201134151A (en) RSVP-TE graceful restart under fast re-route conditions
JPWO2006092915A1 (en) Packet ring network system, connection method between packet rings, and inter-ring connection node
JP7053901B2 (en) Loop avoidance communication method, loop avoidance communication device and loop avoidance communication system
WO2021088561A1 (en) Method, device, and equipment for load sharing in bit index explicit replication network
WO2019062249A1 (en) Sr-be inner tunnel label configuration method, device and communication system
US11356372B2 (en) Data traffic processing method, device, and system
JP2022160653A (en) Packet processing method and gateway device
CN112737954B (en) Message processing method, device, system, equipment and storage medium
KR20220093155A (en) Packet forwarding method, first network device and first device group
WO2021073357A1 (en) Packet processing method, device, system and apparatus as well as storage medium
WO2023045793A1 (en) Loop detection method and apparatus
CN113132222B (en) Message forwarding method, message forwarding equipment and computer readable storage medium
WO2022116615A1 (en) Message transmission method, method for acquiring correspondence, and apparatus and system
WO2022222884A1 (en) Failure sensing method, apparatus and system for forwarding path
JP7483924B2 (en) Connection status detection method, related device, computer storage medium, and computer program product
WO2021077972A1 (en) Packet forwarding method, device, and storage medium
KR20230093015A (en) Information processing method, node and computer readable storage medium

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