CN114257539A - Method for acquiring next hop, method and device for generating forwarding table entry - Google Patents

Method for acquiring next hop, method and device for generating forwarding table entry Download PDF

Info

Publication number
CN114257539A
CN114257539A CN202011273084.8A CN202011273084A CN114257539A CN 114257539 A CN114257539 A CN 114257539A CN 202011273084 A CN202011273084 A CN 202011273084A CN 114257539 A CN114257539 A CN 114257539A
Authority
CN
China
Prior art keywords
forwarding
bfr
bit
identifier
forwarding table
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011273084.8A
Other languages
Chinese (zh)
Inventor
田太徐
夏阳
李吉
李东锋
谢经荣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 PCT/CN2021/111632 priority Critical patent/WO2022052709A1/en
Publication of CN114257539A publication Critical patent/CN114257539A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/32Flooding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/16Multipoint 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/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering

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 application provides a method for acquiring a next hop, which comprises the following steps: receiving a bit index explicit copy BIER multicast message, wherein the BIER multicast message comprises a first bit string, and a bit with 1 set included in the first bit string corresponds to a bit forwarding outlet router BFER; determining an index of a forwarding table entry according to the bit with the 1 set in the first bit string, wherein the forwarding table entry comprises the index and an identifier of equipment serving as a next hop; the identification of the device is directly obtained from the index. The embodiment of the present application further provides a method for generating a forwarding table entry, including: receiving the identification and BFR-id of the equipment sent by the equipment; and acquiring a forwarding table item according to the identifier and the BFR-id of the equipment, wherein the index of the forwarding table item corresponds to the BFR-id, and the forwarding table item is used for directly acquiring the identifier of the equipment which is taken as the next hop and is included in the forwarding table item according to the index. The BFR-id in the above method is used to identify a BFER that can communicate with a device, which is the BFER or a first intermediate BFR through which the BFER is reached.

Description

Method for acquiring next hop, method and device for generating forwarding table entry
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method for obtaining a next hop, and a method and an apparatus for generating a forwarding table entry.
Background
In a Bit Index Explicit Replication (BIER) domain, when a Bit Forwarding Ingress Router (BFIR) or a middle BIER forwarding router (transit BFR) forwards a BIER multicast packet, a BFR neighbor (BFR neighbor, BFR-NBR) as a next hop may be determined according to a Bit string (Bit string) carried in the BIER multicast packet and a configured Bit Index forwarding table (Bit Index forwarding table, BIFT). Specifically, the BFIR uses an offset of a bit with a1 set in a bit string included in the received first BIER multicast packet in the bit string as a Sequence Number (SN) to obtain a bit table entry (entry). And performing AND operation on forwarding bit-string masks (F-BM) included in the BIFT table entry and bit string included in the first BIER multicast message to obtain updated bit string. And the BFIR replaces the bit string included in the first BIER multicast message with the updated bit string to obtain a second BIER multicast message. And the BFIR sends the second BIER multicast message to a BFR neighbor included in the BIFT list item.
In the process of forwarding the BIER multicast packet by using the BIFT, taking Bit String Length (BSL) as 256 as an example, one entry in the BIFT includes an F-BM field occupying 256 bits (bit) and a BFR neighbor field occupying 8 bits (bit). When the number of the BFR neighbors is large, the BFIR or the intermediate BFR needs to read at least 256-bit data in the F-BM field from the memory every time when copying one message, for example, 10 messages are copied, at least 2560-bit data needs to be read, the requirement on the performance of forwarding hardware is high, and the performance of the existing forwarding hardware cannot support a BIER forwarding scene with a BSL of 512 or 1024.
Disclosure of Invention
The embodiment of the application provides a method for acquiring a next hop, a method for generating a forwarding table entry and a device, which can reduce the performance requirement on forwarding hardware and improve the forwarding efficiency.
In a first aspect, a method for acquiring a next hop is provided, where the method includes: receiving a BIER multicast message, wherein the BIER multicast message comprises a first bit string, and a bit with a set 1in the first bit string corresponds to a Bit Forwarding Egress Router (BFER); determining an index of a forwarding table entry according to the bit with the 1 set in the first bit string, wherein the forwarding table entry comprises the index and an identifier of equipment serving as a next hop; and directly obtaining the identifier of the equipment according to the index, wherein the equipment is the BFER or a first intermediate BFR passed by reaching the BFER.
In the method, the corresponding equipment identifier is directly obtained according to the index of the forwarding table entry without searching bit string in the F-BM in the common BIFT table entry, which is beneficial to reducing the performance requirement on forwarding hardware and improving the forwarding efficiency.
In a possible implementation manner, the index is a sequence number corresponding to a bit forwarding router identifier BFR-id of the BFER, and the identifier of the device corresponds to a sequence number. The forwarding table entry can support the forwarding behavior in a network scene with a BSL of 512 bits or 1024 bits, and the expandability can be further improved.
In a possible implementation manner, the forwarding table entry further includes a second bit string, the second bit string has only 1bit with 1bit being set to 1, and an offset of the bit with 1bit being set in the second bit string corresponds to a sequence number included in the forwarding table entry where the second bit string is located. Based on the forwarding table, the directly obtaining the identifier of the device according to the index includes: and obtaining the identifier of the equipment serving as the next hop, which is included in the forwarding table entry, according to the sequence number, without searching the second bit string included in the forwarding table entry. Since the F-BM does not need to be read, the identification of the equipment is directly determined according to the index, and the forwarding efficiency can be further improved.
In a possible implementation manner, the forwarding table entry includes N identifiers, where N is less than or equal to a value of a read bit width, the N identifiers include an identifier of the device, and an order of any identifier included in the N identifiers in the forwarding table entry corresponds to the sequence number. Based on the forwarding table, the directly obtaining the identifier of the device according to the index includes: determining a row number according to the serial number and the reading bit width, wherein the row number corresponds to a quotient of the serial number and the reading bit width; and acquiring the N identifiers included in the forwarding table entry corresponding to the row number. The forwarding table entry does not need to store a common F-BM, so that the storage space can be saved, and the high-performance requirement on forwarding hardware when the F-BM is read is reduced. In addition, the forwarding table entry can support the forwarding behavior in the network scene with the BSL of 512bit or 1024bit, and the expandability can be further improved.
In a possible implementation manner, the determining an index of a forwarding table entry according to the bit set to 1in the first bit string includes: acquiring the offset of the bit with 1in the first bit string; and determining the index according to the offset, wherein the offset corresponds to the index.
In a possible implementation manner, the index is used to identify a row where M identifier sets are located, where M is an integer greater than or equal to 2, the M identifier sets include identifiers of the device, the identifier set to which the identifier of the device belongs corresponds to the data block to which the serial number belongs, and an order of the identifier of the device in the identifier set to which the identifier belongs corresponds to the serial number. The forwarding table entry does not need to store a common F-BM, so that the storage space can be saved, and the high-performance requirement on forwarding hardware when the F-BM is read is reduced. In addition, the forwarding table entry can support the forwarding behavior in the network scene with the BSL of 512bit or 1024bit, and the expandability can be further improved.
In a possible implementation manner, the determining an index of a forwarding table entry according to the bit set to 1in the first bit string includes: determining a data block to which a bit with a1 set in the first bit string belongs according to the first bit string and the reading bit width; acquiring an identifier set corresponding to a data block to which a bit with a1 set in the first bit string belongs, wherein the M identifier sets comprise the identifier sets corresponding to the data block; and determining the rows where the M identification sets are located according to the identification sets corresponding to the data blocks.
In one possible implementation, directly obtaining the identifier of the device according to the index includes: obtaining the identity of the device from the M identity sets comprised by the index.
In one possible implementation, the method further includes: receiving the identification of the equipment and the BFR-id sent by the equipment; obtaining the sequence number corresponding to the BFR-id according to the BFR-id; and obtaining the forwarding table entry according to the serial number and the identifier of the equipment, wherein the index of the forwarding table entry is the serial number, and the next hop of the forwarding table entry is the identifier of the equipment.
In one possible implementation, the method further includes: receiving the identification of the equipment and the BFR-id sent by the equipment; obtaining the second bit string and the sequence number corresponding to the BFR-id according to the BFR-id; and obtaining the forwarding table entry according to the serial number, the second bit string and the identifier of the equipment, wherein the index of the forwarding table entry is the serial number, the F-BM of the forwarding table entry is the second bit string, and the next hop of the forwarding table entry is the identifier of the equipment.
In one possible implementation, the method further includes: receiving the identification of the equipment and the BFR-id sent by the equipment; obtaining the sequence number corresponding to the BFR-id according to the BFR-id; and sequencing the serial number and the identifier of the equipment according to the reading bit width to obtain the forwarding table entry, wherein the row number of the forwarding table entry corresponds to a quotient of the serial number and the reading bit width, and the sequencing of the identifier of the equipment in the N identifiers included in the forwarding table entry corresponds to the serial number.
In one possible implementation, the method further includes: receiving the identification of the equipment and the BFR-id sent by the equipment; obtaining the sequence number corresponding to the BFR-id according to the BFR-id; dividing the identifiers corresponding to the serial numbers according to the sequence of the serial numbers to obtain L identifier sets, wherein the L corresponds to the quotient of the maximum value of the serial numbers and a preset value, and the preset value is the number of bits included in the data block; and dividing the L identification sets according to the mobile window, and combining the identification sets in the mobile window to obtain the forwarding table entries comprising the M identification sets. Wherein the maximum value of the serial number is 256, the preset value is 8, the L is 32, and the M is 2.
The method provided by the first aspect described above may be performed by the BFIR or by a second intermediate BFR.
In a second aspect, a method for generating a forwarding table entry is provided, where the method includes: receiving an identifier and a BFR-id of the device, which are sent by the device, wherein the BFR-id is used for identifying a BFER which can communicate with the device, and the device is the BFER or a first BFR which passes by the BFER; and acquiring a forwarding table entry according to the identifier of the equipment and the BFR-id, wherein the index of the forwarding table entry corresponds to the BFR-id, and the forwarding table entry is used for directly acquiring the identifier of the equipment which is used as the next hop and is included in the forwarding table entry according to the index.
In a possible implementation manner, the index is a sequence number corresponding to the BFR-id, and the identifier of the device corresponds to a sequence number.
In a possible implementation manner, the forwarding table entry further includes a first bit string, the first bit string has only 1bit with 1bit being set to 1, and an offset of the bit with 1bit being set in the first bit string corresponds to a sequence number included in the forwarding table entry where the bit is located.
In a possible implementation manner, the forwarding table entry includes N identifiers, where N is less than or equal to a value of a read bit width, the N identifiers include an identifier of the device, and an order of any identifier included in the N identifiers in the forwarding table entry corresponds to the sequence number.
In a possible implementation manner, the index is used to identify a row where M identifier sets are located, where M is an integer greater than or equal to 2, the M identifier sets include identifiers of the device, the identifier set to which the identifier of the device belongs corresponds to the data block to which the serial number belongs, and an order of the identifier of the device in the identifier set to which the identifier belongs corresponds to the serial number.
In one possible implementation, the method further includes: obtaining the sequence number corresponding to the BFR-id according to the BFR-id; and obtaining the forwarding table entry according to the serial number and the identifier of the equipment, wherein the index of the forwarding table entry is the serial number, and the next hop of the forwarding table entry is the identifier of the equipment.
In one possible implementation, the method further includes: obtaining the first bit string and the sequence number corresponding to the BFR-id according to the BFR-id; and obtaining the forwarding table item according to the serial number, the first bit string and the identifier of the equipment, wherein the index of the forwarding table item is the serial number, the F-BM of the forwarding table item is the first bit string, and the next hop of the forwarding table item is the identifier of the equipment.
In one possible implementation, the method further includes: obtaining the sequence number corresponding to the BFR-id according to the BFR-id; and sequencing the serial number and the identifier of the equipment according to the reading bit width to obtain the forwarding table entry, wherein the row number of the forwarding table entry corresponds to a quotient of the serial number and the reading bit width, and the sequencing of the identifier of the equipment in the N identifiers included in the forwarding table entry corresponds to the serial number.
In one possible implementation, the method further includes: obtaining the sequence number corresponding to the BFR-id according to the BFR-id; dividing the identifiers corresponding to the serial numbers according to the sequence of the serial numbers to obtain L identifier sets, wherein the L corresponds to the quotient of the maximum value of the serial numbers and a preset value, and the preset value is the number of bits included in the data block; and dividing the L identification sets according to the mobile window, and combining the identification sets in the mobile window to obtain the forwarding table entries comprising the M identification sets. Wherein the maximum value of the serial number is 256, the preset value is 8, the L is 32, and the M is 2.
The method provided by the second aspect described above may be performed by the BFIR or by a second intermediate BFR.
In a third aspect, a forwarding device is provided, where the forwarding device includes a unit configured to implement a function corresponding to a step included in the method provided by the foregoing first aspect or a possible implementation manner in the first aspect.
In a fourth aspect, an apparatus for generating a forwarding table entry is provided, where the apparatus includes a unit configured to implement the functions corresponding to the steps included in the method provided by the second aspect or the possible implementation manner in the second aspect.
In a fifth aspect, a system is provided, where the system includes the forwarding device provided in the third aspect, or the system includes the apparatus for generating a forwarding table entry provided in the fourth aspect.
In a sixth aspect, a chip is provided, where the chip includes a memory and a processor, where the memory is used to store computer instructions, and the processor is used to call and execute the computer instructions from the memory, so as to execute the method for obtaining a next hop provided in the first aspect or the possible implementation manner in the first aspect, or execute the method for generating a forwarding table entry provided in the second aspect or the possible implementation manner in the second aspect.
A seventh aspect provides a computer program product, where the computer program product includes one or more computer program instructions, and when the computer program instructions are loaded and executed by a computer, the computer executes a method for obtaining a next hop provided in the first aspect or in a possible implementation manner in the first aspect, or executes a method for generating a forwarding table entry provided in the second aspect or in a possible implementation manner in the second aspect.
In an eighth aspect, a computer-readable storage medium is provided, where the computer-readable storage medium is used to store instructions, where the instructions include a program designed to execute the method for obtaining a next hop provided in the first aspect or the possible implementation manner in the first aspect, or the instructions include a program designed to execute the method for generating a forwarding table entry provided in the second aspect or the possible implementation manner in the second aspect.
In a ninth aspect, there is provided a forwarding device comprising a processor and a non-transitory computer readable storage medium storing program instructions for execution by the processor, the program instructions instructing the processor to perform a method of acquiring a next hop as provided by the first aspect or a possible implementation manner under the first aspect.
In a tenth aspect, an apparatus for generating a forwarding entry is provided, where the apparatus includes a processor and a non-transitory computer-readable storage medium storing program instructions for the processor to execute, where the program instructions instruct the processor to execute a method for generating a forwarding entry provided in the second aspect or a possible implementation manner in the second aspect.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a schematic diagram of a BIER network scenario.
Fig. 2 is a schematic view of a BIER network scenario provided in an embodiment of the present application.
Fig. 3 is a flowchart illustrating a method for obtaining a forwarding entry according to an embodiment of the present application.
Fig. 4 is a schematic flowchart of a method for forwarding a multicast packet according to a second embodiment of the present application.
Fig. 5 is a schematic view of another BIER network scenario provided in the embodiment of the present application.
Fig. 6 is a flowchart illustrating a method for obtaining a forwarding entry according to a third embodiment of the present application.
Fig. 7 is a schematic diagram of a format of a forwarding multicast packet according to a fourth embodiment of the present application.
Fig. 8 is a schematic diagram of a format of a BIER multicast packet according to an embodiment of the present application.
Fig. 9 is a schematic diagram of another BIER multicast packet format according to an embodiment of the present application.
Fig. 10 is a schematic diagram of a format of another BIER multicast packet according to an embodiment of the present application.
Fig. 11 is a schematic structural diagram of a forwarding device provided in an embodiment of the present application.
Fig. 12 is a schematic structural diagram of an apparatus for generating a forwarding entry according to an embodiment of the present application.
Fig. 13 is a schematic structural diagram of a forwarding device according to an embodiment of the present application.
Fig. 14 is a schematic structural diagram of an apparatus for generating a forwarding table entry according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention.
In the BIER network scenario shown in fig. 1, device 101 connects to multicast recipient 1. Device 102 connects to multicast recipient 2. The device 103 connects to the multicast receiver 3. Device 104 connects to multicast recipient 4. Device 255 receives multicast recipient 5. Device 256 receives multicast recipient 6. Device 101 connects to device 105 and device 105 connects to device 109. Device 102 and device 103 are connected to device 106, and device 106 is connected to device 109. Device 104 connects to device 107 and device 107 connects to device 109. Device 255 and device 256 are connected to device 108, and device 108 is connected to device 109. Device 109 connects to device 110 and device 110 connects to the multicast source. The device 110 is a BFIR. Device 109, device 106, device 107, and device 108 are intermediate BFRs. Device 101, device 102, device 103, device 104, device 255, and device 256 are BFERs. Device 101 has an assigned BFR-id of 1. Device 102 is assigned a BFR-id of 2. The device 103 has an assigned BFR-id of 3. Device 104 is assigned a BFR-id of 4. The device 255 has an assigned BFR-id of 255. The device 256 is assigned a BFR-id of 256. The device 101, the device 102, the device 103, the device 104, the device 255, and the device 256 belong to a sub-domain (SD) of the same BIER, and Set Identifiers (SIs) are the same, for example, the SI may be 0.
In the scenario shown in fig. 1, multicast receivers 2 and 6 need to receive multicast packets from a multicast source. Devices acting as BFERs, such as device 101, device 102, device 103, device 104, device 255, and device 256 in fig. 1, issue their own assigned BFR-id and device identification (which may be denoted as a102) to their BFR neighbors by means of Inter Gateway Protocol (IGP) flooding. For example: device 102 issues its own BFR-id and address to device 106. Device 103 publishes its own BFR-id and device identification (which may be denoted as a102) to device 106. The device identification may be information such as an address or a name. Device 106 generates a BIFT entry as shown in Table 1-1 below.
TABLE 1-1
Figure BDA0002778289330000051
Figure BDA0002778289330000061
In Table 1-1, each BIFT entry in Table 1-1 includes a Sequence Number (SN), a F-BM, and a BFR-NBR. The ellipses represent 252 empty entries with 4-255 SN omitted. The empty entry may be a representation of the entry in Table 1-1 having a SN of 256. SN included in any table entry in Table 1-1 is a value corresponding to BFR-id, for example, SN of 1 means BFR-id of 1, SN of 3 means BFR-id of 3. The bit string in the F-BM included in any table entry in Table 1-1 includes a bit set to 1, and the offset of the bit set to 1in the bit string corresponds to the BFR-id of the BFER. The BFR-NBR included in any table entry in Table 1-1 indicates the next hop passed by when reaching the BFER corresponding to bit string in F-BM, and the next hop may be BFER or intermediate BFR. For example, in the entry with SN of 2, a102 may be the device identifier of the device 102, that is, the entry with SN of 2 indicates that the next hop to reach the BFR (device 102) with BFR-id of 2 identified by 0000 … 00000000000000000000000000000010 is the device (device 102) identified by a 102. In the entry with SN of 3, a103 may be the device identifier of device 103, that is, the entry with SN of 3 indicates that the next hop to reach the BFR (device 103) with BFR-id of 3 identified by 0000 … 00000000000000000000000000000100 is the device (device 103) identified by a 103.
Device 255 issues its own BFR-id and device identification (which may be denoted as a255) to device 108. Device 256 publishes its own BFR-id and device identification (which may be denoted as a256) to device 108. Device 108 generates the BIFT entries as shown in tables 1-2 below.
Tables 1 to 2
SN F-BM(256bit) BFR-NBR
1 0000…00000000000000000000000000000000 0
2 0000…00000000000000000000000000000000 0
255 0100…00000000000000000000000000000000 a255
256 1000…00000000000000000000000000000000 a256
In tables 1-2, the ellipses indicate the omitted 252 empty entries having SN 3 through SN 254. The empty entry may be a representation of an entry in tables 1-2 having an SN of 1. S N in tables 1-2 has the same meaning as SN in Table 1-1. The meanings of F-BM of tables 1-2 are the same as those of F-BM of tables 1-1. The BFR-NBR of tables 1-2 has the same meaning as the BFR-NBR of tables 1-1. In the table entry with SN of 255, a255 may be the device identifier of the device 255, that is, the table entry with SN of 255 indicates that the next hop to reach the BFER (device 255) with a BFR-id of 255 identified by 0100 … 00000000000000000000000000000000 is the device (device 255) identified by a 255. In the entry with SN 256, a256 may be the device identification of device 256, i.e., the entry with SN 256 indicates that the next hop to reach the BFR with ID 256 identified at 1000 … 00000000000000000000000000000000 (device 256) is the device identified by a256 (device 256).
The method for generating the bit entry by the device 105 and the device 107 may refer to the method for generating the bit entry by the device 106, and is not described herein again.
Device 105 sends device identification of device 105 and the BFR-id of device 101 to device 109. The device identification of device 105 is a 105. Device 107 sends the device identification of device 107 and the BFR-id of device 104 to device 109. The device identification of device 107 is a 107. Device 106 sends the device identification of device 106, the BFR-id of device 102, and the BFR-id of device 103 to device 109. The device identification of the device 106 is a 106. Device 108 sends the device identification of device 108, the BFR-id of device 255, and the BFR-id of device 256 to device 109. The device identification of device 108 is a 108. The device 109 generates the BIFT entries according to the parameters obtained by IGP flooding, as shown in tables 1-3 below.
Tables 1 to 3
SN F-BM(256bit) BFR-NBR
1 0000…00000000000000000000000000000001 a105
2 0000…00000000000000000000000000000110 a106
3 0000…00000000000000000000000000000110 a106
4 0000…00000000000000000000000000001000 a107
255 1100…00000000000000000000000000000000 a108
256 1100…00000000000000000000000000000000 a108
In tables 1-3, the ellipses represent 250 empty entries with SN 5 through SN 254 that are omitted. The empty entry may be a representation of the entry in Table 1-1 having a SN of 256. SN in tables 1-3 has the same meaning as SN in tables 1-1. The meanings of F-BM of tables 1-3 are the same as those of F-BM of Table 1-1. The BFR-NBRs of tables 1-3 have the same meanings as those of the BFR-NBRs of tables 1-1. In the entry with SN of 1, a105 is the device identifier of the device 105, that is, the entry with SN of 1 indicates that the next hop to reach the BFER (device 101) with BFR-id of 1 identified by 0000 … 00000000000000000000000000000001 is the device (device 105) identified by a 105. In the entry with SN 2, a106 is the device identification of the device 106, that is, the entry with SN 2 indicates that the next hop to reach the BFER (device 102) with BFR-id 2 identified by 0000 … 00000000000000000000000000000110 is the device (device 106) identified by a 106. In the entry with SN 3, a106 is the device identification of the device 106, that is, the entry with SN 3 indicates that the next hop to reach the BFER with BFR-id 3 (device 103) identified by 0000 … 00000000000000000000000000000110 is the device identified by a106 (device 106). In the entry with SN of 4, a107 is the device identifier of the device 107, that is, the entry with SN of 4 indicates that the next hop to reach the BFR (device 104) with BFR-id of 4 identified by 0000 … 00000000000000000000000000001000 is the device (device 107) identified by a 107. In the entry with SN of 255, a108 is the device identifier of the device 108, that is, the entry with SN of 255 indicates that the next hop to reach the BFER (device 255) with the BFR-id of 255 identified by 1100 … 00000000000000000000000000000000 is the device (device 108) identified by a 108. In the entry with SN 256, a108 is the device identification of the device 108, that is, the entry with SN 256 indicates that the next hop to reach the BFER with BFR-id 256 identified by 1100 … 00000000000000000000000000000000 (device 256) is the device identified by a108 (device 108). The reason why the F-BM includes bit string in the above entry with SN 2 and SN 3 is that the device 106 feeds back to the device 109 that it can communicate with the BFER with BFR-id 2 and 3, i.e. bit string is 0000 … 00000000000000000000000000000110. For the same reason, the entry with SN 255 includes the same F-BM as the entry with SN 256.
Device 109 may send its own device identification (which may be denoted as a109), the BFR-id of device 101, the BFR-id of device 102, the BFR-id of device 103, the BFR-id of device 104, the BFR-id of device 255, and the BFR-id of device 256 to device 110. The device 110 obtains the BIFT table entry according to the above parameters, as shown in tables 1-4 below.
Tables 1 to 4
SN F-BM(256bit) BFR-NBR
1 1100…00000000000000000000000000001111 a109
2 1100…00000000000000000000000000001111 a109
3 1100…00000000000000000000000000001111 a109
4 1100…00000000000000000000000000001111 a109
255 1100…00000000000000000000000000001111 a109
256 1100…00000000000000000000000000001111 a109
In tables 1-4, the ellipses represent 250 empty entries with SN 5 through SN 254 that are omitted. The value of 0 in the column of the BFR-NBR included in the above tables 1-1 to 1-4 indicates that there is no next hop or that the next hop is empty. … in the BFR-NBR column indicates that there is no next hop or that the next hop is null. The empty entry may be a representation of the entry in Table 1-1 having a SN of 256. SN in tables 1-4 has the same meaning as SN in tables 1-1. The meanings of F-BM of tables 1-4 are the same as those of F-BM of Table 1-1. The BFR-NBRs of tables 1-4 have the same meanings as those of the BFR-NBRs of tables 1-1. In the above list items with SN 1, 2, 3, 4, 255 and 256, the F-BM includes bit string with the same original letter, because B device it str1in0g9 all feed 00 to 101011 … 000 of device 1, 00 can be 00 and 00B0F0R0-0i0d00 is 0010, 020, 0031, 1141 and 0010. The entries 2 and 55 that are 1B, FE2, R3, 4, 255, and 256 of 2S5N6 above have the same next hop, i.e., the device identified by a109 (device 109).
Taking the BIER network scenario of fig. 1 and the above-mentioned BIFT table (table 1-1 to table 1-4) as an example, the multicast source will be described as sending multicast messages to multicast receiver 2 and multicast receiver 6. In one implementation, the device 110 acting as a BFIR receives a multicast packet containing (S, G) from a multicast source. Device 110 determines BFERs (device 102 and device 256) connected to multicast receiver 2 and multicast receiver 6, respectively, based on (S, G) in the multicast packet. Device 110 obtains a bit string having a value of 1000 … 00000000000000000000000000000010 based on the BFR-id of device 102 (value 2) and the BFR-id of device 256 (value 256). The device 110 encapsulates the BIER header on the outer layer of the multicast packet to obtain the first BIER multicast packet. The BIER header of the first BIER multicast packet includes a bit string having a value of 1000 … 00000000000000000000000000000010. In the process of forwarding the first BIER multicast packet by the device 110, the device 110 uses the offset of the first bit with 1 set in the bit string from right to left direction in the bit string as the SN lookup table 1-4 to obtain the entry with SN of 2. The device 110 performs an and operation on 1100 … 00000000000000000000000000001111 in the entry with SN of 2 and the bit string with the value of 1000 … 00000000000000000000000000000010 included in the first BIER multicast packet, and does not perform bit string replacement as the result after the operation is the same as the bit string in the first BIER multicast packet. The device 110 sends the first BIER multicast packet to the device identified by a109 (the identifier in the BFR-NBR in the entry with SN of 2). The device 110 performs an inversion operation on 1100 … 00000000000000000000000000001111 in the entry with SN of 2 to obtain 0011 … 11111111111111111111111111110000. The device 110 performs an and operation on the result obtained by the negation operation and the bit string with the value of 1000 … 00000000000000000000000000000010 in the first BIER multicast packet, and ends the query if the result is all 0. After receiving the first BIER multicast packet, the device 109 may use the offset (offset is 2) of the bit string with the first bit set to 1in the right-left direction of the bit string with the value of 1000 … 00000000000000000000000000000010 in the first BIER multicast packet as the SN lookup table 1-3 to obtain the entry with SN of 2. The device 109 may and 0000 … 00000000000000000000000000000110 in the entry with SN of 2 with the bit string with the value of 1000 … 00000000000000000000000000000010 in the first BIER multicast packet, to obtain 0000 … 00000000000000000000000000000010. The device 109 replaces the bit string with a value of 1000 … 00000000000000000000000000000010 in the first BIER multicast packet with the result obtained by the and operation to obtain a second BIER packet, where the second BIER packet includes the bit string with a value of 0000 … 00000000000000000000000000000010. The device 109 sends the second BIER packet to the device (device 106) identified by the BFR-NBR with SN of 2 in tables 1-3. The device 109 may perform an inversion operation on 0000 … 00000000000000000000000000000011 included in the entry with SN 2 in tables 1-3 to obtain 1111 … 11111111111111111111111111111001. The device 109 performs and operation on the result obtained by the negation operation and bit string with a value of 1000 … 00000000000000000000000000000010 in the first BIER multicast packet, so as to obtain 1000 … 00000000000000000000000000000000. The device 109 uses the offset in bit string of the first bit set to 1in the right-to-left direction in 1000 … 00000000000000000000000000000000 obtained by the operation (offset is 256) as the SN lookup table 1-3, and obtains the entry with SN of 256. The device 109 may and 1100 … 00000000000000000000000000000000 in the entry with SN of 256 with the bit string with the value of 1000 … 00000000000000000000000000000010 in the first BIER multicast packet, to obtain 1000 … 00000000000000000000000000000000. The device 109 replaces the bit string with a value of 1000 … 00000000000000000000000000000010 in the first BIER multicast packet with the result obtained by the operation, and obtains a third BIER packet. The bit string included in the third BIER message is 1000 … 00000000000000000000000000000000. Device 109 may send the third BIER packet to the BFR-NBR (the device identified by a 108), i.e., device 108, included in the entry with SN of 256 in tables 1-3. The device 106 may send the second BIER multicast packet to the device 102 according to the method adopted by the device 109 and according to the received bit string lookup table 1-1 in the second BIER multicast packet. The device 108 may send the third BIER multicast packet to the device 256 according to the method adopted by the device 109 and according to the received bit string lookup table 1-2 in the third BIER multicast packet. According to the processing process of the BIER multicast message by the forwarding equipment serving as the BFIR or the intermediate BFR, when the BSL is 256 bits, each BIFT table entry in the BIFT occupies 256-bit F-BM and 8-bit BFR-NBR. When the number of the BFR-NBRs is large, at least 256 bits of the BIER multicast message need to be read from the memory by the forwarding equipment each time when one BIER multicast message is copied, 64k bits of the message need to be read from the memory under the limit condition of copying the 256 messages (each forwarding equipment can copy 256 messages at most when the BSL is 256 bits), the performance requirement on forwarding hardware is extremely high, the forwarding efficiency is low, and the general forwarding hardware cannot support the table entry reading operation of which the memory occupied space is more than 256 bits.
In another implementation, the method for any device in the BIER network scenario shown in fig. 1 to obtain the BIFT and the content of the BIFT are the same as those mentioned in the above implementation, and the table lookup forwarding operation is different from the above implementation. The forwarding of the first BIER multicast packet by the device 109 is taken as an example for the relevant description. The first BIER multicast message includes a bit string of value 1000 … 00000000000000000000000000000010. Device 109 traverses tables 1-3 starting with an SN of 1. The device 109 performs and operation on 0000 … 00000000000000000000000000000001 in the table entry of the first BIER multicast packet including bit string and SN of 1, obtains all 0 s, and does not perform packet replication. The device 109 performs and operation on the result of negating 0000 … 00000000000000000000000000000001 in the entry with SN of 1 (1111 … 11111111111111111111111111111110) and bit string in the first BIER multicast packet to obtain 1000 … 00000000000000000000000000000010, and the result is not 0, and continues to traverse the next SN. The device 109 performs and operation on 0000 … 00000000000000000000000000000001 in the entry of the first BIER multicast packet including bit string and SN of 2, to obtain 0000 … 00000000000000000000000000000001 that is not 0. The device 109 replaces the bit string in the first BIER multicast packet with the result obtained by the operation, and obtains a second BIER multicast packet. The second BIER multicast message includes 0000 … 00000000000000000000000000000001. The device 109 sends the second BIER multicast packet to the device (device 106) identified by the BFR-NBR in the entry with SN of 2. The device 109 may traverse to the entry with SN of 256 by using the similar method described above, and obtain the third BIER multicast packet according to the entry with SN of 256 and send the third BIER multicast packet to the device 256. The third BIER multicast message includes 1000 … 00000000000000000000000000000000. In this implementation manner, each time a device in a BIER network scene forwards a BIER multicast packet, all the BIFT entries in the BIFT need to be traversed, but not all the BIFT entries can complete the copying and forwarding of the BIER multicast packet, for example, bit string in the BIER multicast packet and bit string in the F-BM in the BIFT entry are anded, and as a result, the BIFT entry of 0 cannot be used to guide the forwarding of the BIER multicast packet, which may cause waste of memory bandwidth and reading operation, and put forward a higher demand on the performance of forwarding hardware. Furthermore, this implementation still suffers from the problems of the previous implementation.
In order to solve the problem in the above scheme, an embodiment of the present application provides a method for acquiring a next hop, where in the method, a first BIER multicast packet is received, where the first BIER multicast packet includes a first bit string, and a bit with a1 being included in the first bit string corresponds to a BFER; determining an index of a forwarding table entry according to the bit with the 1 set in the first bit string, wherein the forwarding table entry comprises the index and an identifier of equipment serving as a next hop; and directly obtaining the identifier of the equipment according to the index, wherein the equipment is the BFER or a first BFR passed by reaching the BFER. In the method, the identifier of the equipment can be directly obtained according to the index without executing the operation of searching the F-BM in the BIFT table entry, so that the hardware resource consumed by reading the F-BM operation is saved, the performance requirement on forwarding hardware can be reduced, and the forwarding efficiency is improved.
Fig. 2 is a schematic view of a BIER network scenario provided in an embodiment of the present application. The device 101 in the BIER network scenario shown in fig. 2 is the same as the device 101 in the BIER network scenario shown in fig. 1. The device 102 in the BIER network scenario shown in fig. 2 is the same as the device 102 in the BIER network scenario shown in fig. 1. The device 103 in the BIER network scenario shown in fig. 2 is the same as the device 103 in the BIER network scenario shown in fig. 1. The device 104 in the BIER network scenario shown in fig. 2 is the same as the device 104 in the BIER network scenario shown in fig. 1. The device 255 in the BIER network scenario shown in fig. 2 is the same as the device 255 in the BIER network scenario shown in fig. 1. The device 256 in the BIER network scenario shown in fig. 2 is the same as the device 256 in the BIER network scenario shown in fig. 1. The device 210 in the BIER network scenario shown in fig. 2 is connected to a multicast source. Device 210 is a BFIR. The description will be given by taking as an example that the multicast receiver 2 and the multicast receiver 6 need to receive the multicast packet of the multicast source. When other multicast receivers receive the multicast packet of the multicast source, the device in the BIER network scenario shown in fig. 2 may forward the BIER multicast packet by using the method provided in the embodiment of the present application, which is not described herein again. Device 205, device 206, device 207, device 208, and device 209 are intermediate BFRs. Device 205 connects device 101 and device 209, respectively. Device 206 connects device 102, device 103, and device 209, respectively. Device 207 connects device 104 and device 209, respectively. Device 208 is connected to device 255, device 256, and device 209, respectively. Device 101, device 102, device 103, device 104, device 255, device 256, device 205, device 206, device 207, device 208, device 209, and device 210 are in the same BIER sub-domain, for example, the identity of the BIER sub-domain to which each device belongs is 0. The BFR-ID valid in the BIER subdomain mentioned in the embodiments of the present application refers to a BFR-ID with a value other than 0. The allocated BFR-ids of the devices 101, 102, 103, 104, 255, and 256 as BFERs are the same as the configured BFR-ids in the BIER scenario shown in fig. 1, and are not described again here. The BIER network scenario shown in fig. 2 is a network scenario with a BSL of 256 bits, and Set Identifiers (SIs) of the device 101, the device 102, the device 103, the device 104, the device 255, and the device 256 are all 0. The length of bit string is expressed by the BSL, and the bit with 1 set in bit string corresponds to the SI and BFR-id of the bit string, namely the length of the BSL determines the range of BFR-id which can be identified by one bit string. When the numerical value of the BFR-id exceeds the range of the BFR-id which can be identified by bit string of the BSL length, the BFR-id needs to be effectively distinguished and identified through SI and bit string. When the value of BFR-id is more than 256, the BFER in the BIER sub-domain can be effectively distinguished by setting the value of SI and the bit string with BSL of 256 bits, for example, if the BFR-id of the device is 257, the BFR-id is 257 can be represented by the bit string with SI of 1 and the value of 0001. Or when the value of the BFR-id is more than 256, the BFER can be distinguished by expanding the length of bit string, for example, the BFER in the BIER sub-domain is distinguished by the BSL of 512bit or 1024 bit.
Example one
Fig. 3 is a flowchart illustrating a method for obtaining a forwarding entry according to an embodiment of the present application. The embodiment corresponding to fig. 3 is directed to a scenario where multicast receivers 2 and multicast receivers 6 receive multicast packets of a multicast source, and the BFIR in fig. 3 and the corresponding embodiment may be a device 210 in the BIER network scenario shown in fig. 2. The intermediate BFR in fig. 3 and corresponding embodiments may be device 209, device 206, or device 208 in the BIER network scenario shown in fig. 2. The BFER in fig. 3 and corresponding embodiments may be device 102 or device 256 in the BIER network scenario shown in fig. 2. The following describes a method for obtaining a forwarding table entry according to an embodiment of the present application with reference to fig. 2 and fig. 3.
S301, the BFER issues its own BFR-id and equipment identification through IGP.
For example, the device identifier in the first embodiment may be information such as an address or a name that can be routed to the device. BFERs publish their own BFR-id and device identification by means of IGP flooding. In the scenario shown in fig. 2, device 101 floods a BFR-id with a value of 1 and a device identification (which may be denoted as a101) of device 101 through IGP. The device 102 floods the BFR-id with a value of 2 and the device identification of the device 102 (which may be denoted as a102) via IGP. The device 103 floods the BFR-id with a value of 3 and the device identification of the device 103 (which may be denoted as a103) via IGP. Device 104 floods the BFR-id with a value of 4 and the device identification of device 104 (which may be denoted as a104) via IGP. The device 255 is flooded with BFR-ids having a value of 255 and device identification of the device 255 (which may be denoted as a255) by IGP. Device 256 floods the BFR-id with value 256 and the device identification of device 103 (which may be denoted as a256) via IGP. The device serving as the BFER may issue the parameters in a general IGP flooding manner, and details of specific implementation of IGP flooding in this embodiment are not described again.
S302, the intermediate BFR issues its own device identification and BFR-id of the BFER through the IGP.
For example, the intermediate BFR obtains the BFR-id of the BFER by means of IGP flooding. The intermediate BFR issues its own device address and the acquired BFR-id of the BFER. In the scenario illustrated in FIG. 2, device 205 obtains a BFR-id with a value of 1 via IGP and floods the BFR-id with a value of 1 and the device identification of device 205 (which may be denoted as a205) via IGP. The device 206 obtains a BFR-id of value 2 and a BFR-id of value 3 via IGP, floods the BFR-id of value 2, the BFR-id of value 3 and the device identification of the device 206 (which may be denoted as a206) via IGP. The device 207 obtains a BFR-id d with a value of 4 via IGP and floods the BFR-id with a value of 4 and the device identification of the device 207 (which may be denoted as a207) via IGP. Device 208 obtains a BFR-id of 25 and a BFR-id of 256 via IGP, floods the BFR-id of 255, the BFR-id of 256 and the device identification of device 208 (which may be denoted as a208) via IGP. Wherein, the intermediate BFR mentioned in S302 may be directly connected with the BFER. If the intermediate BFRs mentioned at S302 are not directly connected to the BFRs, but are connected to the BFRs through other intermediate BFRs, the BFR-ids of the BFRs acquired by the intermediate BFRs through IGP are from other intermediate BFRs, and the intermediate BFRs may also acquire device identifications of other intermediate BFRs through IGP flooding. In the scenario shown in fig. 2, device 209 is not directly connected to the device that is the BFER. The parameters that the device 209 acquires through IGP flooding include: a first parameter set, a second parameter set, a third parameter set, and a fourth parameter set. The first parameter set includes a205 and a BFR-id with a value of 1. The second parameter set includes a206, a BFR-id with a value of 2 and a BFR-id with a value of 3. The third parameter set includes a207 and a BFR-id with a value of 4. The fourth parameter set includes a208, a BFR-id with a value of 255, and a BFR-id with a value of 256. Device 209 floods a209 with IGP, a BFR-id of value 1, a BFR-id of value 2, a BFR-id of value 3, a BFR-id of value 4, a BFR-id of value 255, and a BFR-id of value 256.
S303, the intermediate BFR obtains a first forwarding table according to the parameters obtained by IGP flooding, where the first forwarding table includes a sequence number and an identifier of a device serving as a next hop.
For example, the representation form of BFR-id flooded by IGP may be 256-bit string, and the offset of bit in bit string with bit set to 1in bit string flooded by IGP is the value of BFR-id. Or the representation form of the BFR-id flooded through the IGP is a specific numerical value from 1 to 256, the equipment receiving the BFR-id converts the BFR-id into a 256-bit string, and the offset of the bit with 1in the bit string is the numerical value of the BFR-id. The intermediate BFR obtaining the first forwarding table from the parameters obtained by IGP flooding comprises: the intermediate BFR obtains a forwarding table entry in the first forwarding table according to a BFR-id obtained by IGP flooding and an equipment identifier corresponding to the BFR-id, wherein the forwarding table entry comprises a sequence number and a Neighbor (NBR), the sequence number corresponds to the BFR-id, and the NBR is used for recording the identifier of the equipment serving as the next hop. And the identification of the equipment corresponding to the BFR-id is the identification of equipment which can communicate with the BFER identified by the BFR-id or the identification of the BFER identified by the BFR-id. The NBR is used for recording the neighbor equipment of the next hop passed by when the neighbor equipment reaches the BFER identified by the BFR-id. And if the intermediate BFR is directly connected with the BFER, the NBR is the equipment identifier of the BFER. And if the intermediate BFR is connected with the BFER through other intermediate BFRs, the NBR is the equipment identification of other intermediate BFRs. Optionally, any forwarding table entry included in the first forwarding table further includes a bit string, an offset of a bit with a 1in the bit string in the forwarding table entry corresponds to the BFR-id, and the number of bits with a 1in the bit string is not greater than 1. The forwarding table entry also comprises an F-BM, and the F-BM is used for storing or recording the bit string.
In the scenario shown in fig. 2, the device 206 acquires the fifth and sixth parameter sets by IGP flooding. Wherein the fifth parameter set includes a102 and a BFR-id with a value of 2. The sixth parameter set includes a103 and a BFR-id with a value of 3. The device 206 may obtain an entry with SN 2 according to the fifth parameter set. The NBR in the entry with SN of 2 is a 102. The device 206 obtains an entry with SN of 3 according to the sixth parameter group. The NBR in the entry with SN of 3 is a 103. The ellipses in Table 2-1 indicate the omission of 252 entries with SNs beginning at 4 and ending at 255. Each entry in the omitted 252 entries includes NBR of 0. NBR of 0 in Table 2-1 indicates that the next hop is empty or that there is no next hop.
TABLE 2-1
SN NBR(8bit)
1 0
2 a102
3 a103
…. ….
256 0
In another possible implementation, the device 206 may obtain the SN with the value of 2 and the bit string with the value 0000 … 00000000000000000000000000000010 according to the BFR-id with the value of 2 in the fifth parameter set. The device 206 obtains the forwarding table entry with SN of 2 in table 2-2 according to a102, SN of 2 and bit string of 0000 … 00000000000000000000000000000010 (stored in F-BM) in the fifth parameter set. The device 206 may obtain a SN value of 3 and a bit string value of 0000 … 00000000000000000000000000000100 from the BFR-id value of 3 in the sixth parameter set. The device 206 obtains the forwarding table entry with SN of 3 in table 2-2 according to a103, SN of 3 and bit string of 0000 … 00000000000000000000000000000100 (stored in F-BM) in the sixth parameter set. The ellipses in Table 2-2 represent 252 entries that omit the SN starting from 4 and ending at 255. Each entry in the omitted 252 entries includes NBR of 0. An NBR of 0 in the embodiment of the present application means that the next hop is null or there is no next hop. The F-BM includes a bit string with a BSL of 256 bits, which includes … omitting 220 bits from the 33 rd bit to the 252 th bit from right to left. In the F-BM obtained by the device 206, only 1bit and only 1bit in the bit sting containing the bit with 1 set are set to 1, and the offset of the bit with 1 set in the bit sting corresponds to the value of SN. In the embodiment of the present application, the offset of the bit set to 1in the bit string is SN. In other possible time patterns, the offset of the bit with 1in the bit string is the difference between SN and a constant, or the offset of the bit with 1in the bit string is the sum of SN and a constant. The constant may be 1 or other natural number greater than 1, which is not limited in this application.
Tables 2 to 2
SN F-BM(256bit) NBR(8bit)
1 0000…00000000000000000000000000000000 0
2 0000…00000000000000000000000000000010 a102
3 0000…00000000000000000000000000000100 a103
256 0000…00000000000000000000000000000000 0
The device 206 in the scenario shown in fig. 2 may rank the SNs and the NBRs corresponding to the SNs according to table 2-1, specifically, may take a plurality of NBRs ranked according to the sizes of the SNs as a row according to the reading bit width of the forwarding hardware, where the number of the NBRs is less than or equal to the value of the reading bit width. The row of the NBR corresponding to a certain SN, for example, the row number, corresponds to a quotient of the SN and the read bit width, specifically, may correspond to a quotient of a difference between the SN and a constant and the read bit width, where the constant may be 1 or another possible natural number greater than 1. In the embodiment of the present application, an example is given by taking the read bit width as 16, and the implementation manner of reading the bit width as other values can be referred to in the embodiment of reading the bit width as 16. When the constant is 1, the quotient of the difference between SN and 1 with the values of 1 to 16 and the read bit width is 0, and the row number of the row corresponding to the quotient is the sum of 1 and the quotient, as shown in the row forwarding table entry of the row 1 to 16 in table 2-3, that is, the row number of the forwarding table entry is 1. The NBR corresponding to SN 2 in the forwarding entry with row number 1 is a102, and the NBR corresponding to SN 3 is a 103. In another implementation manner, the row number of the row in which the NBR corresponding to a certain SN is located may be the sum of a quotient of the SN and the reading bit width and a constant, and for the SN at the maximum value of the reading bit width, the row number of the row in which the NBR corresponding to the SN is located is the quotient of the SN and the reading bit width. For example, in tables 2 to 3, the row number of the row in which the NBR corresponding to the SN with the value of 16 is located is 1, and the row number of the row in which the NBR corresponding to the SN with the value of 1 to 15 is located is 1. Tables 2-3 include 16 rows, … in tables 2-3 indicating an omission of content that is empty, and X may be 0. Whether NBR is X or 0, it indicates that the next hop is null or there is no next hop.
Tables 2 to 3
Figure BDA0002778289330000131
Figure BDA0002778289330000141
For example, the device 206 stores M NBRs in Table 2-1 in one row in Table 2-3, i.e., the number of columns in Table 2-3 other than the column identified by the SN is M. The size of M depends on the read bit width of the forwarding hardware, and M may be an N power of 2, where N is an integer greater than or equal to 1. In the first embodiment of the present application, M is 16. In the forwarding table shown in tables 2-3, the number of columns indicates the bit width M that can be read at a time, for example, the numbers 1 to 16 indicate that the device 206 can read 16 SNs at a time. The identity of the NBR of each entry in Table 2-1 is stored in the cell corresponding to the SN in Table 2-3, in other words, the order of the identity of the NBR of each entry in Table 2-1 among the 16 identities of each row in Table 2-3 corresponds to the SN of the NBR in Table 2-1. The 16 identifiers include NBR with a value of 0 or X. Such as: in the entry with SN 2 in Table 2-1, the NBR with value a102 is stored in the cell corresponding to 2 in row number 1 (the row corresponding to SN 1-16). In the entry with SN 3 in Table 2-1, NBR with value a103 is stored in the cell corresponding to 3 in row number 1 (row with SN 1-16). In tables 2-3, the rows in which 16 SNs are located can be represented by row numbers, for example, the rows with SNs 1-16 can be represented by row number 1, and the rows with SNs 17-32 can be represented by row number 2.
In the scenario shown in fig. 2, the device 208 acquires the seventh parameter set and the eighth parameter set by IGP flooding. Wherein the seventh parameter set includes a255 and a BFR-id having a value of 255. The eighth parameter set includes a256 and a BFR-id having a value of 256. Device 208 may obtain tables 2-4 based on the seventh parameter set and the eighth parameter set. The ellipses in tables 2-4 indicate 252 entries with SNs starting from 3 and ending at 254, each entry in the 252 entries including NBR of 0. The method for the device 208 to obtain table 2-4 can refer to the method for the device 206 to obtain table 2-1, which is not described herein again.
Tables 2 to 4
SN NBR(8bit)
1 0
2 0
255 a255
256 a256
In another possible implementation, the device 208 may obtain tables 2-5 based on the seventh parameter set and the eighth parameter set. The method for the device 208 to obtain tables 2-5 can be referred to the method for the device 206 to obtain tables 2-2, and is not described herein again. The ellipses in tables 2-5 represent 252 entries where the SN begins at 3 and ends at 254. Each entry in the 252 entries includes NBR of 0, which indicates that the next hop is empty or there is no next hop. The F-BM includes a bit string with a BSL of 256 bits, which includes … omitting 220 bits from the 33 rd bit to the 252 th bit from right to left. In the F-BM obtained by the device 208, only 1bit and only 1bit in the bit sting containing the bit with 1 set are set to 1, and the offset of the bit with 1 set in the bit string corresponds to the value of SN. The next hop of the BFER corresponding to the bit with the set 1 reaching the bit string is the equipment identified by the NBR.
Tables 2 to 5
Figure BDA0002778289330000142
Figure BDA0002778289330000151
In the scenario shown in fig. 2, the device 208 may further obtain the forwarding tables shown in tables 2 to 6 according to tables 2 to 4, and the specific method may refer to the method for obtaining tables 2 to 3 by the device 206, which is not described herein again. … in tables 2-6 indicates the omission of content that is empty. X may be replaced by 0, indicating that the next hop is empty or that there is no next hop.
Tables 2 to 6
SN 1 2 3 4-14 15 16
1-16 X X X X X
17-32 X X X X X
241-256 X X X a255 a256
For example, the device 208 stores NBRs corresponding to M SNs in tables 2-4 into one entry in tables 2-6, i.e., the number of columns in tables 2-6 excluding the SN identified column is M. M is the read bit width of device 208, which may be the same as the read bit width of device 206. If the reading bit width of the device 208 is different from the reading bit width of the device 206, the number of columns in tables 2 to 6 except for the column indicated by SN is not 16, and may be specifically adjusted according to the reading bit width of the device 208, which is not illustrated in this embodiment of the present application. The ordering of the identity of the NBR for each entry in tables 2-4 within the rows of tables 2-6 determined by the SN corresponding to the NBR is determined by the SN corresponding to the NBR. Such as: in the table entries with SN of 255 in tables 2-4, the identifier of NBR with value a255 is stored in the cell corresponding to 15 in the row (the row identified by 241-256, which may also be referred to as the row with row number 16) in which SN with value 255 is located in tables 2-6. Within the row identified by 241 and 256, the SN with the value of 255 is located in the column identified by 15. In the entry with SN of 256 in table 2-4, the identifier of NBR with value a256 is stored in the cell corresponding to 16 in the row (identified by 241-256, also referred to as row number 16) in which SN with value 256 is located in table 2-6. Within the row identified by 241 and 256, the SN with the value of 256 is located in the column identified by 16. In tables 2-6, the rows in which 16 SNs are located can be represented by row numbers, for example, the rows with SNs 1-16 can be represented by row number 1, and the rows with SNs 17-32 can be represented by row number 2.
In the scenario shown in fig. 2, the device 209 obtains the first parameter group, the second parameter group, the third parameter group and the fourth parameter group, specifically, the corresponding contents as in S302, by IGP flooding. The device 209 may obtain the tables 2-7 according to the first parameter set, the second parameter set, the third parameter set, and the fourth parameter set, and the specific method may refer to the method for the device 206 to obtain the tables 2-1, which is not described herein again. The ellipses in tables 2-7 indicate 250 entries with SNs starting from 5 to ending at 254, each of the 250 entries including NBR of 0. An NBR with a value of 0 indicates that the next hop is empty or that there is no next hop.
Tables 2 to 7
SN NBR(8bit)
1 a205
2 a206
3 a206
4 a207
255 a208
256 a208
In another possible implementation manner, the device 209 may obtain tables 2-8 according to the first parameter set, the second parameter set, the third parameter set, and the fourth parameter set, and the specific method may be seen in the method for the device 206 to obtain tables 2-2, which is not described herein again. The ellipses in tables 2-8 represent 250 entries where the SN begins at 5 and ends at 254. Each entry in the 250 entries includes NBR of 0. An NBR with a value of 0 indicates that the next hop is empty or that there is no next hop. The F-BM includes a bit string with a BSL of 256 bits, which includes … omitting 220 bits from the 33 rd bit to the 252 th bit from right to left. In the F-BM obtained by the device 209, only 1bit and only 1bit are set to 1in the bit sting containing the bit set to 1, and the offset of the bit set to 1in the bit string corresponds to the value of SN. The next hop of the BFER corresponding to the bit with the set 1 reaching the bit string is the equipment identified by the NBR.
Tables 2 to 8
SN F-BM(256bit) NBR(8bit)
1 0000…00000000000000000000000000000001 a205
2 0000…00000000000000000000000000000010 a206
3 0000…00000000000000000000000000000100 a206
4 0000…00000000000000000000000000001000 a207
255 0100…00000000000000000000000000000000 a208
256 1000…00000000000000000000000000000000 a208
In the scenario shown in fig. 2, the device 209 may further obtain the forwarding tables shown in tables 2 to 9 according to tables 2 to 7, and the specific method may refer to the method for obtaining tables 2 to 3 by the device 206, which is not described herein again. … in tables 2-9 indicates an omission of content that is null, and X may be replaced by 0, indicating that the next hop is null or that there is no next hop.
Tables 2 to 9
SN 1 2 3 4 4-14 15 16
1-16 a205 a206 a206 a207 X X
17-32 X X X X X X
241-256 X X X X a208 a208
For example, the device 209 stores M NBRs in tables 2-7 into one entry in tables 2-9, i.e., the number of columns in tables 2-9 except the column identified by the SN is M. M is the read bit width of device 209 and may be the same as the read bit width of device 206 or device 208. If the read bit width of the device 209 is different from the read bit width of the device 206 or the device 208, the number of columns in tables 2 to 9 except for the column indicated by SN is not 16, and may be specifically adjusted according to the read bit width of the device 209, which is not illustrated in this embodiment of the application. The ordering of the identity of the NBR for each entry in tables 2-7 within the rows of tables 2-9 determined by the SN corresponding to the NBR is determined by the SN corresponding to the NBR. Such as: in the table entries with SN of 1in tables 2-7, the identifier of NBR with value a205 is stored in the cell corresponding to table 2-9 with SN of value 1, i.e. the cell where the row corresponding to SN of 1-16 crosses the column with reference number 1. In the entry with SN of 2 in tables 2-7, the identifier of NBR with value a206 is stored in the cell corresponding to the SN of 2 in tables 2-9, i.e. the cell where the row corresponding to the SN of 1-16 crosses the column with reference number 2. In the entry with SN of 3 in tables 2-7, the identifier of NBR with value a206 is stored in the cell corresponding to the SN of 3 in tables 2-9, i.e. the cell where the row corresponding to the SN of 1-16 crosses the column with reference number 3. In the table entries with SN 4 in tables 2-7, the identifier of NBR with value a207 is stored in the cell corresponding to the SN with value 4 in tables 2-9, i.e. the cell where the row corresponding to the SN of 1-16 crosses the column with reference number 4. In the entries with SN of 255 in tables 2-7, the identifier of NBR with value a208 is stored in the cell corresponding to the SN of 255 in tables 2-9, i.e. the cell where the row corresponding to SN of 241-. In the entries with SN of 256 in tables 2-7, the identifier of NBR with value a208 is stored in the cell corresponding to the SN of 256 in tables 2-9, i.e. the cell where the row corresponding to SN of 241-. In tables 2-9, the rows in which 16 SNs are located can be represented by row numbers, for example, the rows with SNs 1-16 can be represented by row number 1, and the rows with SNs 17-32 can be represented by row number 2.
S304, the BFIR obtains a second forwarding table according to the parameters obtained by IGP flooding, and the second forwarding table comprises a sequence number and a next hop identifier.
For example, the parameters that the BFIR acquires via IGP flooding include the device identification of the intermediate BFR and the acquired BFR-id of the intermediate BFR. And the BFIR acquires a second forwarding table according to the acquired parameters. Any table entry in the second forwarding table includes the SN and the NBR. And the SN value of any forwarding table entry of the second forwarding table is the BFR-id value, and the NBR is the equipment identifier of the next hop which passes by when reaching the BFER identified by the BFR-id. Optionally, any forwarding table entry further includes bit string. The number of bits with 1in bit string included in any forwarding table entry is not more than 1, and the offset of the bit with 1in bit string corresponds to the value of SN. In the scenario shown in fig. 2, device 210, which is a BFIR, receives a209, which device 209 floods with IGP, BFR-ids with values 1, 2, 3, 4, 255 and 256. The device 210 obtains the forwarding table entry shown in table 2-10 according to the above parameter from the device 209 and the method for the device 206 to obtain table 2-1. … in tables 2-10 indicates that the NBR in 250 entries with SNs of 5 to 254 is 0, indicating that the next hop is empty or there is no next hop.
Tables 2 to 10
SN NBR(8bit)
1 a209
2 a209
3 a209
4 a209
255 a209
256 a209
In another possible implementation manner, the device 210 may obtain the tables 2 to 11 according to the plurality of BFR-ids and a209 flooded by the device 209, and the specific method may refer to the method for obtaining the tables 2 to 2 by the device 206, which is not described herein again. The plurality of BFR-ids have values of 1, 2, 3, 4, 255, and 256. The ellipses in tables 2-11 indicate 250 entries with SNs starting from 5 to 254 ending, each entry in the 250 entries including NBR of 0 indicating that the next hop is empty or there is no next hop. The F-BM includes a bit string with a BSL of 256 bits, which includes … omitting 220 bits from the 33 rd bit to the 252 th bit from right to left. In the F-BM obtained by the device 210, only 1bit and only 1bit in the bit sting containing the bit with 1 set are set to 1, and the offset of the bit with 1 set in the bit sting corresponds to the value of SN. The next hop of the BFER corresponding to the bit with the set 1 reaching the bit string is the equipment identified by the NBR.
Tables 2 to 11
Figure BDA0002778289330000171
Figure BDA0002778289330000181
In the scenario shown in fig. 2, the device 210 may further obtain the forwarding tables shown in tables 2 to 12 according to tables 2 to 10, and for a specific method, reference may be made to the method for obtaining tables 2 to 3 by the device 206, which is not described herein again. … in tables 2-12 indicates the omission of content that is empty, and X may be 0 or empty.
Tables 2 to 12
SN 1 2 3 4 4-14 15 16
1-16 a209 a209 a209 a209 X X
17-32 X X X X X X
241-256 X X X X a209 a209
For example, the device 210 stores M NBRs in tables 2-10 into one entry (in one row) in tables 2-12, i.e., the number of columns in tables 2-12 except the column identified by the SN is M. M is the read bit width of device 210 and may be the same as the read bit width of device 206, device 208, or device 209. If the read bit width of the device 210 is different from the read bit width of the device 206, the device 208, or the device 209, the number of columns in tables 2-12 except the column indicated by SN is not 16, and may be specifically adjusted according to the read bit width of the devices 2-12, such as: 32 or 8, which are not further illustrated in the embodiments of the present application. The identifier of the NBR of each entry in tables 2-10 is stored in the cell corresponding to the NBR in tables 2-12, such as: in the table entries with SN of 1in tables 2-10, the identifier of NBR with value a209 is stored in the cell corresponding to table 2-12 with SN of value 1, i.e. the cell where the row corresponding to SN of 1-16 crosses the column with reference number 1. In the entry with SN of 2 in tables 2-10, the identifier of NBR with value a209 is stored in the cell corresponding to the SN of 2 in tables 2-12, i.e. the cell where the row corresponding to the SN of 1-16 crosses the column with reference number 2. In the entry with SN of 3 in tables 2-10, the identifier of NBR with value a209 is stored in the cell corresponding to the SN of 3 in tables 2-12, i.e. the cell where the row corresponding to the SN of 1-16 crosses the column with reference number 3. In the table entries with SN 4 in tables 2-10, the identifier of NBR with value a209 is stored in the cell corresponding to the SN with value 4 in tables 2-12, i.e. the cell where the row corresponding to the SN of 1-16 crosses the column with reference number 4. In the entries with SN of 255 in tables 2-10, the identifier of NBR with value a209 is stored in the cell corresponding to the SN of 255 in tables 2-9, i.e. the cell where the row corresponding to SN of 241-. In the entries with SN of 256 in tables 2-10, the identifier of NBR with value a209 is stored in the cell corresponding to the SN of 256 in tables 2-12, i.e. the cell where the row corresponding to SN of 241-. In tables 2-12, the rows with 16 SNs can be represented by row numbers, for example, the rows with SNs 1-16 can be represented by row number 1, and the rows with SNs 17-32 can be represented by row number 2.
The above tables 2-1, 2-3, 2-4, 2-6, 2-7, 2-9, 2-10, and 2-12 are exemplified by M being 16, and for a BIER network scenario with a BSL of 256 bits, the forwarding table may include 16 entries. Because 256 bits occupied by each F-BM is omitted, when M is 16, for a BIER network scenario with BSL of 512 bits, the forwarding table can be expanded to include 32 entries, and for a BIER network scenario with BSL of 1024 bits, the forwarding table can be expanded to include 64 BIFT entries. Because the forwarding hardware does not need to read the 256-bit F-BM included in the common BIFT table entry, even for a network scene with the BSL of 512bit or 1024bit, the forwarding hardware can quickly complete the table entry searching and forwarding without performance improvement, and the forwarding efficiency is further improved.
The offset of a bit with 1 set (which may also be referred to as the offset of a bit with 1 set in bit string) mentioned in the first embodiment of the present application is the offset of a bit with 1 set relative to bit string in the right-to-left direction. The right-to-left direction is determined based on the data reading mode of the forwarding hardware, and the right-to-left direction may be replaced by a left-to-right direction. If the left-to-right direction is used to determine the offset of the bit set to 1, the offset of the bit set to 1in bit string in the first embodiment of this application will also change accordingly, for example: for tables 2-12, for BFR-ids 1, 2, 3, 4, 255 and 256, bit string will be represented as 1111 … 0000000000000000000000000000011, the contents of tables 2-12 are not changed, and when forwarding the BIER multicast packet, the BFIR reads bit string in the BIER multicast packet from left to right.
The value of the SN in the forwarding table obtained in the first embodiment of the present application is an example, and the SN may also be an integer multiple of the BFR-id, or a sum of an integer multiple of the BFR-id and a constant. The first bit from right to left of the bit string may be referred to as the 1 st bit, and then the last 1bit on the left side may be referred to as the 256 th bit, or the first bit from right to left of the bit string may be referred to as the 0 th bit, and then the last 1bit on the left side may be referred to as the 255 th bit. The present embodiment is not limited to the above expression forms.
In the method for obtaining the forwarding table entry provided in the embodiment of the present application, the device serving as the BFIR or the device serving as the intermediate BFR may implement configuration of the forwarding table entry through the control plane. In the forwarding table entry provided by the embodiment of the application, the SN corresponding to the BFR-id is directly used for determining the NBR serving as the next hop, so that the space for storing the F-BM and the hardware resource consumed by reading the F-BM operation are saved, and the performance requirement on forwarding hardware can be reduced.
Example two
Fig. 4 is a flowchart of a method for forwarding a multicast packet according to a second embodiment of the present application. The entry mentioned in the second embodiment for forwarding the BIER multicast packet is the forwarding entry obtained in the first embodiment. In the second embodiment, the bit string is read in the right-to-left direction as an example. In another embodiment, the bit string may be read by replacing the direction from the right to the left with the direction from the left to the right, and this embodiment of the present application does not exemplify the direction from the left to the right. Next, a method for forwarding a multicast packet according to the second embodiment of the present application is described with reference to fig. 2, fig. 3, and fig. 4.
S401, the device 210 obtains a first BIER multicast packet according to the multicast packet from the multicast source.
For example, the obtaining, by the device 210, the first BIER multicast packet according to the multicast packet from the multicast source includes: the device 210 obtains bit string according to the BFR-id of the BFER connected by one or more multicast receivers; the device 210 encapsulates a BIER header on the received multicast packet to obtain a first BIER multicast packet, where the BIER header includes bit string. Optionally, the device 210 may further obtain the SI to which the bit string belongs according to the BFR-id of the BFER connected by one or more multicast receivers. The BIER header included in the first BIER multicast packet further includes the SI to which the bit string belongs. In the BIER network scenario shown in fig. 2, the device 210 learns, according to configuration, that the multicast receiver 2 and the multicast receiver 6 need to obtain the multicast packet sent by the multicast source. Multicast receiver 2 is connected to device 102, which is a BFER. Multicast receiver 6 is connected to device 256, which is a BFER. The BFR-id of device 102 is 2 and the BFR-id of device 256 is 256. Since the BFR-ids of device 102 and device 256 do not exceed the range of 256, device 102 and device 256 belong to the same SI, e.g., SI may be 0. The bit string obtained by device 210 may be denoted as 1000 … 00000000000000000000000000000010. The bit string described above omits the 220 bits with the intermediate value of 0. The BIER header in the first BIER multicast message obtained by the device 210 includes the bit string obtained above.
S402, the device 210 determines its next hop according to the configured forwarding table entry and sends a first BIER multicast packet.
For example, the next hop of the device 210 refers to the next node, such as the device 209 in fig. 2, that is traversed in the direction from the multicast source to the multicast receiver to reach the BFER of one or more multicast receiver connections.
For example, the method by which the device 210 determines its own next hop may include the following two:
in a first implementation manner, the device 210 obtains an offset of a bit set to 1in a bit string of the first BIER multicast packet from right to left, where the offset is 2 and 256, for example. The apparatus 210 checks tables 2 to 10 or tables 2 to 11 in example one with SN of 2 and 256 to obtain NBR with a value of a 209. Or the device 210 searches the cells matched in the tables 2-12 by using 2 and 256 as indexes, namely a209 in the cell of the row and column 2 with SN 1-16 and a209 in the cell of the row and column 16 with SN 241-. Specifically, the device 210 determines that the forwarding entry identified by the row number 1 needs to be read, according to the row number 1 (the row in which the SN with the value of 1-16 in tables 2-12) corresponding to the quotient of the SN with the value of 2 and the read bit width with the value of 16. The device 210 obtains the NBR with a value of a209 from the forwarding table entry identified by row number 1in tables 2-12 according to the position of the NBR determined by the SN with a value of 2 (the NBR in the cell where the row identified by row number 1 and the column identified by the SN with a value of 2 intersect is the NBR with a value of a209 corresponding to the SN with a value of 2). The device 210 determines that it needs to read the forwarding entry identified by the row number 16, according to the row number 16 (the row in which the SN with the value of 241-16 in tables 2-12) corresponding to the quotient of the SN with the value of 256 and the read bit width with the value of 16. The device 210 obtains the NBR with a value of a209 from the forwarding table entry identified by the row number 16 in tables 2-12 according to the position of the NBR determined by the SN with a value of 256 (the NBR in the cell where the row identified by the row number 16 crosses the column identified by the SN with a value of 16 is the NBR with a value of a209 corresponding to the SN with a value of 256).
In a second implementation manner, the device 210 obtains an offset of a bit with a first set 1in a bit string of the first BIER multicast packet from right to left, where the offset is 2, for example. The apparatus 210 checks tables 2 to 10 or tables 2 to 11 in example one with 2 as SN to obtain NBR with a 209. Or the device 210 indexes 2 to the cell matched by the table 2-12, i.e. the a209 in the row and column 2 cell where the SN is 1-16. The device 210 will get 1000 … 00000000000000000000000000000000 after setting the 2 nd bit to 0 in the right to left direction. The device 210 determines that the first bit to be set to 1in the right-to-left direction is offset by 256. The apparatus 210 checks tables 2 to 10 or tables 2 to 11 in example one with 256 for SN to obtain NBR with a value of a 209. Or the device 210 searches the cells matched in tables 2-12 by using 256 as an index, i.e. a209 in the cell in column 16 of the row where SN is 241-. The method for determining the next hop by the device 210 by looking up the table 2-12 can be referred to the method in the first implementation manner, and is not described herein again.
When looking up the tables 2-11, the device 210 can directly determine the NBR corresponding to the SN according to the SN without looking up the F-BM in the tables 2-11. When looking up table 2-12, the device 210 may determine a serial number corresponding to the offset by using the offset of the first bit set to 1 from right to left in the bit string of the first BIER multicast packet, determine the row number where the SN is located according to the determined serial number and the quotient of the read bit width, and read the NRB of the sorting position determined by the SN in the row, for example, it is determined that SN is 2 in the bit string of the first BIER multicast packet that the offset of the value 2 is 2, and SN of the value 2 and the quotient of the read bit width of the value 16 are to determine that the row number corresponding to SN of the value 2 is 1. The offset with the value of 256 in the bit string of the first BIER multicast message determines that the SN is 256, and the quotient of the SN offset with the value of 256 and the read bit width with the value of 16 determines that the row number corresponding to the SN with the value of 256 is 16. The method for determining the NBR by table look-up does not need to read the common F-BM, and can improve the forwarding efficiency and reduce the performance requirement on forwarding hardware.
Compared with the common BIFT table look-up method (32 table entries need to be read when reading the BIFT table entries shown in tables 1-4, each table entry in tables 1-4 occupies 256-bit F-BM and 8-bit BFR-NBR identifiers, and 8448 bits need to be read in total), the table look-up method adopted by the device 210 can reduce the performance requirement on forwarding hardware, and the table entries in tables 2-10, tables 2-11 and tables 2-12 can be further expanded according to the BSL value, so that the table look-up forwarding requirement of bit string with the BSL of 512 and 1024 can be met on the premise of not improving the performance requirement of the forwarding hardware.
For example, the following three implementation manners are included in the apparatus 210 for acquiring the BIER multicast packet sent to the next hop:
in a first possible implementation manner, when the device 210 determines the NBR by using tables 2 to 10 and tables 2 to 12, if the next hops of BFERs corresponding to the 2 nd bit and the 256 th bit to which the device 210 is set 1in the first BIER multicast packet are both the device 209, the device 210 only sends one first BIER multicast packet and does not replace the bit string in the first BIER multicast packet.
In a second possible implementation manner, when the device 210 determines the NBR by using tables 2 to 11, because the NBR is the same, the device 210 performs and operation on the bit string of the F-BM with SN of 2 and the bit string of the F-BM with SN of 256 and the bit string in the first BIER multicast packet according to a certain order to obtain a bit string with a value of 1000 … 00000000000000000000000000000010. According to a certain sequence, the bit string of the F-BM with SN of 2 and the bit string of the first BIER multicast message can be AND-operated, and the result after the AND-operation and the bit string of the F-BM with SN of 256 are AND-operated again. Or according to a certain sequence, performing AND operation on the bit string of the F-BM with the SN of 256 and the bit string of the first BIER multicast message, and performing AND operation on the result after the AND operation and the bit string of the F-BM with the SN of 2 again. Or according to a certain sequence, performing AND operation on the bit string of the F-BM with SN 2 and the bit string of the F-BM with SN 256, and performing AND operation on the result after the AND operation and the bit string in the first BIER multicast message again. And if the bit string obtained by the two times of operations is the same as the bit string in the first BIER multicast message, the bit string replacing operation is not carried out.
In a third possible implementation manner, when looking up tables 2 to 11, the device 210 may determine that the entry with SN of 2 is used to forward the first BIER multicast packet. The device 210 performs and operation on the F-BM in the table entry with SN of 2 and the bit string in the first BIER multicast packet, to obtain 000 … 00000000000000000000000000000010. The device 210 replaces the bit string in the first BIER multicast message with the operated result to obtain the first sub-message. The bit string of the first sub-packet is 000 … 00000000000000000000000000000010. The device 210 may determine that the entry with the SN of 256 is used to forward the first BIER multicast packet when table lookup 2-11 is performed, for example, after table lookup operation with the SN of 2 is completed, the offset of the first bit with 1in the bit string after clearing 0 from the 2 nd bit from right to left in the bit string of the first BIER multicast packet is used as a new SN, that is, the SN is 256. The device 210 performs and operation on the F-BM in the table entry with the SN of 256 and the bit string in the first BIER multicast packet, to obtain 100 … 00000000000000000000000000000000. The device 210 replaces the bit string in the first BIER multicast message with the operated result to obtain the second sub-message. The bit string of the second sub-packet is 100 … 00000000000000000000000000000000. The device 210 may send the second sub-packet and the first sub-packet to the device 209 as the first BIER multicast packet. In this implementation, the first BIER multicast packet includes a first sub-packet and a second sub-packet, and the first BIER multicast packet is a concept of a set.
For possible implementation manners of the device 210 obtaining the BIER multicast packet sent to the next hop, the first possible implementation manner and the second possible implementation manner can save bandwidth between the device 210 and the device 209. A third possible implementation may avoid a subsequent intermediate BFR from performing a copy operation.
And S403, the device 209 determines its own next hop according to the configured table entry and the bit string in the first BIER multicast message, and sends the next hop.
For example, the next hop of the device 209 refers to the next node, such as the device 205, the device 206, the device 207, and the device 208 in fig. 2, through which the BFER arriving at one or more multicast receiver connections passes in the direction from the multicast source to the multicast receiver. For the first BIER multicast packet in the second embodiment of the present application, according to the offset of bit set to 1in bit string in the first BER multicast packet, the device 209 determines that the next hop is the device 206 and the device 208 in fig. 2.
For example, the method for the device 209 to determine the next hop may include the following two methods:
in a first implementation manner, the device 209 obtains an offset of a bit, which is set to 1in a right-to-left direction in a bit string included in the first BIER multicast packet, in the bit string, where the offset is 2 and 256, for example. The apparatus 209 directly checks tables 2 to 7 or tables 2 to 8 in example one with SN of 2 and 256 to obtain NBRs having values a206 and a 208. The device 209 needs to copy a first BIER multicast packet. Or the device 209 indexes the cells matched with the tables 2-9 by 2 and 256, namely a206 in the row and column 2 cell with SN 1-16 and a208 in the row and column 16 cell with SN 241-. Specifically, the device 209 determines that the forwarding entry identified by the row number 1 needs to be read, according to the row number 1 (the row in which the SN with the value of 1-16 in tables 2-9) corresponding to the quotient of the SN with the value of 2 and the read bit width with the value of 16. The device 209 obtains the NBR with a value of a206 from the forwarding table entry identified by the row number 1in tables 2 to 9 according to the position of the NBR determined by the SN with a value of 2 (the NBR in the cell where the row identified by the row number 1 and the column identified by the SN with a value of 2 intersect is the NBR with a value of a206 corresponding to the SN with a value of 2). The device 209 determines, by using the SN with the value of 256 and the row number 16 corresponding to the quotient of the read bit width with the value of 16 (the row in which the SN with the value of 241-16 in tables 2-9 is located), that the forwarding entry identified by the row number 16 needs to be read. The device 209 obtains the NBR with the value a208 from the forwarding table entry identified by the row number 16 in tables 2 to 9 according to the position of the NBR determined by the SN with the value 256 (the NBR in the cell where the row identified by the row number 16 crosses the column identified by the SN with the value 16 is the NBR with the value a208 corresponding to the SN with the value 256).
In a second implementation manner, the device 209 obtains an offset of a bit with a first set 1in a bit string of the first BIER multicast packet from right to left, where the offset is 2, for example. The apparatus 209 checks tables 2 to 7 or tables 2 to 8 in example one with 2 as SN to obtain NBR with a value of a 206. Or the device 209 indexes 2 to the cells matched by the tables 2-9, i.e., a206 in the row and column 2 cells where the SN is 1-16. The device 209 will get 1000 … 00000000000000000000000000000000 after setting the 2 nd bit to 0 in the right to left direction. The device 209 determines that the offset of the first bit set to 1in the right-to-left direction is 256. The apparatus 209 checks tables 2 to 7 or tables 2 to 8 in example one with SN of 256 to obtain NBR with a value of a 208. Or the device 209 uses 256 as an index to look up the cells matched in tables 2-9, i.e. a208 in the cell in column 16 of the row where SN is 241-. The method for determining the next hop by the device 209 according to table look-up 2-9 can be referred to the method in the first implementation manner, and is not described herein again.
When looking up tables 2-8, the device 209 can directly determine the NBR corresponding to the SN according to the SN without looking up the bit string included in the F-BM of tables 2-8. When looking up a table 2-9, the device 209 may determine a serial number corresponding to the offset by using the offset of the first bit set to 1 from right to left in the bit string of the first BIER multicast packet, determine the row number where the SN is located according to the determined serial number and the quotient of the read bit width, read the NRB of the row whose sorting position is determined by the SN, and avoid reading a general F-BM and reducing the performance requirement on forwarding hardware.
Compared with the common BIFT table look-up method (32 table entries need to be read when reading the BIFT table entries shown in tables 1-3, each table entry in tables 1-3 occupies 256-bit F-BM and 8-bit BFR-NBR identifiers, and 8448 bits need to be read in total), the table look-up method adopted by the device 209 can reduce the performance requirement on forwarding hardware, and the table entries of tables 2-7, tables 2-8 and tables 2-9 can be further expanded according to the BSL value, so that the table look-up forwarding requirement of bit string with the BSL of 512 and 1024 can be met on the premise of not improving the performance requirement of the forwarding hardware.
For example, the following two implementation manners are included in the device 209 for obtaining the BIER multicast packet sent to the next hop:
in a first possible implementation manner, when the device 209 determines the NBR by using tables 2 to 7 and tables 2 to 9, if the device 209 reaches the next hop of the BFER corresponding to the 2 nd bit with the first BIER multicast set to 1 as the device 206, and if the device 209 reaches the next hop of the BFER corresponding to the 256 th bit with the first BIER multicast set to 1 as the device 208, the device 209 needs to perform packet replication and bit string replacement operations. Specifically, the device 209 determines that the entry with SN of 2 can be used to forward the first BIER multicast packet, and the device 209 reserves the 2 nd bit (the bit corresponding to SN of 2) which is set to 1in the bit string in the first BIER multicast packet from right to left, and clears other bits to obtain the bit sting with a value of 0000 … 00000000000000000000000000000010. The device 209 obtains the second BIER multicast packet according to the first BIER multicast packet and the bit sting with the value of 0000 … 00000000000000000000000000000010. The second BIER multicast message includes bit sting at 0000 … 00000000000000000000000000000010. The device 209 sends the second BIER multicast packet to the NBR in the entry with SN 2, i.e. the device 206. The device 209 can obtain a bit sting with a value of 1000 … 00000000000000000000000000000000 after clearing 0 the 2 nd bit of which is set to 1in the bit string direction from right to left in the first BIER multicast message. Since the bit sting of 1000 … 00000000000000000000000000000000 is not all 0's, the device 209 copies a first BIER multicast packet. The device 209 may replace the bit string in the first BIER multicast packet with 1000 … 00000000000000000000000000000000 to obtain a third BIER multicast packet. Or the device 209 may keep the bit (the 256 th bit in the direction from right to left) corresponding to the SN in the first BIER multicast packet unchanged according to the lookup result with the SN of 256, and clear the other bits to obtain the bit sting with the value of 1000 … 00000000000000000000000000000000. The device 209 obtains the third BIER multicast packet according to the first BIER multicast packet and the bit sting with the value of 1000 … 00000000000000000000000000000000. The third multicast message includes a bit sting value of 1000 … 00000000000000000000000000000000. The device 209 sends the third BIER multicast packet to the NBR in the entry with SN 256, i.e. the device 208.
In a second possible implementation manner, when looking up tables 2 to 8, the device 209 determines that the entry with SN of 2 is used to forward the first BIER multicast packet. The device 209 performs and operation on the F-BM in the table entry with SN of 2 and the bit string in the first BIER multicast packet, to obtain 000 … 00000000000000000000000000000010. The device 209 replaces the bit string in the first BIER multicast packet with the operated result to obtain a second BIER multicast packet. The bit string of the second BIER multicast packet is 000 … 00000000000000000000000000000010. The device 209 sends the second BIER multicast packet to the NBR in the entry with SN 2, i.e. the device 206. The device 209 may determine, when looking up tables 2-8, that the entry with SN of 256 is used to forward the first BIER multicast packet. The method for determining, by the device 209, that the entry with the SN of 256 is used to forward the first BIER multicast packet may refer to a method adopted by the device 210, and is not described herein again. The device 209 performs and operation on the F-BM in the entry with SN of 256 and the bit string in the first BIER multicast packet, to obtain 100 … 00000000000000000000000000000000. The device 209 replaces the bit string in the first BIER multicast packet with the operated result to obtain a third BIER multicast packet. The bit string of the third BIER multicast packet is 100 … 00000000000000000000000000000000. The device 209 sends the third BIER multicast packet to the NBR in the entry with SN 256, i.e. the device 208.
In a third possible implementation manner, the device 209 receives a first BIER multicast packet including the first sub packet and the second sub packet. The device 209 may use the first possible implementation manner or the second possible implementation manner to obtain the second BIER multicast packet and the third BIER multicast packet. The difference from the first possible implementation manner or the second possible implementation manner is that, since the device 210 has already performed packet replication, the device 209 does not need to perform packet replication and bit string replacement. Specifically, since the bit string included in the first sub-packet only includes a bit with a bit set to 1, that is, a2 nd bit in the right-to-left direction, the device 209 uses the first sub-packet as the second BIER multicast packet. The device 209 sends the second BIER multicast packet to the NBR in the entry with SN 2, i.e. the device 206. Since the bit string included in the second sub-packet only includes a bit with a bit set to 1, that is, the 256 th bit in the right-to-left direction, the device 209 uses the second sub-packet as the third BIER multicast packet. The device 209 sends the third BIER multicast packet to the NBR in the entry with SN 256, i.e. the device 208.
S404, the device 206 determines its own next hop and sends it according to the configured BIFT table entry and the second BIER multicast message.
For example, the next hop of the device 206 refers to the next node, such as the devices 102 and 103 in fig. 2, through which the BFER arriving at one or more multicast receiver connections passes in the direction from the multicast source to the multicast receiver. In the second embodiment of the present application, for example, when multicast receiver 2 and multicast receiver 6 need to receive a multicast packet from a multicast source, device 206 determines that the next hop of the second BIER multicast packet is device 102 according to the offset of bit set to 1in the bit string in the second BIER multicast packet.
For example, a method for the device 206 to determine the next hop may include: the device 206 obtains an offset of a bit with a1 set in a bit string from the right to the left direction in the bit string included in the second BIER multicast packet, for example, the offset is 2. The apparatus 206 checks table 2-1 or table 2-2 in example one with 2 as SN to obtain NBR with a value of a 102. Or the device 206 indexes 2 to look up the cell that the table 2-3 matches, i.e., the NBR of a102 in the row column 2 cell where the SN is 1-16. When looking up the table 2-2, the device 206 can directly determine the NBR corresponding to the SN according to the SN without looking up the F-BM in the table 2-2. When looking up table 2-3, the device 206 may determine the row number of the SN by using the offset of the bit first set to 1in the bit string of the second BIER multicast packet from right to left and the quotient of the reading bit width, read the NRB in the row, for example, the quotient of the offset with the value of 2 and the reading bit width with the value of 16 is 0, and determine the row number of the SN to be 1. Compared with the common BIFT table look-up method (32 table entries need to be read when reading the BIFT table entry shown in the table 1-1, each table entry in the table 1-1 occupies 256-bit F-BM and 8-bit BFR-NBR, and 8448 bits need to be read in total), the table look-up method adopted by the device 206 can reduce the performance requirement on forwarding hardware, and the table entries in the tables 2-1, 2-2 and 2-3 can be further expanded according to the numerical value of the BSL, so that the table look-up forwarding requirement of bit string with the BSL of 512 and 1024 can be met on the premise of not improving the performance requirement of the forwarding hardware. The method for determining the next hop by the device 206 according to table lookup 2-3 may refer to the method for determining the next hop according to table lookup 2-9 of the device 209, and will not be described herein again.
For example, the following two implementation manners are included in the apparatus 206 for acquiring the BIER multicast packet sent to the next hop:
in a first possible implementation manner, when the device 206 determines the NBR by using tables 2-1 and 2-3, the device 206 reaches the next hop of the BFER corresponding to the 2 nd bit with the set 1in the second BIER multicast packet as the device 102, and the device 206 does not need to perform packet replication and bit string replacement operations. The device 206 sends the second BIER multicast packet to the NBR in the entry with SN 2, i.e. the device 102. The device 206 may obtain bit sting with a value of 0000 … 00000000000000000000000000000000 after clearing 0 for the 2 nd bit of which 1 is set in the bit string from right to left in the second BIER multicast message, and all 0 s, then the device 206 does not copy the message any more.
In a second possible implementation manner, when looking up table 2-2, the device 206 determines that the entry with SN of 2 is used to forward the second BIER multicast packet. The device 206 performs an and operation on the F-BM in the table entry with SN of 2 and the bit string in the second BIER multicast packet to obtain 000 … 00000000000000000000000000000010, which is the same as the bit string in the second BIER multicast packet, and does not perform a replacement or copy operation. The device 206 sends the second BIER multicast packet to the NBR in the entry with SN 2, i.e. the device 102. The device 206 may obtain bit sting with a value of 0000 … 00000000000000000000000000000000 after clearing 0 for the 2 nd bit of which 1 is set in the bit string from right to left in the second BIER multicast message, and all 0 s, then the device 206 does not copy the message any more.
S405, the device 208 determines its own next hop according to the configured BIFT table entry and the third BIER multicast message, and sends the next hop.
For example, the next hop of the device 208 refers to the next node, such as devices 255 and 256 in fig. 2, that passes in the direction from the multicast source to the multicast receivers to reach the bfrs of one or more multicast receiver connections. In the second embodiment of the present application, for example, when multicast receiver 2 and multicast receiver 6 need to receive a multicast packet from a multicast source, device 208 determines that the next hop of the third BIER multicast packet is device 256 according to the offset of bit set to 1in the bit string in the third BIER multicast packet.
For example, the method for the device 208 to determine the next hop may include: the device 208 obtains an offset of a bit with a1 set in a bit string from the right to the left direction in the bit string included in the third BIER multicast packet, for example, the offset is 256. The apparatus 208 checks tables 2-4 or tables 2-5 in example one with 256 as SN to obtain NBR with a 256. Or the device 208 searches the cells matched in tables 2-6 by using 256 as an index, i.e., the NBRs of a256 in the cells of column 16 of the row with SN 241-. When looking up the table 2-5, the device 208 can directly determine the NBR corresponding to the SN according to the SN without looking up the F-BM in the table 2-5. When looking up table 2-6, the device 208 may determine the row number where the SN is located by using the offset of the bit first set to 1in the bit string of the third BIER multicast packet from right to left and the quotient of the reading bit width, read the NRB in the row, for example, the quotient of the offset with a value of 256 and the reading bit width with a value of 16 is 16, and determine the row number where the SN is located is 16. Compared with the common BIFT table look-up method (32 table entries need to be read when reading the BIFT table entry shown in the table 1-2, each table entry in the table 1-2 occupies 256-bit F-BM and 8-bit BFR-NBR, and 8448 bits need to be read in total), the table look-up method adopted by the device 208 can reduce the performance requirement on forwarding hardware, and the table entries in the tables 2-4, 2-5 and 2-6 can be further expanded according to the numerical value of the BSL, so that the table look-up forwarding requirement of bit string with the BSL of 512 and 1024 can be met on the premise of not improving the performance requirement of the forwarding hardware. The method for determining the next hop by the device 208 according to table lookup 2-6 can refer to the method for determining the next hop according to table lookup 2-9 of the device 209, and will not be described herein again.
For example, the following two implementation manners are included in the apparatus 208 for acquiring the BIER multicast packet sent to the next hop:
in a first possible implementation manner, when the device 208 determines the NBR by using tables 2-1 and 2-3, the device 208 reaches the next hop of the BFER corresponding to the 256 th bit with the set 1in the third BIER multicast packet as the device 256, and the device 208 does not need to perform packet copying and bit string replacing operations. The device 208 sends the third BIER multicast packet to the NBR in the entry with SN of 256, that is, the device 256. After the device 208 can clear 0 of the 2 nd bit with 1in the bit string of the third BIER multicast message from right to left, the bit sting with the value of 0000 … 00000000000000000000000000000000 is obtained, and all 0 s are obtained, so that the device 208 does not copy the message any more.
In a second possible implementation manner, when looking up table 2-2, the device 208 determines that the entry with SN of 256 is used to forward the third BIER multicast packet. The device 208 performs an and operation on the F-BM in the table entry with the SN of 256 and the bit string in the third BIER multicast packet to obtain 100 … 00000000000000000000000000000000, and does not perform a replacement operation or a copy operation, which is the same as the bit string in the third BIER multicast packet. The device 208 sends the third BIER multicast packet to the NBR in the entry with SN of 256, that is, the device 256. After the device 208 can clear 0 of the 2 nd bit with 1in the bit string of the third BIER multicast message from right to left, the bit sting with the value of 0000 … 00000000000000000000000000000000 is obtained, and all 0 s are obtained, so that the device 208 does not copy the message any more.
S406, the BFER device obtains the multicast message and sends it to the multicast receiver.
For example, after receiving the second BIER multicast packet, the device 102 serving as the BFER determines, according to the bit string with a value of 0000 … 00000000000000000000000000000010 in the second BIER multicast packet, that the bit string includes its own BFR-id, that is, the 2 nd bit from right to left, which is set to 1, represents the BFR-id of the device 102. The device 102, which is a BFER, strips the BIER header in the second BIER multicast packet and sends it to the multicast receiver 2 connected to itself. After receiving the third BIER multicast packet, the device 256 serving as the BFER determines that the bit string includes its own BFR-id according to the bit string with the value of 1000 … 00000000000000000000000000000000 in the third BIER multicast packet, i.e., the 256 th bit from right to left, which is set to 1, represents the BFR-id of the device 256. The device 256, which is a BFER, strips off the BIER header in the third BIER multicast packet and sends it to the multicast receiver 6 connected to itself.
In the method provided by the embodiment of the present application, forwarding devices in a BIER network scenario, for example, devices serving as a BFIR, an intermediate BFR, or a BFER, may obtain the optimized BIFT entry provided by the embodiment of the present application through a control plane, and forward a BIER multicast packet using the optimized BIFT entry provided by the embodiment of the present application, so as to omit an operation of reading a bit string in an F-BM determined by a BSL, which is included in a general BIFT entry, and improve forwarding efficiency and scalability without improving forwarding hardware performance.
Fig. 5 is a schematic view of another BIER network scenario provided in the embodiment of the present application. The BIER network scenario shown in fig. 5 is different from the BIER network scenario shown in fig. 2 in that the BIER network scenario shown in fig. 5 is obtained by adding a multicast receiver 7 that desires to receive a multicast packet sent by a multicast source, to the network scenario shown in fig. 2. The multicast receiver connects 7 to the device 509 through the device 511 acting as a BFER. Device 509 connects device 510, device 505, device 506, device 507, and device 508. The device 510 connects to a multicast source. The device 511 as a BFER is assigned a BFR-id of 31. The functions of the devices with the same numbers in fig. 2 in the BIER network scenario shown in fig. 5 are the same, and are not described again here. Device 505, device 506, device 507, device 508, and device 509 are intermediate BFRs. Device 210 is a BFIR. In the BIER network scenario shown in fig. 5, multicast receivers 2, 6, and 7 need to receive a multicast packet sent by a multicast source.
EXAMPLE III
Fig. 6 is a flowchart illustrating a method for obtaining a forwarding entry according to a third embodiment of the present application. The embodiment corresponding to fig. 6 is directed to a scenario where multicast receiver 2, multicast receiver 6, and multicast receiver 7 receive a multicast packet of a multicast source, and the BFIR in fig. 6 and the corresponding embodiment may be device 510 in the BIER network scenario shown in fig. 5. The intermediate BFR in fig. 6 and corresponding embodiments may be device 509, device 506, or device 508 in the BIER network scenario shown in fig. 5. The BFER in fig. 6 and corresponding embodiments may be device 102, device 256, or device 511 in the BIER network scenario shown in fig. 5. The following describes a method for obtaining a forwarding table entry according to an embodiment of the present application with reference to fig. 5 and fig. 6.
S601, the BFER issues the BFR-id and the equipment identification of the BFER through the IGP.
The content of S601 can be specifically referred to the content of S301 in the first embodiment. In the scenario shown in fig. 5, the device acting as a BFER may issue its BFR-id and device identification using the method in S301. The method for the device 511 to issue its own BFR-id and device identification may be referred to as any method adopted by the device as a BFER in S301. The device identification of device 511 is a 511.
S602, the intermediate BFR issues its own device identification and BFR-id of the BFER through IGP.
The content of S602 can be specifically referred to as the content of S302 in embodiment one. The intermediate BFRs other than the device 509 may publish their own device representations and BFR-ids of BFERs using the method in S302. In contrast to S302 in example one, the device 509 as an intermediate BFR issues a209, BFR-ids with values 1, 2, 3, 4, 31, 255 and 256 via IGP flooding.
And S603, the intermediate BFR obtains a first forwarding table according to the parameters obtained by IGP flooding, wherein the first forwarding table comprises the identifier of the next hop.
In the scenario shown in fig. 5, the device 506 may obtain the same table entries as those in tables 2-3 in the first embodiment by using the method of S303 in the first embodiment. The apparatus 506 divides the NBRs into identity sets, such as 256 NBRs included in Table 2-3 into 32 identity sets, each identity set including a division of 8 NBRs in a SN order, based on the obtained entry same as Table 2-3. The device 506 divides the acquired 32 identifier sets (i ranges between 0 and 31) sorted according to SN, and divides the 32 identifier sets according to moving windows, such as a moving window with a value of 5, where the first moving window includes B0-B4, the second moving window includes B1-B5, the third moving window includes B2-B6 …, the twenty-eighth moving window includes B27-B31, the twenty-ninth moving window includes B28-B31, the thirtieth moving window includes B29-B31, and the 31 st moving window includes B30 and B31. The device 506 combines the Bi included in each moving window to obtain the Bi included in each row in table 3-1. In Table 3-1, the identifier set corresponding to B0 includes NBR with a value of a 102.
TABLE 3-1
index 0 1 2 3 4 5 6 7
0 B0 B1 B0 B2 B0 B3 B0 B4
1 B1 B2 B1 B3 B1 B4 B1 B5
2 B2 B3 B2 B4 B2 B5 B2 B6
27 B27 B28 B27 B29 B27 B30 B27 B31
28 B28 B29 B28 B30 B28 B31
29 B29 B30 B29 B31
30 B30 B31
For example, the device 506 may divide the 8-bit ids of each row in table 2-3 by the control plane to obtain the set of ids of Bi ids. B0 in Table 3-1 represents the ID set formed by the IDs of columns 1 to 8 in the table entries with SN 1-16 in Table 2-3. B1 in Table 3-1 represents the ID set formed by the IDs of columns 9 to 16 in the table entries with SN 1-16 in Table 2-3. B2 in Table 3-1 represents the ID set formed by the IDs of columns 1 to 8 in the table entries with SN 17-32 in Table 2-3. B3 in Table 3-1 represents the ID set formed by the IDs of columns 9 to 16 in the table entries with SN 17-32 in Table 2-3. B30 in Table 3-1 represents the ID set formed by the IDs in columns 1 to 8 in the table entries with SN 241-256 in Table 2-3. B31 in Table 3-1 represents the ID set formed by the 9 th to 16 th ID in the entry with SN 241-256 in Table 2-3. The 256 tags in tables 2-3 were converted to the 32 tag sets B0 through B31 described above according to the method described above. The number of columns in Table 2-1 corresponding to the identification set identified by Bi in Table 3-1 may be determined by the quotient of M and Y. In the third embodiment, M is 16 and Y is 2, wherein Y may be any other number divisible by 16. In the embodiment of the application, a value capable of improving the performance of forwarding hardware is selected from possible values of Y, that is, Y is 2. The device 206 may group the 31 identifier sets of B0 to B31 through the control plane, where the grouping includes 32 identifier sets for illustration, that is, the 32 identifier sets included in each group are fully combined, for example, two by two, to obtain the table entry in the form of table 3-2.
TABLE 3-2
Figure BDA0002778289330000271
Figure BDA0002778289330000281
In the scenario shown in fig. 5, the device 508 may obtain the same entries as the tables 2-6 in the first embodiment by using the method adopted by the device 208 in S303 in the first embodiment. The device 508 performs NBR partitioning according to the method adopted by the device 506 based on the obtained table entries same as those in tables 2-6, and obtains tables 3-3. In tables 3-3 obtained by the device 508, B31 contains the NBR associated with multicast receiver 6, namely a 256. The BFR-id of the device 256 to which the device 508 is connected is 256, then the table 3-3 generated by the device 508 is augmented with a row of entries with index 121.
Tables 3 to 3
Figure BDA0002778289330000282
Figure BDA0002778289330000291
In the scenario shown in fig. 5, the device 509 may obtain tables 3 to 4 by using the method used by the device 209 in S303 in the first embodiment. … in tables 3-4 indicates the omission of content that is empty, and X may be 0 or empty.
Tables 3 to 4
SN 1 2 3 4 4-14 15 16
1-16 a205 a206 a206 a207 X X
17-32 X X X X a511 X
241-256 X X X X a208 a208
In tables 3-4, a205 is the device identification of the device 505 connecting the device 101. a206 is the device identification of the device 506 connecting the device 102 and the device 103. a207 is the device identification of the device 507 connecting the devices 104. a511 is the device identification of the device 511 connecting the multicast receivers 7. a208 is the device identification of the device 208 connecting the device 255 and the device 256. The BFR-id of device 101 is 1. The BFR-id of device 102 is 2. The BFR-id of device 103 is 3. The BFR-id of device 104 is 4. The BFR-id for device 255 is 255. The BFR-id of device 256 is 256. The BFR-id of device 511 is 31. The corresponding relationship between NBR and SN in tables 3-4 is the same as that in tables 2-7, and will not be described herein.
For example, the device 509 performs the NBR partitioning according to the method adopted by the device 506 based on tables 3 to 4 to obtain tables 3 to 5. In tables 3-5 obtained by the device 509, B0 contains the NBR associated with multicast receiver 2, i.e., a 206. B3 contains the NBR associated with multicast recipient 7, a 511. B31 contains the NBR associated with multicast recipient 6, namely a 208. The table entries in tables 3-5 of device 509 indexed 121 have the same meaning as tables 3-3, i.e., device 509 is capable of communicating with device 256 having a BFR-id of 256.
Tables 3 to 5
Figure BDA0002778289330000292
Figure BDA0002778289330000301
And S604, the BFIR acquires a second forwarding table according to the parameters acquired through IGP flooding, wherein the second forwarding table comprises the identifier of the next hop.
In the scenario shown in fig. 5, the device 510 may obtain tables 3-6 by using the method adopted by the device 210 in S304 in the first embodiment. … in tables 3-6 indicates the omission of content that is empty, and X may be 0 or empty. In tables 3-6, a209 is the device identification of the device 509.
Tables 3 to 6
SN 1 2 3 4 4-14 15 16
1-16 a209 a209 a209 a209 X X
17-32 X X X X a209 X
241-256 X X X X a209 a209
For example, the device 510 performs the NBR partitioning according to the method adopted by the device 506 based on tables 3 to 6, and obtains tables 3 to 7. In tables 3-7 obtained by the device 510, B0 contains the NBR associated with multicast receiver 2, namely a 209. B3 contains the NBR associated with multicast recipient 7, namely a 209. B31 contains the NBR associated with multicast recipient 6, i.e., a 209. The table entries in tables 3-7 of device 510 indexed 121 have the same meaning as tables 3-4, i.e., device 510 is capable of communicating with device 256 having a BFR-id of 256.
Tables 3 to 7
Figure BDA0002778289330000302
Figure BDA0002778289330000311
The tables in tables 3-1 to 3-7 above take M as an example, and for the BIER network scenario with BSL of 256 bits. Because 256 bits occupied by each F-BM is omitted, when M is 16, for the BIER network scenario with BSL of 512 bits or 1024 bits, the forwarding table can be further expanded. Because the forwarding hardware does not need to read the 256-bit F-BM included in the common BIFT table entry, even for a network scene with the BSL of 512bit or 1024bit, the forwarding hardware can quickly complete the table entry searching and forwarding without performance improvement, and the forwarding efficiency is further improved.
In the forwarding table entry provided by the embodiment of the application, Bi containing a plurality of NBRs can be directly indexed according to whether bits in bit string corresponding to the NBRs are set to 1, that is, the NBR serving as the next hop is directly obtained, so that the space for storing the F-BM and hardware resources consumed by reading the F-BM operation are saved, and the performance requirement on forwarding hardware can be reduced.
Example four
Fig. 7 is a flowchart of a method for forwarding a multicast packet according to a fourth embodiment of the present application. The entry in the fourth embodiment is the entry obtained in the third embodiment. In the fourth embodiment, the multicast receivers 2, 6, and 7 need to acquire multicast packets from a multicast source. Next, a method for forwarding a multicast packet according to the fourth embodiment of the present application is described with reference to fig. 5, fig. 6, and fig. 7.
S701, the device 510 obtains a first BIER multicast packet according to the multicast packet from the multicast source.
In this embodiment, the device 510 may obtain the first BIER multicast packet by using the method in S401 in the second embodiment, which is not described herein again. The bit string included in the first BIER multicast packet in the fourth embodiment is different from the bit string included in the first BIER multicast packet in the first embodiment. The first BIER multicast packet in the fourth embodiment includes a bit string of 1000 … 01000000000000000000000000000010, that is, the 2 nd, 31 th and 256 th bits from right to left of the bit string in the first BIER multicast packet in the fourth embodiment are set to 1.
S702, the device 510 determines its own next hop according to the configured table forwarding entry and sends the first BIER multicast packet.
For example, the device 510 determines the entries in tables 3-7 to be looked up according to whether all 0 data blocks containing 8 bits in the bit string from the right to the left direction included in the first BIER multicast packet are included. The device 510 reads 32 8-bit data blocks from the bit string of the first BIER multicast packet in the direction from right to left, that is, 1000 … 01000000000000000000000000000010 includes bit positions with 1 along the 1 st data block (1 st to 8 th bits), the 4 th data block (25 th to 32 th bits) and the 32 nd data block (249 th to 256 th bits) from right to left. The 1 st data block corresponds to B0. The 4 th data block corresponds to B3. The 32 th data block corresponds to B31. The identification set identified by Bi is a set of n NBRs, and the value of n is the quotient of M and Y. From the contents of tables 3-7, the NBR in the identification set identified by B0 corresponding to the 2 nd bit is a 209. The NBR corresponding to the 31 st bit in the identification set identified by B3 is a 209. The NBR corresponding to the 256 th bit in the identification set identified by B31 is a 209. The device 510 determines that B0 and B3 are identification sets related to the bit set to 1 according to the offset of the bit set to 1in the bit string of the first BIER multicast packet, such as 2 and 31. The apparatus 510 looks up the rows containing B0 and B3 in tables 3-7, reads the NBR corresponding to the 2 nd bit in B0 and the NBR corresponding to the 31 th bit in B3, and obtains a 209. The device 510 clears the 2 nd bit and the 31 th bit from right to left in the bit string included in the first BIER multicast packet (i.e., clears the bit corresponding to the identifier sets identified by B0 and B3 in the bit string by 0), and obtains the bit string with the value of 1000 … 00000000000000000000000000000000. The device 510 determines that the 32 th data block of bit string with a value of 1000 … 00000000000000000000000000000000 contains a bit set to 1, reads NBR corresponding to the 256 th bit in B31 using B31 lookup table 3-7 corresponding to the 31 st data block to obtain a 209. The device 510 sends a first BIER multicast message to a 209.
S703, the device 509 determines its own next hop according to the configured forwarding table entry and the bit string in the first BIER multicast packet, and sends the next hop.
For example, the device 509 reads 4 8-bit data blocks from right to left from the bit string of the first BIER multicast packet, that is, 1000 … 01000000000000000000000000000010 includes bits with a bit of 1in the 1 st data block, the 4 th data block, and the 32 nd data block from right to left. The 1 st data block corresponds to B0. The 4 th data block corresponds to B3. The 32 th data block corresponds to B31. From the contents of tables 3-5, the NBR in the identification set identified by B0 corresponding to the 2 nd bit is a 206. The NBR corresponding to the 31 st bit in the identification set identified by B3 is a 511. The NBR in the identification set identified by B31 corresponding to the 256 th bit is a 208. The device 509 determines that B0 and B3 are identification sets related to the bit set to 1 according to the offset of the bit set to 1in the bit string of the first BIER multicast packet. The device 509 looks up the rows containing B0 and B3 in tables 3-5, and reads the NBR corresponding to the 2 nd bit in B0 (a206) and the NBR corresponding to the 31 th bit in B3 (a 511). The device 509 copies a copy of the first BIER multicast message. The device 509 clears bits other than the 2 nd bit to obtain a bit string having a value of 0000 … 00000000000000000000000000000010. The device 509 replaces the bit string in the first BIER multicast packet with 0000 … 00000000000000000000000000000010 to obtain the second BIER multicast packet. The device 509 sends a second BIER multicast message to a 206. The device 509 clears bits other than the 31 st bit to obtain a bit string having a value of 0000 … 01000000000000000000000000000000. The device 509 replaces the bit string in the copied first BIER multicast packet with 0000 … 01000000000000000000000000000000 to obtain a fourth BIER multicast packet. The device 509 sends a fourth BIER multicast message to a 511. The device 509 clears the 2 nd bit and the 31 th bit from right to left in the bit string included in the first BIER multicast packet (i.e., clears the bit corresponding to the identifier sets identified by B0 and B3 in the bit string by 0), and obtains the bit string with the value of 1000 … 00000000000000000000000000000000. The device 509 determines that the 32 th data block of bit string having a value of 1000 … 00000000000000000000000000000000 contains a bit set to 1, and reads NBR corresponding to the 256 th bit in B31 using the B31 lookup table 3-5 corresponding to the 32 th data block to obtain a 208. The device 509 copies a copy of the first BIER multicast message. The device 509 replaces the bit string in the copied first BIER multicast packet with 1000 … 00000000000000000000000000000000 to obtain a third BIER multicast packet. The device 509 sends a third BIER multicast message to a 208.
S704, the device 506 determines its own next hop according to the configured BIFT entry and the second BIER multicast packet, and sends the second BIER multicast packet.
In this embodiment, the device 506 determines that the next hop is the device 102 by using the method used by the device 206 in the first embodiment, and sends the second BIER multicast packet to the device 102. The method for determining the next hop by the device 506 is similar to the method adopted by the device 509, that is, according to the offset of the bit set to 1in the bit string of the second BIER multicast packet, that is, the offset is 2, the NBR included in the B0 corresponding to the 2 nd bit, that is, the a102, is searched. The device 506 sends a second BIER multicast message to a 102.
S705, the device 508 determines its own next hop according to the configured BIFT entry and the third BIER multicast packet, and sends the third BIER multicast packet.
In this embodiment, the device 508 determines that the next hop is the device 256 by using the method used by the device 208 in the first embodiment, and sends the third BIER multicast packet to the device 256. The method for determining the next hop by the device 508 is similar to the method adopted by the device 509, that is, according to the offset of the bit set to 1in the bit string of the third BIER multicast packet, that is, the offset is 256, the NBR included in B31 corresponding to the 256bit, that is, a256, is searched. Device 508 sends a third BIER multicast message to a 256.
S706, the device as BFER obtains the multicast message and sends it to the multicast receiver.
For example, the method for the device 102, the device 256, and the device 511 serving as the BFER to obtain and send the multicast packet may refer to the method adopted by the device 102 in the first embodiment, and details are not described here.
In the method provided in embodiment two, the forwarding device in the BIER network scenario, for example, the device serving as a BFIR, an intermediate BFR, or a BFER, may further optimize the table entry provided in embodiment one through the control plane to obtain the optimized table entry provided in embodiment two of the present application, and compared with the forwarding method in embodiment one, the method can further reduce the data amount read at each time of forwarding the table entry, for example, the data amount obtained by reading the product of 128 bits and 2 in embodiment two (one Bi identifier set is 128 bits, and it is sufficient to read 2 identifier sets), and compared with embodiment one, the method reads the 128bit data amount less, and improves the forwarding efficiency and extensibility without improving the performance of forwarding hardware.
The carrying mode of bit string in any BIER multicast message mentioned in the second embodiment and the fourth embodiment of the present application may include the following modes:
in the method 1, the bit string is carried in a Destination Option Header (DOH) after the IPv6 header included in the BIER multicast packet, which is referred to as a packet format shown in fig. 8. The next header in the IPv6 header is assigned a value of 60, indicating that the IPv6 header is followed by a DOH. A next header in the DOH is 4, which indicates that a subsequent payload is an Internet Protocol version 4 (IPv 4) multicast packet. A next header in DOH is 41, which indicates that the subsequent payload is a multicast packet of Internet Protocol version six (IPv 6). The DOH further comprises a bit string field (not shown in fig. 8), which is used to carry the bit string in the BIER multicast packet.
In the mode 2, the bit string is carried in a Destination Option Header (DOH) after the IPv6 header included in the BIER multicast packet, which is referred to as a packet format shown in fig. 9. The value of the next header in the IPv6 header is 0, which means that the IPv6 header is followed by a hop-by-hop option header (HBH option header). The next header of the hop-by-hop header has an assignment of 60, indicating that the hop-by-hop header is followed by a DOH. A next header in the DOH is 4, which indicates that a subsequent payload is an Internet Protocol version 4 (IPv 4) multicast packet. A next header in DOH is 41, which indicates that the subsequent payload is a multicast packet of Internet Protocol version six (IPv 6). The DOH further comprises a bit string field (not shown in fig. 8), which is used to carry the bit string in the BIER multicast packet.
In the method 3, the bit string is carried in the IPv6 extension header after the IPv6 header included in the BIER multicast packet, see the packet format shown in fig. 10. The BIER header in the IPv6 extension header can be used to carry the bit string in the BIER multicast message in the embodiment of the present application. The multicast data packet in fig. 10 may be an IPv4 multicast packet or an IPv6 multicast packet.
Fig. 11 is a schematic structural diagram of a forwarding device provided in an embodiment of the present application. The forwarding apparatus 1100 provided in the embodiment corresponding to fig. 11 is described from the perspective of a logical structure, and may be disposed in the device serving as a BFIR or the device serving as an intermediate BFR mentioned in any of the first to fourth embodiments, such as the device 210, the device 209, the device 206, or the device 208 in the scenario shown in fig. 2, the device 510, the device 509, the device 506, or the device 508 in the scenario shown in fig. 5, and the like. The following describes a structure of a forwarding device provided in an embodiment of the present application with reference to fig. 11.
The forwarding device 1100 includes: a receiving unit 1101, a determining unit 1102 and an obtaining unit 1103. The receiving unit 1101 is configured to receive a BIER multicast packet, where the BIER multicast packet includes a first bit string, and a bit with a1 being set included in the first bit string corresponds to a BFER. The determining unit 1102 is configured to determine an index of a forwarding entry according to the bit with 1 set in the first bit string, where the forwarding entry includes the index and an identifier of a device serving as a next hop. The obtaining unit 1103 is configured to directly obtain, according to the index, an identifier of the device, where the device is the BFER or a first middle bit forwarding router BFR that passes by when the device reaches the BFER. The forwarding device 1100 is the device 210 in the second embodiment, and the determining unit 1102 and the obtaining unit 1103 are configured to support the device 210 to execute S402 in the second embodiment. The forwarding device 1100 is the device 209 in the second embodiment, and the determining unit 1102 and the obtaining unit 1103 are configured to support the device 209 to execute S403 in the second embodiment. The forwarding device 1100 is the device 206 in the second embodiment, and the determining unit 1102 and the obtaining unit 1103 are configured to support the device 206 to execute S404 in the second embodiment. The forwarding device 1100 is the device 208 in the second embodiment, and the determining unit 1102 and the obtaining unit 1103 are configured to support the device 208 to execute S405 in the second embodiment. The forwarding device 1100 is the device 510 in the fourth embodiment, and the determining unit 1102 and the obtaining unit 1103 are configured to support the device 510 to execute S702 in the fourth embodiment. The forwarding device 1100 is the device 509 in the fourth embodiment, and the determining unit 1102 and the obtaining unit 1103 are configured to support the device 509 to execute S703 in the fourth embodiment. The forwarding device 1100 is the device 506 in the fourth embodiment, and the determining unit 1102 and the obtaining unit 1103 are configured to support the device 506 to execute S704 in the fourth embodiment. The forwarding device 1100 is the device 508 in the fourth embodiment, and the determining unit 1102 and the obtaining unit 1103 are configured to support the device 508 to execute S705 in the fourth embodiment.
In a first possible implementation manner, the index is a sequence number corresponding to a BFR-id of the BFER, and the identifier of the device corresponds to a sequence number. The forwarding table entry in the first possible implementation manner may be a forwarding table entry included in a forwarding table of one embodiment, such as table 2-1, table 2-4, table 2-7, or table 2-10.
In a second possible implementation manner, the forwarding table entry further includes a second bit string based on the first possible implementation manner. And the second bit string has only 1bit with 1bit being set to 1, and the offset of the bit with 1bit being set in the second bit string corresponds to the sequence number included in the forwarding table entry where the bit is located. The forwarding table entry in the second possible implementation manner may be a forwarding table entry included in the forwarding tables in tables 2-2, 2-5, 2-8, or 2-11 in the first embodiment. Based on the forwarding table entry in the second possible implementation manner, the obtaining unit 1103 is specifically configured to obtain, according to the sequence number, the identifier of the device serving as the next hop, which is included in the forwarding table entry, without searching for the second bit string included in the forwarding table entry.
In a third possible implementation manner, the forwarding table entry includes N identifiers, where N is less than or equal to a value of a read bit width, the N identifiers include an identifier of the device, and an order of any identifier included in the N identifiers in the forwarding table entry corresponds to the sequence number. The forwarding table entry in the third possible implementation manner may be a forwarding table entry included in the forwarding tables in tables 2 to 3, tables 2 to 6, tables 2 to 9, or tables 2 to 12 in the first embodiment. Based on the forwarding entry in the third possible implementation manner, the obtaining unit 1103 is specifically configured to: determining a row number according to the serial number and the reading bit width, wherein the row number corresponds to a quotient of the serial number and the reading bit width; and acquiring the N identifiers included in the forwarding table entry corresponding to the row number.
Based on the forwarding table entries of the three possible implementation manners, the determining unit 1102 is specifically configured to: acquiring the offset of the bit with 1in the first bit string; and determining the index according to the offset, wherein the offset corresponds to the index.
In a fourth possible implementation manner, the index is used to identify a row in which M identifier sets are located, where M is an integer greater than or equal to 2, the M identifier sets include identifiers of the device, the identifier set to which the identifier of the device belongs corresponds to the data block to which the serial number belongs, and an order of the identifier of the device in the identifier set to which the identifier belongs corresponds to the serial number. The forwarding table entry in the fourth possible implementation manner may be a forwarding table entry included in the forwarding tables in table 3-2, table 3-3, table 3-5, or table 3-7 in the third embodiment.
Based on the forwarding entry in the fourth possible implementation manner, the determining unit 1102 is specifically configured to: determining a data block to which a bit with a1 set in the first bit string belongs according to the first bit string and the reading bit width; acquiring an identifier set corresponding to a data block to which a bit with a1 set in the first bit string belongs, wherein the M identifier sets comprise the identifier sets corresponding to the data block; and determining the rows where the M identification sets are located according to the identification sets corresponding to the data blocks. The obtaining unit 1103 is specifically configured to: and acquiring the identification of the equipment from the M identification sets included in the row corresponding to the index.
For example, the forwarding device 1100 may also obtain the forwarding table entry in the following manner. When the forwarding table entry is the forwarding table entry in the first, second, or third possible implementation manners, the receiving unit 1101 is further configured to receive the identifier of the device and the BFR-id sent by the device. The obtaining unit 1103 is further configured to: obtaining the sequence number corresponding to the BFR-id according to the BFR-id; and obtaining the forwarding table entry according to the serial number and the identifier of the equipment, wherein the index of the forwarding table entry is the serial number, and the next hop of the forwarding table entry is the identifier of the equipment.
For example, when the forwarding table entry is the forwarding table entry in the second possible implementation manner, the receiving unit 1101 is further configured to receive the identifier of the device and the BFR-id sent by the device. The obtaining unit 1103 is further configured to: obtaining the second bit string and the sequence number corresponding to the BFR-id according to the BFR-id; and obtaining the forwarding table entry according to the serial number, the second bit string and the identifier of the equipment, wherein the index of the forwarding table entry is the serial number, the forwarding bit string mask F-BM of the forwarding table entry is the second bit string, and the next hop of the forwarding table entry is the identifier of the equipment.
For example, when the forwarding table entry is a forwarding table entry in the third possible implementation manner, the receiving unit 1101 is further configured to receive the identifier of the device and the BFR-id sent by the device. The obtaining unit 1103 is further configured to: obtaining the sequence number corresponding to the BFR-id according to the BFR-id; and sequencing the serial number and the identifier of the equipment according to the reading bit width to obtain the forwarding table entry, wherein the row number of the forwarding table entry corresponds to a quotient of the serial number and the reading bit width, and the sequencing of the identifier of the equipment in the N identifiers included in the forwarding table entry corresponds to the serial number.
For example, when the forwarding table entry is a forwarding table entry in the fourth possible implementation manner, the receiving unit 1101 is further configured to receive the identifier of the device and the BFR-id sent by the device. The obtaining unit 1103 is further configured to: obtaining the sequence number corresponding to the BFR-id according to the BFR-id; dividing the identifiers corresponding to the serial numbers according to the sequence of the serial numbers to obtain L identifier sets, wherein the L corresponds to the quotient of the maximum value of the serial numbers and a preset value, and the preset value is the number of bits included in the data block; and dividing the L identification sets according to the mobile window, and combining the identification sets in the mobile window to obtain the forwarding table entries comprising the M identification sets. The size of the mobile window can be set according to needs, and the mobile window is 5 identification sets in the embodiment of the application. The maximum value of the serial number is 256, the preset value is 8, the L is 32, and the M is 2.
Fig. 12 is a schematic structural diagram of an apparatus for generating a forwarding entry according to an embodiment of the present application. The apparatus 1200 provided in the corresponding embodiment of fig. 12 is described from the perspective of a logical structure, and may be disposed in the device serving as a BFIR or the device serving as an intermediate BFR mentioned in any one of the first to fourth embodiments, such as the device 210, the device 209, the device 206, or the device 208 in the scenario shown in fig. 2, the device 510, the device 509, the device 506, or the device 508 in the scenario shown in fig. 5, and the like. Next, with reference to fig. 12, a structure of an apparatus for generating a forwarding table entry according to an embodiment of the present application is described.
The apparatus 1200 comprises a receiving unit 1201 and an obtaining unit 1202. The receiving unit 1201 is configured to receive an identifier of the device and a BFR-id sent by the device, where the BFR-id is used to identify a BFER capable of communicating with the device, and the device is the BFER or a first BFR that passes by to reach the BFER. The obtaining unit 1202 is configured to obtain a forwarding table according to the identifier of the device and the BFR-id, where an index of the forwarding table corresponds to the BFR-id, and the forwarding table is used to directly obtain the identifier of the device serving as a next hop, which is included in the forwarding table, according to the index. The apparatus 1200 is the device 210 in the first embodiment, and the obtaining unit 1202 is configured to support the device 210 to execute S304 in the first embodiment. The apparatus 1200 is the device 209 in the first embodiment, and the obtaining unit 1202 is configured to support the device 209 to execute S303 in the first embodiment. The apparatus 1200 is the device 206 in the first embodiment, and the obtaining unit 1202 is configured to support the device 206 to perform S303 in the first embodiment. The apparatus 1200 is the device 208 in the first embodiment, and the obtaining unit 1202 is configured to support the device 208 to execute S303 in the first embodiment.
In a first possible implementation manner, the index is a sequence number corresponding to the BFR-id, and the identifier of the device corresponds to a sequence number. The forwarding table entry in the first possible implementation manner may be a forwarding table entry included in a forwarding table of one embodiment, such as table 2-1, table 2-4, table 2-7, or table 2-10.
In a second possible implementation manner, the forwarding table entry further includes a first bit string based on the first possible implementation manner, the first bit string has only 1bit with 1bit set to 1, and an offset of the bit with 1bit set in the first bit string corresponds to a sequence number included in the forwarding table entry where the bit is located. The forwarding table entry in the second possible implementation manner may be a forwarding table entry included in the forwarding tables in tables 2-2, 2-5, 2-8, or 2-11 in the first embodiment.
In a third possible implementation manner, the forwarding table entry includes N identifiers, where N is less than or equal to a value of a read bit width, the N identifiers include an identifier of the device, and an order of any identifier included in the N identifiers in the forwarding table entry corresponds to the sequence number. The forwarding table entry in the third possible implementation manner may be a forwarding table entry included in the forwarding tables in tables 2 to 3, tables 2 to 6, tables 2 to 9, or tables 2 to 12 in the first embodiment.
In a fourth possible implementation manner, the index is used to identify a row in which M identifier sets are located, where M is an integer greater than or equal to 2, the M identifier sets include identifiers of the device, the identifier set to which the identifier of the device belongs corresponds to the data block to which the serial number belongs, and an order of the identifier of the device in the identifier set to which the identifier belongs corresponds to the serial number. The forwarding table entry in the fourth possible implementation manner may be a forwarding table entry included in the forwarding tables in table 3-2, table 3-3, table 3-5, or table 3-7 in the third embodiment.
For example, when the forwarding entry is a forwarding entry in the first, second or third possible implementation manners, the obtaining unit 1202 is further configured to: obtaining the sequence number corresponding to the BFR-id according to the BFR-id; and obtaining the forwarding table entry according to the serial number and the identifier of the equipment, wherein the index of the forwarding table entry is the serial number, and the next hop of the forwarding table entry is the identifier of the equipment.
For example, when the forwarding entry is a forwarding entry in the second possible implementation manner, the obtaining unit 1202 is further configured to: obtaining the first bit string and the sequence number corresponding to the BFR-id according to the BFR-id; and obtaining the forwarding table entry according to the sequence number, the first bit string and the identifier of the equipment, wherein the index of the forwarding table entry is the sequence number, the forwarding bit string mask F-BM of the forwarding table entry is the first bit string, and the next hop of the forwarding table entry is the identifier of the equipment.
For example, when the forwarding entry is a forwarding entry in the third possible implementation manner, the obtaining unit 1202 is further configured to: obtaining the sequence number corresponding to the BFR-id according to the BFR-id; and sequencing the serial number and the identifier of the equipment according to the reading bit width to obtain the forwarding table entry, wherein the row number of the forwarding table entry corresponds to a quotient of the serial number and the reading bit width, and the sequencing of the identifier of the equipment in the N identifiers included in the forwarding table entry corresponds to the serial number.
For example, when the forwarding entry is a forwarding entry in the fourth possible implementation manner, the obtaining unit 1202 is further configured to: obtaining the sequence number corresponding to the BFR-id according to the BFR-id; dividing the identifiers corresponding to the serial numbers according to the sequence of the serial numbers to obtain L identifier sets, wherein the L corresponds to the quotient of the maximum value of the serial numbers and a preset value, and the preset value is the number of bits included in the data block; and dividing the L identification sets according to the mobile window, and combining the identification sets in the mobile window to obtain the forwarding table entries comprising the M identification sets. The size of the mobile window can be set according to needs, and the mobile window is 5 identification sets in the embodiment of the application. The maximum value of the serial number is 256, the preset value is 8, the L is 32, and the M is 2.
Fig. 13 is a schematic structural diagram of a forwarding device according to an embodiment of the present application. The forwarding device 1300 provided in the embodiment corresponding to fig. 13 may be the forwarding device 1100 provided in the embodiment corresponding to fig. 11, or may be the forwarding device in which the apparatus 1200 provided in the embodiment corresponding to fig. 12 is located. The forwarding device 1300 provided by the corresponding embodiment of fig. 13 is described from the perspective of a hardware structure. The forwarding device 1300 includes a processor 1301, a memory 1302, a communication bus 1304, and a communication interface 1303. The processor 1301, the memory 1302, and the communication interface 1303 are connected by a communication bus 1304. The memory 1302 is used for storing programs. When the forwarding device 1300 is installed in a device that is a BFIR, the processor 1301 executes the method executed by the device 210 in the second embodiment or executes the method executed by the device 510 in the fourth embodiment according to the executable instructions included in the program read from the memory 1302. When the forwarding device 1300 is installed in a device serving as an intermediate BFR, the processor 1301 executes the method executed by the device 209, the device 206, or the device 208 in the second embodiment or the method executed by the device 509, the device 506, or the device 508 in the fourth embodiment according to the executable instructions included in the program read from the memory 1302.
Fig. 14 is a schematic structural diagram of an apparatus for generating a forwarding table entry according to an embodiment of the present application. The apparatus 1400 provided by the corresponding embodiment of fig. 14 may be the apparatus 1200 provided by the corresponding embodiment of fig. 12. The corresponding embodiment of fig. 14 provides a description of the apparatus 1400 from the perspective of hardware architecture. The apparatus 1400 comprises a processor 1401, a memory 1402, a communication bus 1404, and a communication interface 1403. The processor 1401, the memory 1402 and the communication interface 1403 are connected by a communication bus 1404. The memory 1402 is used to store programs. When the apparatus 1400 is disposed in a device that is a BFIR, the processor 1401 executes the method executed by the device 210 in the first embodiment or the method executed by the device 510 in the third embodiment according to the executable instructions included in the program read from the memory 1402. When the apparatus 1400 is disposed in a device serving as an intermediate BFR, the processor 1401 executes the method executed by the device 209, the device 206, or the device 208 in the first embodiment or executes the method executed by the device 509, the device 506, or the device 508 in the third embodiment according to the executable instructions included in the program read from the memory 1402.
The embodiment of the present application provides a system, where the system includes a forwarding device 1100 or an apparatus 1200, or the system includes a forwarding device 1300 or an apparatus 1400. The forwarding device 1100 or the forwarding device 1300 may be configured to execute the method executed by the device serving as the BFIR in the second embodiment or the fourth embodiment, or execute the method executed by the device serving as the intermediate BFR in the second embodiment or the fourth embodiment. The apparatus 1200 or the apparatus 1400 may be configured to perform the method performed by the device in the first embodiment or the third embodiment as the BFIR, or perform the method performed by the device in the first embodiment or the third embodiment as the intermediate BFR.
The embodiment of the application provides a chip. The chip may include the memory 1301 and the processor 1301 shown in fig. 13. The memory 1302 is used to store computer instructions. The processor 1301 is configured to call and execute the computer instructions from the memory 1302 to perform the method for determining a next hop provided in embodiment two or embodiment four. The chip may include the memory 1401 and processor 1401 shown in fig. 14. The memory 1402 is used to store computer instructions. The processor 1401 is configured to invoke and execute the computer instructions from the memory 1402, so as to execute a method for generating a forwarding table entry provided in the first embodiment or the third embodiment. The chip provided by the embodiment of the present application may be disposed on forwarding hardware or a forwarding circuit included in the forwarding hardware is integrated with the chip provided by the embodiment of the present application.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the present application, "at least one item(s)" means one or more, "a plurality" means two or more. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or multiple. In the present application, "A and/or B" is considered to include A alone, B alone, and A + B.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one type of logical module division, and other division manners may be available in actual implementation, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be obtained according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, each module unit in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a hardware form, and can also be realized in a software module unit form.
The integrated unit, if implemented as a software module unit and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in this invention may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The above-described embodiments are intended to explain the objects, aspects and advantages of the present invention in further detail, and it should be understood that the above-described embodiments are merely exemplary embodiments of the present invention.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (60)

1. A method for acquiring a next hop, the method comprising:
receiving a bit index explicit copy BIER multicast message, wherein the BIER multicast message comprises a first bit string, and a bit with 1 set included in the first bit string corresponds to a bit forwarding exit router BFER;
determining an index of a forwarding table entry according to the bit with the 1 set in the first bit string, wherein the forwarding table entry comprises the index and an identifier of equipment serving as a next hop;
and directly obtaining the identifier of the equipment according to the index, wherein the equipment is the BFER or a first intermediate bit forwarding router BFR which passes by the BFER.
2. The method of claim 1, wherein the index is a sequence number corresponding to a bit forwarding router identification (BFR-id) of the BFER, and wherein the identification of the device corresponds to a sequence number.
3. The method according to claim 2, wherein the forwarding table entry further includes a second bit string, the second bit string has only 1bit with 1bit being set to 1, and an offset of the bit with 1bit being set in the second bit string corresponds to a sequence number included in the forwarding table entry where the bit is located.
4. The method of claim 3, wherein directly obtaining the identity of the device from the index comprises:
and obtaining the identifier of the equipment serving as the next hop, which is included in the forwarding table entry, according to the sequence number, without searching the second bit string included in the forwarding table entry.
5. The method of claim 2, wherein the forwarding entry contains N identifiers, wherein N is less than or equal to a value of a read bit width, wherein the N identifiers include identifiers of the device, and wherein an order of any identifier included in the N identifiers in the forwarding entry corresponds to the sequence number.
6. The method of claim 5, wherein directly obtaining the identity of the device from the index comprises:
determining a row number according to the serial number and the reading bit width, wherein the row number corresponds to a quotient of the serial number and the reading bit width;
and acquiring the N identifiers included in the forwarding table entry corresponding to the row number.
7. The method according to any of claims 1 to 6, wherein said determining an index of a forwarding entry according to a bit with a set 1in said first bit string comprises:
acquiring the offset of the bit with 1in the first bit string;
and determining the index according to the offset, wherein the offset corresponds to the index.
8. The method according to claim 1, wherein the index is used to identify a row in which M identification sets are located, where M is an integer greater than or equal to 2, the M identification sets include an identification of the device, the identification set to which the identification of the device belongs corresponds to the data block to which the sequence number belongs, and an ordering of the identification of the device in the identification set to which the identification of the device belongs corresponds to the sequence number.
9. The method of claim 8, wherein the determining the index of the forwarding entry according to the bit with 1 set in the first bit string comprises:
determining a data block to which a bit with a1 set in the first bit string belongs according to the first bit string and the reading bit width;
acquiring an identifier set corresponding to a data block to which a bit with a1 set in the first bit string belongs, wherein the M identifier sets comprise the identifier sets corresponding to the data block;
and determining the rows where the M identification sets are located according to the identification sets corresponding to the data blocks.
10. The method of claim 8 or 9, wherein directly obtaining the identity of the device from the index comprises:
obtaining the identity of the device from the M identity sets comprised by the index.
11. The method of any of claims 2 to 7, further comprising:
receiving the identification of the equipment and the BFR-id sent by the equipment;
obtaining the sequence number corresponding to the BFR-id according to the BFR-id;
and obtaining the forwarding table entry according to the serial number and the identifier of the equipment, wherein the index of the forwarding table entry is the serial number, and the next hop of the forwarding table entry is the identifier of the equipment.
12. The method according to claim 3 or 4, characterized in that the method further comprises:
receiving the identification of the equipment and the BFR-id sent by the equipment;
obtaining the second bit string and the sequence number corresponding to the BFR-id according to the BFR-id;
and obtaining the forwarding table entry according to the serial number, the second bit string and the identifier of the equipment, wherein the index of the forwarding table entry is the serial number, the forwarding bit string mask F-BM of the forwarding table entry is the second bit string, and the next hop of the forwarding table entry is the identifier of the equipment.
13. The method of claim 5 or 6, further comprising:
receiving the identification of the equipment and the BFR-id sent by the equipment;
obtaining the sequence number corresponding to the BFR-id according to the BFR-id;
and sequencing the serial number and the identifier of the equipment according to the reading bit width to obtain the forwarding table entry, wherein the row number of the forwarding table entry corresponds to a quotient of the serial number and the reading bit width, and the sequencing of the identifier of the equipment in the N identifiers included in the forwarding table entry corresponds to the serial number.
14. The method according to any one of claims 8 to 10, further comprising:
receiving the identification of the equipment and the BFR-id sent by the equipment;
obtaining the sequence number corresponding to the BFR-id according to the BFR-id;
dividing the identifiers corresponding to the serial numbers according to the sequence of the serial numbers to obtain L identifier sets, wherein the L corresponds to the quotient of the maximum value of the serial numbers and a preset value, and the preset value is the number of bits included in the data block;
and dividing the L identification sets according to the mobile window, and combining the identification sets in the mobile window to obtain the forwarding table entries comprising the M identification sets.
15. The method of claim 14, wherein the maximum value of the sequence number is 256, the preset value is 8, the L is 32, and the M is 2.
16. Method according to any of claims 1 to 15, characterized in that the method is performed by a bit forwarding ingress router, BFIR, or by a second intermediate BFR.
17. A method for generating forwarding entries, the method comprising:
receiving an identifier of the device and a bit forwarding router identifier (BFR-id) sent by the device, wherein the BFR-id is used for identifying a Bit Forwarding Exit Router (BFER) capable of communicating with the device, and the device is the BFER or a first intermediate Bit Forwarding Router (BFR) through which the BFER arrives;
and acquiring a forwarding table entry according to the identifier of the equipment and the BFR-id, wherein the index of the forwarding table entry corresponds to the BFR-id, and the forwarding table entry is used for directly acquiring the identifier of the equipment which is used as the next hop and is included in the forwarding table entry according to the index.
18. The method of claim 17, wherein the index is a sequence number corresponding to the BFR-id, and wherein the identification of the device corresponds to a sequence number.
19. The method according to claim 18, wherein the forwarding table entry further includes a first bit string, the first bit string has only 1bit set to 1, and an offset of the 1bit set in the first bit string corresponds to a sequence number included in the forwarding table entry where the first bit string is located.
20. The method of claim 18, wherein the forwarding entry contains N identifiers, wherein N is less than or equal to a value of a read bit width, wherein the N identifiers comprise identifiers of the device, and wherein an ordering of any identifier of the N identifiers in the forwarding entry corresponds to the sequence number.
21. The method according to claim 17, wherein the index is used to identify a row in which M identification sets are located, where M is an integer greater than or equal to 2, the M identification sets include an identification of the device, an identification set to which the identification of the device belongs corresponds to a data block to which the sequence number belongs, and an ordering of the identification of the device in the identification set to which the identification of the device belongs corresponds to the sequence number.
22. The method of any one of claims 18 to 20, further comprising:
obtaining the sequence number corresponding to the BFR-id according to the BFR-id;
and obtaining the forwarding table entry according to the serial number and the identifier of the equipment, wherein the index of the forwarding table entry is the serial number, and the next hop of the forwarding table entry is the identifier of the equipment.
23. The method of claim 19, further comprising:
obtaining the first bit string and the sequence number corresponding to the BFR-id according to the BFR-id;
and obtaining the forwarding table entry according to the sequence number, the first bit string and the identifier of the equipment, wherein the index of the forwarding table entry is the sequence number, the forwarding bit string mask F-BM of the forwarding table entry is the first bit string, and the next hop of the forwarding table entry is the identifier of the equipment.
24. The method of claim 20, further comprising:
obtaining the sequence number corresponding to the BFR-id according to the BFR-id;
and sequencing the serial number and the identifier of the equipment according to the reading bit width to obtain the forwarding table entry, wherein the row number of the forwarding table entry corresponds to a quotient of the serial number and the reading bit width, and the sequencing of the identifier of the equipment in the N identifiers included in the forwarding table entry corresponds to the serial number.
25. The method of claim 21, further comprising:
obtaining the sequence number corresponding to the BFR-id according to the BFR-id;
dividing the identifiers corresponding to the serial numbers according to the sequence of the serial numbers to obtain L identifier sets, wherein the L corresponds to the quotient of the maximum value of the serial numbers and a preset value, and the preset value is the number of bits included in the data block;
and dividing the L identification sets according to the mobile window, and combining the identification sets in the mobile window to obtain the forwarding table entries comprising the M identification sets.
26. The method of claim 25, wherein the maximum value of the sequence number is 256, the predetermined value is 8, the L is 32, and the M is 2.
27. Method according to any of claims 17 to 26, wherein said method is performed by a bit forwarding ingress router, BFIR, or by a second intermediate BFR.
28. A forwarding device, characterized in that the forwarding device comprises:
a receiving unit, configured to receive a bit index explicit copy BIER multicast packet, where the BIER multicast packet includes a first bit string, and a bit with a1 being included in the first bit string corresponds to a bit forwarding exit router BFER;
a determining unit, configured to determine an index of a forwarding entry according to a bit with a1 set in the first bit string, where the forwarding entry includes the index and an identifier of a device serving as a next hop;
and an obtaining unit, configured to directly obtain, according to the index, an identifier of the device, where the device is the BFER or a first middle-bit forwarding router BFR through which the device reaches the BFER.
29. The forwarding device of claim 28, wherein the index is a sequence number corresponding to a bit forwarding router identification, BFR-id, of the BFER, and wherein the identification of the device corresponds to a sequence number.
30. The forwarding device of claim 29, wherein the forwarding table entry further comprises a second bit string, the second bit string has only 1bit with 1bit being set to 1, and an offset of the bit with 1bit being set in the second bit string corresponds to a sequence number included in the forwarding table entry where the bit is located.
31. The forwarding device of claim 30,
the obtaining unit is specifically configured to obtain, according to the sequence number, the identifier of the device serving as the next hop, which is included in the forwarding table entry, without searching for the second bit string included in the forwarding table entry.
32. The forwarding device of claim 29, wherein the forwarding entry contains N identifiers, wherein N is less than or equal to a value of a read bit width, wherein the N identifiers comprise identifiers of the device, and wherein an order of any identifier in the forwarding entry corresponds to the sequence number.
33. The forwarding device of claim 32, wherein the obtaining unit is specifically configured to:
determining a row number according to the serial number and the reading bit width, wherein the row number corresponds to a quotient of the serial number and the reading bit width;
and acquiring the N identifiers included in the forwarding table entry corresponding to the row number.
34. The forwarding device of any one of claims 28 to 33, wherein the determining unit is specifically configured to:
acquiring the offset of the bit with 1in the first bit string;
and determining the index according to the offset, wherein the offset corresponds to the index.
35. The forwarding device of claim 28, wherein the index is used to identify a row in which M identification sets are located, where M is an integer greater than or equal to 2, the M identification sets include an identification of the device, an identification set to which the identification of the device belongs corresponds to a data block to which the sequence number belongs, and an ordering of the identification of the device in the identification set to which the identification of the device belongs corresponds to the sequence number.
36. The forwarding device of claim 35, wherein the determining unit is specifically configured to:
determining a data block to which a bit with a1 set in the first bit string belongs according to the first bit string and the reading bit width;
acquiring an identifier set corresponding to a data block to which a bit with a1 set in the first bit string belongs, wherein the M identifier sets comprise the identifier sets corresponding to the data block;
and determining the rows where the M identification sets are located according to the identification sets corresponding to the data blocks.
37. The forwarding device of claim 35 or 36, wherein the obtaining unit is specifically configured to:
and acquiring the identification of the equipment from the M identification sets included in the row corresponding to the index.
38. The forwarding device of any one of claims 29 through 34,
the receiving unit is further configured to receive the identifier of the device and the BFR-id sent by the device;
the obtaining unit is further configured to:
obtaining the sequence number corresponding to the BFR-id according to the BFR-id;
and obtaining the forwarding table entry according to the serial number and the identifier of the equipment, wherein the index of the forwarding table entry is the serial number, and the next hop of the forwarding table entry is the identifier of the equipment.
39. The forwarding device of claim 30 or 31,
the receiving unit is further configured to receive the identifier of the device and the BFR-id sent by the device;
the obtaining unit is further configured to:
obtaining the second bit string and the sequence number corresponding to the BFR-id according to the BFR-id;
and obtaining the forwarding table entry according to the serial number, the second bit string and the identifier of the equipment, wherein the index of the forwarding table entry is the serial number, the forwarding bit string mask F-BM of the forwarding table entry is the second bit string, and the next hop of the forwarding table entry is the identifier of the equipment.
40. The forwarding device of claim 32 or 33,
the receiving unit is further configured to receive the identifier of the device and the BFR-id sent by the device;
the obtaining unit is further configured to:
obtaining the sequence number corresponding to the BFR-id according to the BFR-id;
and sequencing the serial number and the identifier of the equipment according to the reading bit width to obtain the forwarding table entry, wherein the row number of the forwarding table entry corresponds to a quotient of the serial number and the reading bit width, and the sequencing of the identifier of the equipment in the N identifiers included in the forwarding table entry corresponds to the serial number.
41. The forwarding device of any one of claims 35 through 37,
the receiving unit is further configured to receive the identifier of the device and the BFR-id sent by the device;
the obtaining unit is further configured to:
obtaining the sequence number corresponding to the BFR-id according to the BFR-id;
dividing the identifiers corresponding to the serial numbers according to the sequence of the serial numbers to obtain L identifier sets, wherein the L corresponds to the quotient of the maximum value of the serial numbers and a preset value, and the preset value is the number of bits included in the data block;
and dividing the L identification sets according to the mobile window, and combining the identification sets in the mobile window to obtain the forwarding table entries comprising the M identification sets.
42. The forwarding device of claim 41, wherein the maximum value of the sequence number is 256, the preset value is 8, the L is 32, and the M is 2.
43. The forwarding device of any of claims 28 through 42, wherein the forwarding device is a Bit Forwarding Ingress Router (BFIR) or a second intermediate BFR.
44. An apparatus for generating forwarding entries, the apparatus comprising:
a receiving unit, configured to receive an identifier of the device and a bit forwarding router identifier BFR-id sent by a device, where the BFR-id is used to identify a bit forwarding exit router BFER capable of communicating with the device, and the device is the BFER or a first intermediate bit forwarding router BFR through which the BFER arrives;
and the obtaining unit is used for obtaining a forwarding table item according to the identifier of the equipment and the BFR-id, wherein the index of the forwarding table item corresponds to the BFR-id, and the forwarding table item is used for directly obtaining the identifier of the equipment which is used as the next hop and is included in the forwarding table item according to the index.
45. The apparatus of claim 44, wherein the index is a sequence number corresponding to the BFR-id, and wherein the identification of the device corresponds to a sequence number.
46. The apparatus of claim 45, wherein the forwarding table entry further comprises a first bit string, the first bit string has only 1bit set to 1, and an offset of the 1bit set in the first bit string corresponds to a sequence number included in the forwarding table entry where the first bit string is located.
47. The apparatus of claim 45, wherein the forwarding entry contains N identifiers, wherein N is less than or equal to a value of a read bit width, wherein the N identifiers comprise identifiers of the device, and wherein an ordering of any identifier of the N identifiers in the forwarding entry corresponds to the sequence number.
48. The apparatus of claim 44, wherein the index is configured to identify a row in which M identifier sets are located, where M is an integer greater than or equal to 2, and wherein the M identifier sets include identifiers of the devices, and wherein an identifier set to which the identifier of the device belongs corresponds to a data block to which the sequence number belongs, and wherein an ordering of the identifier of the device in the identifier set to which the identifier of the device belongs corresponds to the sequence number.
49. The apparatus according to any one of claims 44 to 47, wherein said obtaining unit is further configured to:
obtaining the sequence number corresponding to the BFR-id according to the BFR-id;
and obtaining the forwarding table entry according to the serial number and the identifier of the equipment, wherein the index of the forwarding table entry is the serial number, and the next hop of the forwarding table entry is the identifier of the equipment.
50. The apparatus of claim 46, wherein the obtaining unit is further configured to:
obtaining the first bit string and the sequence number corresponding to the BFR-id according to the BFR-id;
and obtaining the forwarding table entry according to the sequence number, the first bit string and the identifier of the equipment, wherein the index of the forwarding table entry is the sequence number, the forwarding bit string mask F-BM of the forwarding table entry is the first bit string, and the next hop of the forwarding table entry is the identifier of the equipment.
51. The apparatus of claim 47, wherein the obtaining unit is further configured to:
obtaining the sequence number corresponding to the BFR-id according to the BFR-id;
and sequencing the serial number and the identifier of the equipment according to the reading bit width to obtain the forwarding table entry, wherein the row number of the forwarding table entry corresponds to a quotient of the serial number and the reading bit width, and the sequencing of the identifier of the equipment in the N identifiers included in the forwarding table entry corresponds to the serial number.
52. The apparatus of claim 48, wherein the obtaining unit is further configured to:
obtaining the sequence number corresponding to the BFR-id according to the BFR-id;
dividing the identifiers corresponding to the serial numbers according to the sequence of the serial numbers to obtain L identifier sets, wherein the L corresponds to the quotient of the maximum value of the serial numbers and a preset value, and the preset value is the number of bits included in the data block;
and dividing the L identification sets according to the mobile window, and combining the identification sets in the mobile window to obtain the forwarding table entries comprising the M identification sets.
53. The apparatus of claim 52, wherein the maximum value of the sequence number is 256, the predetermined value is 8, the L is 32, and the M is 2.
54. The apparatus according to any of claims 44 to 53, wherein said apparatus is a location forwarding ingress router, BFIR, or a second intermediate BFR.
55. A system, characterized in that the system comprises a forwarding device according to any one of claims 28 to 43, or an apparatus according to any one of claims 44 to 54.
56. A chip, comprising a memory for storing computer instructions and a processor for calling and executing the computer instructions from the memory to perform the method of retrieving a next hop of any of claims 1 to 16 or to perform the method of generating a forwarding entry of any of claims 17 to 27.
57. A computer program product comprising one or more computer program instructions which, when loaded and executed by a computer, cause the computer to perform the method of acquiring a next hop of any one of claims 1 to 16 or to perform the method of generating a forwarding entry of any one of claims 17 to 27.
58. A computer-readable storage medium, for storing instructions, wherein the instructions include a program designed to execute the method for acquiring a next hop according to any one of claims 1 to 16, or the instructions include a program designed to execute the method for generating a forwarding entry according to any one of claims 17 to 27.
59. A forwarding device comprising a processor and a non-transitory computer readable storage medium storing program instructions for execution by the processor, the program instructions instructing the processor to perform the method of acquiring a next hop of any of claims 1 to 16.
60. An apparatus for generating a forwarding entry, the apparatus comprising a processor and a non-transitory computer readable storage medium storing program instructions for execution by the processor, the program instructions instructing the processor to perform the method of generating a forwarding entry of any of claims 17 to 27.
CN202011273084.8A 2020-09-11 2020-11-13 Method for acquiring next hop, method and device for generating forwarding table entry Pending CN114257539A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/111632 WO2022052709A1 (en) 2020-09-11 2021-08-09 Method for obtaining next hop, and method and apparatus for generating forwarding-table entry

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010956283 2020-09-11
CN2020109562832 2020-09-11

Publications (1)

Publication Number Publication Date
CN114257539A true CN114257539A (en) 2022-03-29

Family

ID=80789518

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011273084.8A Pending CN114257539A (en) 2020-09-11 2020-11-13 Method for acquiring next hop, method and device for generating forwarding table entry

Country Status (1)

Country Link
CN (1) CN114257539A (en)

Similar Documents

Publication Publication Date Title
US10778576B2 (en) System and method for providing a bit indexed service chain
EP3429143B1 (en) Packet forwarding method and apparatus
US9338079B2 (en) Method of routing multicast traffic
US9705799B2 (en) Server-side load balancing using parent-child link aggregation groups
US7650429B2 (en) Preventing aliasing of compressed keys across multiple hash tables
CN108768866B (en) Cross-card forwarding method and device for multicast message, network equipment and readable storage medium
EP3442178B1 (en) Route searching method and apparatus
US20180241608A1 (en) Forwarding ethernet packets
US10212069B2 (en) Forwarding of multicast packets in a network
EP4102783A1 (en) Method, device and system for sending message
CN112134776B (en) Method for generating multicast forwarding table item and access gateway
EP3327993A1 (en) Route management
CN107547407A (en) Message transmitting method, device and realization device
US20090028069A1 (en) Method and system for network data transmitting
CN111131050A (en) Flow table matching method and device
EP3072265B1 (en) Filtering at lower network protocol layers
CN116527559B (en) Message forwarding processing and sending method, device, equipment and medium for network slice
EP4068705A1 (en) Packet transmission method and apparatus and storage medium
CN112887209B (en) Entry establishment method and related equipment for data transmission
CN111464443B (en) Message forwarding method, device, equipment and storage medium based on service function chain
CN112532563B (en) Message sending method and device
WO2022052709A1 (en) Method for obtaining next hop, and method and apparatus for generating forwarding-table entry
CN114257539A (en) Method for acquiring next hop, method and device for generating forwarding table entry
CN109327407B (en) data exchange device, data exchange method, computer device, and storage medium
JP5035410B2 (en) Address search method and packet processing apparatus

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