WO2022052709A1 - Method for obtaining next hop, and method and apparatus for generating forwarding-table entry - Google Patents

Method for obtaining next hop, and method and apparatus for generating forwarding-table entry Download PDF

Info

Publication number
WO2022052709A1
WO2022052709A1 PCT/CN2021/111632 CN2021111632W WO2022052709A1 WO 2022052709 A1 WO2022052709 A1 WO 2022052709A1 CN 2021111632 W CN2021111632 W CN 2021111632W WO 2022052709 A1 WO2022052709 A1 WO 2022052709A1
Authority
WO
WIPO (PCT)
Prior art keywords
forwarding
bit
bfr
identifier
table entry
Prior art date
Application number
PCT/CN2021/111632
Other languages
French (fr)
Chinese (zh)
Inventor
田太徐
夏阳
李吉
李东锋
谢经荣
Original Assignee
华为技术有限公司
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
Priority claimed from CN202011273084.8A external-priority patent/CN114257539A/en
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022052709A1 publication Critical patent/WO2022052709A1/en

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/16Multipoint routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/34Flow control; Congestion control ensuring sequence integrity, e.g. using sequence numbers

Definitions

  • the present application relates to the field of communication technologies, and in particular, to a method for acquiring a next hop, a method and an apparatus for generating a forwarding entry.
  • the bit forwarding ingress router (BFIR) or the intermediate BIER forwarding router (transit bit forwarding router, transit BFR) forwards BIER multicast packets when forwarding
  • the BFR neighbor (BFR neighbor, BFR-NBR) as the next hop can be determined according to the bit string (bit string) carried in the BIER multicast message and the configured bit index forwarding table (BIFT).
  • the BFIR takes the offset of the bit in the bit string that is set to 1 in the bit string included in the received first BIER multicast packet as the sequence number (sequence number, SN), and obtains the BIFT entry (entry ).
  • the forwarding bitmask (F-BM) included in the BIFT entry is ANDed with the bit string included in the first BIER multicast packet to obtain the updated bit string.
  • BFIR replaces the bit string included in the first BIER multicast packet with the updated bit string to obtain the second BIER multicast packet.
  • the BFIR sends the second BIER multicast packet to the BFR neighbors included in the BIFT entry.
  • an entry in BIFT includes the F-BM field occupying 256 bits (bit) and the F-BM field occupying 8 bits.
  • BFR neighbor field When the number of BFR neighbors is large, BFIR or intermediate BFR needs to read at least 256 bits of data in the F-BM field from memory for each copy of a message. For example, to copy 10 messages, at least 2560 bits of data need to be read. , the performance requirements of the forwarding hardware are relatively high, and the performance of the existing forwarding hardware cannot support the BIER forwarding scenario with a BSL of 512 or 1024.
  • Embodiments of the present application provide a method for acquiring a next hop, a method and an apparatus for generating a forwarding entry, which can reduce performance requirements on forwarding hardware and improve forwarding efficiency.
  • a method for obtaining a next hop comprising: receiving a BIER multicast message, where the BIER multicast message includes a first bit string, and the first bit string includes a set The bit bit of 1 corresponds to the bit forwarding egress router (BFER); the index of the forwarding table entry is determined according to the bit set to 1 in the first bit string, and the forwarding table entry includes the index and the The identifier of the device of the next hop; the identifier of the device is directly obtained according to the index, and the device is the BFER or the first intermediate BFR through which the BFER is reached.
  • BFER bit forwarding egress router
  • the identification of the corresponding device is directly obtained according to the index of the forwarding entry, without the need to look up the bit string in the F-BM in the usual BIFT entry, which helps to reduce the performance requirements for the forwarding hardware and improve the forwarding efficiency.
  • the index is a serial number corresponding to the bit forwarding router identifier BFR-id of the BFER, and the identifier of the device corresponds to a serial number.
  • the above forwarding entry can support forwarding behavior in a network scenario where the BSL is 512bit or 1024bit, which can further improve scalability.
  • the forwarding table entry further includes a second bit string, the second bit string has and only 1 bit is set to 1, and the second bit string is set to 1
  • the offset of the bit in the second bit string corresponds to the sequence number included in the forwarding entry where it is located.
  • the directly obtaining the identifier of the device according to the index includes: obtaining the identifier of the device as the next hop included in the forwarding entry according to the serial number, without searching The second bit string included in the forwarding entry. Since the F-BM does not need to be read, the device identifier can be directly determined according to the index, which can further improve the forwarding efficiency.
  • the forwarding table entry includes N identifiers, the N is less than or equal to a value of the read bit width, the N identifiers include the device identifier, and the N identifiers include The order of any identifier of , in the forwarding entry corresponds to the sequence number.
  • the directly obtaining the identifier of the device according to the index includes: determining a line number according to the serial number and the read bit width, where the line number corresponds to the serial number and the read bit width. The quotient of the bit width; obtain the N identifiers included in the forwarding entry corresponding to the line number.
  • the above forwarding table entry does not need to store the usual F-BM, which can save storage space and reduce the high-performance requirement for forwarding hardware when reading the F-BM.
  • using the above forwarding entry can support forwarding behavior in a network scenario where the BSL is 512bit or 1024bit, which can further improve scalability.
  • the determining the index of the forwarding table entry according to the bit set to 1 in the first bit string includes: obtaining the bit set to 1 in the first bit string in the first bit string.
  • the offset in the bit string; the index is determined according to the offset, and the offset corresponds to the index.
  • the index is used to identify the row where M identification sets are located, where M is an integer greater than or equal to 2, the M identification sets include the identification of the device, the device The identity set to which the identity of the device belongs corresponds to the data block to which the serial number belongs, and the order of the identity of the device in the identity set to which it belongs corresponds to the serial number.
  • the above forwarding table entry does not need to store the usual F-BM, which can save storage space and reduce the high-performance requirement for forwarding hardware when reading the F-BM.
  • using the above forwarding entry can support forwarding behavior in a network scenario where the BSL is 512bit or 1024bit, which can further improve scalability.
  • the determining the index of the forwarding table entry according to the bit set to 1 in the first bit string includes: determining the first bit string and the read bit width according to the first bit string.
  • the identification set is determined; according to the identification set corresponding to the data block, the row where the M identification sets are located is determined.
  • directly obtaining the identification of the device according to the index includes: obtaining the identification of the device from the M identification sets included in the index.
  • the method further includes: receiving the device identifier and the BFR-id sent by the device; obtaining the corresponding serial number according to the BFR-id; The serial number and the identifier of the device are obtained, and the forwarding table entry is obtained, 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 device.
  • the method further includes: receiving the device identifier and the BFR-id sent by the device; obtaining the second bit string and the BFR-id according to the BFR-id The serial number corresponding to the BFR-id; according to the serial number, the second bit string and the device identifier, the forwarding table entry is obtained, the index of the forwarding table entry is the serial number, and the The F-BM of the forwarding table entry is the second bit string, and the next hop of the forwarding table entry of the forwarding table entry is the identifier of the device.
  • the method further includes: receiving the device identifier and the BFR-id sent by the device; obtaining the corresponding serial number according to the BFR-id; The read bit width, sort the serial number and the device identifier to obtain the forwarding table entry, where the line number of the forwarding table entry corresponds to the quotient of the serial number and the read bit width , the order of the identifiers of the devices included in the forwarding entry in the N identifiers corresponds to the sequence number.
  • the method further includes: receiving the device identifier and the BFR-id sent by the device; obtaining the corresponding sequence number according to the BFR-id; Sorting of the serial numbers, dividing the identifiers corresponding to the serial numbers to obtain L identifier sets, where 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 ; Divide the L identification sets according to the moving window, and combine the identification sets in the moving window to obtain the forwarding entry including the M identification sets.
  • 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 above-mentioned first aspect may be performed by the BFIR or by the second intermediate BFR.
  • a method for generating a forwarding entry comprising: receiving an identifier of the device and a BFR-id sent by a device, where the BFR-id is used to identify a BFER capable of communicating with the device, The device is the BFER or the first BFR passed through to the BFER; according to the device identifier and the BFR-id, a forwarding entry is obtained, and the index of the forwarding entry corresponds to the BFR-id , the forwarding table entry is used to directly obtain, according to the index, the identifier of the device as the next hop included in the forwarding table entry.
  • the index is a serial number corresponding to the BFR-id, and the device identifier corresponds to a serial number.
  • the forwarding table entry further includes a first bit string, the first bit string has and only 1 bit is set to 1, and the first bit string is set to 1
  • the offset of the bit in the first bit string corresponds to the sequence number included in the forwarding entry where it is located.
  • the forwarding table entry includes N identifiers, the N is less than or equal to a value of the read bit width, the N identifiers include the device identifier, and the N identifiers include The order of any identifier of , in the forwarding entry corresponds to the sequence number.
  • the index is used to identify the row where M identification sets are located, where M is an integer greater than or equal to 2, the M identification sets include the identification of the device, the device The identity set to which the identity of the device belongs corresponds to the data block to which the serial number belongs, and the order of the identity of the device in the identity set to which it belongs corresponds to the serial number.
  • the method further includes: obtaining the corresponding serial number according to the BFR-id; obtaining the forwarding entry according to the serial number and the identifier of the device.
  • the index of the forwarding entry is the sequence number, and the next hop of the forwarding entry is the identifier of the device.
  • the method further includes: obtaining the first bit string and the sequence number corresponding to the BFR-id according to the BFR-id; The first bit string and the identifier of the device, obtain the forwarding table entry, the index of the forwarding table entry is the serial number, the F-BM of the forwarding table entry is the first bit string, the The next hop of the forwarding entry of the forwarding entry is the identifier of the device.
  • the method further includes: obtaining the corresponding serial number according to the BFR-id; Sort, obtain the forwarding table entry, the line number where the forwarding table entry is located corresponds to the quotient of the serial number and the read bit width, and the identifier of the device included in the forwarding table entry is in the N The ordering in the identification corresponds to the sequence number.
  • the method further includes: obtaining the corresponding serial number according to the BFR-id; dividing the identifiers corresponding to the serial numbers according to the ordering of the serial numbers to obtain L identifiers set, the quotient of the maximum value of the corresponding sequence number and the preset value of the L, and the preset value is the number of bits included in the data block; according to the moving window, the L identification sets are divided, and the numbers in the moving window are divided.
  • the identification sets are combined to obtain the forwarding entry including the M identification sets.
  • 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 above may be performed by the BFIR or by the second intermediate BFR.
  • a forwarding device in a third aspect, includes a unit for implementing the functions corresponding to the steps included in the method provided in the above-mentioned first aspect or possible implementation manners of the first aspect.
  • an apparatus for generating a forwarding table entry includes a unit for implementing the functions corresponding to the steps included in the method provided in the above-mentioned second aspect or possible implementation manners of the second aspect.
  • a fifth aspect provides a system, where the system includes the forwarding device provided in the third aspect, or the system includes the apparatus for generating a forwarding entry provided in the fourth aspect.
  • a chip in a sixth aspect, includes a memory and a processor, the memory is used to store computer instructions, and the processor is used to call and execute the computer instructions from the memory to execute the first aspect. Or the method for obtaining the next hop provided by the possible implementation manner of the first aspect, or the method for generating a forwarding entry provided by executing the second aspect or the possible implementation manner of the second aspect.
  • 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 first aspect or the first aspect
  • the method for obtaining the next hop provided by the following possible implementation manners, or the method for generating a forwarding table entry provided by the second aspect or the possible implementation manners of the second aspect is performed.
  • a computer-readable storage medium is provided, the computer-readable storage medium is used to store instructions, and the instructions include an acquisition method for executing the first aspect or a possible implementation manner of the first aspect.
  • a program designed by the one-hop method, or the instruction includes a program designed for executing the second aspect or the method for generating a forwarding entry provided by a possible implementation manner of the second aspect.
  • 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 execute a first The method for obtaining the next hop provided by the aspect or possible implementation manners under the first aspect.
  • a tenth aspect provides an apparatus for generating a forwarding entry, characterized in that the apparatus includes a processor and a non-transitory computer-readable storage medium storing program instructions for execution by the processor, the program instructions indicating The processor executes the method for generating a forwarding entry provided in the second aspect or possible implementation manners of the second aspect.
  • FIG. 1 is a schematic diagram of a BIER network scenario.
  • FIG. 2 is a schematic diagram of a BIER network scenario provided by an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of a method for obtaining a forwarding entry according to Embodiment 1 of the present application.
  • FIG. 4 is a schematic flowchart of a method for forwarding a multicast packet according to Embodiment 2 of the present application.
  • FIG. 5 is a schematic diagram of another BIER network scenario provided by an embodiment of the present application.
  • FIG. 6 is a schematic flowchart of a method for obtaining a forwarding entry according to Embodiment 3 of the present application.
  • FIG. 7 is a schematic diagram of the format of the forwarding multicast packet according to Embodiment 4 of the present application.
  • FIG. 8 is a schematic diagram of a format of a BIER multicast message provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of a format of another BIER multicast packet provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of the format of another BIER multicast packet provided by an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of a forwarding device provided by 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 another schematic structural diagram of a forwarding device provided by an embodiment of the present application.
  • FIG. 14 is another schematic structural diagram of an apparatus for generating a forwarding entry provided by an embodiment of the present application.
  • the device 101 is connected to the multicast receiver 1 .
  • Device 102 connects to multicast receiver 2.
  • Device 103 is connected to multicast receiver 3 .
  • Device 104 is connected to multicast receiver 4 .
  • Device 255 receives multicast recipient 5.
  • Device 256 receives multicast recipient 6 .
  • Device 101 is connected to device 105 , and device 105 is connected to device 109 .
  • Device 102 and device 103 are connected to device 106 , and device 106 is connected to device 109 .
  • Device 104 is connected to device 107 , and device 107 is connected to device 109 .
  • Device 255 and device 256 are connected to device 108 , and device 108 is connected to device 109 .
  • Device 109 is connected to device 110, and device 110 is connected to a multicast source.
  • 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 is assigned a BFR-id of 1.
  • Device 102 is assigned a BFR-id of 2.
  • Device 103 is assigned a BFR-id of 3.
  • Device 104 is assigned a BFR-id of 4.
  • Device 255 is assigned a BFR-id of 255.
  • Device 256 is assigned a BFR-id of 256.
  • the above-mentioned device 101, device 102, device 103, device 104, device 255, and device 256 belong to the sub-domain (sub-domain, SD) of the same BIER, and the set identifier (set identifier, SI) is the same, for example, SI can be 0.
  • multicast receiver 2 and multicast receiver 6 need to receive multicast packets from the multicast source.
  • a BFER device such as device 101, device 102, device 103, device 104, device 255, and device 256 in FIG. 1
  • IGP Interior Gateway Protocol
  • device 102 publishes its own BFR-id and address to device 106.
  • device 103 publishes its own BFR-id and device identification (may be denoted as a102 ) to device 106 .
  • the above-mentioned device identification may be information such as address or name.
  • Device 106 generates BIFT entries, as shown in Table 1-1 below.
  • each BIFT entry in Table 1-1 includes a sequence number (sequence number, SN), F-BM and BFR-NBR.
  • the ellipsis indicates that the omitted 252 entries whose SN is 4 to 255 are empty.
  • the above-mentioned empty table entry may be the representation of the table entry whose SN is 256 in Table 1-1.
  • the SN included in any entry in Table 1-1 is a value corresponding to the BFR-id. For example, an SN of 1 indicates that the BFR-id is 1, and an SN of 3 indicates that the BFR-id is 3.
  • the bit string in the F-BM included in any entry in Table 1-1 includes a bit set to 1, and the offset of the bit set to 1 in the bit string corresponds to the BFR-id of the BFER.
  • the BFR-NBR included in any entry in Table 1-1 indicates the next hop to reach the BFER corresponding to the bit string in the F-BM, and the next hop can be a BFER or an intermediate BFR.
  • a102 can be the device identifier of device 102, that is, an entry with SN of 2 indicates that the next hop to BFER (device 102) with BFR-id of 2 identified by 0000...0000000000000000000000000010 is a102 The identified device (device 102).
  • a103 can be the device identifier of device 103, that is, the entry with SN of 3 indicates that the next hop to the BFER (device 103) with BFR-id 3 identified by 0000...00000000000000000000100 is identified by a103 device (device 103).
  • Device 255 publishes its own BFR-id and device identification (may be denoted a255) to device 108.
  • Device 256 publishes its own BFR-id and device identification (may be denoted a256) to device 108.
  • Device 108 generates BIFT entries as shown in Table 1-2 below.
  • ellipses indicate the omitted 252 empty entries with SN 3 to SN 254.
  • the above-mentioned empty table entry may be an expression form of the table entry whose SN is 1 in Table 1-2.
  • the meanings of the SNs in Table 1-2 are the same as those of the SNs in Table 1-1.
  • the meaning of F-BM of Table 1-2 is the same as that of F-BM of Table 1-1.
  • the BFR-NBR in Table 1-2 has the same meaning as the BFR-NBR in Table 1-1.
  • a255 can be the device ID of device 255, that is, the entry with SN of 255 indicates that the next hop to the BFER (device 255) with the BFR-id of 255 identified by 0100...000000000000000000000000000 is a255 The identified device (device 255).
  • a256 can be the device identifier of device 256, that is, the entry with SN of 256 indicates that the next hop to the BFER (device 256) with BFR-id of 256 identified by 1000...000000000000000000000000000 is identified by a256 device (device 256).
  • Device 105 sends device 109 the device identification of device 105 and the BFR-id of device 101 .
  • the device ID of device 105 is a105.
  • Device 107 sends device 109 the device identification of device 107 and the BFR-id of device 104 .
  • the device ID of device 107 is a107.
  • Device 106 sends device 109 the device identity of device 106 , the BFR-id of device 102 , and the BFR-id of device 103 .
  • the device ID of device 106 is a106.
  • Device 108 sends device 109 the device identification of device 108, the BFR-id of device 255, and the BFR-id of device 256.
  • the device ID of device 108 is a108.
  • the device 109 generates BIFT entries according to the parameters obtained through IGP flooding, as shown in Table 1-3 below.
  • ellipses indicate the omitted 250 empty entries whose SN is 5 to 254.
  • the above-mentioned empty table entry may be the representation of the table entry whose SN is 256 in Table 1-1.
  • the meanings of SNs in Table 1-3 are the same as those of SNs in Table 1-1.
  • the meaning of F-BM of Table 1-3 is the same as that of F-BM of Table 1-1.
  • the BFR-NBR in Table 1-3 has the same meaning as the BFR-NBR in Table 1-1.
  • a105 is the device identifier of device 105, that is, the entry with SN of 1 indicates that the next hop to the BFER (device 101) with the BFR-id of 1 identified by 0000...00000000000000000000001 is the a105 identifier device (device 105).
  • a106 is the device ID of the device 106, that is, the entry with the SN of 2 indicates that the next hop to the BFER (device 102) with the BFR-id of 2 identified by 0000...000000000000000000000000110 is the device identified by a106 (device 106).
  • a106 is the device ID of device 106, that is, the entry with SN of 3 indicates that the next hop to the BFER (device 103) with BFR-id 3 identified by 0000...00000000000000000000000110 is the device identified by a106 (device 106).
  • a107 is the device ID of device 107, that is, the entry with SN of 4 indicates that the next hop to the BFER (device 104) with the BFR-id of 4 identified by 0000...00000000000000000000001000 is the device identified by a107 (device 107).
  • a108 is the device ID of device 108, that is, the entry with SN of 255 indicates that the next hop to the BFER (device 255) identified by 1100... (device 108).
  • a108 is the device ID of device 108, that is, the entry with SN of 256 indicates that the next hop to the BFER (device 256) identified by 1100...0000000000000000000000000000000000000000000000000000000000 with BFR-id of 256 (device 256) is the device identified by a108 (device 108).
  • the reason that the bit strings included in the F-BM are the same is that the device 106 feeds back to the device 109 that it can communicate with the BFERs whose BFR-ids are 2 and 3, that is, the bit strings are both 0000 ...0000000000000000000000000110.
  • the F-BM included in the entry whose SN is 255 is the same as the F-BM included in the entry whose SN is 256.
  • Device 109 may identify its own device identity (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 BIFT entries according to the above parameters, as shown in the following Tables 1-4.
  • ellipses indicate the omitted 250 empty entries from SN 5 to SN 254.
  • a value of 0 in the column of BFR-NBR included in Table 1-1 to Table 1-4 above indicates that there is no next hop or the next hop is empty.
  • ... in the column of BFR-NBR indicates that there is no next hop or the next hop is empty.
  • the above-mentioned empty table entry may be the representation of the table entry whose SN is 256 in Table 1-1.
  • the meanings of SNs in Table 1-4 are the same as those of SNs in Table 1-1.
  • the meaning of F-BM of Table 1-4 is the same as that of F-BM of Table 1-1.
  • the BFR-NBR in Table 1-4 has the same meaning as the BFR-NBR in Table 1-1.
  • the reason why the bit string included in the F-BM is the same is that the device 109 feeds back to the device 1110 that it can match the BFR-id of 1, 2, 3, 4 , 255 and 256 BFER communication, that is, the bit strings are all 1100...000000000000000000001111.
  • the entries whose SNs are 1, 2, 3, 4, 255, and 256 have the same next hop, that is, the device identified by a109 (device 109).
  • the device 110 acting as a BFIR receives a multicast packet containing (S, G) from a multicast source.
  • Device 110 determines the BFERs (device 102 and device 256 ) respectively connected to multicast receiver 2 and multicast receiver 6 according to (S, G) in the multicast message.
  • the device 110 obtains a bit string with a value of 1000 .
  • the device 110 encapsulates the BIER header in 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 with a value of 1000...00000000000000000000000000000010.
  • the device 110 uses the offset in the bit string of the first bit set to 1 in the bit string from right to left as the SN lookup table 1-4 , to obtain an entry with an SN of 2.
  • the device 110 performs an AND operation between 1100...0000000000000000000000000001111 in the entry with the SN of 2 and the bit string included in the first BIER multicast packet with a value of 1000...0000000000000000000000000010, and the result of the AND operation is the same as the bit string in the first BIER multicast packet. String is the same, no bit string replacement is performed.
  • 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 the SN of 2).
  • the device 110 performs a negation operation on 1100...000000000000000000000001111 in the entry whose SN is 2, and obtains 0011...1111111111111111111111110000.
  • the device 110 performs an AND operation on the result obtained by the inversion operation with the bit string whose value is 1000...00000000000000000000000010 in the first BIER multicast message, and the result is all 0, and the query ends.
  • the device 109 can use the bit string in the first BIER multicast packet whose value is 1000...000000000000000000000010 in the right-to-left direction.
  • the offset (the offset is 2) is used as the SN to look up Table 1-3, and the SN is 2 entry.
  • the device 109 can perform an AND operation between 0000...0000000000000000000000000110 in the entry whose SN is 2 and the bit string whose value is 1000...000000000000000000000000000000 in the first BIER multicast packet to obtain 0000...00000000000000.
  • the device 109 replaces the bit string with the value of 1000...0000000000000000000000000010 in the first BIER multicast packet with the result obtained by the AND operation, and obtains the second BIER packet, and the second BIER packet includes the bit string with the value of 0000...0000000000000000000000000010.
  • the device 109 sends the second BIER message to the device (device 106 ) identified by the BFR-NBR whose SN is 2 in Table 1-3.
  • the device 109 may perform a negation operation on 0000...0000000000000000000000000011 included in the entry whose SN is 2 in Table 1-3 to obtain 1111...11111111111111111111111111001.
  • the device 109 performs an AND operation on the result obtained by the inversion operation with the bit string whose value is 1000...000000000000000000000000010 in the first BIER multicast packet, and obtains 1000...000000000000000000000000000.
  • the device 109 uses the AND operation to obtain the offset of the first bit set to 1 in the bit string (the offset is 256) in the direction from right to left in 1000...000000000000000000000000, as the SN lookup table 1-3, Obtain the entry whose SN is 256.
  • Equipment 109 can perform Bit String, 1100 ...
  • the device 109 replaces the bit string with a value of 1000...0000000000000000000000000010 in the first BIER multicast packet with the result obtained by the AND operation to obtain a third BIER packet.
  • the bit string included in the third BIER message is 1000...0000000000000000000000000000000.
  • the device 109 may send the third BIER message to the BFR-NBR (the device identified by a108 ) included in the entry whose SN is 256 in Table 1-3, that is, the device 108 .
  • the device 106 can look up Table 1-1 according to the bit string in the received second BIER multicast message according to the method adopted by the above-mentioned device 109, and send the second BIER multicast message to the device 102.
  • the device 108 can look up Table 1-2 according to the bit string in the received third BIER multicast message according to the method adopted by the above-mentioned device 109, and send the third BIER multicast message to the device 256.
  • each BIFT entry in BIFT occupies 256 bits of F-BM and 8 bits of BFR-NBR.
  • the forwarding device needs to read at least 256 bits from the memory each time it copies a BIER multicast packet.
  • each forwarding device needs to It can copy up to 256 packets), and needs to read 64k bits from the memory.
  • the performance requirements of the forwarding hardware are extremely high, and the forwarding efficiency is low, and the usual forwarding hardware cannot support the entry reading operation with a memory footprint larger than 256 bits.
  • the method for obtaining BIFT by any device in the BIER network scenario shown in FIG. 1 and the content of the BIFT are the same as those mentioned in the above implementation manner, and the table lookup forwarding operation is different from the above implementation manner .
  • the related description is made by taking the forwarding of the first BIER multicast packet by the device 109 as an example.
  • the first BIER multicast packet includes a bit string with a value of 1000...0000000000000000000000000000010.
  • Device 109 traverses Tables 1-3 starting with SN of 1.
  • Device 109 uses the first Bier multicast "10000 ... 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, getting all 0, not packet replication.
  • Equipment 109 Refueling 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
  • the device 109 replaces the bit string in the first BIER multicast packet with the result obtained by the AND operation to obtain the second BIER multicast packet.
  • the second BIER multicast packet includes 0000...0000000000000000000000000001.
  • the device 109 sends the second BIER multicast packet to the device (device 106 ) identified by the BFR-NBR in the entry whose SN is 2.
  • the device 109 can use a method similar to the above to traverse to the entry with the SN of 256, and obtain the third BIER multicast packet according to the entry with the SN of 256, and send it to the device 256.
  • the third BIER multicast packet includes 1000...0000000000000000000000000000.
  • each time a device in a BIER network scenario forwards a BIER multicast packet it needs to traverse all BIFT entries in BIFT, and not all BIFT entries can complete the replication and replication of BIER multicast packets.
  • Forwarding for example, perform AND operation between the bit string in the BIER multicast packet and the bit string in the F-BM in the BIFT entry.
  • the BIFT entry with the result of 0 cannot be used to guide the forwarding of the BIER multicast packet, which will exist in memory. The waste of bandwidth and read operations places high demands on the performance of the forwarding hardware.
  • this implementation still has the problems existing in the previous implementation.
  • an embodiment of the present application provides a method for obtaining the next hop.
  • a first BIER multicast packet is received, and the first BIER multicast packet includes a first bit string , the bit that is set to 1 included in the first bit string corresponds to the BFER; the index of the forwarding table entry is determined according to the bit that is set to 1 in the first bit string, and the forwarding table entry includes the index and the The identifier of the device of the next hop; the identifier of the device is directly obtained according to the index, and the device is the BFER or the first BFR through which the BFER is reached.
  • the identification of the device can be directly obtained according to the index, without performing the usual operation of finding the F-BM in the BIFT table entry, eliminating the hardware resources consumed by the operation of reading the F-BM, and reducing the need for Performance requirements of forwarding hardware to improve forwarding efficiency.
  • FIG. 2 is a schematic diagram of a BIER network scenario provided by 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 210 in the BIER network scenario shown in FIG. 2 is connected to the multicast source.
  • Device 210 is a BFIR. The description is given by taking the example that the multicast receiver 2 and the multicast receiver 6 need to receive the multicast packets of the multicast source.
  • the device in the BIER network scenario shown in FIG. 2 can forward the BIER multicast message by using the method provided in this embodiment of the present application, which is not repeated here.
  • Device 205, Device 206, Device 207, Device 208, and Device 209 are intermediate BFRs.
  • Device 205 is connected to device 101 and device 209, respectively.
  • Device 206 is connected to device 102, device 103 and device 209, respectively.
  • Device 207 is connected to 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 subdomain, such as the BIER subdomain to which each device belongs. The flags are all 0.
  • the BFR-IDs that are valid in the BIER subdomain mentioned in the embodiments of this application refer to BFR-ids with a value other than 0.
  • the BFR-ids assigned to the device 101, device 102, device 103, device 104, device 255, and device 256 serving as BFERs are the same as the BFR-ids configured in the BIER scenario shown in FIG. 1, and are not repeated here.
  • the BIER network scenario shown in FIG. 2 is for a network scenario with a BSL of 256 bits, and the set identifier (SI) of device 101, device 102, device 103, device 104, device 255, and device 256 are all 0.
  • SI set identifier
  • the above BSL represents the length of the bit string, and each bit set to 1 in the bit string corresponds to the SI and BFR-id to which the bit string belongs, that is, the length of the BSL determines the length of the BFR-id that a bit string can identify. Scope.
  • the value of the BFR-id exceeds the range of the BFR-id that can be identified by the bit string of BSL length, the BFR-id needs to be effectively distinguished and identified by the SI and the bit string.
  • the value of BFR-id is greater than 256, the BFER in the BIER subdomain can be effectively distinguished by setting the value of SI and the bit string whose BSL is 256 bits.
  • the BFR-id of the device can be set as 1 and a bit string with the value 0001 to indicate that the BFR-id is 257.
  • the BFER can be distinguished by extending the length of the bit string, for example, the BSL is 512bit or 1024bit to distinguish the BFER in the BIER subfield.
  • FIG. 3 is a schematic flowchart of a method for obtaining a forwarding entry according to Embodiment 1 of the present application.
  • the embodiment corresponding to FIG. 3 is for a scenario in which multicast receiver 2 and multicast receiver 6 receive multicast packets from the multicast source.
  • the BFIR in FIG. 3 and the corresponding embodiment may be the one shown in FIG. 2 .
  • the intermediate BFR in FIG. 3 and corresponding embodiments may be the device 209 , the device 206 or the device 208 in the BIER network scenario shown in FIG. 2 .
  • the BFER in FIG. 3 and corresponding embodiments may be the device 102 or the device 256 in the BIER network scenario shown in FIG. 2 .
  • the method for obtaining a forwarding entry provided by this embodiment of the present application will be described below with reference to FIG. 2 and FIG. 3 .
  • BFER publishes its own BFR-id and device identifier through IGP.
  • the device identifier in the first embodiment may be information that can be routed to the device, such as an address or a name.
  • BFER publishes its own BFR-id and device ID through IGP flooding.
  • the device 101 floods the BFR-id with a value of 1 and the device identifier of the device 101 (which can be represented as a101 ) through the IGP.
  • the device 102 floods the BFR-id with a value of 2 and the device identity of the device 102 (may be denoted as a102 ) through the IGP.
  • the device 103 floods the BFR-id with a value of 3 and the device ID of the device 103 (may be represented as a103 ) through the IGP.
  • the device 104 floods the BFR-id with a value of 4 and the device identification of the device 104 (may be denoted as a104 ) through the IGP.
  • the device 255 floods the BFR-id with a value of 255 and the device ID of the device 255 (may be denoted as a255) through the IGP.
  • Device 256 floods the BFR-id with a value of 256 and the device ID of device 103 (may be denoted as a256) through the IGP.
  • the above-mentioned device serving as the BFER may publish the above-mentioned parameters through the usual IGP flooding manner, and the specific implementation details of the IGP flooding in this embodiment of the present application will not be repeated.
  • the intermediate BFR publishes its own device identifier and the BFR-id of the BFER through the IGP.
  • the intermediate BFR obtains the BFR-id of the BFER through IGP flooding.
  • the intermediate BFR publishes its own device address and the acquired BFR-id of the BFER.
  • the device 205 obtains a BFR-id with a value of 1 through the IGP, and floods the BFR-id with a value of 1 and the device identifier of the device 205 (which can be represented as a205 ) through the IGP.
  • the device 206 obtains a BFR-id with a value of 2 and a BFR-id with a value of 3 through the IGP, and floods the BFR-id with a value of 2, a BFR-id with a value of 3, and the device identification of the device 206 through the IGP (which can be expressed as a206).
  • the device 207 obtains a BFR-id d with a value of 4 through the IGP, and floods the BFR-id with a value of 4 and the device identity of the device 207 (which can be represented as a207 ) through the IGP.
  • the device 208 obtains a BFR-id of 25 and a BFR-id of 256 through the IGP, and floods the BFR-id of a208).
  • the intermediate BFR mentioned in S302 can be directly connected with BFER. If the intermediate BFR mentioned in S302 is not directly connected to the BFER, but is connected to the BFER through other intermediate BFRs, the BFR-id of the BFER obtained by the intermediate BFR through IGP comes from other intermediate BFRs, and the intermediate BFR can also be obtained through IGP flooding Device identification of other intermediate BFRs.
  • the device 209 is not directly connected to the device acting as a BFER.
  • the parameters obtained by the device 209 through IGP flooding include: a first parameter group, a second parameter group, a third parameter group, and a fourth parameter group.
  • the first parameter group includes a205 and a BFR-id with a value of 1.
  • the second parameter group includes a206, a BFR-id with a value of 2, and a BFR-id with a value of 3.
  • the third parameter group includes a207 and a BFR-id with a value of 4.
  • the fourth parameter group includes a208, a BFR-id with a value of 255, and a BFR-id with a value of 256.
  • Device 209 floods a209 through IGP, BFR-id with value 1, BFR-id with value of 2, BFR-id with value of 3, BFR-id with value of 4, BFR-id with value of 255 and value of BFR-id of 256.
  • the intermediate BFR obtains a first forwarding table according to the parameters obtained through IGP flooding, where the first forwarding table includes a sequence number and an identifier of a device serving as a next hop.
  • the representation form of the BFR-id flooded through the IGP can be a 256-bit bit string, and the offset of the bit set to 1 in the bit string flooded through the IGP is the value of the BFR-id.
  • the representation of the BFR-id flooded through the IGP is a specific value from 1 to 256.
  • the device that receives the BFR-id converts it into a 256-bit bit string, and the bit set to 1 in the bit string is in the bit string.
  • the offset in is the value of the BFR-id.
  • the intermediate BFR obtaining the first forwarding table according to the parameters obtained through IGP flooding includes: the intermediate BFR obtains a forwarding table in the first forwarding table according to a BFR-id obtained through IGP flooding and its corresponding device identifier item, the forwarding entry includes a sequence number and a neighbor (neighbor, NBR), the sequence number corresponds to a BFR-id, and the NBR is used to record the identifier of the device as the next hop.
  • the identification of the device corresponding to the BFR-id is the identification of the device capable of communicating with the BFER identified by the BFR-id or the identification of the BFER identified by the BFR-id.
  • the NBR is used to record the neighbor device that reaches the next hop through the BFER identified by the BFR-id. If the intermediate BFR is directly connected to the BFER, the NBR is the device identifier of the BFER. If the intermediate BFR is connected to the BFER through other intermediate BFRs, the NBR is the device identifier of the other intermediate BFR.
  • any forwarding table entry included in the first forwarding table also includes a bit string, the offset of the bit set to 1 in the bit string in the forwarding table entry corresponds to the BFR-id, and the bit string is set to 1 in the forwarding table entry. The number of bits set to 1 is not greater than 1.
  • the forwarding table entry also includes the F-BM, and the F-BM is used to store or record the bit string.
  • the device 206 obtains the fifth parameter group and the sixth parameter group through IGP flooding.
  • the fifth parameter group includes a102 and a BFR-id with a value of 2.
  • the sixth parameter group includes a103 and a BFR-id with a value of 3.
  • the device 206 may obtain an entry with an SN of 2 according to the fifth parameter group.
  • the NBR in the entry whose SN is 2 is a102.
  • the device 206 obtains the entry with the SN of 3 according to the sixth parameter group.
  • the NBR in the entry whose SN is 3 is a103.
  • the ellipsis in Table 2-1 indicates that 252 entries whose SN starts from 4 and ends at 255 are omitted.
  • the NBR included in each of the omitted 252 entries is 0.
  • the NBR value of 0 in Table 2-1 indicates that the next hop is empty or there is no next hop.
  • the device 206 may obtain an SN with a value of 2 and a bit string with a value of 0000...0000000000000000000000000010 according to the BFR-id with a value of 2 in the fifth parameter group.
  • the device 206 obtains a forwarding entry with an SN of 2 in Table 2-2 according to a102 in the fifth parameter group, an SN with a value of 2, and a bit string with a value of 0000...0000000000000000000010 (stored in the F-BM).
  • the device 206 can obtain an SN with a value of 3 and a bit string with a value of 0000...0000000000000000000000000100 according to the BFR-id with a value of 3 in the sixth parameter group.
  • the device 206 obtains the forwarding entry with the SN of 3 in Table 2-2 according to a103 in the sixth parameter group, the SN with a value of 3, and the bit string with a value of 0000...00000000000000000000100 (stored in the F-BM).
  • the ellipsis in Table 2-2 indicates that 252 entries whose SN starts from 4 and ends at 255 are omitted.
  • the NBR included in each of the omitted 252 entries is 0. In this embodiment of the present application, the NBR being 0 indicates that the next hop is empty or there is no next hop.
  • the BSL of the bit string included in the F-BM is 256 bits, and the bit string includes...
  • the offset of the bit set to 1 in the bit string is SN.
  • the offset of the set bit in the bit string is the difference between SN and the constant, or the offset of the set bit in the bit string is the sum of SN and the constant .
  • the constant may be 1 or other natural numbers greater than 1, which is not limited in this application.
  • the device 206 in the scenario shown in FIG. 2 can sort the SNs and the NBRs corresponding to the SNs according to Table 2-1. Specifically, according to the read bit width of the forwarding hardware, multiple NBRs sorted by the size of the SNs can be used as One line, the number of the multiple NBRs is less than or equal to the value of the read bit width.
  • the constant can be 1 or other possible values. a natural number greater than 1.
  • the read bit width is 16 as an example for illustration.
  • the read bit width is 16.
  • the constant is 1
  • the quotient of the difference between SN and 1 with a value of 1 to 16 and the read bit width is 0, and the row number of the corresponding row is the sum of the quotient and 1, as shown in Table 2-3
  • the behavior forwarding table entry where 1-16 is located that is, the line number of the forwarding table entry is 1.
  • the NBR corresponding to the SN of 2 is a102
  • the NBR corresponding to the SN of 3 is a103.
  • the row number of the row where the NBR corresponding to a certain SN is located may be the sum of the quotient of the SN and the read bit width and a constant.
  • the corresponding The row number of the row where the NBR is located is the quotient of the SN and the read bit width.
  • the row number of the row where the NBR corresponding to the SN with a value of 16 is located is 1, and the row number of the row where the NBR corresponding to the SN with a value of 1-15 is located is 1.
  • ... indicates the omission of empty content, and X can be 0. Regardless of whether the NBR is X or 0, it means that the next hop is empty or there is no next hop.
  • the device 206 stores the M NBRs in Table 2-1 into a row in Table 2-3, that is, the number of columns in Table 2-3 other than the column identified by SN is M.
  • the size of M depends on the read bit width of the forwarding hardware. M can be 2 to the Nth power, and N is an integer greater than or equal to 1. In the first embodiment of the present application, M is 16 as an example.
  • the number of columns indicates the bit width M that can be read each time. For example, the numbers 1 to 16 indicate that the device 206 can read 16 SNs each time.
  • the NBR identifier of each entry in Table 2-1 is stored in the cell corresponding to the SN in Table 2-3.
  • the NBR identifier of each entry in Table 2-1 is stored in Table 2-3
  • the ordering among the 16 identities in each row of the NBR corresponds to the SN in Table 2-1.
  • the above 16 flags contain NBRs with a value of 0 or X.
  • the NBR with the value of a102 is stored in the cell corresponding to 2 in the row number 1 (the row corresponding to the SN of 1-16).
  • the NBR whose value is a103 is stored in the cell corresponding to 3 in the row number 1 (the row corresponding to SN 1-16).
  • the row where the 16 SNs are located can be represented by the row number.
  • the row corresponding to the SN of 1-16 can be represented by the row number 1
  • the row corresponding to the SN of 17-32 can be represented by the row number 2.
  • the device 208 obtains the seventh parameter group and the eighth parameter group through IGP flooding.
  • the seventh parameter group includes a255 and a BFR-id with a value of 255.
  • the eighth parameter group includes a256 and a BFR-id with a value of 256.
  • Device 208 may obtain Tables 2-4 from the seventh parameter group and the eighth parameter group.
  • the ellipses in Table 2-4 indicate 252 entries whose SN starts from 3 and ends at 254.
  • the NBR included in each entry in the 252 entries is 0.
  • Table 2-4 reference may be made to the method for the device 206 to obtain Table 2-1, which will not be repeated here.
  • the device 208 may obtain Tables 2-5 according to the seventh parameter group and the eighth parameter group.
  • Table 2-5 For the method for the device 208 to obtain Table 2-5, reference may be made to the method for the device 206 to obtain Table 2-2, which will not be repeated here.
  • the ellipses in Table 2-5 indicate 252 entries whose SN starts from 3 and ends at 254.
  • the NBR included in each of the 252 entries is 0, indicating that the next hop is empty or there is no next hop.
  • the BSL of the bit string included in the F-BM is 256 bits, and the bit string includes... 220 bits from the 33rd bit to the 252th bit from right to left are omitted.
  • the F-BM obtained by the device 208 one and only one bit is set to 1 in the bit sting including the set bit, and the offset of the set bit in the bit string and the value of SN correspond.
  • the next hop to the BFER corresponding to the bit set to 1 in the bit string is the device identified by the NBR.
  • the device 208 in the scenario shown in FIG. 2 can further obtain the forwarding table shown in Table 2-6 according to Table 2-4.
  • Table 2-4 For the specific method, refer to the method for the device 206 to obtain Table 2-3, which will not be repeated here.
  • ... in Table 2-6 indicates the omission of empty content.
  • X can be replaced with 0, indicating that the next hop is empty or does not exist.
  • the device 208 stores the NBRs corresponding to the M SNs in Table 2-4 into an entry in Table 2-6, that is, the number of columns in Table 2-6 other than the column identified by the SN is M.
  • M is the read bit width of the device 208 , which may be the same as the read bit width of the device 206 . If the read bit width of the device 208 is different from the read bit width of the device 206, the number of columns other than the columns indicated by SN in Table 2-6 is not 16, which can be determined according to the read bit width of the device 208. For adjustment, this embodiment of the present application will not illustrate this one by one.
  • the order of the NBR identifier of each entry in Table 2-4 in the row determined by the SN corresponding to the NBR in Table 2-6 is determined by the SN corresponding to the NBR.
  • the identifier of the NBR with the value of a255 is stored in the row of the SN with the value of 255 in Table 2-6 (the row identified by 241-256 can also be Called the row with row number 16) in the cell corresponding to 15.
  • the SN with the value 255 is in the column identified by 15 at the position of the row.
  • the identifier of the NBR whose value is a256 is stored in the row where the SN whose value is 256 is located in Table 2-6 (the row identified by 241-256, also known as row number 16) in the cell corresponding to 16.
  • the row identified by 241-256 the SN with the value 256 is in the column identified by 16 at the position of the row.
  • the row where the 16 SNs are located can be represented by the row number.
  • the row corresponding to the SN of 1-16 can be represented by the row number 1
  • the row corresponding to the SN of 17-32 can be represented by the row number 2.
  • the device 209 obtains the first parameter group, the second parameter group, the third parameter group and the fourth parameter group through IGP flooding, specifically as the corresponding content of S302.
  • the device 209 can obtain Table 2-7 according to the first parameter group, the second parameter group, the third parameter group and the fourth parameter group.
  • the ellipses in Table 2-7 indicate 250 entries whose SN starts from 5 and ends at 254.
  • the NBR included in each entry in the 250 entries is 0.
  • An NBR with a value of 0 indicates that the next hop is empty or does not exist.
  • the device 209 may obtain Table 2-8 according to the first parameter group, the second parameter group, the third parameter group and the fourth parameter group. For the specific method, see that the device 206 obtains the values in Table 2-2. method, which will not be repeated here.
  • the ellipses in Table 2-8 indicate 250 entries whose SN starts from 5 and ends at 254.
  • the NBR included in each of the 250 entries is 0.
  • An NBR with a value of 0 indicates that the next hop is empty or does not exist.
  • the BSL of the bit string included in the F-BM is 256 bits, and the bit string includes... 220 bits from the 33rd bit to the 252th bit from right to left are omitted.
  • the F-BM obtained by the device 209 one and only one bit is set to 1 in the bit sting including the set bit, and the offset of the set bit in the bit string and the value of SN correspond.
  • the next hop to the BFER corresponding to the bit set to 1 in the bit string is the device identified by the NBR.
  • the device 209 in the scenario shown in FIG. 2 can further obtain the forwarding table shown in Table 2-9 according to Table 2-7.
  • Table 2-7 For the specific method, refer to the method for the device 206 to obtain Table 2-3, which is not repeated here.
  • Table 2-9 ... indicates the omission of empty content, and X can be replaced by 0, indicating that the next hop is empty or does not exist.
  • the device 209 stores the M NBRs in Table 2-7 into an entry in Table 2-9, that is, the number of columns in Table 2-9 other than the column identified by SN is M.
  • M is the read bit width of the device 209 , which may be the same as the read bit width of the device 206 or the device 208 . If the read bit width of device 209 is different from the read bit width of device 206 or device 208, the number of columns other than the columns indicated by SN in Table 2-9 is not 16. The bit width is adjusted, which will not be described one by one in this embodiment of the present application.
  • the order of the NBR identifier of each entry in Table 2-7 in the row determined by the SN corresponding to the NBR in Table 2-9 is determined by the SN corresponding to the NBR.
  • the identifier of NBR with the value of a205 is stored in the cell corresponding to the SN of 1 in Table 2-9, that is, the SN corresponding to 1-16 A cell where a row intersects a column labeled 1.
  • the identifier of the NBR with the value of a206 is stored in the cell corresponding to the SN of 2 in Table 2-9, that is, the row corresponding to the SN of 1-16 and Label the cells where the 2 columns intersect.
  • the identifier of the NBR with the value of a206 is stored in the cell corresponding to the SN of 3 in Table 2-9, that is, the row corresponding to the SN of 1-16 and Label the cells that intersect with 3 columns.
  • the identifier of the NBR with the value of a207 is stored in the cell corresponding to the SN of 4 in Table 2-9, that is, the row corresponding to the SN of 1-16 and Cells are labeled as 4-column intersections.
  • the identifier of the NBR with the value of a208 is stored in the cell corresponding to the SN of 255 in Table 2-9, that is, the row corresponding to the SN of 241-256 and Label the 15-column intersecting cells.
  • the identifier of the NBR with the value of a208 is stored in the cell corresponding to the SN of 256 in Table 2-9, that is, the row corresponding to the SN of 241-256 and Label the 16-column intersecting cells.
  • the row where the 16 SNs are located can be represented by the row number.
  • the row corresponding to the SN of 1-16 can be represented by the row number 1
  • the row corresponding to the SN of 17-32 can be represented by the row number 2.
  • the BFIR obtains a second forwarding table according to the parameters obtained through IGP flooding, where the second forwarding table includes a sequence number and an identifier of the next hop.
  • the parameters obtained by the BFIR through IGP flooding include the device identifier of the intermediate BFR and the BFR-id obtained by the intermediate BFR.
  • the BFIR obtains the second forwarding table according to the acquired parameters.
  • Any entry in the second forwarding table includes SN and NBR.
  • the value of the SN of any forwarding entry in the second forwarding table is the value of the BFR-id
  • the NBR is the device identifier of the next hop through which the BFER identified by the BFR-id is reached.
  • any forwarding entry also includes a bit string. The number of bits set to 1 in the bit string included in any forwarding entry is not greater than 1, and the offset of the bit set to 1 in the bit string corresponds to the value of SN.
  • the device 210 serving as the BFIR receives the BFR-ids of 1, 2, 3, 4, 255, and 256 flooded by the device 209 through the IGP.
  • the device 210 obtains the forwarding entries shown in Table 2-10 according to the above parameters from the device 209 and according to the method in which the device 206 obtains Table 2-1.
  • Table 2-10 indicates that the NBR is 0 in the 250 entries with SN ranging from 5 to 254, indicating that the next hop is empty or does not exist.
  • the device 210 may obtain Table 2-11 according to multiple BFR-ids flooded by the device 209 and a209.
  • the above-mentioned multiple BFR-id values are 1, 2, 3, 4, 255, and 256.
  • the ellipsis in Table 2-11 indicates the 250 entries whose SN starts from 5 and ends at 254.
  • the NBR included in each entry in the 250 entries is 0, indicating that the next hop is empty or there is no next hop.
  • the BSL of the bit string included in the F-BM is 256 bits, and the bit string includes...
  • the device 210 in the scenario shown in FIG. 2 can further obtain the forwarding table shown in Table 2-12 according to Table 2-10.
  • Table 2-10 For the specific method, refer to the method for obtaining Table 2-3 by the device 206, which is not repeated here.
  • ... in Table 2-12 indicates the omission of empty content, and X can be 0 or empty.
  • the device 210 stores the M NBRs in Table 2-10 into one entry (in one row) in Table 2-12, that is, the number of columns in Table 2-12 other than the column identified by SN is M .
  • M is the read bit width of the device 210 , which may be the same as the read bit width of the device 206 , the device 208 , or the device 209 . If the read bit width of device 210 is different from the read bit width of device 206, device 208, or device 209, the number of columns other than the columns indicated by SN in Table 2-12 is not 16, which can be determined according to device 2
  • the read bit width of -12 is adjusted, for example: 32 or 8, which is not described one by one in this embodiment of the present application.
  • the NBR identifier of each entry in Table 2-10 is stored in the corresponding SN of the NBR in the cell corresponding to Table 2-12.
  • the value is a209.
  • the identifier of the NBR is stored in the cell corresponding to the SN of 1 in Table 2-12, that is, the cell where the row corresponding to the SN of 1-16 intersects with the column labeled 1.
  • the identifier of the NBR with the value of a209 is stored in the cell corresponding to the SN of 2 in Table 2-12, that is, the row corresponding to the SN of 1-16 and Label the cells where the 2 columns intersect.
  • the identifier of the NBR with the value of a209 is stored in the cell corresponding to the SN of 3 in Table 2-12, that is, the row corresponding to the SN of 1-16 and Label the cells that intersect with 3 columns.
  • the identifier of the NBR with the value of a209 is stored in the cell corresponding to the SN of 4 in Table 2-12, that is, the row corresponding to the SN of 1-16 and Cells are labeled as 4-column intersections.
  • the identifier of the NBR with the value of a209 is stored in the cell corresponding to the SN of 255 in Table 2-9, that is, the row corresponding to the SN of 241-256 and Label the 15-column intersecting cells.
  • the identifier of the NBR with the value of a209 is stored in the cell corresponding to the SN of 256 in Table 2-12, that is, the row corresponding to the SN of 241-256 and Label the 16-column intersecting cells.
  • the row where the 16 SNs are located can be represented by the row number.
  • the row corresponding to the SN of 1-16 can be represented by the row number 1
  • the row corresponding to the SN of 17-32 can be represented by the row number 2.
  • the above forwarding table may include 16 entries. Since the 256 bits occupied by each F-BM is omitted, when M is 16, for the BIER network scenario where the BSL is 512 bits, the above forwarding table can be extended to include 32 entries. For the BIER network scenario where the BSL is 1024 bits, Said that the above forwarding table can be expanded to include 64 BIFT entries.
  • the forwarding hardware Since the forwarding hardware does not need to read the 256-bit F-BM included in the usual BIFT entry, even in the network scenario where the BSL is 512-bit or 1024-bit, the forwarding hardware can quickly complete the entry lookup and forwarding without performance improvement. The forwarding efficiency is further improved.
  • the offset of the bit that is set to 1 mentioned in the first embodiment of this application (also called the offset of the bit that is set to 1 in the bit string) is the bit that is set to 1 in the right-to-left direction Offset relative to the bit string.
  • the above-mentioned right-to-left direction is determined based on the data reading method of the forwarding hardware, and the right-to-left direction can also be replaced with a left-to-right direction.
  • the left-to-right direction is used to determine the offset of the bit that is set to 1
  • the offset of the bit that is set to 1 in the first embodiment of the present application in the bit string will also change accordingly, for example:
  • the bit string will be represented as 1111...0000000000000000000000000000000000011, the content of Table 2-12 does not change, BFIR is performing BIER When a multicast packet is forwarded, the bit string in the BIER multicast packet is read 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 BFR-id, or the sum of an integer multiple of BFR-id and a constant.
  • the first bit from right to left of the bit string can be called the 1st bit, then the last 1bit on the left is called the 256th bit, or the first bit from right to left of the bit string can be called the 0th bit, then the left The last 1 bit is called the 255th bit.
  • the embodiments of the present application do not limit the above expression forms.
  • a device serving as a BFIR or a device serving as an intermediate BFR can configure the forwarding entry through the control plane.
  • the SN corresponding to the BFR-id is directly used to determine the NBR as the next hop, which saves the space for storing the F-BM and the hardware resources consumed by the F-BM reading operation. , which can reduce the performance requirements on the forwarding hardware.
  • FIG. 4 is a flowchart of a method for forwarding a multicast packet according to Embodiment 2 of the present application.
  • the entry for forwarding the BIER multicast message mentioned in the second embodiment is the forwarding entry obtained in the first embodiment.
  • the bit string is read from right to left as an example for description.
  • the left-to-right direction may be used instead of the right-to-left direction to read the bit string, and the above-mentioned left-to-right direction is not exemplified in this embodiment of the present application.
  • the method for forwarding a multicast packet provided by Embodiment 2 of the present application will be described below with reference to FIG. 2 , FIG. 3 , and FIG. 4 .
  • the device 210 obtains a first BIER multicast packet according to the multicast packet from the multicast source.
  • the device 210 obtaining the first BIER multicast message according to the multicast message from the multicast source includes: the device 210 obtains the bit string according to the BFR-id of the BFER connected to one or more multicast receivers; the device 210 Encapsulate a BIER header on the received multicast message to obtain a first BIER multicast message, where the BIER header includes a bit string.
  • the device 210 may also obtain the SI to which the bit string belongs according to the BFR-id of the BFER connected to one or more multicast receivers.
  • the BIER header included in the first BIER multicast packet also includes the SI to which the bit string belongs.
  • the device 210 learns according to the configuration that the multicast receiver 2 and the multicast receiver 6 need to obtain the multicast packets sent by the multicast source.
  • the multicast receiver 2 is connected to the device 102 as BFER.
  • Multicast receiver 6 is connected to device 256 as BFER.
  • the BFR-id of device 102 is 2 and the BFR-id of device 256 is 256. Since the BFR-ids of the device 102 and the device 256 do not exceed the range of 256, the device 102 and the device 256 belong to the same SI, for example, the SI may be 0.
  • the bit string obtained by device 210 may be represented as 1000...000000000000000000000000010. The above bit string omits the 220 bits whose intermediate value is 0.
  • the BIER header in the first BIER multicast packet obtained by the device 210 includes the bit string obtained above.
  • the device 210 determines its own next hop according to the forwarding entry configured by the device 210 and sends the first BIER multicast packet.
  • next hop of the device 210 refers to the next node that the BFER connected to one or more multicast receivers passes through in the direction from the multicast source to the multicast receiver, such as the device in FIG. 2 209.
  • the method for the device 210 to determine its own next hop may include the following two:
  • the device 210 obtains the offset of the bit set to 1 in the right-to-left direction in the bit string of the first BIER multicast packet, for example, the offsets are 2 and 256.
  • the device 210 checks Table 2-10 or Table 2-11 in the first embodiment with 2 and 256 as the SN, and obtains an NBR with a value of a209. Or the device 210 uses 2 and 256 as indexes to look up the matching cells in table 2-12, that is, a209 in the second column cell of the row where SN is 1-16, and the 16th column cell of the row where SN is 241-256 a209 in the grid.
  • the device 210 uses the row number 1 corresponding to the quotient of the SN with a value of 2 and the read bit width with a value of 16 (the row where the SN with a value of 1-16 in Table 2-12 is located) determines that it needs to be read
  • the device 210 obtains an NBR with a value of a209 from the forwarding entry identified by the row number 1 in Table 2-12 according to the position of the NBR determined by the SN with a value of 2 (the row identified by the row number 1 and the row identified by the numerical value of 2).
  • the NBR in the cell where the column intersects is the NBR with the value a209 corresponding to the SN with the value 2).
  • the device 210 determines that the line number 16 needs to be read based on the line number 16 corresponding to the quotient of the SN with the value of 256 and the read bit width with the value of 16 (the line where the SN with the value of 241-16 is located in Table 2-12).
  • the identified forwarding entry The device 210 obtains the NBR with a value of a209 from the forwarding entry identified by the row number 16 in Table 2-12 according to the position of the NBR determined by the SN with the value of 256 (the row identified by the row number 16 and the row identified by the numerical value of 16).
  • the NBR in the cell where the column intersects is the NBR with a value of a209 corresponding to the SN with a value of 256).
  • the device 210 obtains the offset of the first bit set to 1 in the right-to-left direction in the bit string of the first BIER multicast packet, for example, the offset is 2.
  • the device 210 uses 2 as the SN to look up Table 2-10 or Table 2-11 in the first embodiment, and obtains an NBR whose value is a209. Or the device 210 uses 2 as the index to look up the matching cell of table 2-12, that is, a209 in the second column of the row where the SN is 1-16.
  • the device 210 acquires 1000...0000000000000000000000000000 after setting the second bit to 0 in the direction from right to left.
  • the device 210 determines the offset of the first bit set to 1 in the right-to-left direction to be 256.
  • the device 210 checks Table 2-10 or Table 2-11 in Embodiment 1 with 256 as the SN, and obtains an NBR with a value of a209. Or the device 210 uses 256 as the index to look up the matching cell in Table 2-12, that is, the SN is a209 in the 16th column cell of the row where 241-256 is located. For the method for the device 210 to look up Table 2-12 to determine the next hop, reference may be made to the method in the above-mentioned first implementation manner, and details are not described herein again.
  • the device 210 when looking up Table 2-11, can directly determine the corresponding NBR according to the SN, without looking up the F-BM in Table 2-11.
  • the device 210 can use the offset of the first bit set to 1 in the right-to-left direction in the bit string of the first BIER multicast packet to determine the offset corresponding to the offset.
  • Serial number determine the row number where the SN is located, and read the NRB in the row in the sorting position determined by the SN, such as the value in the bit string of the first BIER multicast packet
  • the offset of 2 determines the SN to be 2
  • the quotient of the SN of 2 and the read bit width of 16 determines that the row number corresponding to the SN of 2 is 1.
  • the offset of 256 in the bit string of the first BIER multicast packet determines the SN of 256
  • the quotient of the SN offset of 256 and the read bit width of 16 determines the corresponding SN of 256
  • the line number is 16.
  • the above method of looking up the table to determine the NBR does not need to read the usual F-BM, which can improve the forwarding efficiency and reduce the performance requirement on the forwarding hardware.
  • each entry in Table 1-4 occupies 256 bits of F-BM and 8 bits of BFR. -The identifier of the NBR, a total of 8448 bits need to be read), the table lookup method adopted by the device 210 can reduce the performance requirements of the forwarding hardware, and the table entries in Table 2-10, Table 2-11 and Table 2-12 can also be Further expansion according to the value of the BSL can meet the table lookup and forwarding requirements of bit strings with BSLs of 512 and 1024 without increasing the performance requirements of the forwarding hardware.
  • the device 210 obtains the BIER multicast packet sent to the next hop, including the following three implementations:
  • the device 210 since the device 210 uses Table 2-10 and Table 2-12 to determine the NBR, the device 210 reaches the BFER corresponding to the 2nd bit and the 256th bit set to 1 in the first BIER multicast packet. If the next hop is the device 209, the device 210 only sends one copy of the first BIER multicast packet, and does not replace the bit string in the first BIER multicast packet.
  • the device 210 determines the NBR by using Table 2-11, since the NBR is the same, the device 210 converts the bit string of the F-BM whose SN is 2 and the bit string of the F-BM whose SN is 256. perform AND operation with the bit string in the first BIER multicast message in a certain order to obtain a bit sting with a value of 1000...000000000000000000000000010. According to a certain order, the bit string of the F-BM in the SN of 2 can be ANDed with the bit string in the first BIER multicast message, and the result after the AND operation can be combined with the bit string of the F-BM in the SN of 256. Perform the AND operation again.
  • the bit string of the F-BM in the SN of 256 can be ANDed with the bit string in the first BIER multicast message, and the result after the AND operation can be combined with the bit of the F-BM in the SN of 2.
  • the string is ANDed again.
  • the bit string of the F-BM in the SN of 2 and the bit string of the F-BM in the SN of 256 can be ANDed, and the result of the AND operation can be combined with the bit string in the first BIER multicast message.
  • the string is ANDed again.
  • the bit string obtained by the above two AND operations is the same as the bit string in the first BIER multicast message, and the bit string replacement operation is not performed.
  • the device 210 may, when looking up the table 2-11, determine that the entry whose SN is 2 is used to forward the first BIER multicast packet.
  • the device 210 performs an AND operation between the F-BM in the entry with the SN of 2 and the bit string in the first BIER multicast message, and obtains 000...0000000000000000000000000010.
  • the device 210 replaces the bit string in the first BIER multicast packet with the result of the AND operation to obtain the first sub-packet.
  • the bit string of the first sub-packet is 000...000000000000000000000000010.
  • the device 210 may determine that the entry with the SN of 256 is used to forward the first BIER multicast packet when looking up the table 2-11.
  • the offset of the first bit set to 1 in the bit string after the 2nd bit from right to left in the bit string is cleared to 0 is used as the new SN, that is, the SN is 256.
  • the device 210 performs an AND operation on the F-BM in the entry with the SN of 256 and the bit string in the first BIER multicast packet to obtain 100...00000000000000000000.
  • the device 210 replaces the bit string in the first BIER multicast packet with the result of the AND operation to obtain the second sub-packet.
  • the bit string of the second sub-packet is 100...0000000000000000000000000000.
  • the device 210 may send the second sub-packet and the first sub-packet to the device 209 as the first BIER multicast packet.
  • the first BIER multicast packet includes a first sub-packet and a second sub-packet
  • the first BIER multicast packet is a concept of a set.
  • the first possible implementation manner and the second possible implementation manner can save the bandwidth between the device 210 and the device 209 .
  • the third possible implementation avoids subsequent intermediate BFRs for copying operations.
  • the device 209 determines its own next hop and sends it according to the configured entry and the bit string in the first BIER multicast message.
  • the next hop of the device 209 refers to the next node that the BFER connected to one or more multicast receivers passes through in the direction from the multicast source to the multicast receiver, such as the device in Figure 2 205, Device 206, Device 207, and Device 208.
  • the device 209 determines that its next hop is the one in FIG. 2 device 206 and device 208.
  • the method for the device 209 to determine the next hop may include the following two:
  • the device 209 obtains the offset in the bit string of the bit set to 1 in the right-to-left direction in the bit string included in the first BIER multicast packet, for example, the offset is 2 and 256.
  • the device 209 directly looks up Table 2-7 or Table 2-8 in Embodiment 1 with 2 and 256 as the SN, and obtains NBRs with values a206 and a208.
  • the device 209 needs to copy a copy of the first BIER multicast message.
  • the device 209 uses 2 and 256 as indexes to look up the matching cells in table 2-9, that is, a206 in the second column cell of the row where the SN is 1-16, and the 16th column cell of the row where the SN is 241-256 a208 in the grid. Specifically, the device 209 uses the row number 1 corresponding to the quotient of the SN with a value of 2 and the read bit width with a value of 16 (the row where the SN with a value of 1-16 in Table 2-9 is located) determines that it needs to be read The forwarding entry identified by line number 1.
  • the device 209 obtains the NBR with a value of a206 from the forwarding entry identified by the row number 1 in Table 2-9 according to the position of the NBR determined by the SN with the value of 2 (the row identified by the row number 1 and the row identified by the numerical value of 2).
  • the NBR in the cell where the column intersects is the NBR with a value of a206 corresponding to the SN with a value of 2).
  • the device 209 uses the line number 16 corresponding to the quotient of the SN with the value of 256 and the read bit width with the value of 16 (the line where the SN with the value of 241-16 in Table 2-9 is located) determines that the line number 16 needs to be read.
  • the identified forwarding entry is the line number 16 corresponding to the quotient of the SN with the value of 256 and the read bit width with the value of 16 (the line where the SN with the value of 241-16 in Table 2-9 is located) determines that the line number 16 needs to be read.
  • the device 209 obtains the NBR with a value of a208 from the forwarding entry identified by the row number 16 in Table 2-9 according to the position of the NBR determined by the SN with the value of 256 (the row identified by the row number 16 and the row identified by the numerical value of 16).
  • the NBR in the cell where the column intersects is the NBR with a value of a208 corresponding to the SN with a value of 256).
  • the device 209 obtains the offset of the first bit set to 1 in the right-to-left direction in the bit string of the first BIER multicast packet, for example, the offset is 2.
  • the device 209 uses 2 as the SN to look up Table 2-7 or Table 2-8 in the first embodiment, and obtains the NBR whose value is a206.
  • the device 209 uses 2 as the index to look up the matching cell of table 2-9, that is, the SN is a206 in the second column cell of the row where 1-16 is located.
  • the device 209 acquires 1000...0000000000000000000000000000 after setting the second bit to 0 in the direction from right to left.
  • the device 209 determines that the offset of the first bit set to 1 in the right-to-left direction is 256.
  • the device 209 uses 256 as the SN to look up Table 2-7 or Table 2-8 in the first embodiment, and obtains an NBR whose value is a208.
  • the device 209 uses 256 as the index to look up the matching cell of Table 2-9, that is, the SN is a208 in the 16th column cell of the row where 241-256 is located.
  • Table 2-9 For the method for the device 209 to look up Table 2-9 to determine the next hop, reference may be made to the method in the above-mentioned first implementation manner, and details are not described herein again.
  • the device 209 when looking up Table 2-8, can directly determine the corresponding NBR according to the SN without looking up the bit string contained in the F-BM of Table 2-8.
  • the device 209 can use the offset of the first bit set to 1 in the right-to-left direction in the bit string of the first BIER multicast packet to determine the offset corresponding to the offset.
  • Serial number according to the quotient of the determined serial number and the read bit width, determine the row number where the SN is located, and read the NRB in the row whose sorting position is determined by the SN, avoiding reading the usual F-BM and reducing the impact on the forwarding hardware. performance requirements.
  • each entry in Table 1-3 occupies 256 bits of F-BM and 8 bits of BFR. -The identifier of the NBR, a total of 8448 bits need to be read), the table lookup method adopted by the device 209 can reduce the performance requirements of the forwarding hardware, and the table entries in Table 2-7, Table 2-8 and Table 2-9 can also be used. Further expansion according to the value of the BSL can meet the table lookup and forwarding requirements of bit strings with BSLs of 512 and 1024 without increasing the performance requirements of the forwarding hardware.
  • the device 209 can obtain the BIER multicast packet sent to the next hop in the following two ways:
  • the device 209 since the device 209 uses Table 2-7 and Table 2-9 to determine the NBR, the device 209 reaches the next hop of the BFER corresponding to the 2th bit set to 1 in the first BIER multicast packet For the device 206, the next hop of the device 209 to the BFER corresponding to the 256th bit set to 1 in the first BIER multicast message is the device 208, then the device 209 needs to perform packet copy and bit string replacement operations.
  • the device 209 determines that the entry whose SN is 2 can be used to forward the first BIER multicast packet, and the device 209 reserves the second bit that is set to 1 from right to left in the bit string in the first BIER multicast packet ( The bit corresponding to SN is 2), clear the other bits to zero, and obtain a bit sting with a value of 0000...000000000000000000000000010.
  • the device 209 obtains the second BIER multicast packet according to the first BIER multicast packet and the bit sting with a value of 0000...000000000000000000000000010.
  • the second BIER multicast packet includes a bit sting of 0000...000000000000000000000010.
  • the device 209 sends the second BIER multicast packet to the NBR in the entry with the SN of 2, that is, the device 206 .
  • the device 209 may clear the second bit that is set to 1 in the right-to-left direction in the bit string of the first BIER multicast packet to 0, and obtain a bit sting with a value of 1000...000000000000000000000000. Since the bit sting whose value is 1000...00000000000000000000 is not all 0, the device 209 copies a copy of the first BIER multicast packet.
  • the device 209 can replace the bit string in the first BIER multicast packet with 1000...000000000000000000000000 to obtain the third BIER multicast packet.
  • the device 209 can keep the bit corresponding to the SN in the first BIER multicast packet (the 256th bit in the direction from right to left) unchanged according to the table lookup result with the SN of 256, and clear the other bits to zero to obtain a value of 1000...00000000000000000000000 bit sting.
  • the device 209 obtains the third BIER multicast packet according to the first BIER multicast packet and the bit sting with a value of 1000...000000000000000000000000.
  • the third multicast packet includes a bit sting with a value of 1000...00000000000000000000000000000000.
  • the device 209 sends the third BIER multicast packet to the NBR in the entry with the SN of 256, that is, the device 208 .
  • the device 209 determines that the entry with the SN of 2 is used to forward the first BIER multicast packet when looking up the table 2-8.
  • the device 209 performs an AND operation on the F-BM in the entry with the SN of 2 and the bit string in the first BIER multicast packet to obtain 000...0000000000000000000000000010.
  • the device 209 replaces the bit string in the first BIER multicast message with the result of the AND operation to obtain the second BIER multicast message.
  • the bit string of the second BIER multicast packet is 000...000000000000000000000000010.
  • the device 209 sends the second BIER multicast packet to the NBR in the entry with the SN of 2, that is, the device 206 .
  • the device 209 may determine that the entry whose SN is 256 is used to forward the first BIER multicast packet when looking up Tables 2-8.
  • the method for the device 209 to determine that the entry whose SN is 256 is used to forward the first BIER multicast packet may refer to the method adopted by the device 210, and details are not described herein again.
  • the device 209 performs an AND operation between the F-BM in the entry with the SN of 256 and the bit string in the first BIER multicast message, and obtains 100...000000000000000000000000.
  • the device 209 replaces the bit string in the first BIER multicast packet with the result of the AND operation to obtain a third BIER multicast packet.
  • the bit string of the third BIER multicast packet is 100...000000000000000000000000000.
  • the device 209 sends the third BIER multicast packet to the NBR in the entry with the SN of 256, that is, the device 208 .
  • what the device 209 receives is the first BIER multicast packet including the first sub-packet and the second sub-packet.
  • the device 209 may acquire the second BIER multicast packet and the third BIER multicast packet by adopting the above-mentioned first possible implementation manner or the second possible implementation manner.
  • the difference from the above-mentioned first possible implementation manner or the second possible implementation manner is that, since the device 210 has already performed packet duplication, the device 209 does not need to perform packet duplication and bit string replacement.
  • the device 209 uses the first sub-packet as the second BIER multicast report Arts.
  • the device 209 sends the second BIER multicast packet to the NBR in the entry with the SN of 2, that is, the device 206 .
  • the bit string included in the second sub-packet includes only one bit set to 1, that is, the 256th bit in the right-to-left direction, the device 209 regards 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 the SN of 256, that is, the device 208 .
  • the device 206 determines its own next hop according to the configured BIFT entry and the second BIER multicast packet and sends it.
  • the next hop of the device 206 refers to the next node that the BFER connected to one or more multicast receivers passes through in the direction from the multicast source to the multicast receiver, such as the device in FIG. 2 102 and equipment 103.
  • the second embodiment of this application is to illustrate that the multicast receiver 2 and the multicast receiver 6 need to receive multicast packets from the multicast source as an example.
  • the bit set to 1 is in the bit string
  • the device 206 determines that the next hop of the second BIER multicast packet is the device 102.
  • the method for the device 206 to determine the next hop may include: the device 206 obtains the offset in the bit string of the bit set to 1 in the right-to-left direction in the bit string included in the second BIER multicast packet , for example, the offset is 2.
  • the device 206 checks Table 2-1 or Table 2-2 in Embodiment 1 with 2 as the SN, and obtains an NBR with a value of a102.
  • the device 206 uses 2 as an index to look up the matching cell of table 2-3, that is, the SN is the NBR of a102 in the cell in the second column of the row where 1-16 is located.
  • the device 206 when the device 206 looks up the table 2-2, it can directly determine the NBR corresponding to it according to the SN, without looking up the F-BM in the table 2-2.
  • the device 206 can use the offset of the first bit set to 1 in the right-to-left direction in the bit string of the second BIER multicast message and the quotient of the read bit width to determine The line number where the SN is located, and the NRB in the line is read. For example, the quotient of the offset with a value of 2 and the read bit width with a value of 16 is 0, and the line number where the SN is located is determined to be 1.
  • each entry in Table 1-1 occupies 256 bits of F-BM and 8 bits of BFR. -The identifier of the NBR, a total of 8448 bits need to be read), the table lookup method adopted by the device 206 can reduce the performance requirements of the forwarding hardware, and the table entries in Table 2-1, Table 2-2 and Table 2-3 can also be Further expansion according to the value of the BSL can meet the table lookup and forwarding requirements of bit strings with BSLs of 512 and 1024 without increasing the performance requirements of the forwarding hardware.
  • the method for the device 206 to look up Table 2-3 to determine the next hop reference may be made to the method for the device 209 to look up Table 2-9 to determine the next hop, which will not be repeated here.
  • the device 206 obtains the BIER multicast packet sent to the next hop, including the following two implementations:
  • the device 206 since the device 206 uses Table 2-1 and Table 2-3 to determine the NBR, the device 206 reaches the next hop of the BFER corresponding to the 2th bit set to 1 in the second BIER multicast packet For device 102, device 206 does not need to perform packet copying and bit string replacement operations.
  • the device 206 sends the second BIER multicast packet to the NBR in the entry with the SN of 2, that is, the device 102 .
  • the device 206 can clear the second bit, which is set to 1 in the right-to-left direction in the second BIER multicast packet, to 0, and obtain a bit sting with a value of 0000... Arts.
  • the device 206 determines that the entry whose SN is 2 is used to forward the second BIER multicast packet.
  • the device 206 performs an AND operation on the F-BM in the entry whose SN is 2 and the bit string in the second BIER multicast packet, and obtains 000...0000000000000000000000010, which is the same as the bit string in the second BIER multicast packet, and does not perform replacement and duplication operate.
  • the device 206 sends the second BIER multicast packet to the NBR in the entry with the SN of 2, that is, the device 102 .
  • the device 206 can clear the second bit, which is set to 1 in the right-to-left direction in the second BIER multicast packet, to 0, and obtain a bit sting with a value of 0000... Arts.
  • the device 208 determines its own next hop according to the configured BIFT entry and the third BIER multicast packet and sends it.
  • the next hop of the device 208 refers to the next node through which the BFER connected to one or more multicast receivers is reached in the direction from the multicast source to the multicast receiver, such as the device in FIG. 2 255 and equipment 256.
  • the second embodiment of the present application is to illustrate that the multicast receiver 2 and the multicast receiver 6 need to receive multicast packets from the multicast source as an example, then according to the bit set to 1 in the third BIER multicast packet is in the bit string The device 208 determines that the next hop of the third BIER multicast packet is the device 256.
  • the method for the device 208 to determine the next hop may include: the device 208 obtains the offset in the bit string of the bit set to 1 in the right-to-left direction in the bit string included in the third BIER multicast packet , for example, the offset is 256.
  • the device 208 looks up Table 2-4 or Table 2-5 in Embodiment 1 with 256 as the SN, and obtains an NBR whose value is a256.
  • the device 208 uses 256 as the index to look up the matching cell of Table 2-6, that is, the NBR of a256 in the 16th column cell of the row where the SN is 241-256.
  • the device 208 when the device 208 looks up the table 2-5, it can directly determine the NBR corresponding to it according to the SN, without looking up the F-BM in the table 2-5.
  • the device 208 can use the offset of the first bit set to 1 in the right-to-left direction in the bit string of the third BIER multicast message and the quotient of the read bit width to determine The line number where the SN is located, and the NRB in the line is read. For example, the quotient of the offset with a value of 256 and the read bit width with a value of 16 is 16, and the line number where the SN is located is 16.
  • each entry in Table 1-2 occupies 256 bits of F-BM and 8 bits of BFR. -The identifier of the NBR, a total of 8448 bits need to be read), the table lookup method adopted by the device 208 can reduce the performance requirement of the forwarding hardware, and the table entries in Table 2-4, Table 2-5 and Table 2-6 can also be Further expansion according to the value of the BSL can meet the table lookup and forwarding requirements of bit strings with BSLs of 512 and 1024 without increasing the performance requirements of the forwarding hardware.
  • the method for the device 208 to look up Table 2-6 to determine the next hop reference may be made to the method for the device 209 to look up Table 2-9 to determine the next hop, which will not be repeated here.
  • the device 208 can obtain the BIER multicast packet sent to the next hop in the following two ways:
  • the device 208 since the device 208 uses Table 2-1 and Table 2-3 to determine the NBR, the device 208 reaches the next hop of the BFER corresponding to the 256th bit set to 1 in the third BIER multicast packet For device 256, device 208 does not need to perform packet copy and bit string replacement operations.
  • the device 208 sends the third BIER multicast packet to the NBR in the entry with the SN of 256, that is, the device 256.
  • the device 208 can clear the second bit, which is set to 1 in the right-to-left direction in the bit string of the third BIER multicast message, to 0, and obtain a bit sting with a value of 0000... Arts.
  • the device 208 determines that the entry whose SN is 256 is used to forward the third BIER multicast packet.
  • the device 208 performs an AND operation between the F-BM in the entry with the SN of 256 and the bit string in the third BIER multicast message, and obtains 100...00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
  • the device serving as the BFER obtains the multicast packet and sends it to the multicast receiver.
  • the device 102 serving as BFER determines that the bit string includes its own BFR-id according to the bit string whose value in the second BIER multicast packet is 0000...000000000000000000000000010.
  • the second bit from the left, which is set to 1 represents the BFR-id of the device 102 .
  • the device 102 serving as a BFER strips the BIER header in the second BIER multicast packet, and sends it to the multicast receiver 2 connected to itself.
  • the device 256 serving as BFER After receiving the third BIER multicast message, the device 256 serving as BFER determines that the bit string includes its own BFR-id according to the bit string whose value in the third BIER multicast message is 1000...000000000000000000000000000000000000000000000000000000000000000 The 256th bit, which is set to 1, represents the BFR-id of the device 256.
  • the device 256 serving as BFER strips the BIER header in the third BIER multicast packet, and sends it to the multicast receiver 6 connected to itself.
  • a forwarding device in a BIER network scenario such as a device serving as a BFIR, an intermediate BFR, or a BFER
  • a forwarding device in a BIER network scenario can obtain the optimized BIFT entry provided by the embodiment of the present application through the control plane, and use the The optimized BIFT entry provided by the embodiment forwards the BIER multicast message, and the operation of reading the bit string in the F-BM determined by the BSL included in the usual BIFT entry is omitted, and the forwarding hardware is not improved.
  • the forwarding efficiency and scalability are improved.
  • FIG. 5 is a schematic diagram of another BIER network scenario provided by an embodiment of the present application.
  • the difference between the BIER network scenario shown in FIG. 5 and the BIER network scenario shown in FIG. 2 is that the BIER network scenario shown in FIG. 5 is based on the network scenario shown in FIG. Multicast receiver 7 of the sent multicast packet.
  • Multicast recipients connect to device 509 through device 511 acting as a BFER.
  • Device 509 connects device 510 , device 505 , device 506 , device 507 and device 508 .
  • Device 510 connects to a multicast source.
  • the BFR-id assigned to the device 511 as a BFER is 31.
  • Device 505, Device 506, Device 507, Device 508, and Device 509 are intermediate BFRs.
  • Device 210 is a BFIR.
  • multicast receiver 2, multicast receiver 6, and multicast receiver 7 need to receive multicast packets sent by the multicast source.
  • FIG. 6 is a schematic flowchart of a method for obtaining a forwarding entry according to Embodiment 3 of the present application.
  • the embodiment corresponding to FIG. 6 is for a scenario in which multicast receiver 2, multicast receiver 6, and multicast receiver 7 receive multicast packets from a multicast source.
  • the BFIR in FIG. 6 and the corresponding embodiment can be is the 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 the device 102 , the device 256 or the device 511 in the BIER network scenario shown in FIG. 5 .
  • the method for obtaining a forwarding entry provided by this embodiment of the present application will be described below with reference to FIG. 5 and FIG. 6 .
  • BFER publishes its own BFR-id and device ID through IGP.
  • the device serving as the BFER may use the method in S301 to publish its own BFR-id and device identifier.
  • the method for the device 511 to publish its own BFR-id and device identity reference may be made to the method adopted by any device serving as the BFER in S301.
  • the device ID of device 511 is a511.
  • the intermediate BFR publishes its own device identifier and the BFR-id of the BFER through the IGP.
  • the intermediate BFRs other than the device 509 can use the method in S302 to publish their own device representation and the BFR-id of the BFER.
  • the device 509 serving as the intermediate BFR publishes the BFR-ids of a209 with values of 1, 2, 3, 4, 31, 255 and 256 through IGP flooding.
  • the intermediate BFR obtains a first forwarding table according to parameters obtained through IGP flooding, where the first forwarding table includes an identifier of the next hop.
  • the device 506 can obtain the same table entry as Table 2-3 in the first embodiment by using the method of S303 in the first embodiment.
  • the device 506 divides the NBRs into identity sets based on the obtained entries that are the same as those in Table 2-3, for example, divides the 256 NBRs included in Table 2-3 into 32 identity sets, and each identity set includes sorting by SN.
  • the device 506 divides the acquired 32 identification sets according to the SN sorting (such as the following Bi, the value range of i is between 0 and 31), and divides the 32 identification sets according to the moving window, for example, the mobile value is 5.
  • 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, and the twenty-ninth moving window includes B28-B31 , the thirtieth moving window includes B29-B31, and the thirty-first 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.
  • the identity set corresponding to B0 includes the NBR whose value is a102.
  • the device 506 may divide the 8-bit identifiers in each row in Table 2-3 to obtain the identifier set of Bi identifiers.
  • B0 in Table 3-1 represents an identification set formed by the identifications in the first column to the eighth column in the table entry whose SN is 1-16 in Table 2-3.
  • B1 in Table 3-1 represents an identifier set formed by the identifiers in the 9th to 16th columns in the table entry with SN of 1-16 in Table 2-3.
  • B2 in Table 3-1 represents an identifier set formed by the identifiers in the 1st to 8th columns in the table entry whose SN is 17-32 in Table 2-3.
  • B3 in Table 3-1 represents an identifier set formed by the identifiers in the 9th to 16th columns in the table entry whose SN is 17-32 in Table 2-3.
  • B30 in Table 3-1 represents the identifier set formed by the identifiers in the 1st to 8th columns in the entry with SN 241-256 in Table 2-3.
  • B31 in Table 3-1 represents the identifier set formed by the identifiers in the 9th to 16th columns in the table entry whose SN is 241-256 in Table 2-3. According to the above method, the 256 identities in Table 2-3 are converted into the above-mentioned 32 identities of B0 to B31.
  • the number of columns corresponding to the identity set identified by Bi in Table 3-1 in Table 2-1 can be determined according to the quotient of M and Y.
  • M is 16 and Y is 2, wherein Y can also be other values that can be divisible by 16.
  • a value that can improve the performance of the forwarding hardware is selected from the possible values of Y, that is, Y is 2.
  • the device 206 can group the 31 identification sets from B0 to B31 through the control plane, and the grouping includes 32 identification sets as an example for illustration, that is, a full combination of the 32 identification sets included in each group is performed, such as a pairwise combination, Obtain entries in the form of Table 3-2.
  • the device 508 may use the method used by the device 208 in S303 of the first embodiment to obtain the same table entries as those of Tables 2-6 in the first embodiment.
  • the device 508 performs NBR division based on the obtained table entries that are the same as those in Table 2-6, and obtains Table 3-3 according to the method adopted by the above-mentioned device 506 .
  • B31 contains the NBR associated with the multicast receiver 6, that is, a256. If the BFR-id of the device 256 connected to the device 508 is 256, then a table entry with an index of 121 is added to the table 3-3 generated by the device 508 .
  • the device 509 may use the method used by the device 209 in S303 of the first embodiment to obtain Tables 3-4. ... in Table 3-4 indicates the omission of empty content, X can be 0 or empty.
  • a205 is the device identifier of the device 505 connected to the device 101.
  • a206 is the device identifier of the device 506 that connects the device 102 and the device 103 .
  • a207 is the device ID of the device 507 connected to the device 104 .
  • a511 is the device identifier of the device 511 connected to the multicast receiver 7 .
  • a208 is the device ID of device 208 connecting device 255 and 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 of device 255 is 255.
  • the BFR-id of device 256 is 256.
  • the BFR-id of device 511 is 31.
  • the correspondence between NBR and SN in Table 3-4 is the same as that in Table 2-7, and is not repeated here.
  • the device 509 divides the NBR according to the method adopted by the above-mentioned device 506, and obtains Tables 3-5.
  • B0 contains the NBR related to the multicast receiver 2, that is, a206.
  • B3 contains the NBR associated with multicast receiver 7, namely a511.
  • B31 contains the NBR associated with multicast receiver 6, ie a208.
  • the meaning of the entry whose index is 121 in Table 3-5 of the device 509 is the same as that in Table 3-3, that is, the device 509 can communicate with the device 256 whose BFR-id is 256.
  • the BFIR obtains a second forwarding table according to the parameters obtained through IGP flooding, where the second forwarding table includes an identifier of the next hop.
  • the device 510 may use the method used by the device 210 in S304 of the first embodiment to obtain Tables 3-6. ... in Table 3-6 indicates the omission of empty content, and X can be 0 or empty.
  • a209 is the device ID of the device 509.
  • the device 510 performs NBR division according to the method adopted by the above-mentioned device 506, and obtains Tables 3-7.
  • B0 contains the NBR related to the multicast receiver 2, that is, a209.
  • B3 contains the NBR associated with multicast receiver 7, namely a209.
  • B31 contains the NBR associated with multicast receiver 6, namely a209.
  • the meaning of the entry whose index is 121 in Table 3-7 of the device 510 is the same as that of Table 3-4, that is, the device 510 can communicate with the device 256 whose BFR-id is 256.
  • the above tables in the form of Table 3-1 to Table 3-7 take M as 16 as an example, for the BIER network scenario where the BSL is 256 bits. Since the 256 bits occupied by each F-BM is omitted, when M is 16, for the BIER network scenario where the BSL is 512 bits or 1024 bits, the above forwarding table can be further expanded. Since the forwarding hardware does not need to read the 256-bit F-BM included in the usual BIFT entry, even in the network scenario where the BSL is 512-bit or 1024-bit, the forwarding hardware can quickly complete the entry lookup and forwarding without performance improvement. The forwarding efficiency is further improved.
  • Bi containing multiple NBRs can be directly indexed according to whether the bit in the corresponding bit string is set to 1, that is, the NBR as the next hop is directly obtained, omitting
  • the space for storing the F-BM and the hardware resources consumed by the F-BM reading operation can be reduced, and the performance requirements on the forwarding hardware can be reduced.
  • FIG. 7 is a flowchart of a method for forwarding a multicast packet according to Embodiment 4 of the present application.
  • the entry in the fourth embodiment is the entry obtained in the third embodiment.
  • the multicast receiver 2, the multicast receiver 6, and the multicast receiver 7 in the fourth embodiment need to obtain multicast packets from the multicast source.
  • the method for forwarding a multicast packet provided in Embodiment 4 of the present application will be described below with reference to FIG. 5 , FIG. 6 , and FIG. 7 .
  • the device 510 obtains a first BIER multicast packet according to the multicast packet from the multicast source.
  • the device 510 may obtain the first BIER multicast packet by using the method in S401 of the second embodiment, which will not be repeated here.
  • the bit string included in the first BIER multicast message in the fourth embodiment is different from the bit sting included in the first BIER multicast message in the first embodiment.
  • the bit string included in the first BIER multicast packet in the fourth embodiment is 1000...010000000000000000000000010, that is, the 2nd bit, the 31st bit and the 256th bit from right to left of the bit string in the first BIER multicast packet in the fourth embodiment is set to 1.
  • the device 510 determines its own next hop and sends the first BIER multicast packet according to the forwarding entry in the table configured by the device 510.
  • the device 510 determines the table entry in Table 3-7 to be searched according to whether the data block containing 8 bits in the right-to-left direction in the bit string included in the first BIER multicast packet is all 0s.
  • the device 510 reads 32 8-bit data blocks in the right-to-left direction from the bit string of the first BIER multicast message, that is, 1000... ), the 4th data block (25th to 32nd bit) and the 32nd data block (249th to 256th bit) contain bits set to 1.
  • the first data block corresponds to B0.
  • the fourth data block corresponds to B3.
  • the 32nd data block corresponds to B31.
  • the identity set identified by Bi is a set of n NBRs, and the value of n is the quotient of M and Y.
  • the NBR corresponding to the second bit in the identity set identified by B0 is a209.
  • the NBR corresponding to the 31st bit in the identity set identified by B3 is a209.
  • the NBR corresponding to the 256th bit in the identification set identified by B31 is a209.
  • the device 510 determines, according to the offset of the bit set to 1 in the bit string of the first BIER multicast packet, such as 2 and 31, that B0 and B3 are the identification sets related to the bit set to 1.
  • the device 510 searches for the row containing B0 and B3 in Table 3-7, reads the NBR corresponding to the 2nd bit in B0 and the NBR corresponding to the 31st bit in B3, and obtains a209.
  • the device 510 clears the 2nd bit and the 31st bit from right to left in the bit string included in the first BIER multicast message (that is, clears the corresponding bits of the identification set identified by B0 and B3 in the bit string to 0), and obtains A bit string with the value 1000...000000000000000000000000000.
  • the device 510 determines that the 32nd data block of the bit string whose value is 1000...00000000000000000000000 contains the bit set to 1, then uses the B31 corresponding to the 31st data block to look up Table 3-7, and reads the B31 corresponding to the 256th bit. NBR, get a209. The device 510 sends the first BIER multicast packet to a209.
  • the device 509 determines its own next hop according to its configured forwarding entry and the bit string in the first BIER multicast packet and sends it.
  • the device 509 reads four 8-bit data blocks from right to left from the bit string of the first BIER multicast packet, that is, the first data block, the fourth data block and the The 32nd data block contains bits set to 1.
  • the first data block corresponds to B0.
  • the fourth data block corresponds to B3.
  • the 32nd data block corresponds to B31.
  • the NBR corresponding to the second bit in the identity set identified by B0 is a206.
  • the NBR corresponding to the 31st bit in the identity set identified by B3 is a511.
  • the NBR corresponding to the 256th bit in the identification set identified by B31 is a208.
  • the device 509 determines, according to the offset of the bit set to 1 in the bit string of the first BIER multicast packet, that B0 and B3 are the identification sets related to the bit set to 1.
  • the device 509 looks up the row containing B0 and B3 in Table 3-5, and reads the NBR (a206) corresponding to the 2nd bit in B0 and the NBR (a511) corresponding to the 31st bit in B3.
  • Device 509 copies a copy of the first BIER multicast message.
  • the device 509 clears the bits other than the second bit to zero, and obtains a bit string with a value of 0000...000000000000000000000000010.
  • the device 509 replaces the bit string in the first BIER multicast packet with 0000...000000000000000000000010 to obtain the second BIER multicast packet.
  • the device 509 sends the second BIER multicast packet to a206.
  • the device 509 clears the bits other than the 31st bit to zero, and obtains a bit string whose value is 0000...010000000000000000000000000.
  • the device 509 replaces the bit string in the copied first BIER multicast packet with 0000...0100000000000000000000000000000 to obtain a fourth BIER multicast packet.
  • the device 509 sends the fourth BIER multicast packet to a511.
  • the device 509 clears the 2nd bit and the 31st bit from right to left in the bit string included in the first BIER multicast message (that is, clears the corresponding bits of the identification set identified by B0 and B3 in the bit string to 0), and obtains A bit string with the value 1000...000000000000000000000000000.
  • Device 509 determines that the 32nd data block of the bit string of 1000 ... 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
  • 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...000000000000000000000000 to obtain a third BIER multicast packet.
  • Device 509 sends a third BIER multicast packet to a208.
  • 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.
  • the device 506 adopts the method adopted by the device 206 in the first embodiment to determine that the next hop is the device 102 , and sends the second BIER multicast packet to the device 102 .
  • the method used by the device 506 to determine the next hop is similar to the method used by the above-mentioned device 509, that is, according to the offset of the bit set to 1 in the bit string of the second BIER multicast packet, that is, the offset is 2, to find the first hop.
  • the NBR included in B0 corresponding to 2bit is a102.
  • the device 506 sends the second BIER multicast packet to a102.
  • 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.
  • the device 508 adopts the method used by the device 208 in the first embodiment to determine that the next hop is the device 256 , and sends the third BIER multicast packet to the device 256 .
  • the method used by the device 508 to determine the next hop is similar to the method used by the above-mentioned device 509, that is, according to the offset of the bit set to 1 in the bit string of the third BIER multicast packet, that is, the offset is 256, find the first hop.
  • the NBR included in B31 corresponding to 256bit is a256.
  • the device 508 sends the third BIER multicast packet to a256.
  • the device serving as the BFER obtains the multicast packet and sends it to the multicast receiver.
  • the method for obtaining and sending the multicast packet by the device 102, the device 256, and the device 511 serving as BFER may refer to the method adopted by the device 102 in the first embodiment, and details are not repeated here.
  • the forwarding device in the BIER network scenario can further optimize the table entries provided in the first embodiment through the control plane to obtain the information provided in the second embodiment of the present application.
  • the optimized table entry can further reduce the amount of data read when the table is forwarded each time, such as the amount of data read in the product of 128bit and 2 in the second embodiment (one The Bi identifier set is 128 bits, and 2 identifier sets can be read).
  • the amount of 128 bits of data read is further reduced, and the forwarding efficiency and scalability are improved without improving the performance of the forwarding hardware.
  • the carrying mode of the bit string in any BIER multicast message mentioned in Embodiment 2 and Embodiment 4 of this application may include the following modes:
  • the bit string is carried in the destination options header (DOH) after the IPv6 header included in the BIER multicast message. See the message format shown in Figure 8.
  • the next header in the IPv6 header is assigned a value of 60, indicating that the IPv6 header is followed by DOH.
  • the next header in DOH is 4, indicating that the following payload is an Internet Protocol version 4 (IPv4) multicast packet.
  • the next header in the DOH is 41, indicating that the subsequent payload is an Internet Protocol version 6 (IPv6) multicast packet.
  • the DOH also includes a bit string field (not shown in Figure 8), which is used to carry the bit string in the BIER multicast message.
  • the bit string is carried in the destination options header (DOH) after the IPv6 header included in the BIER multicast message. See the message format shown in FIG. 9 .
  • the next header in the IPv6 header is assigned a value of 0, indicating that the IPv6 header is followed by a hop by hop option header (HBH option header).
  • the next header of the hop-by-hop option header is assigned a value of 60, indicating that the hop-by-hop option header is followed by DOH.
  • the next header in DOH is 4, indicating that the following payload is an Internet Protocol version 4 (IPv4) multicast packet.
  • IPv6 Internet Protocol version 6
  • the DOH also includes a bit string field (not shown in Figure 8), which is used to carry the bit string in the BIER multicast message
  • the bit string is carried in the IPv6 extension header after the IPv6 header included in the BIER multicast message, see the message format shown in Figure 10.
  • the BIER header in the IPv6 extension header may be used to carry the bit string in the BIER multicast message in this 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 by an embodiment of the present application.
  • the forwarding apparatus 1100 provided by the embodiment corresponding to FIG. 11 is described from the perspective of the logical structure, and can be set to the device as the BFIR mentioned in any one of the foregoing Embodiments 1 to 4 or as the device as the intermediate BFR, For example, device 210, device 209, device 206, or device 208 in the scene shown in FIG. 2, and device 510, device 509, device 506, or device 508, etc. in the scene shown in FIG. 5.
  • the following describes the structure of the forwarding device provided by the 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 message
  • the BIER multicast message includes a first bit string
  • the bits set to 1 included in the first bit stirng correspond to BFER.
  • the determining unit 1102 is configured to determine the index of the forwarding table entry according to the bit set to 1 in the first bit string, where the forwarding table entry includes the index and the identifier of the device serving as the next hop.
  • the obtaining unit 1103 is configured to directly obtain the identifier of the device according to the index, where the device is the BFER or the first intermediate bit forwarding router BFR through which the BFER is reached.
  • 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 perform 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 perform 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 perform 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 perform 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 perform 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 perform 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 perform 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 perform S705 in the fourth embodiment.
  • the index is a serial number corresponding to the BFR-id of the BFER, and the device identifier corresponds to a serial number.
  • the forwarding table entry in the first possible implementation manner may be the forwarding table entry included in the forwarding table such as Table 2-1, Table 2-4, Table 2-7, or Table 2-10 in the first embodiment.
  • the forwarding table entry further includes a second bit string based on the above-mentioned first possible implementation manner.
  • the second bit string has and only 1 bit is set to 1, and the offset of the bit set to 1 in the second bit string is included in the offset of the second bit string and the forwarding entry where it is located. corresponding to the serial number.
  • the forwarding entry in the second possible implementation manner may be the forwarding entry included in the forwarding table such as Table 2-2, Table 2-5, Table 2-8, or Table 2-11 in the first embodiment.
  • the obtaining unit 1103 is specifically configured to obtain the identifier of the device as the next hop included in the forwarding table entry according to the sequence number, without searching for all The second bit string included in the forwarding table entry.
  • the forwarding table entry includes N identifiers, the N is less than or equal to the value of the read bit width, the N identifiers include the identifier of the device, and the N identifiers The order of any of the included identifiers in the forwarding entry corresponds to the sequence number.
  • the forwarding entry in the third possible implementation manner may be the forwarding entry included in the forwarding table such as Table 2-3, Table 2-6, Table 2-9, or Table 2-12 in the first embodiment.
  • the obtaining unit 1103 is specifically configured to: determine a line number according to the sequence number and the read bit width, where the line number corresponds to the sequence number and the read bit width. Read the quotient of the bit width; obtain the N identifiers included in the forwarding entry corresponding to the line number.
  • the determining unit 1102 is specifically configured to: obtain the offset of the bit set to 1 in the first bit string in the first bit string; The offset determines the index, and the offset corresponds to the index.
  • the index is used to identify the row where M identification sets are located, where M is an integer greater than or equal to 2, the M identification sets include the identification of the device, and the The identification set to which the identification of the device belongs corresponds to the data block to which the serial number belongs, and the order of the identification of the device in the identification set to which it belongs corresponds to the serial number.
  • the forwarding entries in the fourth possible implementation manner may be the forwarding entries included in the forwarding tables such as Table 3-2, Table 3-3, Table 3-5, or Table 3-7 in the third embodiment.
  • the determining unit 1102 is specifically configured to: determine, according to the first bit string and the read bit width, to which the bit set to 1 in the first bit string belongs The data block; obtain the identification set corresponding to the data block to which the bit set to 1 in the first bit string belongs, and the M identification sets include the identification set corresponding to the data block; according to the data block For the corresponding identification sets, determine the row where the M identification sets are located.
  • the obtaining unit 1103 is specifically configured to: obtain the identification of the device from the M identification sets included in the row corresponding to the index.
  • the forwarding device 1100 may also obtain the forwarding entry in the following manner.
  • the receiving unit 1101 is further configured to receive the device identifier and the device identifier sent by the device. BFR-id.
  • the obtaining unit 1103 is further configured to: obtain the corresponding serial number according to the BFR-id; obtain the forwarding entry, the index of the forwarding entry, according to the serial number and the device identifier is the sequence number, and the next hop of the forwarding entry is the identifier of the device.
  • the receiving unit 1101 is further configured to receive the device identifier and the BFR-id sent by the device.
  • the obtaining unit 1103 is further configured to: obtain the second bit string and the sequence number corresponding to the BFR-id according to the BFR-id;
  • the identifier of the device is obtained, the forwarding table entry is obtained, 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, the forwarding
  • the next hop of the forwarding entry of the posting entry is the identifier of the device.
  • the receiving unit 1101 is further configured to receive the device identifier and the BFR-id sent by the device.
  • the obtaining unit 1103 is further configured to: obtain the serial number corresponding to the BFR-id according to the BFR-id; sort the serial number and the device identifier according to the read bit width, and obtain the BFR-id.
  • Publication item, the line number where the forwarding table item is located corresponds to the quotient of the serial number and the read bit width, and the ordering of the identifiers of the devices included in the forwarding table item in the N identifiers is the same as that of the N identifiers. corresponding to the serial number.
  • the receiving unit 1101 is further configured to receive the device identifier and the BFR-id sent by the device.
  • the obtaining unit 1103 is further configured to: obtain the corresponding serial number according to the BFR-id; according to the ordering of the serial numbers, divide the identifiers corresponding to the serial numbers to obtain L identifier sets, the L corresponding to The quotient of the maximum value of the serial number and the preset value, the preset value being the number of bits included in the data block; according to the moving window, the L identification sets are divided, and the identification sets in the moving window are combined to The forwarding table entry including the M identity sets is obtained.
  • the size of the moving window can be set as required, and in this embodiment of the present application, the moving window is 5 identification sets.
  • 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 embodiment corresponding to FIG. 12 is described from the perspective of the logical structure, and can be set to the device as the BFIR or the device as the intermediate BFR mentioned in any of the foregoing Embodiments 1 to 4, such as The device 210 , the device 209 , the device 206 or the device 208 and so on in the scene shown in FIG. 2 , and the device 510 , the device 509 , the device 506 or the device 508 and the like in the scene shown in FIG. 5 .
  • the apparatus 1200 includes a receiving unit 1201 and an obtaining unit 1202 .
  • the receiving unit 1201 is configured to receive the device's identifier and BFR-id sent by the device, where the BFR-id is used to identify a BFER that can communicate with the device, and the device is the BFER or reaches the BFER The first BFR passed.
  • the obtaining unit 1202 is configured to obtain a forwarding table entry according to the identification of the device and the BFR-id, the index of the forwarding table entry corresponds to the BFR-id, and the forwarding table entry is used to directly obtain according to the index
  • the forwarding entry includes the identifier of the device as the next hop.
  • the apparatus 1200 is the device 210 in the first embodiment, and the obtaining unit 1202 is configured to support the device 210 to perform 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 perform 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 perform S303 in the first embodiment.
  • the index is a serial number corresponding to the BFR-id, and the device identifier corresponds to a serial number.
  • the forwarding table entry in the first possible implementation manner may be the forwarding table entry included in the forwarding table such as Table 2-1, Table 2-4, Table 2-7, or Table 2-10 in the first embodiment.
  • the forwarding table entry is based on the above-mentioned first possible implementation manner, and further includes a first bit string, and the first bit string has one and only one bit that is set to 1 , and the offset of the bit set to 1 in the first bit string in the first bit string corresponds to the sequence number included in the forwarding entry where it is located.
  • the forwarding entries in the second possible implementation manner may be the forwarding entries included in the forwarding tables such as Table 2-2, Table 2-5, Table 2-8, or Table 2-11 in the first embodiment.
  • the forwarding table entry includes N identifiers, the N is less than or equal to the value of the read bit width, the N identifiers include the identifier of the device, and the N identifiers The order of any of the included identifiers in the forwarding entry corresponds to the sequence number.
  • the forwarding entry in the third possible implementation manner may be the forwarding entry included in the forwarding table such as Table 2-3, Table 2-6, Table 2-9, or Table 2-12 in the first embodiment.
  • the index is used to identify the row where M identification sets are located, where M is an integer greater than or equal to 2, the M identification sets include the identification of the device, and the The identification set to which the identification of the device belongs corresponds to the data block to which the serial number belongs, and the order of the identification of the device in the identification set to which it belongs corresponds to the serial number.
  • the forwarding entries in the fourth possible implementation manner may be the forwarding entries included in the forwarding tables such as Table 3-2, Table 3-3, Table 3-5, or Table 3-7 in the third embodiment.
  • the obtaining unit 1202 is further configured to: obtain the corresponding BFR-id according to the BFR-id the serial number; according to the serial number and the device identifier, the forwarding table entry is obtained, the index of the forwarding table entry is the serial number, and the next hop of the forwarding table entry is the device 's identification.
  • the obtaining unit 1202 is further configured to: obtain the first bit string and the BFR according to the BFR-id The serial number corresponding to the -id; according to the serial number, the first bit string and the identifier of the device, the forwarding table entry is obtained, the index of the forwarding table entry is the serial number, the 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 of the forwarding table entry is the identifier of the device.
  • the obtaining unit 1202 is further configured to: obtain the corresponding sequence number according to the BFR-id; Read the bit width, sort the serial number and the identifier of the device, and obtain the forwarding table entry, where the line number of the forwarding table entry corresponds to the quotient of the serial number and the read bit width, The order of the identifiers of the devices included in the forwarding entry in the N identifiers corresponds to the sequence number.
  • the obtaining unit 1202 is further configured to: obtain the corresponding sequence number according to the BFR-id; The ordering, the identification corresponding to the serial number is divided, and L identification sets are obtained, the L corresponding to the maximum value of the serial number and the quotient of a preset value, and the preset value is the number of bits included in the data block; The L identification sets are divided according to the moving window, and the identification sets in the moving window are combined to obtain the forwarding table entry including the M identification sets.
  • the size of the moving window can be set as required, and in this embodiment of the present application, the moving window is 5 identification sets.
  • 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 another schematic structural diagram of a forwarding device provided by an embodiment of the present application.
  • the forwarding device 1300 provided by the embodiment corresponding to FIG. 13 may be the forwarding device 1100 provided by the embodiment corresponding to FIG. 11 , or the forwarding device where the apparatus 1200 provided by the embodiment corresponding to FIG. 12 is located.
  • the forwarding device 1300 provided by the embodiment corresponding to FIG. 13 is described from the perspective of 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 through a communication bus 1304 .
  • the memory 1302 is used to store programs.
  • the processor 1301 executes the method executed by the device 210 in the second embodiment above according to the executable instructions included in the program read from the memory 1302, or executes the above The method performed by the device 510 in the fourth embodiment.
  • the processor 1301 executes the device 209 , the device 206 or the device 208 in the second embodiment above according to the executable instructions included in the program read from the memory 1302 Execute the method, or execute the method executed by the device 509, the device 506, or the device 508 in the fourth embodiment.
  • FIG. 14 is another schematic structural diagram of an apparatus for generating a forwarding entry provided by an embodiment of the present application.
  • the apparatus 1400 provided by the embodiment corresponding to FIG. 14 may be the apparatus 1200 provided by the embodiment corresponding to FIG. 12 .
  • the apparatus 1400 provided by the embodiment corresponding to FIG. 14 is described from the perspective of hardware structure.
  • the apparatus 1400 includes 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 through a communication bus 1404 .
  • the memory 1402 is used to store programs.
  • the processor 1401 executes the method executed by the device 210 in the first embodiment or the method in the third embodiment according to the executable instructions included in the program read from the memory 1402 A method performed by device 510.
  • the processor 1401 executes the device 209 , the device 206 or the device 208 in the first embodiment according to the executable instructions included in the program read from the memory 1402 . method, or perform the method performed by the device 509, the device 506, or the device 508 in the third embodiment.
  • An 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 used to execute the method executed by the device serving as the BFIR in the second embodiment or the fourth embodiment, or 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 used to execute the method performed by the device serving as the BFIR in the first embodiment or the third embodiment, or the method performed by the device serving as the intermediate BFR in the first embodiment or the third embodiment.
  • An embodiment of the present 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 execute the method for determining the next hop provided in the second embodiment or the fourth embodiment.
  • the chip may include the memory 1401 and the processor 1401 shown in FIG. 14 .
  • the memory 1402 is used to store computer instructions.
  • the processor 1401 is configured to call and execute the computer instructions from the memory 1402 to execute the method for generating a forwarding entry provided in Embodiment 1 or Embodiment 3.
  • the chip provided by the embodiment of the present application may be disposed on the forwarding hardware, or the forwarding circuit included in the forwarding hardware may be integrated with the chip provided by the embodiment of the present application.
  • At least one item (piece) refers to one or more, and “multiple” refers to two or more.
  • At least one item(s) below” or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s).
  • at least one item (a) of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple .
  • “A and/or B” is considered to include A alone, B alone, and A+B.
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical module division.
  • multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be acquired according to actual needs to achieve the purpose of the solution in this embodiment.
  • each module unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit may be implemented in the form of hardware, or may be implemented in the form of software module units.
  • the integrated unit if implemented in the form of a software module unit and sold or used as a stand-alone product, may be stored in a computer-readable storage medium.
  • the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .
  • the functions described in the present invention may be implemented in hardware, software, firmware, or any combination thereof.
  • 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 medium can be any available medium that can be accessed by a general purpose or special purpose computer.

Abstract

Embodiments of the present application provide a method for obtaining a next hop, comprising: receiving a bit index explicit replication (BIER) multicast message, the BIER multicast message comprising a first bit string, bit set to 1 and comprised by the first bit string corresponds to a bit forwarding ingress router (BFER); determining an index of a forwarding-table entry according to the bit in the first bit string set to 1, the forwarding-table entry comprising said index and an identification of a device as a next hop; according to the index, directly obtaining the identification of the device. Also provided by embodiments of the present application is a method for generating a forwarding-table entry, comprising: an identification and BFR-id of a device sent by a receiving device; according to the identification and BFR-id of the device, obtaining a forwarding-table entry, the index of the forwarding-table entry corresponding to the BFR-id, the forwarding-table entry being used for directly obtaining, according to the index, the identification of the device comprised by the forwarding-table entry as the next hop. The BFR-id in the described method is used for identifying the BFER which can communicate with the device, and the device in the described method is a BFER or a first intermediate BFR through which the BFER is reached.

Description

获取下一跳的方法、生成转发表项的方法及装置Method for obtaining next hop, method and device for generating forwarding entry
本申请要求于2020年9月11日提交国家知识产权局、申请号为202010956283.2、发明名称为“一种处理组播报文的方法及装置”的中国专利申请的优先权,并要求于2020年11月13日提交国家知识产权局、申请号为202011273084.8、发明名称为“获取下一跳的方法、生成转发表项的方法及装置”的中国专利申请的优先权。上述中国专利申请的全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202010956283.2 and the invention titled "A Method and Device for Processing Multicast Messages", which was submitted to the State Intellectual Property Office on September 11, 2020, and is claimed in 2020 The priority of the Chinese patent application submitted to the State Intellectual Property Office on November 13, the application number is 202011273084.8, and the invention title is "method for obtaining the next hop, method and device for generating a forwarding entry". The entire contents of the above Chinese patent application are incorporated herein by reference.
技术领域technical field
本申请涉及通信技术领域,特别涉及一种获取下一跳的方法、生成转发表项的方法及装置。The present application relates to the field of communication technologies, and in particular, to a method for acquiring a next hop, a method and an apparatus for generating a forwarding entry.
背景技术Background technique
在位索引显式复制(Bit Index Explicit Replication,BIER)域内,位转发入口路由器(bit forwarding ingress router,BFIR)或中间BIER转发路由器(transit bit forwarding router,transit BFR)在转发BIER组播报文时,可根据BIER组播报文中携带的比特串(bit string)和配置的位索引转发表(bit index forwarding table,BIFT),确定作为下一跳的BFR邻居(BFR neighbor,BFR-NBR)。具体地,BFIR将接收到的第一BIER组播报文包括的bit string中被置1的比特位在bit string中的偏移量作为序列号(sequence number,SN),获得BIFT表项(entry)。该BIFT表项中包括的转发位串掩码(forwarding bitmask,F-BM)与第一BIER组播报文包括的bit string进行与操作,获得更新后的bit string。BFIR用更新后的bit string替换第一BIER组播报文包括的bit string,获得第二BIER组播报文。BFIR将第二BIER组播报文发送给BIFT表项中包括的BFR邻居。In the Bit Index Explicit Replication (BIER) domain, the bit forwarding ingress router (BFIR) or the intermediate BIER forwarding router (transit bit forwarding router, transit BFR) forwards BIER multicast packets when forwarding , the BFR neighbor (BFR neighbor, BFR-NBR) as the next hop can be determined according to the bit string (bit string) carried in the BIER multicast message and the configured bit index forwarding table (BIFT). Specifically, the BFIR takes the offset of the bit in the bit string that is set to 1 in the bit string included in the received first BIER multicast packet as the sequence number (sequence number, SN), and obtains the BIFT entry (entry ). The forwarding bitmask (F-BM) included in the BIFT entry is ANDed with the bit string included in the first BIER multicast packet to obtain the updated bit string. BFIR replaces the bit string included in the first BIER multicast packet with the updated bit string to obtain the second BIER multicast packet. The BFIR sends the second BIER multicast packet to the BFR neighbors included in the BIFT entry.
上述利用BIFT转发BIER组播报文的过程中,以比特串长度(bit string length,BSL)为256为例,BIFT中一条表项包括占用256位(bit)的F-BM字段和占用8bit的BFR邻居字段。当BFR邻居数量比较多的时候,BFIR或中间BFR每复制一份报文至少需要从内存读取256bit的F-BM字段中的数据,比如复制10份报文,就需要读取至少2560bit的数据,对转发硬件的性能要求较高,且现有的转发硬件的性能无法支持BSL为512或者1024的BIER转发场景。In the above process of forwarding BIER multicast packets using BIFT, taking the bit string length (BSL) as 256 as an example, an entry in BIFT includes the F-BM field occupying 256 bits (bit) and the F-BM field occupying 8 bits. BFR neighbor field. When the number of BFR neighbors is large, BFIR or intermediate BFR needs to read at least 256 bits of data in the F-BM field from memory for each copy of a message. For example, to copy 10 messages, at least 2560 bits of data need to be read. , the performance requirements of the forwarding hardware are relatively high, and the performance of the existing forwarding hardware cannot support the BIER forwarding scenario with a BSL of 512 or 1024.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供了一种获取下一跳的方法、生成转发表项的方法及装置,能够降低对转发硬件的性能需求和提高转发效率。Embodiments of the present application provide a method for acquiring a next hop, a method and an apparatus for generating a forwarding entry, which can reduce performance requirements on forwarding hardware and improve forwarding efficiency.
第一方面,提供了一种获取下一跳的方法,所述方法包括:接收BIER组播报文,所述BIER组播报文包括第一bit string,所述第一bit stirng包括的被置1的比特bit与位转发出口路由器(bit forwarding egress router,BFER)对应;根据所述第一bit string中被置1的bit确定转发表项的索引,所述转发表项包括所述索引和作为下一跳的设备的标识;根据所述索引直接获得所述设备的标识,所述设备为所述BFER或者到达所述BFER所经过的第一中间 BFR。In a first aspect, a method for obtaining a next hop is provided, the method comprising: receiving a BIER multicast message, where the BIER multicast message includes a first bit string, and the first bit string includes a set The bit bit of 1 corresponds to the bit forwarding egress router (BFER); the index of the forwarding table entry is determined according to the bit set to 1 in the first bit string, and the forwarding table entry includes the index and the The identifier of the device of the next hop; the identifier of the device is directly obtained according to the index, and the device is the BFER or the first intermediate BFR through which the BFER is reached.
上述方法中,根据转发表项的索引直接获得对应的设备的标识,而无需查找通常的BIFT表项中的F-BM中的bit string,有助于降低对转发硬件的性能需求和提高转发效率。In the above method, the identification of the corresponding device is directly obtained according to the index of the forwarding entry, without the need to look up the bit string in the F-BM in the usual BIFT entry, which helps to reduce the performance requirements for the forwarding hardware and improve the forwarding efficiency. .
在一种可能的实现方式中,所述索引为与所述BFER的位转发路由器标识BFR-id对应的序列号,所述设备的标识对应一个序列号。上述转发表项可支持BSL为512bit或1024bit网络场景中的转发行为,能够进一步提高可扩展性。In a possible implementation manner, the index is a serial number corresponding to the bit forwarding router identifier BFR-id of the BFER, and the identifier of the device corresponds to a serial number. The above forwarding entry can support forwarding behavior in a network scenario where the BSL is 512bit or 1024bit, which can further improve scalability.
在一种可能的实现方式中,所述转发表项还包括第二bit string,所述第二bit string有且仅有1位被置1的bit,且所述第二bit string中被置1的bit在所述第二bit string的偏移量与其所在的转发表项包括的序列号对应。其中,基于该转发表项,所述根据所述索引直接获得所述设备的标识包括:根据所述序列号获得所述转发表项包括的所述作为下一跳的设备的标识,而不查找所述转发表项包括的所述第二bit string。由于无需对F-BM进行读取操作,根据索引直接确定设备的标识,可以进一步提高转发效率。In a possible implementation manner, the forwarding table entry further includes a second bit string, the second bit string has and only 1 bit is set to 1, and the second bit string is set to 1 The offset of the bit in the second bit string corresponds to the sequence number included in the forwarding entry where it is located. Wherein, based on the forwarding entry, the directly obtaining the identifier of the device according to the index includes: obtaining the identifier of the device as the next hop included in the forwarding entry according to the serial number, without searching The second bit string included in the forwarding entry. Since the F-BM does not need to be read, the device identifier can be directly determined according to the index, which can further improve the forwarding efficiency.
在一种可能的实现方式中,所述转发表项包含N个标识,所述N小于或等于读取位宽的值,所述N个标识包括所述设备的标识,所述N个标识包括的任一标识在所述转发表项中的排序与所述序列号对应。基于该转发表项,所述根据所述索引直接获得所述设备的标识包括:根据所序列号和所述读取位宽确定行号,所述行号对应所述序列号与所述读取位宽的商;获取所述行号对应的所述转发表项包括的所述N个标识。上述转发表项无需存储通常的F-BM,可节省存储空间,降低了读取F-BM时对转发硬件的高性能需求。此外,采用上述转发表项可支持BSL为512bit或1024bit网络场景中的转发行为,能够进一步提高可扩展性。In a possible implementation manner, the forwarding table entry includes N identifiers, the N is less than or equal to a value of the read bit width, the N identifiers include the device identifier, and the N identifiers include The order of any identifier of , in the forwarding entry corresponds to the sequence number. Based on the forwarding entry, the directly obtaining the identifier of the device according to the index includes: determining a line number according to the serial number and the read bit width, where the line number corresponds to the serial number and the read bit width. The quotient of the bit width; obtain the N identifiers included in the forwarding entry corresponding to the line number. The above forwarding table entry does not need to store the usual F-BM, which can save storage space and reduce the high-performance requirement for forwarding hardware when reading the F-BM. In addition, using the above forwarding entry can support forwarding behavior in a network scenario where the BSL is 512bit or 1024bit, which can further improve scalability.
在一种可能的实现方式中,所述根据所述第一bit string中被置1的bit确定转发表项的索引包括:获取所述第一bit string中被置1的bit在所述第一bit string中的偏移量;根据所述偏移量确定所述索引,所述偏移量与所述索引对应。In a possible implementation manner, the determining the index of the forwarding table entry according to the bit set to 1 in the first bit string includes: obtaining the bit set to 1 in the first bit string in the first bit string. The offset in the bit string; the index is determined according to the offset, and the offset corresponds to the index.
在一种可能的实现方式中,所述索引用于标识M个标识集所在的行,所述M为大于或等于2的整数,所述M个标识集包括所述设备的标识,所述设备的标识所属的标识集对应所述序列号所属的数据块,所述设备的标识在其所属的标识集内的排序对应所述序列号。上述转发表项无需存储通常的F-BM,可节省存储空间,降低了读取F-BM时对转发硬件的高性能需求。此外,采用上述转发表项可支持BSL为512bit或1024bit网络场景中的转发行为,能够进一步提高可扩展性。In a possible implementation manner, the index is used to identify the row where M identification sets are located, where M is an integer greater than or equal to 2, the M identification sets include the identification of the device, the device The identity set to which the identity of the device belongs corresponds to the data block to which the serial number belongs, and the order of the identity of the device in the identity set to which it belongs corresponds to the serial number. The above forwarding table entry does not need to store the usual F-BM, which can save storage space and reduce the high-performance requirement for forwarding hardware when reading the F-BM. In addition, using the above forwarding entry can support forwarding behavior in a network scenario where the BSL is 512bit or 1024bit, which can further improve scalability.
在一种可能的实现方式中,所述根据所述第一bit string中被置1的bit确定转发表项的索引包括:根据所述第一bit string和读取位宽,确定所述第一bit string中被置1的bit所属的数据块;获取与所述第一bit string中被置1的bit所属的数据块对应的标识集,所述M个标识集包括所述数据块对应的所述标识集;根据所述数据块对应的所述标识集,确定所述M个标识集所在的行。In a possible implementation manner, the determining the index of the forwarding table entry according to the bit set to 1 in the first bit string includes: determining the first bit string and the read bit width according to the first bit string. The data block to which the bit set to 1 in the bit string belongs; obtain the identity set corresponding to the data block to which the bit set to 1 in the first bit string belongs, and the M identity sets include all the corresponding data blocks. The identification set is determined; according to the identification set corresponding to the data block, the row where the M identification sets are located is determined.
在一种可能的实现方式中,根据所述索引直接获得所述设备的标识包括:从所述索引包括的所述M个标识集获取所述设备的标识。In a possible implementation manner, directly obtaining the identification of the device according to the index includes: obtaining the identification of the device from the M identification sets included in the index.
在一种可能的实现方式中,所述方法还包括:接收所述设备发送的所述设备的标识和所述BFR-id;根据所述BFR-id获得与其对应的所述序列号;根据所述序列号和所述设备的标识,获得所述转发表项,所述转发表项的索引为所述序列号,所述转发表项的下一跳为所述设备的标识。In a possible implementation manner, the method further includes: receiving the device identifier and the BFR-id sent by the device; obtaining the corresponding serial number according to the BFR-id; The serial number and the identifier of the device are obtained, and the forwarding table entry is obtained, 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 device.
在一种可能的实现方式中,所述方法还包括:接收所述设备发送的所述设备的标识和所述BFR-id;根据所述BFR-id获得所述第二bit string和与所述BFR-id对应的所述序列号;根 据所述序列号、所述第二bit string和所述设备的标识,获得所述转发表项,所述转发表项的索引为所述序列号,所述转发表项的F-BM为所述第二bit string,所述转发表项的所述转发表项的下一跳为所述设备的标识。In a possible implementation manner, the method further includes: receiving the device identifier and the BFR-id sent by the device; obtaining the second bit string and the BFR-id according to the BFR-id The serial number corresponding to the BFR-id; according to the serial number, the second bit string and the device identifier, the forwarding table entry is obtained, the index of the forwarding table entry is the serial number, and the The F-BM of the forwarding table entry is the second bit string, and the next hop of the forwarding table entry of the forwarding table entry is the identifier of the device.
在一种可能的实现方式中,所述方法还包括:接收所述设备发送的所述设备的标识和所述BFR-id;根据所述BFR-id获得与其对应的所述序列号;按照所述读取位宽,将所述序列号和所述设备的标识进行排序,获得所述转发表项,所述转发表项所在的行号对应所述序列号与所述读取位宽的商,所述转发表项包括的所述设备的标识在所述N个标识中的排序与所述序列号对应。In a possible implementation manner, the method further includes: receiving the device identifier and the BFR-id sent by the device; obtaining the corresponding serial number according to the BFR-id; The read bit width, sort the serial number and the device identifier to obtain the forwarding table entry, where the line number of the forwarding table entry corresponds to the quotient of the serial number and the read bit width , the order of the identifiers of the devices included in the forwarding entry in the N identifiers corresponds to the sequence number.
在一种可能的实现方式中,所述方法还包括:接收所述设备发送的所述设备的标识和所述BFR-id;根据所述BFR-id获得与其对应的所述序列号;按照序列号的排序,对序列号所对应的标识进行划分,获得L个标识集,所述L对应序列号的最大值和预设值的商,所述预设值为所述数据块包括的bit数;根据移动窗口对L个标识集进行划分,并对移动窗口内的标识集进行组合,以获得包括所述M个标识集的所述转发表项。其中,所述序列号的最大值为256,所述预设值为8,所述L为32,所述M为2。In a possible implementation manner, the method further includes: receiving the device identifier and the BFR-id sent by the device; obtaining the corresponding sequence number according to the BFR-id; Sorting of the serial numbers, dividing the identifiers corresponding to the serial numbers to obtain L identifier sets, where 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 ; Divide the L identification sets according to the moving window, and combine the identification sets in the moving window to obtain the forwarding entry including the M identification sets. The maximum value of the serial number is 256, the preset value is 8, the L is 32, and the M is 2.
上述第一方面提供的方法可由BFIR执行或者由第二中间BFR执行。The method provided by the above-mentioned first aspect may be performed by the BFIR or by the second intermediate BFR.
第二方面,提供一种生成转发表项的方法,所述方法包括:接收设备发送的所述设备的标识和BFR-id,所述BFR-id用于标识能够与所述设备通信的BFER,所述设备为所述BFER或者到达所述BFER所经过的第一BFR;根据所述设备的标识和所述BFR-id,获取转发表项,所述转发表项的索引对应所述BFR-id,所述转发表项用于根据所述索引直接获得所述转发表项包括的作为下一跳的设备的标识。In a second aspect, a method for generating a forwarding entry is provided, the method comprising: receiving an identifier of the device and a BFR-id sent by a device, where the BFR-id is used to identify a BFER capable of communicating with the device, The device is the BFER or the first BFR passed through to the BFER; according to the device identifier and the BFR-id, a forwarding entry is obtained, and the index of the forwarding entry corresponds to the BFR-id , the forwarding table entry is used to directly obtain, according to the index, the identifier of the device as the next hop included in the forwarding table entry.
在一种可能的实现方式中,所述索引为与所述BFR-id对应的序列号,所述设备的标识对应一个序列号。In a possible implementation manner, the index is a serial number corresponding to the BFR-id, and the device identifier corresponds to a serial number.
在一种可能的实现方式中,所述转发表项还包括第一bit string,所述第一bit string有且仅有1位被置1的bit,且所述第一bit string中被置1的bit在所述第一bit string的偏移量与其所在的转发表项包括的序列号对应。In a possible implementation manner, the forwarding table entry further includes a first bit string, the first bit string has and only 1 bit is set to 1, and the first bit string is set to 1 The offset of the bit in the first bit string corresponds to the sequence number included in the forwarding entry where it is located.
在一种可能的实现方式中,所述转发表项包含N个标识,所述N小于或等于读取位宽的值,所述N个标识包括所述设备的标识,所述N个标识包括的任一标识在所述转发表项中的排序与所述序列号对应。In a possible implementation manner, the forwarding table entry includes N identifiers, the N is less than or equal to a value of the read bit width, the N identifiers include the device identifier, and the N identifiers include The order of any identifier of , in the forwarding entry corresponds to the sequence number.
在一种可能的实现方式中,所述索引用于标识M个标识集所在的行,所述M为大于或等于2的整数,所述M个标识集包括所述设备的标识,所述设备的标识所属的标识集对应所述序列号所属的数据块,所述设备的标识在其所属的标识集内的排序对应所述序列号。In a possible implementation manner, the index is used to identify the row where M identification sets are located, where M is an integer greater than or equal to 2, the M identification sets include the identification of the device, the device The identity set to which the identity of the device belongs corresponds to the data block to which the serial number belongs, and the order of the identity of the device in the identity set to which it belongs corresponds to the serial number.
在一种可能的实现方式中,所述方法还包括:根据所述BFR-id获得与其对应的所述序列号;根据所述序列号和所述设备的标识,获得所述转发表项,所述转发表项的索引为所述序列号,所述转发表项的下一跳为所述设备的标识。In a possible implementation manner, the method further includes: obtaining the corresponding serial number according to the BFR-id; obtaining the forwarding entry according to the serial number and the identifier of the device. The index of the forwarding entry is the sequence number, and the next hop of the forwarding entry is the identifier of the device.
在一种可能的实现方式中,所述方法还包括:根据所述BFR-id获得所述第一bit string和与所述BFR-id对应的所述序列号;根据所述序列号、所述第一bit string和所述设备的标识,获得所述转发表项,所述转发表项的索引为所述序列号,所述转发表项的F-BM为所述第一bit string,所述转发表项的所述转发表项的下一跳为所述设备的标识。In a possible implementation manner, the method further includes: obtaining the first bit string and the sequence number corresponding to the BFR-id according to the BFR-id; The first bit string and the identifier of the device, obtain the forwarding table entry, the index of the forwarding table entry is the serial number, the F-BM of the forwarding table entry is the first bit string, the The next hop of the forwarding entry of the forwarding entry is the identifier of the device.
在一种可能的实现方式中,所述方法还包括:根据所述BFR-id获得与其对应的所述序列号;按照所述读取位宽,将所述序列号和所述设备的标识进行排序,获得所述转发表项,所述转发表项所在的行号对应所述序列号与所述读取位宽的商,所述转发表项包括的所述设备 的标识在所述N个标识中的排序与所述序列号对应。In a possible implementation manner, the method further includes: obtaining the corresponding serial number according to the BFR-id; Sort, obtain the forwarding table entry, the line number where the forwarding table entry is located corresponds to the quotient of the serial number and the read bit width, and the identifier of the device included in the forwarding table entry is in the N The ordering in the identification corresponds to the sequence number.
在一种可能的实现方式中,所述方法还包括:根据所述BFR-id获得与其对应的所述序列号;按照序列号的排序,对序列号所对应的标识进行划分,获得L个标识集,所述L对应序列号的最大值和预设值的商,所述预设值为所述数据块包括的bit数;根据移动窗口对L个标识集进行划分,并对移动窗口内的标识集进行组合,以获得包括所述M个标识集的所述转发表项。其中,所述序列号的最大值为256,所述预设值为8,所述L为32,所述M为2。In a possible implementation manner, the method further includes: obtaining the corresponding serial number according to the BFR-id; dividing the identifiers corresponding to the serial numbers according to the ordering of the serial numbers to obtain L identifiers set, the quotient of the maximum value of the corresponding sequence number and the preset value of the L, and the preset value is the number of bits included in the data block; according to the moving window, the L identification sets are divided, and the numbers in the moving window are divided. The identification sets are combined to obtain the forwarding entry including the M identification sets. The maximum value of the serial number is 256, the preset value is 8, the L is 32, and the M is 2.
上述第二方面提供的方法可由BFIR执行或者由第二中间BFR执行。The method provided by the second aspect above may be performed by the BFIR or by the second intermediate BFR.
第三方面,提供一种转发设备,所述转发设备包括用于实现上述第一方面或第一方面下的可能的实现方式提供的方法包括的步骤对应功能的单元。In a third aspect, a forwarding device is provided, where the forwarding device includes a unit for implementing the functions corresponding to the steps included in the method provided in the above-mentioned first aspect or possible implementation manners of the first aspect.
第四方面,提供一种生成转发表项的装置,所述装置包括用于实现上述第二方面或第二方面下的可能的实现方式提供的方法包括的步骤对应功能的单元。In a fourth aspect, an apparatus for generating a forwarding table entry is provided, where the apparatus includes a unit for implementing the functions corresponding to the steps included in the method provided in the above-mentioned second aspect or possible implementation manners of the second aspect.
第五方面,提供一种***,所述***包括第三方面提供的转发设备,或者所述***包括第四方面提供的生成转发表项的装置。A fifth aspect provides a system, where the system includes the forwarding device provided in the third aspect, or the system includes the apparatus for generating a forwarding entry provided in the fourth aspect.
第六方面,提供一种芯片,所述芯片包括存储器和处理器,所述存储器用于存储计算机指令,所述处理器用于从所述存储器中调用并运行所述计算机指令,以执行第一方面或第一方面下的可能的实现方式提供的获取下一跳的方法,或者以执行第二方面或第二方面下的可能的实现方式提供的生成转发表项的方法。In a sixth aspect, a chip is provided, the chip includes a memory and a processor, the memory is used to store computer instructions, and the processor is used to call and execute the computer instructions from the memory to execute the first aspect. Or the method for obtaining the next hop provided by the possible implementation manner of the first aspect, or the method for generating a forwarding entry provided by executing the second aspect or the possible implementation manner of the second aspect.
第七方面,提供一种计算机程序产品,所述计算机程序产品包括一个或多个计算机程序指令,当所述计算机程序指令被计算机加载并执行时,使得所述计算机执行第一方面或第一方面下的可能的实现方式提供的获取下一跳的方法,或者执行第二方面或第二方面下的可能的实现方式提供的生成转发表项的方法。In a seventh aspect, a computer program product is provided, the computer program product comprising one or more computer program instructions which, when loaded and executed by a computer, cause the computer to perform the first aspect or the first aspect The method for obtaining the next hop provided by the following possible implementation manners, or the method for generating a forwarding table entry provided by the second aspect or the possible implementation manners of the second aspect is performed.
第八方面,提供一种计算机可读存储介质,所述计算机可读存储介质用于存储指令,所述指令中包括用于执行第一方面或第一方面下的可能的实现方式提供的获取下一跳的方法所设计的程序,或者所述指令中包括用于执行第二方面或第二方面下的可能的实现方式提供的生成转发表项的方法所设计的程序。In an eighth aspect, a computer-readable storage medium is provided, the computer-readable storage medium is used to store instructions, and the instructions include an acquisition method for executing the first aspect or a possible implementation manner of the first aspect. A program designed by the one-hop method, or the instruction includes a program designed for executing the second aspect or the method for generating a forwarding entry provided by a possible implementation manner of the second aspect.
第九方面,提供一种转发设备,所述转发设备包括处理器和存储供所述处理器执行的程序指令的非瞬时性计算机可读存储介质,所述程序指令指示所述处理器执行第一方面或第一方面下的可能的实现方式提供的获取下一跳的方法。In a ninth aspect, a forwarding device is provided, the 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 execute a first The method for obtaining the next hop provided by the aspect or possible implementation manners under the first aspect.
第十方面,提供一种生成转发表项的装置,其特征在于,所述装置包括处理器和存储供所述处理器执行的程序指令的非瞬时性计算机可读存储介质,所述程序指令指示所述处理器执行第二方面或第二方面下的可能的实现方式提供的生成转发表项的方法。A tenth aspect provides an apparatus for generating a forwarding entry, characterized in that the apparatus includes a processor and a non-transitory computer-readable storage medium storing program instructions for execution by the processor, the program instructions indicating The processor executes the method for generating a forwarding entry provided in the second aspect or possible implementation manners of the second aspect.
附图说明Description of drawings
图1为一种BIER网络场景示意图。FIG. 1 is a schematic diagram of a BIER network scenario.
图2为本申请实施例提供的BIER网络场景示意图。FIG. 2 is a schematic diagram of a BIER network scenario provided by an embodiment of the present application.
图3为本申请实施例一提供的获取转发表项的方法流程示意图。FIG. 3 is a schematic flowchart of a method for obtaining a forwarding entry according to Embodiment 1 of the present application.
图4为本申请实施例二提供的转发组播报文的方法流程示意图。FIG. 4 is a schematic flowchart of a method for forwarding a multicast packet according to Embodiment 2 of the present application.
图5为本申请实施例提供的另一BIER网络场景示意图。FIG. 5 is a schematic diagram of another BIER network scenario provided by an embodiment of the present application.
图6为本申请实施例三提供的获取转发表项的方法流程示意图。FIG. 6 is a schematic flowchart of a method for obtaining a forwarding entry according to Embodiment 3 of the present application.
图7为本申请实施例四提供的转发组播报文的格式示意图。FIG. 7 is a schematic diagram of the format of the forwarding multicast packet according to Embodiment 4 of the present application.
图8为本申请实施例提供的一种BIER组播报文的格式示意图。FIG. 8 is a schematic diagram of a format of a BIER multicast message provided by an embodiment of the present application.
图9为本申请实施例提供的另一种BIER组播报文的格式示意图。FIG. 9 is a schematic diagram of a format of another BIER multicast packet provided by an embodiment of the present application.
图10为本申请实施例提供的又一种BIER组播报文的格式示意图。FIG. 10 is a schematic diagram of the format of another BIER multicast packet provided by an embodiment of the present application.
图11为本申请实施例提供的转发设备的结构示意图。FIG. 11 is a schematic structural diagram of a forwarding device provided by an embodiment of the present application.
图12为本申请实施例提供的生成转发表项的装置的结构示意图。FIG. 12 is a schematic structural diagram of an apparatus for generating a forwarding entry according to an embodiment of the present application.
图13为本申请实施例提供的转发设备的又一结构示意图。FIG. 13 is another schematic structural diagram of a forwarding device provided by an embodiment of the present application.
图14为本申请实施例提供的生成转发表项的装置的又一结构示意图。FIG. 14 is another schematic structural diagram of an apparatus for generating a forwarding entry provided by an embodiment of the present application.
具体实施方式detailed description
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present invention.
图1所示的BIER网络场景中,设备101连接组播接收者1。设备102连接组播接收者2。设备103连接组播接收者3。设备104连接组播接收者4。设备255接收组播接收者5。设备256接收组播接收者6。设备101连接设备105,设备105连接设备109。设备102和设备103连接设备106,设备106连接设备109。设备104连接设备107,设备107连接设备109。设备255和设备256连接设备108,设备108连接设备109。设备109连接设备110,设备110连接组播源。设备110为BFIR。设备109、设备106、设备107和设备108为中间BFR。设备101、设备102、设备103、设备104、设备255和设备256为BFER。设备101被分配的BFR-id为1。设备102被分配的BFR-id为2。设备103被分配的BFR-id为3。设备104被分配的BFR-id为4。设备255被分配的BFR-id为255。设备256被分配的BFR-id为256。上述设备101、设备102、设备103、设备104、设备255和设备256属于同一BIER的子域(sub-domain,SD),且集合标识(set identifier,SI)相同,例如,SI可以是0。In the BIER network scenario shown in FIG. 1 , the device 101 is connected to the multicast receiver 1 . Device 102 connects to multicast receiver 2. Device 103 is connected to multicast receiver 3 . Device 104 is connected to multicast receiver 4 . Device 255 receives multicast recipient 5. Device 256 receives multicast recipient 6 . Device 101 is connected to device 105 , and device 105 is connected to device 109 . Device 102 and device 103 are connected to device 106 , and device 106 is connected to device 109 . Device 104 is connected to device 107 , and device 107 is connected to device 109 . Device 255 and device 256 are connected to device 108 , and device 108 is connected to device 109 . Device 109 is connected to device 110, and device 110 is connected to a multicast source. 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 is assigned a BFR-id of 1. Device 102 is assigned a BFR-id of 2. Device 103 is assigned a BFR-id of 3. Device 104 is assigned a BFR-id of 4. Device 255 is assigned a BFR-id of 255. Device 256 is assigned a BFR-id of 256. The above-mentioned device 101, device 102, device 103, device 104, device 255, and device 256 belong to the sub-domain (sub-domain, SD) of the same BIER, and the set identifier (set identifier, SI) is the same, for example, SI can be 0.
在图1所示的场景中,组播接收者2和组播接收者6需要接收来自组播源的组播报文。作为BFER的设备,比如图1中的设备101、设备102、设备103、设备104、设备255和设备256通过内部网关协议(Interior Gateway Protocol,IGP)泛洪的方式,向其BFR邻居发布自身被分配的BFR-id和设备标识(可表示为a102)。例如:设备102向设备106发布其自身的BFR-id和地址。设备103向设备106发布其自身的BFR-id和设备标识(可表示为a102)。上述设备标识可以是地址或名称等信息。设备106生成BIFT表项,如下表1-1所示。In the scenario shown in FIG. 1 , multicast receiver 2 and multicast receiver 6 need to receive multicast packets from the multicast source. As a BFER device, such as device 101, device 102, device 103, device 104, device 255, and device 256 in FIG. 1, through the way of Interior Gateway Protocol (Interior Gateway Protocol, IGP) flooding, it announces itself to its BFR neighbors. The assigned BFR-id and device identification (may be denoted as a102). For example: device 102 publishes its own BFR-id and address to device 106. Device 103 publishes its own BFR-id and device identification (may be denoted as a102 ) to device 106 . The above-mentioned device identification may be information such as address or name. Device 106 generates BIFT entries, as shown in Table 1-1 below.
表1-1Table 1-1
SNSN F-BM(256bit)F-BM(256bit) BFR-NBRBFR-NBR
11 0000…000000000000000000000000000000000000…00000000000000000000000000000000 00
22 0000…000000000000000000000000000000100000…00000000000000000000000000000010 a102a102
33 0000…000000000000000000000000000001000000…00000000000000000000000000000100 a103a103
256256 0000…000000000000000000000000000000000000…00000000000000000000000000000000 00
在表1-1中,表1-1中的每条BIFT表项包括序列号(sequence number,SN)、F-BM及BFR-NBR。省略号表示省略的SN为4至SN为255的252条为空的表项。上述空的表项可以是表1-1中SN为256的表项的表现形式。表1-1中任一表项包括的SN是与BFR-id对应的数值,比如SN为1表示BFR-id为1,SN为3表示BFR-id为3。表1-1中任一表项中包括的F-BM中的bit string包括被置1的比特位,该被置1的比特位在比特串中的偏移量与BFER 的BFR-id对应。表1-1中任一表项包括的BFR-NBR表示到达F-BM中bit string所对应的BFER所经过的下一跳,该下一跳可以是BFER或中间BFR。比如,SN为2的表项中,a102可以是设备102的设备标识,即SN为2的表项表示到达0000…00000000000000000000000000000010标识的BFR-id为2的BFER(设备102)的下一跳是a102标识的设备(设备102)。SN为3的表项中,a103可以是设备103的设备标识,即SN为3的表项表示到达0000…00000000000000000000000000000100标识的BFR-id为3的BFER(设备103)的下一跳是a103标识的设备(设备103)。In Table 1-1, each BIFT entry in Table 1-1 includes a sequence number (sequence number, SN), F-BM and BFR-NBR. The ellipsis indicates that the omitted 252 entries whose SN is 4 to 255 are empty. The above-mentioned empty table entry may be the representation of the table entry whose SN is 256 in Table 1-1. The SN included in any entry in Table 1-1 is a value corresponding to the BFR-id. For example, an SN of 1 indicates that the BFR-id is 1, and an SN of 3 indicates that the BFR-id is 3. The bit string in the F-BM included in any entry in Table 1-1 includes a bit set to 1, and the offset of the bit set to 1 in the bit string corresponds to the BFR-id of the BFER. The BFR-NBR included in any entry in Table 1-1 indicates the next hop to reach the BFER corresponding to the bit string in the F-BM, and the next hop can be a BFER or an intermediate BFR. For example, in an entry with SN of 2, a102 can be the device identifier of device 102, that is, an entry with SN of 2 indicates that the next hop to BFER (device 102) with BFR-id of 2 identified by 0000...00000000000000000000000000000010 is a102 The identified device (device 102). In the entry with SN of 3, a103 can be the device identifier of device 103, that is, the entry with SN of 3 indicates that the next hop to the BFER (device 103) with BFR-id 3 identified by 0000...0000000000000000000000000000100 is identified by a103 device (device 103).
设备255向设备108发布其自身的BFR-id和设备标识(可表示为a255)。设备256向设备108发布其自身的BFR-id和设备标识(可表示为a256)。设备108生成BIFT表项,如下表1-2所示。Device 255 publishes its own BFR-id and device identification (may be denoted a255) to device 108. Device 256 publishes its own BFR-id and device identification (may be denoted a256) to device 108. Device 108 generates BIFT entries as shown in Table 1-2 below.
表1-2Table 1-2
SNSN F-BM(256bit)F-BM(256bit) BFR-NBRBFR-NBR
11 0000…000000000000000000000000000000000000…00000000000000000000000000000000 00
22 0000…000000000000000000000000000000000000…00000000000000000000000000000000 00
255255 0100…000000000000000000000000000000000100…00000000000000000000000000000000 a255a255
256256 1000…000000000000000000000000000000001000…00000000000000000000000000000000 a256a256
在表1-2中,省略号表示省略的SN为3至SN为254的252条为空的表项。上述空的表项可以是表1-2中SN为1的表项的表现形式。表1-2的SN的含义与表1-1的SN的含义相同。表1-2的F-BM的含义与表1-1的F-BM的含义相同。表1-2的BFR-NBR与表1-1的BFR-NBR的含义相同。其中,SN为255的表项中,a255可以是设备255的设备标识,即SN为255的表项表示到达0100…00000000000000000000000000000000标识的BFR-id为255的BFER(设备255)的下一跳是a255标识的设备(设备255)。SN为256的表项中,a256可以是设备256的设备标识,即SN为256的表项表示到达1000…00000000000000000000000000000000标识的BFR-id为256的BFER(设备256)的下一跳是a256标识的设备(设备256)。In Table 1-2, ellipses indicate the omitted 252 empty entries with SN 3 to SN 254. The above-mentioned empty table entry may be an expression form of the table entry whose SN is 1 in Table 1-2. The meanings of the SNs in Table 1-2 are the same as those of the SNs in Table 1-1. The meaning of F-BM of Table 1-2 is the same as that of F-BM of Table 1-1. The BFR-NBR in Table 1-2 has the same meaning as the BFR-NBR in Table 1-1. Among them, in the entry with SN of 255, a255 can be the device ID of device 255, that is, the entry with SN of 255 indicates that the next hop to the BFER (device 255) with the BFR-id of 255 identified by 0100...0000000000000000000000000000000 is a255 The identified device (device 255). In the entry with SN of 256, a256 can be the device identifier of device 256, that is, the entry with SN of 256 indicates that the next hop to the BFER (device 256) with BFR-id of 256 identified by 1000...0000000000000000000000000000000 is identified by a256 device (device 256).
设备105和设备107生成BIFT表项的方法可参见上述设备106生成BIFT表项的方法,在此不再赘述。For the method for generating the BIFT entry by the device 105 and the device 107, reference may be made to the above-mentioned method for generating the BIFT entry by the device 106, and details are not described herein again.
设备105向设备109发送设备105的设备标识和设备101的BFR-id。设备105的设备标识为a105。设备107向设备109发送设备107的设备标识和设备104的BFR-id。设备107的设备标识为a107。设备106向设备109发送设备106的设备标识、设备102的BFR-id和设备103的BFR-id。设备106的设备标识为a106。设备108向设备109发送设备108的设备标识、设备255的BFR-id和设备256的BFR-id。设备108的设备标识为a108。设备109根据通过IGP泛洪的方式获得的参数,生成BIFT表项,如下表1-3所示。Device 105 sends device 109 the device identification of device 105 and the BFR-id of device 101 . The device ID of device 105 is a105. Device 107 sends device 109 the device identification of device 107 and the BFR-id of device 104 . The device ID of device 107 is a107. Device 106 sends device 109 the device identity of device 106 , the BFR-id of device 102 , and the BFR-id of device 103 . The device ID of device 106 is a106. Device 108 sends device 109 the device identification of device 108, the BFR-id of device 255, and the BFR-id of device 256. The device ID of device 108 is a108. The device 109 generates BIFT entries according to the parameters obtained through IGP flooding, as shown in Table 1-3 below.
表1-3Table 1-3
SNSN F-BM(256bit)F-BM(256bit) BFR-NBRBFR-NBR
11 0000…000000000000000000000000000000010000…00000000000000000000000000000001 a105a105
22 0000…000000000000000000000000000001100000…00000000000000000000000000000110 a106a106
33 0000…000000000000000000000000000001100000…00000000000000000000000000000110 a106a106
44 0000…000000000000000000000000000010000000…00000000000000000000000000001000 a107a107
255255 1100…000000000000000000000000000000001100…00000000000000000000000000000000 a108a108
256256 1100…000000000000000000000000000000001100…00000000000000000000000000000000 a108a108
在表1-3中,省略号表示省略的SN为5至SN为254的250条为空的表项。上述空的表项可以是表1-1中SN为256的表项的表现形式。表1-3的SN的含义与表1-1的SN的含义相同。表1-3的F-BM的含义与表1-1的F-BM的含义相同。表1-3的BFR-NBR与表1-1的BFR-NBR的含义相同。其中,SN为1的表项中,a105是设备105的设备标识,即SN为1的表项表示到达0000…00000000000000000000000000000001标识的BFR-id为1的BFER(设备101)的下一跳是a105标识的设备(设备105)。SN为2的表项中,a106是设备106的设备标识,即SN为2的表项表示到达0000…00000000000000000000000000000110标识的BFR-id为2的BFER(设备102)的下一跳是a106标识的设备(设备106)。SN为3的表项中,a106是设备106的设备标识,即SN为3的表项表示到达0000…00000000000000000000000000000110标识的BFR-id为3的BFER(设备103)的下一跳是a106标识的设备(设备106)。SN为4的表项中,a107是设备107的设备标识,即SN为4的表项表示到达0000…00000000000000000000000000001000标识的BFR-id为4的BFER(设备104)的下一跳是a107标识的设备(设备107)。SN为255的表项中,a108是设备108的设备标识,即SN为255的表项表示到达1100…00000000000000000000000000000000标识的BFR-id为255的BFER(设备255)的下一跳是a108标识的设备(设备108)。SN为256的表项中,a108是设备108的设备标识,即SN为256的表项表示到达1100…00000000000000000000000000000000标识的BFR-id为256的BFER(设备256)的下一跳是a108标识的设备(设备108)。上述SN为2和SN为3的表项中,F-BM包括的bit string相同的原因是设备106向设备109反馈其能够与BFR-id为2和3的BFER通信,即bit string均为0000…00000000000000000000000000000110。基于上述相同的原因,SN为255的表项包括的F-BM与SN为256的表项包括的F-BM相同。In Table 1-3, ellipses indicate the omitted 250 empty entries whose SN is 5 to 254. The above-mentioned empty table entry may be the representation of the table entry whose SN is 256 in Table 1-1. The meanings of SNs in Table 1-3 are the same as those of SNs in Table 1-1. The meaning of F-BM of Table 1-3 is the same as that of F-BM of Table 1-1. The BFR-NBR in Table 1-3 has the same meaning as the BFR-NBR in Table 1-1. Among them, in the entry with SN of 1, a105 is the device identifier of device 105, that is, the entry with SN of 1 indicates that the next hop to the BFER (device 101) with the BFR-id of 1 identified by 0000...0000000000000000000000000000001 is the a105 identifier device (device 105). In the entry with the SN of 2, a106 is the device ID of the device 106, that is, the entry with the SN of 2 indicates that the next hop to the BFER (device 102) with the BFR-id of 2 identified by 0000...0000000000000000000000000000110 is the device identified by a106 (device 106). In the entry with SN of 3, a106 is the device ID of device 106, that is, the entry with SN of 3 indicates that the next hop to the BFER (device 103) with BFR-id 3 identified by 0000...000000000000000000000000000110 is the device identified by a106 (device 106). In the entry with SN of 4, a107 is the device ID of device 107, that is, the entry with SN of 4 indicates that the next hop to the BFER (device 104) with the BFR-id of 4 identified by 0000...000000000000000000000000001000 is the device identified by a107 (device 107). In the entry with SN of 255, a108 is the device ID of device 108, that is, the entry with SN of 255 indicates that the next hop to the BFER (device 255) identified by 1100... (device 108). In the entry with SN of 256, a108 is the device ID of device 108, that is, the entry with SN of 256 indicates that the next hop to the BFER (device 256) identified by 1100...000000000000000000000000000000000000000000000000000000 with BFR-id of 256 (device 256) is the device identified by a108 (device 108). In the above entries with SN of 2 and SN of 3, the reason that the bit strings included in the F-BM are the same is that the device 106 feeds back to the device 109 that it can communicate with the BFERs whose BFR-ids are 2 and 3, that is, the bit strings are both 0000 …00000000000000000000000000000110. For the same reason as above, the F-BM included in the entry whose SN is 255 is the same as the F-BM included in the entry whose SN is 256.
设备109可将其自身的设备标识(可表示为a109)、设备101的BFR-id、设备102的BFR-id、设备103的BFR-id、设备104的BFR-id、设备255的BFR-id和设备256的BFR-id发送给设备110。设备110根据上述参数获得BIFT表项,如下表1-4所示。Device 109 may identify its own device identity (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 BIFT entries according to the above parameters, as shown in the following Tables 1-4.
表1-4Table 1-4
SNSN F-BM(256bit)F-BM(256bit) BFR-NBRBFR-NBR
11 1100…000000000000000000000000000011111100…00000000000000000000000000001111 a109a109
22 1100…000000000000000000000000000011111100…00000000000000000000000000001111 a109a109
33 1100…000000000000000000000000000011111100…00000000000000000000000000001111 a109a109
44 1100…000000000000000000000000000011111100…00000000000000000000000000001111 a109a109
255255 1100…000000000000000000000000000011111100…00000000000000000000000000001111 a109a109
256256 1100…000000000000000000000000000011111100…00000000000000000000000000001111 a109a109
在表1-4中,省略号表示省略的SN为5至SN为254的250条为空的表项。上述表1-1至表1-4包括的BFR-NBR一栏中数值为0表示的是没有下一跳或下一跳为空。BFR-NBR一栏中的…表示的是没有下一跳或下一跳为空。上述空的表项可以是表1-1中SN为256的表项的表现形式。表1-4的SN的含义与表1-1的SN的含义相同。表1-4的F-BM的含义与表1-1 的F-BM的含义相同。表1-4的BFR-NBR与表1-1的BFR-NBR的含义相同。上述SN为1、2、3、4、255和256的表项中,F-BM包括的bit string相同的原因是设备109向设备1110反馈其能够与BFR-id为1、2、3、4、255和256的BFER通信,即bit string均为1100…00000000000000000000000000001111。而上述SN为1、2、3、4、255和256的表项具有相同的下一跳,即a109标识的设备(设备109)。In Table 1-4, ellipses indicate the omitted 250 empty entries from SN 5 to SN 254. A value of 0 in the column of BFR-NBR included in Table 1-1 to Table 1-4 above indicates that there is no next hop or the next hop is empty. ... in the column of BFR-NBR indicates that there is no next hop or the next hop is empty. The above-mentioned empty table entry may be the representation of the table entry whose SN is 256 in Table 1-1. The meanings of SNs in Table 1-4 are the same as those of SNs in Table 1-1. The meaning of F-BM of Table 1-4 is the same as that of F-BM of Table 1-1. The BFR-NBR in Table 1-4 has the same meaning as the BFR-NBR in Table 1-1. In the above entries with SNs 1, 2, 3, 4, 255 and 256, the reason why the bit string included in the F-BM is the same is that the device 109 feeds back to the device 1110 that it can match the BFR-id of 1, 2, 3, 4 , 255 and 256 BFER communication, that is, the bit strings are all 1100...00000000000000000000000000001111. On the other hand, the entries whose SNs are 1, 2, 3, 4, 255, and 256 have the same next hop, that is, the device identified by a109 (device 109).
以图1的BIER网络场景和上述BIFT表(表1-1至表1-4)为例,对组播源向组播接收者2和组播接收者6发送组播报文进行说明。在一种实现方式中,作为BFIR的设备110从组播源接收到包含(S,G)的组播报文。设备110根据组播报文中的(S,G)确定与组播接收者2和组播接收者6分别连接的BFER(设备102和设备256)。设备110根据设备102的BFR-id(数值为2)和设备256的BFR-id(数值为256),获得数值为1000…00000000000000000000000000000010的bit string。设备110在组播报文外层封装BIER头,获得第一BIER组播报文。第一BIER组播报文的BIER头包括数值为1000…00000000000000000000000000000010的bit string。设备110在转发第一BIER组播报文的过程中,设备110将bit string中从右至左方向上首个被置1的比特位在bit string中的偏移量作为SN查找表1-4,获得SN为2的表项。设备110将SN为2的表项中的1100…00000000000000000000000000001111与第一BIER组播报文包括的数值为1000…00000000000000000000000000000010的bit string进行与操作,与操作后的结果与第一BIER组播报文中的bit string相同,不进行bit string替换。设备110向a109标识的设备(SN为2的表项中BFR-NBR中的标识)发送第一BIER组播报文。设备110将SN为2的表项中的1100…00000000000000000000000000001111进行取反操作,获得0011…11111111111111111111111111110000。设备110将取反操作所获得的结果与第一BIER组播报文中的数值为1000…00000000000000000000000000000010的bit string进行与操作,结果全0,结束查询。设备109接收到第一BIER组播报文后,可利用第一BIER组播报文中数值为1000…00000000000000000000000000000010的bit string在从右向左的方向上首个被置1的比特位在bit string中的偏移量(偏移量为2)作为SN查表1-3,获得SN为2表项。设备109可将SN为2的表项中的0000…00000000000000000000000000000110与第一BIER组播报文中数值为1000…00000000000000000000000000000010的bit string进行与操作,获得0000…00000000000000000000000000000010。设备109用与操作所获得的结果替换第一BIER组播报文中数值为1000…00000000000000000000000000000010的bit string,获得第二BIER报文,第二BIER报文包括数值为0000…00000000000000000000000000000010的bit string。设备109向表1-3中SN为2的BFR-NBR标识的设备(设备106)发送第二BIER报文。设备109可将表1-3中SN为2的表项包括的0000…00000000000000000000000000000011进行取反操作,获得1111…11111111111111111111111111111001。设备109将取反操作所获得的结果与第一BIER组播报文中数值为1000…00000000000000000000000000000010的bit string进行与操作,获得1000…00000000000000000000000000000000。设备109用与操作所获得1000…00000000000000000000000000000000中从右至左的方向上首个被置1的比特位在bit string中的偏移量(偏移量为256),作为SN查找表1-3,获得SN为256的表项。设备109可将SN为256的表项中的1100…00000000000000000000000000000000与第一BIER组播报文中数值为1000…00000000000000000000000000000010的bit string进行与操作,获得1000…00000000000000000000000000000000。设备109用与操作获得的结果替换第一BIER组播报文中数值为1000…00000000000000000000000000000010的bit string,获得第三BIER 报文。第三BIER报文包括的bit string为1000…00000000000000000000000000000000。设备109可向表1-3中SN为256的表项包括的BFR-NBR(a108标识的设备),即设备108,发送第三BIER报文。设备106可根据上述设备109所采用的方法,根据接收到的第二BIER组播报文中的bit string查表1-1,向设备102发送第二BIER组播报文。设备108可根据上述设备109所采用的方法,根据接收到的第三BIER组播报文中的bit string查表1-2,向设备256发送第三BIER组播报文。根据上述作为BFIR或中间BFR的转发设备对BIER组播报文的处理过程可以看出,当BSL为256bit时,BIFT中的每一条BIFT表项占用256bit的F-BM和8bit的BFR-NBR。当BFR-NBR的数量较多的时候,转发设备每次复制一份BIER组播报文至少需要从内存读取256bit,在复制256份报文的极限情况下(BSL为256bit时每台转发设备最多能够复制256份报文),需要从内存读取64k bit,对于转发硬件的性能要求极高,转发效率较低,而通常的转发硬件无法支持内存占用空间大于256bit的表项读取操作。Taking the BIER network scenario in FIG. 1 and the above-mentioned BIFT tables (Table 1-1 to Table 1-4) as an example, the multicast source sending multicast packets to the multicast receiver 2 and the multicast receiver 6 will be described. In one implementation, the device 110 acting as a BFIR receives a multicast packet containing (S, G) from a multicast source. Device 110 determines the BFERs (device 102 and device 256 ) respectively connected to multicast receiver 2 and multicast receiver 6 according to (S, G) in the multicast message. The device 110 obtains a bit string with a value of 1000 . The device 110 encapsulates the BIER header in 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 with a value of 1000...00000000000000000000000000000010. When the device 110 forwards the first BIER multicast message, the device 110 uses the offset in the bit string of the first bit set to 1 in the bit string from right to left as the SN lookup table 1-4 , to obtain an entry with an SN of 2. The device 110 performs an AND operation between 1100...0000000000000000000000000001111 in the entry with the SN of 2 and the bit string included in the first BIER multicast packet with a value of 1000...00000000000000000000000000000010, and the result of the AND operation is the same as the bit string in the first BIER multicast packet. String is the same, no bit string replacement is performed. 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 the SN of 2). The device 110 performs a negation operation on 1100...0000000000000000000000000001111 in the entry whose SN is 2, and obtains 0011...1111111111111111111111111110000. The device 110 performs an AND operation on the result obtained by the inversion operation with the bit string whose value is 1000...000000000000000000000000000010 in the first BIER multicast message, and the result is all 0, and the query ends. After receiving the first BIER multicast packet, the device 109 can use the bit string in the first BIER multicast packet whose value is 1000...0000000000000000000000000000010 in the right-to-left direction. The offset (the offset is 2) is used as the SN to look up Table 1-3, and the SN is 2 entry. The device 109 can perform an AND operation between 0000...00000000000000000000000000000110 in the entry whose SN is 2 and the bit string whose value is 1000...000000000000000000000000000000000 in the first BIER multicast packet to obtain 0000...00000000000000. The device 109 replaces the bit string with the value of 1000...00000000000000000000000000000010 in the first BIER multicast packet with the result obtained by the AND operation, and obtains the second BIER packet, and the second BIER packet includes the bit string with the value of 0000...00000000000000000000000000000010. The device 109 sends the second BIER message to the device (device 106 ) identified by the BFR-NBR whose SN is 2 in Table 1-3. The device 109 may perform a negation operation on 0000...00000000000000000000000000000011 included in the entry whose SN is 2 in Table 1-3 to obtain 1111...11111111111111111111111111111001. The device 109 performs an AND operation on the result obtained by the inversion operation with the bit string whose value is 1000...0000000000000000000000000000010 in the first BIER multicast packet, and obtains 1000...0000000000000000000000000000000. The device 109 uses the AND operation to obtain the offset of the first bit set to 1 in the bit string (the offset is 256) in the direction from right to left in 1000...00000000000000000000000000000000, as the SN lookup table 1-3, Obtain the entry whose SN is 256. Equipment 109 can perform Bit String, 1100 ... 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000. The device 109 replaces the bit string with a value of 1000...0000000000000000000000000000010 in the first BIER multicast packet with the result obtained by the AND operation to obtain a third BIER packet. The bit string included in the third BIER message is 1000…0000000000000000000000000000000. The device 109 may send the third BIER message to the BFR-NBR (the device identified by a108 ) included in the entry whose SN is 256 in Table 1-3, that is, the device 108 . The device 106 can look up Table 1-1 according to the bit string in the received second BIER multicast message according to the method adopted by the above-mentioned device 109, and send the second BIER multicast message to the device 102. The device 108 can look up Table 1-2 according to the bit string in the received third BIER multicast message according to the method adopted by the above-mentioned device 109, and send the third BIER multicast message to the device 256. According to the processing process of BIER multicast packets by the forwarding device as BFIR or intermediate BFR, when the BSL is 256 bits, each BIFT entry in BIFT occupies 256 bits of F-BM and 8 bits of BFR-NBR. When the number of BFR-NBR is large, the forwarding device needs to read at least 256 bits from the memory each time it copies a BIER multicast packet. In the limit of 256 copies of the packet (when the BSL is 256 bits, each forwarding device needs to It can copy up to 256 packets), and needs to read 64k bits from the memory. The performance requirements of the forwarding hardware are extremely high, and the forwarding efficiency is low, and the usual forwarding hardware cannot support the entry reading operation with a memory footprint larger than 256 bits.
在另一种实现方式中,图1所示的BIER网络场景中的任一设备获得BIFT的方法以及BIFT的内容与上述实现方式中提及的内容相同,而查表转发操作与上述实现方式不同。以设备109的转发第一BIER组播报文为例进行相关说明。第一BIER组播报文包括数值1000…00000000000000000000000000000010的bit string。设备109从SN为1开始遍历表1-3。设备109将第一BIER组播报文中包括bit string与SN为1的表项中的0000…00000000000000000000000000000001进行与操作,获得全0,不进行报文复制。设备109将SN为1的表项中的0000…00000000000000000000000000000001取反的结果(1111…11111111111111111111111111111110)与第一BIER组播报文中的bit string进行与操作,获得1000…00000000000000000000000000000010,该结果非0,继续遍历下一条SN。设备109将第一BIER组播报文中包括bit string与SN为2的表项中的0000…00000000000000000000000000000001进行与操作,获得非0的0000…00000000000000000000000000000001。设备109用与操作获得的结果替换第一BIER组播报文中的bit string,获得第二BIER组播报文。第二BIER组播报文包括0000…00000000000000000000000000000001。设备109向SN为2的表项中BFR-NBR所标识的设备(设备106)发送第二BIER组播报文。设备109可采用上述相似的方法,遍历至SN为256的表项,并根据SN为256的表项获得第三BIER组播报文并向设备256发送。第三BIER组播报文包括1000…00000000000000000000000000000000。该种实现方式中,BIER网络场景中的设备每次转发BIER组播报文都需要遍历一遍BIFT中的所有BIFT表项,而并非所有的BIFT表项均能完成BIER组播报文的复制和转发,比如BIER组播报文中的bit string和BIFT表项中F-BM中的bit string进行与操作,结果为0的BIFT表项不能用来指导BIER组播报文的转发,这就会存在内存带宽和读取操作的浪费,对转发硬件的性能提出了较高的需求。此外,该种实现方式仍旧会存在前一种实现方式中存在的问题。In another implementation manner, the method for obtaining BIFT by any device in the BIER network scenario shown in FIG. 1 and the content of the BIFT are the same as those mentioned in the above implementation manner, and the table lookup forwarding operation is different from the above implementation manner . The related description is made by taking the forwarding of the first BIER multicast packet by the device 109 as an example. The first BIER multicast packet includes a bit string with a value of 1000...0000000000000000000000000000010. Device 109 traverses Tables 1-3 starting with SN of 1. Device 109 uses the first Bier multicast "10000 ... 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, getting all 0, not packet replication. Equipment 109 Refueling 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 A SN. Equipment 109 The first Bier multicast includes 0000-00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001. The device 109 replaces the bit string in the first BIER multicast packet with the result obtained by the AND operation to obtain the second BIER multicast packet. The second BIER multicast packet 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 whose SN is 2. The device 109 can use a method similar to the above to traverse to the entry with the SN of 256, and obtain the third BIER multicast packet according to the entry with the SN of 256, and send it to the device 256. The third BIER multicast packet includes 1000...00000000000000000000000000000000. In this implementation, each time a device in a BIER network scenario forwards a BIER multicast packet, it needs to traverse all BIFT entries in BIFT, and not all BIFT entries can complete the replication and replication of BIER multicast packets. Forwarding, for example, perform AND operation between the bit string in the BIER multicast packet and the bit string in the F-BM in the BIFT entry. The BIFT entry with the result of 0 cannot be used to guide the forwarding of the BIER multicast packet, which will exist in memory. The waste of bandwidth and read operations places high demands on the performance of the forwarding hardware. In addition, this implementation still has the problems existing in the previous implementation.
为了解决上述方案中的问题,本申请实施例提供了一种获取下一跳的方法,该方法中,接收第一BIER组播报文,所述第一BIER组播报文包括第一bit string,所述第一bit stirng包括的被置1的比特bit与BFER对应;根据所述第一bit string中被置1的bit确定转发表项的索引,所述转发表项包括所述索引和作为下一跳的设备的标识;根据所述索引直接获得所述设备的标识,所述设备为所述BFER或者到达所述BFER所经过的第一BFR。上述方法中,可根据索引直接获得所述设备的标识,而无需执行通常的查找BIFT表项中的F-BM的操作,省去了读取F-BM操作所耗费的硬件资源,能够降低对转发硬件的性能要求,提高转发效率。In order to solve the problem in the above solution, an embodiment of the present application provides a method for obtaining the next hop. In the method, a first BIER multicast packet is received, and the first BIER multicast packet includes a first bit string , the bit that is set to 1 included in the first bit string corresponds to the BFER; the index of the forwarding table entry is determined according to the bit that is set to 1 in the first bit string, and the forwarding table entry includes the index and the The identifier of the device of the next hop; the identifier of the device is directly obtained according to the index, and the device is the BFER or the first BFR through which the BFER is reached. In the above method, the identification of the device can be directly obtained according to the index, without performing the usual operation of finding the F-BM in the BIFT table entry, eliminating the hardware resources consumed by the operation of reading the F-BM, and reducing the need for Performance requirements of forwarding hardware to improve forwarding efficiency.
图2为本申请实施例提供的BIER网络场景示意图。图2所示的BIER网络场景中的设备 101与图1所示BIER网络场景中的设备101相同。图2所示的BIER网络场景中的设备102与图1所示BIER网络场景中的设备102相同。图2所示的BIER网络场景中的设备103与图1所示BIER网络场景中的设备103相同。图2所示的BIER网络场景中的设备104与图1所示BIER网络场景中的设备104相同。图2所示的BIER网络场景中的设备255与图1所示BIER网络场景中的设备255相同。图2所示的BIER网络场景中的设备256与图1所示BIER网络场景中的设备256相同。图2所示的BIER网络场景中的设备210连接组播源。设备210为BFIR。以组播接收者2和组播接收者6需要接收该组播源的组播报文为例进行说明。其它组播接收者接收该组播源的组播报文时,图2所示的BIER网络场景中的设备可采用本申请实施例提供的方法转发BIER组播报文,在此不再赘述。设备205、设备206、设备207、设备208和设备209为中间BFR。设备205分别连接设备101和设备209。设备206分别连接设备102、设备103和设备209。设备207分别连接设备104和设备209。设备208分别连接设备255、设备256和设备209。设备101、设备102、设备103、设备104、设备255、设备256、设备205、设备206、设备207、设备208、设备209和设备210处于同一BIER子域内,比如各设备所属的BIER子域的标识都是0。本申请实施例提及的在BIER子域内有效的BFR-ID指代的是数值非0的BFR-id。作为BFER的设备101、设备102、设备103、设备104、设备255和设备256被分配的BFR-id与图1所示的BIER场景中被配置BFR-id相同,在此不再赘述。图2所示的BIER网络场景是针对BSL为256bit的网络场景,设备101、设备102、设备103、设备104、设备255和设备256的集合标识(set identifier,SI)均为0。上述BSL表示的是bit string的长度,而bit string中的每一个被置1的bit与bit string所属的SI与BFR-id对应,即BSL的长度决定了一个bit string能够标识的BFR-id的范围。当BFR-id的数值超过了BSL长度的bit string所能标识的BFR-id的范围,则需要通过SI和bit string来对BFR-id进行有效的区分和标识。当BFR-id的数值大于256时,可通过设置SI的数值以及BSL为256bit的bit string来对该BIER子域内的BFER进行有效的区分,比如设备的BFR-id是257,则可通过SI为1和数值为0001的bit string来表示BFR-id是257。或者当BFR-id的数值大于256时,可通过扩展bit string的长度来对BFER进行区分,比如BSL为512bit或1024bit来对该BIER子域内的BFER进行区分。FIG. 2 is a schematic diagram of a BIER network scenario provided by 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 the multicast source. Device 210 is a BFIR. The description is given by taking the example that the multicast receiver 2 and the multicast receiver 6 need to receive the multicast packets of the multicast source. When other multicast receivers receive the multicast message from the multicast source, the device in the BIER network scenario shown in FIG. 2 can forward the BIER multicast message by using the method provided in this embodiment of the present application, which is not repeated here. Device 205, Device 206, Device 207, Device 208, and Device 209 are intermediate BFRs. Device 205 is connected to device 101 and device 209, respectively. Device 206 is connected to device 102, device 103 and device 209, respectively. Device 207 is connected to 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 subdomain, such as the BIER subdomain to which each device belongs. The flags are all 0. The BFR-IDs that are valid in the BIER subdomain mentioned in the embodiments of this application refer to BFR-ids with a value other than 0. The BFR-ids assigned to the device 101, device 102, device 103, device 104, device 255, and device 256 serving as BFERs are the same as the BFR-ids configured in the BIER scenario shown in FIG. 1, and are not repeated here. The BIER network scenario shown in FIG. 2 is for a network scenario with a BSL of 256 bits, and the set identifier (SI) of device 101, device 102, device 103, device 104, device 255, and device 256 are all 0. The above BSL represents the length of the bit string, and each bit set to 1 in the bit string corresponds to the SI and BFR-id to which the bit string belongs, that is, the length of the BSL determines the length of the BFR-id that a bit string can identify. Scope. When the value of the BFR-id exceeds the range of the BFR-id that can be identified by the bit string of BSL length, the BFR-id needs to be effectively distinguished and identified by the SI and the bit string. When the value of BFR-id is greater than 256, the BFER in the BIER subdomain can be effectively distinguished by setting the value of SI and the bit string whose BSL is 256 bits. For example, if the BFR-id of the device is 257, it can be set as 1 and a bit string with the value 0001 to indicate that the BFR-id is 257. Or when the value of the BFR-id is greater than 256, the BFER can be distinguished by extending the length of the bit string, for example, the BSL is 512bit or 1024bit to distinguish the BFER in the BIER subfield.
实施例一Example 1
图3为本申请实施例一提供的获取转发表项的方法流程示意图。图3对应的实施例是针对组播接收者2和组播组播接收者6接收组播源的组播报文这一场景,图3及相应实施例中的BFIR可以是图2所示的BIER网络场景中的设备210。图3及相应实施例中的中间BFR可以是图2所示的BIER网络场景中的设备209、设备206或设备208。图3及相应实施例中的BFER可以是图2所示的BIER网络场景中的设备102或设备256。下面结合图2和图3,对本申请实施例提供的获取转发表项的方法进行说明。FIG. 3 is a schematic flowchart of a method for obtaining a forwarding entry according to Embodiment 1 of the present application. The embodiment corresponding to FIG. 3 is for a scenario in which multicast receiver 2 and multicast receiver 6 receive multicast packets from the multicast source. The BFIR in FIG. 3 and the corresponding embodiment may be the one shown in FIG. 2 . Device 210 in a BIER network scenario. The intermediate BFR in FIG. 3 and corresponding embodiments may be the device 209 , the device 206 or the device 208 in the BIER network scenario shown in FIG. 2 . The BFER in FIG. 3 and corresponding embodiments may be the device 102 or the device 256 in the BIER network scenario shown in FIG. 2 . The method for obtaining a forwarding entry provided by this embodiment of the present application will be described below with reference to FIG. 2 and FIG. 3 .
S301,BFER通过IGP发布其自身的BFR-id和设备标识。S301, BFER publishes its own BFR-id and device identifier through IGP.
举例说明,实施例一中的设备标识可以是地址或名称等能够路由至设备的信息。BFER通过IGP泛洪的方式发布其自身的BFR-id和设备标识。在图2所示的场景中,设备101通过IGP泛洪数值为1的BFR-id和设备101的设备标识(可表示为a101)。设备102通过IGP泛洪数值为2的BFR-id和设备102的设备标识(可表示为a102)。设备103通过IGP泛洪数值为3的BFR-id和设备103的设备标识(可表示为a103)。设备104通过IGP泛洪数值为4的BFR-id和设备104的设备标识(可表示为a104)。设备255通过IGP泛洪数值为255的BFR-id和设备255的设备标识(可表示为a255)。设备256通过IGP泛洪数值为256的 BFR-id和设备103的设备标识(可表示为a256)。上述作为BFER的设备可通过通常的IGP泛洪方式发布上述参数,本申请实施例对IGP泛洪的具体实现细节不再赘述。For example, the device identifier in the first embodiment may be information that can be routed to the device, such as an address or a name. BFER publishes its own BFR-id and device ID through IGP flooding. In the scenario shown in FIG. 2 , the device 101 floods the BFR-id with a value of 1 and the device identifier of the device 101 (which can be represented as a101 ) through the IGP. The device 102 floods the BFR-id with a value of 2 and the device identity of the device 102 (may be denoted as a102 ) through the IGP. The device 103 floods the BFR-id with a value of 3 and the device ID of the device 103 (may be represented as a103 ) through the IGP. The device 104 floods the BFR-id with a value of 4 and the device identification of the device 104 (may be denoted as a104 ) through the IGP. The device 255 floods the BFR-id with a value of 255 and the device ID of the device 255 (may be denoted as a255) through the IGP. Device 256 floods the BFR-id with a value of 256 and the device ID of device 103 (may be denoted as a256) through the IGP. The above-mentioned device serving as the BFER may publish the above-mentioned parameters through the usual IGP flooding manner, and the specific implementation details of the IGP flooding in this embodiment of the present application will not be repeated.
S302,中间BFR通过IGP发布其自身的设备标识和BFER的BFR-id。S302, the intermediate BFR publishes its own device identifier and the BFR-id of the BFER through the IGP.
举例说明,中间BFR通过IGP泛洪的方式获取BFER的BFR-id。中间BFR发布其自身的设备地址和获取的BFER的BFR-id。在图2所示的场景中,设备205通过IGP获取数值为1的BFR-id,并通过IGP泛洪数值为1的BFR-id和设备205的设备标识(可表示为a205)。设备206通过IGP获取数值为2的BFR-id和数值为3的BFR-id,通过IGP泛洪数值为2的BFR-id、数值为3的BFR-id和设备206的设备标识(可表示为a206)。设备207通过IGP获取数值为4的BFR-id d,通过IGP泛洪数值为4的BFR-id和设备207的设备标识(可表示为a207)。设备208通过IGP获取数值为25的BFR-id和数值为256的BFR-id,通过IGP泛洪数值为255的BFR-id、数值为256的BFR-id和设备208的设备标识(可表示为a208)。其中,S302提及的中间BFR可以与BFER直连。如果S302提及的中间BFR与BFER并非直连,而是通过其他中间BFR连接BFER,则中间BFR通过IGP获取的BFER的BFR-id来自于其他中间BFR,且中间BFR还可通过IGP泛洪获取其他中间BFR的设备标识。在图2所示的场景中,设备209与作为BFER的设备非直连。设备209通过IGP泛洪获取的参数包括:第一参数组、第二参数组、第三参数组和第四参数组。第一参数组包括a205和数值为1的BFR-id。第二参数组包括a206、数值为2的BFR-id和数值为3的BFR-id。第三参数组包括a207和数值为4的BFR-id。第四参数组包括a208、数值为255的BFR-id和数值为256的BFR-id。设备209通过IGP泛洪a209、数值为1的BFR-id、数值为2的BFR-id、数值为3的BFR-id、数值为4的BFR-id、数值为255的BFR-id和数值为256的BFR-id。For example, the intermediate BFR obtains the BFR-id of the BFER through IGP flooding. The intermediate BFR publishes its own device address and the acquired BFR-id of the BFER. In the scenario shown in FIG. 2 , the device 205 obtains a BFR-id with a value of 1 through the IGP, and floods the BFR-id with a value of 1 and the device identifier of the device 205 (which can be represented as a205 ) through the IGP. The device 206 obtains a BFR-id with a value of 2 and a BFR-id with a value of 3 through the IGP, and floods the BFR-id with a value of 2, a BFR-id with a value of 3, and the device identification of the device 206 through the IGP (which can be expressed as a206). The device 207 obtains a BFR-id d with a value of 4 through the IGP, and floods the BFR-id with a value of 4 and the device identity of the device 207 (which can be represented as a207 ) through the IGP. The device 208 obtains a BFR-id of 25 and a BFR-id of 256 through the IGP, and floods the BFR-id of a208). Among them, the intermediate BFR mentioned in S302 can be directly connected with BFER. If the intermediate BFR mentioned in S302 is not directly connected to the BFER, but is connected to the BFER through other intermediate BFRs, the BFR-id of the BFER obtained by the intermediate BFR through IGP comes from other intermediate BFRs, and the intermediate BFR can also be obtained through IGP flooding Device identification of other intermediate BFRs. In the scenario shown in FIG. 2, the device 209 is not directly connected to the device acting as a BFER. The parameters obtained by the device 209 through IGP flooding include: a first parameter group, a second parameter group, a third parameter group, and a fourth parameter group. The first parameter group includes a205 and a BFR-id with a value of 1. The second parameter group includes a206, a BFR-id with a value of 2, and a BFR-id with a value of 3. The third parameter group includes a207 and a BFR-id with a value of 4. The fourth parameter group includes a208, a BFR-id with a value of 255, and a BFR-id with a value of 256. Device 209 floods a209 through IGP, BFR-id with value 1, BFR-id with value of 2, BFR-id with value of 3, BFR-id with value of 4, BFR-id with value of 255 and value of BFR-id of 256.
S303,中间BFR根据通过IGP泛洪获取的参数,获得第一转发表,所述第一转发表包括序列号和作为下一跳的设备的标识。S303, the intermediate BFR obtains a first forwarding table according to the parameters obtained through IGP flooding, where the first forwarding table includes a sequence number and an identifier of a device serving as a next hop.
举例说明,通过IGP泛洪的BFR-id的表现形式可以是256bit的bit string,通过IGP泛洪的bit string中被置1的bit在bit string中的偏移量为BFR-id的数值。或者通过IGP泛洪的BFR-id的表现形式是具体的1至256中的一个数值,接收到BFR-id的设备将其转换成256bit的bit string,bit string中被置1的bit在bit string中的偏移量为BFR-id的数值。中间BFR根据通过IGP泛洪获取的参数,获得第一转发表包括:中间BFR根据通过IGP泛洪获得的一个BFR-id和与其对应的设备标识,获得所述第一转发表中的一条转发表项,所述转发表项包括序列号和邻居(neighbor,NBR),所述序列号对应BFR-id,所述NBR用于记录作为下一跳的设备的标识。与所述BFR-id对应的设备的标识为能够与所述BFR-id所标识的BFER通信的设备的标识或者为所述BFR-id所标识的BFER的标识。所述NBR用于记录到达BFR-id所标识的BFER所经过的下一跳的邻居设备。如果中间BFR与BFER直连,则所述NBR为BFER的设备标识。如果中间BFR通过其他中间BFR与BFER连接,则所述NBR为其他中间BFR的设备标识。可选地,第一转发表包括的任一转表项还包括bit string,该转发表项中的bit string中被置1的bit的偏移量与BFR-id对应,且该bit string中被置1的bit的数量不大于1。该转发表项还包括F-BM,F-BM用于存储或记录所述bit string。For example, the representation form of the BFR-id flooded through the IGP can be a 256-bit bit string, and the offset of the bit set to 1 in the bit string flooded through the IGP is the value of the BFR-id. Or the representation of the BFR-id flooded through the IGP is a specific value from 1 to 256. The device that receives the BFR-id converts it into a 256-bit bit string, and the bit set to 1 in the bit string is in the bit string. The offset in is the value of the BFR-id. The intermediate BFR obtaining the first forwarding table according to the parameters obtained through IGP flooding includes: the intermediate BFR obtains a forwarding table in the first forwarding table according to a BFR-id obtained through IGP flooding and its corresponding device identifier item, the forwarding entry includes a sequence number and a neighbor (neighbor, NBR), the sequence number corresponds to a BFR-id, and the NBR is used to record the identifier of the device as the next hop. The identification of the device corresponding to the BFR-id is the identification of the device capable of communicating with the BFER identified by the BFR-id or the identification of the BFER identified by the BFR-id. The NBR is used to record the neighbor device that reaches the next hop through the BFER identified by the BFR-id. If the intermediate BFR is directly connected to the BFER, the NBR is the device identifier of the BFER. If the intermediate BFR is connected to the BFER through other intermediate BFRs, the NBR is the device identifier of the other intermediate BFR. Optionally, any forwarding table entry included in the first forwarding table also includes a bit string, the offset of the bit set to 1 in the bit string in the forwarding table entry corresponds to the BFR-id, and the bit string is set to 1 in the forwarding table entry. The number of bits set to 1 is not greater than 1. The forwarding table entry also includes the F-BM, and the F-BM is used to store or record the bit string.
在图2所示的场景中,设备206通过IGP泛洪获取第五参数组和第六参数组。其中,第五参数组包括a102和数值为2的BFR-id。第六参数组包括a103和数值为3的BFR-id。设备206可根据第五参数组获得SN为2的表项。SN为2的表项中的NBR为a102。设备206根据第六参数组获得SN为3的表项。SN为3的表项中的NBR为a103。表2-1中省略号表示省略SN从4开始到255结束的252条表项。该省略的252条表项中每条表项包括的NBR为 0。表2-1中NBR为0表示下一跳为空或不存在下一跳。In the scenario shown in FIG. 2, the device 206 obtains the fifth parameter group and the sixth parameter group through IGP flooding. The fifth parameter group includes a102 and a BFR-id with a value of 2. The sixth parameter group includes a103 and a BFR-id with a value of 3. The device 206 may obtain an entry with an SN of 2 according to the fifth parameter group. The NBR in the entry whose SN is 2 is a102. The device 206 obtains the entry with the SN of 3 according to the sixth parameter group. The NBR in the entry whose SN is 3 is a103. The ellipsis in Table 2-1 indicates that 252 entries whose SN starts from 4 and ends at 255 are omitted. The NBR included in each of the omitted 252 entries is 0. The NBR value of 0 in Table 2-1 indicates that the next hop is empty or there is no next hop.
表2-1table 2-1
SNSN NBR(8bit)NBR(8bit)
11 00
22 a102a102
33 a103a103
….…. ….….
256256 00
在另一可能的实现方式中,设备206可根据第五参数组中的数值为2的BFR-id,获得数值为2的SN和数值为0000…00000000000000000000000000000010的bit string。设备206根据第五参数组中的a102、数值为2的SN和数值为0000…00000000000000000000000000000010的bit string(存储在F-BM),获得表2-2中SN为2的转发表项。设备206可根据第六参数组中数值为3的BFR-id,获得数值为3的SN和数值为0000…00000000000000000000000000000100的bit string。设备206根据第六参数组中的a103、数值为3的SN和数值为0000…00000000000000000000000000000100的bit string(存储在F-BM),获得表2-2中SN为3的转发表项。表2-2中省略号表示省略SN从4开始到255结束的252条表项。该省略的252条表项中每条表项包括的NBR为0。本申请实施例中NBR为0表示下一跳为空或者不存在下一跳。F-BM包括的bit string的BSL为256bit,bit string包含…省略了从右至左的第33bit至第252bit间的220bit。设备206所获得的F-BM中,包含被置1的bit的bit sting中有且仅有1个bit被置1,且该被置1的bit在bit string中的偏移量与SN的值对应。在本申请实施例中,该被置1的bit在bit string中的偏移量为SN。在其他可能的时间方式中,该被置1的bit在bit string中的偏移量为SN与常数的差,或者该被置1的bit在bit string中的偏移量为SN与常数的和。该常数可以是1或者其他大于1的自然数,本申请对此不进行限定。In another possible implementation manner, the device 206 may obtain an SN with a value of 2 and a bit string with a value of 0000...00000000000000000000000000000010 according to the BFR-id with a value of 2 in the fifth parameter group. The device 206 obtains a forwarding entry with an SN of 2 in Table 2-2 according to a102 in the fifth parameter group, an SN with a value of 2, and a bit string with a value of 0000...000000000000000000000000000010 (stored in the F-BM). The device 206 can obtain an SN with a value of 3 and a bit string with a value of 0000...00000000000000000000000000000100 according to the BFR-id with a value of 3 in the sixth parameter group. The device 206 obtains the forwarding entry with the SN of 3 in Table 2-2 according to a103 in the sixth parameter group, the SN with a value of 3, and the bit string with a value of 0000...0000000000000000000000000000100 (stored in the F-BM). The ellipsis in Table 2-2 indicates that 252 entries whose SN starts from 4 and ends at 255 are omitted. The NBR included in each of the omitted 252 entries is 0. In this embodiment of the present application, the NBR being 0 indicates that the next hop is empty or there is no next hop. The BSL of the bit string included in the F-BM is 256 bits, and the bit string includes... 220 bits from the 33rd bit to the 252th bit from right to left are omitted. In the F-BM obtained by the device 206, one and only one bit is set to 1 in the bit sting including the set bit, and the offset of the set bit in the bit string and the value of SN correspond. In this embodiment of the present application, the offset of the bit set to 1 in the bit string is SN. In other possible time modes, the offset of the set bit in the bit string is the difference between SN and the constant, or the offset of the set bit in the bit string is the sum of SN and the constant . The constant may be 1 or other natural numbers greater than 1, which is not limited in this application.
表2-2Table 2-2
SNSN F-BM(256bit)F-BM(256bit) NBR(8bit)NBR(8bit)
11 0000…000000000000000000000000000000000000…00000000000000000000000000000000 00
22 0000…000000000000000000000000000000100000…00000000000000000000000000000010 a102a102
33 0000…000000000000000000000000000001000000…00000000000000000000000000000100 a103a103
256256 0000…000000000000000000000000000000000000…00000000000000000000000000000000 00
图2所示场景中的设备206可根据表2-1,对SN和与SN对应的NBR进行排序,具体可以是根据转发硬件的读取位宽,将按照SN的大小排序的多个NBR作为一行,该多个NBR的数量小于或等于读取位宽的数值。某个SN对应的NBR所在的行,比如行号,对应SN与读取位宽的商,具体可以是对应SN与常数的差值与读取位宽的商,该常数可以是1或其他可能的大于1的自然数。本申请实施例中以读取位宽为16为例进行举例说明,读取位宽是其他数值的实现方式可参见读取位宽为16的实施例。当常数是1时,数值为1至16的SN与1的差值与读取位宽的商是0,其对应的所在的行的行号是该商与1的和,如表2-3中1-16所在的行为转发表项,即转发表项的行号是1。行号是1的转发表项中与SN为2对应的NBR是a102,与SN为3对应的NBR是a103。在另一种实现方式中,某个SN对应的NBR所在 的行的行号可以是SN与读取位宽的商与常数的和,对于处于读取位宽最大值处的SN,其对应的NBR所在的行的行号为SN与读取位宽的商。比如表2-3中,数值为16的SN对应的NBR所在的行的行号是1,数值为1-15的SN对应的NBR所在的行的行号是1。表2-3中包括16行,表2-3中…表示对为空的内容的省略,X可以是0。不论NBR是X还是0,均表示下一跳为空或者不存在下一跳。The device 206 in the scenario shown in FIG. 2 can sort the SNs and the NBRs corresponding to the SNs according to Table 2-1. Specifically, according to the read bit width of the forwarding hardware, multiple NBRs sorted by the size of the SNs can be used as One line, the number of the multiple NBRs is less than or equal to the value of the read bit width. The row where the NBR corresponding to a certain SN is located, such as the row number, corresponds to the quotient of the SN and the read bit width. Specifically, it can be the quotient of the difference between the corresponding SN and the constant and the read bit width. The constant can be 1 or other possible values. a natural number greater than 1. In the embodiment of the present application, the read bit width is 16 as an example for illustration. For the implementation manner of the read bit width being other values, please refer to the embodiment in which the read bit width is 16. When the constant is 1, the quotient of the difference between SN and 1 with a value of 1 to 16 and the read bit width is 0, and the row number of the corresponding row is the sum of the quotient and 1, as shown in Table 2-3 The behavior forwarding table entry where 1-16 is located, that is, the line number of the forwarding table entry is 1. In the forwarding entry whose line number is 1, the NBR corresponding to the SN of 2 is a102, and the NBR corresponding to the SN of 3 is a103. In another implementation manner, the row number of the row where the NBR corresponding to a certain SN is located may be the sum of the quotient of the SN and the read bit width and a constant. For the SN at the maximum read bit width, the corresponding The row number of the row where the NBR is located is the quotient of the SN and the read bit width. For example, in Table 2-3, the row number of the row where the NBR corresponding to the SN with a value of 16 is located is 1, and the row number of the row where the NBR corresponding to the SN with a value of 1-15 is located is 1. There are 16 rows in Table 2-3. In Table 2-3, ... indicates the omission of empty content, and X can be 0. Regardless of whether the NBR is X or 0, it means that the next hop is empty or there is no next hop.
表2-3Table 2-3
SNSN 11 22 33 4-144-14 1515 1616
1-161-16 XX a102a102 a103a103 XX XX
17-3217-32 XX XX XX XX XX
241-256241-256 XX XX XX    XX XX
举例说明,设备206将表2-1中的M个NBR存放到表2-3中的一行中,即表2-3中除SN标识的列之外的列数为M。M的大小取决于转发硬件的读取位宽,M可以是2的N次方,N为大于或等于1的整数。本申请实施例一以M为16进行举例。表2-3所示的转发表中,列数表示每次可读取的位宽M,比如标号为1至16表示设备206每次可读取16个SN。表2-1中每一条表项的NBR的标识存储于表2-3中与SN对应的单元格中,换句话说,表2-1中每一条表项的NBR的标识在表2-3的每一行的16个标识中的排序与NBR在表2-1中的SN对应。上述16个标识包含数值为0或X的NBR。比如:表2-1中的SN为2的表项中,数值为a102的NBR被存储于行号为1(SN为1-16对应的行)中2对应的单元格内。表2-1中的SN为3的表项中,数值为a103的NBR被存储于行号为1(SN为1-16对应的行)中3对应的单元格内。表2-3中,16个SN所在的行可用行号表示,比如SN为1-16对应的行可用行号1表示,SN为17-32对应的行可用行号2表示。For example, the device 206 stores the M NBRs in Table 2-1 into a row in Table 2-3, that is, the number of columns in Table 2-3 other than the column identified by SN is M. The size of M depends on the read bit width of the forwarding hardware. M can be 2 to the Nth power, and N is an integer greater than or equal to 1. In the first embodiment of the present application, M is 16 as an example. In the forwarding table shown in Table 2-3, the number of columns indicates the bit width M that can be read each time. For example, the numbers 1 to 16 indicate that the device 206 can read 16 SNs each time. The NBR identifier of each entry in Table 2-1 is stored in the cell corresponding to the SN in Table 2-3. In other words, the NBR identifier of each entry in Table 2-1 is stored in Table 2-3 The ordering among the 16 identities in each row of the NBR corresponds to the SN in Table 2-1. The above 16 flags contain NBRs with a value of 0 or X. For example, in the table entry with SN of 2 in Table 2-1, the NBR with the value of a102 is stored in the cell corresponding to 2 in the row number 1 (the row corresponding to the SN of 1-16). In the table entry whose SN is 3 in Table 2-1, the NBR whose value is a103 is stored in the cell corresponding to 3 in the row number 1 (the row corresponding to SN 1-16). In Table 2-3, the row where the 16 SNs are located can be represented by the row number. For example, the row corresponding to the SN of 1-16 can be represented by the row number 1, and the row corresponding to the SN of 17-32 can be represented by the row number 2.
在图2所示的场景中,设备208通过IGP泛洪获取第七参数组和第八参数组。其中,第七参数组包括a255和数值为255的BFR-id。第八参数组包括a256和数值为256的BFR-id。设备208可根据第七参数组和第八参数组,获得表2-4。表2-4中省略号表示SN从3开始到254结束的252条表项,该252条表项中每条表项包括的NBR为0。设备208获得表2-4的方法可参见设备206获得表2-1的方法,在此不再赘述。In the scenario shown in FIG. 2, the device 208 obtains the seventh parameter group and the eighth parameter group through IGP flooding. The seventh parameter group includes a255 and a BFR-id with a value of 255. The eighth parameter group includes a256 and a BFR-id with a value of 256. Device 208 may obtain Tables 2-4 from the seventh parameter group and the eighth parameter group. The ellipses in Table 2-4 indicate 252 entries whose SN starts from 3 and ends at 254. The NBR included in each entry in the 252 entries is 0. For the method for the device 208 to obtain Table 2-4, reference may be made to the method for the device 206 to obtain Table 2-1, which will not be repeated here.
表2-4Table 2-4
SNSN NBR(8bit)NBR(8bit)
11 00
22 00
255255 a255a255
256256 a256a256
在另一可能的实现方式中,设备208可根据第七参数组和第八参数组获得表2-5。设备208获得表2-5的方法可参见设备206获得表2-2的方法,在此不再赘述。表2-5中省略号表示SN从3开始到254结束的252条表项。该252条表项中每条表项包括的NBR为0,表示下一跳为空或不存在下一跳。F-BM包括的bit string的BSL为256bit,bit string包含…省略了从右至左的第33bit至第252bit间的220bit。设备208所获得的F-BM中,包含被置1的bit的bit sting中有且仅有1个bit被置1,且该被置1的bit在bit string中的偏移量与SN的值对 应。到达bit string的被置1的bit对应的BFER的下一跳为NBR所标识的设备。In another possible implementation manner, the device 208 may obtain Tables 2-5 according to the seventh parameter group and the eighth parameter group. For the method for the device 208 to obtain Table 2-5, reference may be made to the method for the device 206 to obtain Table 2-2, which will not be repeated here. The ellipses in Table 2-5 indicate 252 entries whose SN starts from 3 and ends at 254. The NBR included in each of the 252 entries is 0, indicating that the next hop is empty or there is no next hop. The BSL of the bit string included in the F-BM is 256 bits, and the bit string includes... 220 bits from the 33rd bit to the 252th bit from right to left are omitted. In the F-BM obtained by the device 208, one and only one bit is set to 1 in the bit sting including the set bit, and the offset of the set bit in the bit string and the value of SN correspond. The next hop to the BFER corresponding to the bit set to 1 in the bit string is the device identified by the NBR.
表2-5Table 2-5
SNSN F-BM(256bit)F-BM(256bit) BFR-NBR(8bit)BFR-NBR(8bit)
11 0000…000000000000000000000000000000000000…00000000000000000000000000000000 00
22 0000…000000000000000000000000000000000000…00000000000000000000000000000000 00
255255 0100…000000000000000000000000000000000100…00000000000000000000000000000000 a255a255
256256 1000…000000000000000000000000000000001000…00000000000000000000000000000000 a256a256
图2所示场景中的设备208可根据表2-4进一步获得如表2-6所示的转发表,具体方法可参见设备206获得表2-3的方法,在此不再赘述。表2-6中的…表示对为空的内容的省略。X可以用0替换,表示下一跳为空或不存在下一跳。The device 208 in the scenario shown in FIG. 2 can further obtain the forwarding table shown in Table 2-6 according to Table 2-4. For the specific method, refer to the method for the device 206 to obtain Table 2-3, which will not be repeated here. ... in Table 2-6 indicates the omission of empty content. X can be replaced with 0, indicating that the next hop is empty or does not exist.
表2-6Table 2-6
SNSN 11 22 33 4-144-14 1515 1616
1-161-16 XX XX XX XX XX
17-3217-32 XX XX XX XX XX
241-256241-256 XX XX XX    a255a255 a256a256
举例说明,设备208将表2-4中的M个SN对应的NBR存放到表2-6中的一条表项中,即表2-6中除SN标识的列之外的列数为M。M为设备208的读取位宽,可以与设备206的读取位宽相同。如果设备208的读取位宽与设备206的读取位宽不同,则表2-6中除SN表示的列之外的列的个数不是16,具体可根据设备208的读取位宽进行调整,本申请实施例对此不再逐一举例说明。表2-4中每一条表项的NBR的标识在表2-6的以NBR对应的SN确定的行内的排序由NBR对应的SN确定。比如:表2-4中的SN为255的表项中,数值为a255的NBR的标识被存储于表2-6中由数值为255的SN所在的行(241-256标识的行,也可称为行号为16的行)中15对应的单元格内。在241-256标识的行内,数值为255的SN在该行的位置为15标识的列。表2-4中的SN为256的表项中,数值为a256的NBR的标识被存储于表2-6中由数值为256的SN所在的行(241-256标识的行,也可称为行号为16的行)中16对应的单元格中。在241-256标识的行内,数值为256的SN在该行的位置为16标识的列。表2-6中,16个SN所在的行可用行号表示,比如SN为1-16对应的行可用行号1表示,SN为17-32对应的行可用行号2表示。For example, the device 208 stores the NBRs corresponding to the M SNs in Table 2-4 into an entry in Table 2-6, that is, the number of columns in Table 2-6 other than the column identified by the SN is M. M is the read bit width of the device 208 , which may be the same as the read bit width of the device 206 . If the read bit width of the device 208 is different from the read bit width of the device 206, the number of columns other than the columns indicated by SN in Table 2-6 is not 16, which can be determined according to the read bit width of the device 208. For adjustment, this embodiment of the present application will not illustrate this one by one. The order of the NBR identifier of each entry in Table 2-4 in the row determined by the SN corresponding to the NBR in Table 2-6 is determined by the SN corresponding to the NBR. For example, in the table entry with SN of 255 in Table 2-4, the identifier of the NBR with the value of a255 is stored in the row of the SN with the value of 255 in Table 2-6 (the row identified by 241-256 can also be Called the row with row number 16) in the cell corresponding to 15. In the row identified by 241-256, the SN with the value 255 is in the column identified by 15 at the position of the row. In the table entry whose SN is 256 in Table 2-4, the identifier of the NBR whose value is a256 is stored in the row where the SN whose value is 256 is located in Table 2-6 (the row identified by 241-256, also known as row number 16) in the cell corresponding to 16. In the row identified by 241-256, the SN with the value 256 is in the column identified by 16 at the position of the row. In Table 2-6, the row where the 16 SNs are located can be represented by the row number. For example, the row corresponding to the SN of 1-16 can be represented by the row number 1, and the row corresponding to the SN of 17-32 can be represented by the row number 2.
在图2所示的场景中,设备209通过IGP泛洪获取第一参数组、第二参数组、第三参数组和第四参数组,具体如S302的相应内容。设备209可根据第一参数组、第二参数组、第三参数组和第四参数组,获得表2-7,具体方法可参***206获取表2-1的方法,在此不再赘述。表2-7中省略号表示SN从5开始到254结束的250条表项,该250条表项中每条表项包括的NBR为0。数值为0的NBR表示下一跳为空或者不存在下一跳。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 through IGP flooding, specifically as the corresponding content of S302. The device 209 can obtain Table 2-7 according to the first parameter group, the second parameter group, the third parameter group and the fourth parameter group. For the specific method, refer to the method for obtaining the Table 2-1 by the device 206, which is not repeated here. The ellipses in Table 2-7 indicate 250 entries whose SN starts from 5 and ends at 254. The NBR included in each entry in the 250 entries is 0. An NBR with a value of 0 indicates that the next hop is empty or does not exist.
表2-7Table 2-7
SNSN NBR(8bit)NBR(8bit)
11 a205a205
22 a206a206
33 a206a206
44 a207a207
255255 a208a208
256256 a208a208
在另一可能的实现方式中,设备209可根据第一参数组、第二参数组、第三参数组和第四参数组获得表2-8,具体方法可看见设备206获取表2-2的方法,在此不再赘述。表2-8中省略号表示SN从5开始到254结束的250条表项。该250条表项中每条表项包括的NBR为0。数值为0的NBR表示下一跳为空或者不存在下一跳。F-BM包括的bit string的BSL为256bit,bit string包含…省略了从右至左的第33bit至第252bit间的220bit。设备209所获得的F-BM中,包含被置1的bit的bit sting中有且仅有1个bit被置1,且该被置1的bit在bit string中的偏移量与SN的值对应。到达bit string的被置1的bit对应的BFER的下一跳为NBR所标识的设备。In another possible implementation manner, the device 209 may obtain Table 2-8 according to the first parameter group, the second parameter group, the third parameter group and the fourth parameter group. For the specific method, see that the device 206 obtains the values in Table 2-2. method, which will not be repeated here. The ellipses in Table 2-8 indicate 250 entries whose SN starts from 5 and ends at 254. The NBR included in each of the 250 entries is 0. An NBR with a value of 0 indicates that the next hop is empty or does not exist. The BSL of the bit string included in the F-BM is 256 bits, and the bit string includes... 220 bits from the 33rd bit to the 252th bit from right to left are omitted. In the F-BM obtained by the device 209, one and only one bit is set to 1 in the bit sting including the set bit, and the offset of the set bit in the bit string and the value of SN correspond. The next hop to the BFER corresponding to the bit set to 1 in the bit string is the device identified by the NBR.
表2-8Table 2-8
SNSN F-BM(256bit)F-BM(256bit) NBR(8bit)NBR(8bit)
11 0000…000000000000000000000000000000010000…00000000000000000000000000000001 a205a205
22 0000…000000000000000000000000000000100000…00000000000000000000000000000010 a206a206
33 0000…000000000000000000000000000001000000…00000000000000000000000000000100 a206a206
44 0000…000000000000000000000000000010000000…00000000000000000000000000001000 a207a207
255255 0100…000000000000000000000000000000000100…00000000000000000000000000000000 a208a208
256256 1000…000000000000000000000000000000001000…00000000000000000000000000000000 a208a208
图2所示场景中的设备209可根据表2-7进一步获得如表2-9所示的转发表,具体方法可参见设备206获取表2-3的方法,在此不再赘述。表2-9中的…表示对为空的内容的省略,X可以被0替换,表示下一跳为空或不存在下一跳。The device 209 in the scenario shown in FIG. 2 can further obtain the forwarding table shown in Table 2-9 according to Table 2-7. For the specific method, refer to the method for the device 206 to obtain Table 2-3, which is not repeated here. In Table 2-9, ... indicates the omission of empty content, and X can be replaced by 0, indicating that the next hop is empty or does not exist.
表2-9Table 2-9
SNSN 11 22 33 44 4-144-14 1515 1616
1-161-16 a205a205 a206a206 a206a206 a207a207 XX XX
17-3217-32 XX XX XX XX XX XX
241-256241-256 XX XX XX XX a208a208 a208a208
举例说明,设备209将表2-7中的M个NBR存放到表2-9中的一条表项中,即表2-9中除SN标识的列之外的列数为M。M为设备209的读取位宽,可以与设备206或设备208的读取位宽相同。如果设备209的读取位宽与设备206或设备208的读取位宽不同,则表2-9中除SN表示的列之外的列的个数不是16,具体可根据设备209的读取位宽进行调整,本申请实施例对此不再逐一举例说明。表2-7中每一条表项的NBR的标识在表2-9的以NBR对应的SN确定的行内的排序由NBR对应的SN确定。比如:表2-7中的SN为1的表项中,数值为a205的NBR的标识被存储于数值为1的SN在表2-9对应的单元格中,即SN为1-16对应的行与标号为1列交叉的单元格。表2-7中的SN为2的表项中,数值为a206的NBR的标识被存储于数值为2的SN在表2-9对应的单元格中,即SN为1-16对应的行与标号为2列交叉的单元格。表2-7中的SN为3的表项中,数值为a206的NBR的标识被存储于数值为 3的SN在表2-9对应的单元格中,即SN为1-16对应的行与标号为3列交叉的单元格。表2-7中的SN为4的表项中,数值为a207的NBR的标识被存储于数值为4的SN在表2-9对应的单元格中,即SN为1-16对应的行与标号为4列交叉的单元格。表2-7中的SN为255的表项中,数值为a208的NBR的标识被存储于数值为255的SN在表2-9对应的单元格中,即SN为241-256对应的行与标号为15列交叉的单元格。表2-7中的SN为256的表项中,数值为a208的NBR的标识被存储于数值为256的SN在表2-9对应的单元格中,即SN为241-256对应的行与标号为16列交叉的单元格。表2-9中,16个SN所在的行可用行号表示,比如SN为1-16对应的行可用行号1表示,SN为17-32对应的行可用行号2表示。For example, the device 209 stores the M NBRs in Table 2-7 into an entry in Table 2-9, that is, the number of columns in Table 2-9 other than the column identified by SN is M. M is the read bit width of the device 209 , which may be the same as the read bit width of the device 206 or the device 208 . If the read bit width of device 209 is different from the read bit width of device 206 or device 208, the number of columns other than the columns indicated by SN in Table 2-9 is not 16. The bit width is adjusted, which will not be described one by one in this embodiment of the present application. The order of the NBR identifier of each entry in Table 2-7 in the row determined by the SN corresponding to the NBR in Table 2-9 is determined by the SN corresponding to the NBR. For example, in the table entry with SN of 1 in Table 2-7, the identifier of NBR with the value of a205 is stored in the cell corresponding to the SN of 1 in Table 2-9, that is, the SN corresponding to 1-16 A cell where a row intersects a column labeled 1. In the table entry with SN of 2 in Table 2-7, the identifier of the NBR with the value of a206 is stored in the cell corresponding to the SN of 2 in Table 2-9, that is, the row corresponding to the SN of 1-16 and Label the cells where the 2 columns intersect. In the table entry with SN of 3 in Table 2-7, the identifier of the NBR with the value of a206 is stored in the cell corresponding to the SN of 3 in Table 2-9, that is, the row corresponding to the SN of 1-16 and Label the cells that intersect with 3 columns. In the table entry with SN of 4 in Table 2-7, the identifier of the NBR with the value of a207 is stored in the cell corresponding to the SN of 4 in Table 2-9, that is, the row corresponding to the SN of 1-16 and Cells are labeled as 4-column intersections. In the table entry with SN of 255 in Table 2-7, the identifier of the NBR with the value of a208 is stored in the cell corresponding to the SN of 255 in Table 2-9, that is, the row corresponding to the SN of 241-256 and Label the 15-column intersecting cells. In the table entry with SN of 256 in Table 2-7, the identifier of the NBR with the value of a208 is stored in the cell corresponding to the SN of 256 in Table 2-9, that is, the row corresponding to the SN of 241-256 and Label the 16-column intersecting cells. In Table 2-9, the row where the 16 SNs are located can be represented by the row number. For example, the row corresponding to the SN of 1-16 can be represented by the row number 1, and the row corresponding to the SN of 17-32 can be represented by the row number 2.
S304,BFIR根据通过IGP泛洪获取的参数,获得第二转发表,所述第二转发表包括序列号和下一跳的标识。S304, the BFIR obtains a second forwarding table according to the parameters obtained through IGP flooding, where the second forwarding table includes a sequence number and an identifier of the next hop.
举例说明,BFIR通过IGP泛洪获取的参数包括中间BFR的设备标识和中间BFR所获取的BFR-id。BFIR根据所获取的参数,获得第二转发表。第二转发表中的任一表项包括SN和NBR。第二转发表的任一转发表项的SN的数值为BFR-id的数值,NBR为到达BFR-id所标识的BFER所经过的下一跳的设备标识。可选的,该任一转发表项还包括bit string。该任一转发表项包括的bit string中被置1的bit的数量不大于1,且被置1的bit在bit string的偏移量与SN的值对应。图2所示的场景中,作为BFIR的设备210接收设备209通过IGP泛洪的a209、数值为1、2、3、4、255和256的BFR-id。设备210根据来自设备209的上述参数,按照设备206获取表2-1的方法获得表2-10所示的转发表项。表2-10中…表示SN为5至254的250条表项中NBR为0,表示下一跳为空或者不存在下一跳。For example, the parameters obtained by the BFIR through IGP flooding include the device identifier of the intermediate BFR and the BFR-id obtained by the intermediate BFR. The BFIR obtains the second forwarding table according to the acquired parameters. Any entry in the second forwarding table includes SN and NBR. The value of the SN of any forwarding entry in the second forwarding table is the value of the BFR-id, and the NBR is the device identifier of the next hop through which the BFER identified by the BFR-id is reached. Optionally, any forwarding entry also includes a bit string. The number of bits set to 1 in the bit string included in any forwarding entry is not greater than 1, and the offset of the bit set to 1 in the bit string corresponds to the value of SN. In the scenario shown in FIG. 2 , the device 210 serving as the BFIR receives the BFR-ids of 1, 2, 3, 4, 255, and 256 flooded by the device 209 through the IGP. The device 210 obtains the forwarding entries shown in Table 2-10 according to the above parameters from the device 209 and according to the method in which the device 206 obtains Table 2-1. In Table 2-10...indicates that the NBR is 0 in the 250 entries with SN ranging from 5 to 254, indicating that the next hop is empty or does not exist.
表2-10Table 2-10
SNSN NBR(8bit)NBR(8bit)
11 a209a209
22 a209a209
33 a209a209
44 a209a209
255255 a209a209
256256 a209a209
在另一可能的实现方式中,设备210可根据设备209泛洪的多个BFR-id和a209获得表2-11,具体方法可参见设备206获取表2-2的方法,在此不再赘述。上述多个BFR-id的数值为1、2、3、4、255和256。表2-11中省略号表示SN从5开始到254结束的250条表项,该250条表项中每条表项包括的NBR为0,表示下一跳为空或者不存在下一跳。F-BM包括的bit string的BSL为256bit,bit string包含…省略了从右至左的第33bit至第252bit间的220bit。设备210所获得的F-BM中,包含被置1的bit的bit sting中有且仅有1个bit被置1,且该被置1的bit在bit string中的偏移量与SN的值对应。到达bit string的被置1的bit对应的BFER的下一跳为NBR所标识的设备。In another possible implementation manner, the device 210 may obtain Table 2-11 according to multiple BFR-ids flooded by the device 209 and a209. For the specific method, please refer to the method for obtaining the Table 2-2 by the device 206, which will not be repeated here. . The above-mentioned multiple BFR-id values are 1, 2, 3, 4, 255, and 256. The ellipsis in Table 2-11 indicates the 250 entries whose SN starts from 5 and ends at 254. The NBR included in each entry in the 250 entries is 0, indicating that the next hop is empty or there is no next hop. The BSL of the bit string included in the F-BM is 256 bits, and the bit string includes... 220 bits from the 33rd bit to the 252th bit from right to left are omitted. In the F-BM obtained by the device 210, one and only one bit is set to 1 in the bit sting including the set bit, and the offset of the set bit in the bit string and the value of SN correspond. The next hop to the BFER corresponding to the bit set to 1 in the bit string is the device identified by the NBR.
表2-11Table 2-11
SNSN F-BM(256bit)F-BM(256bit) NBR(8bit)NBR(8bit)
11 0000…000000000000000000000000000000010000…00000000000000000000000000000001 a209a209
22 0000…000000000000000000000000000000100000…00000000000000000000000000000010 a209a209
33 0000…000000000000000000000000000001000000…00000000000000000000000000000100 a209a209
44 0000…000000000000000000000000000010000000…00000000000000000000000000001000 a209a209
255255 0100…000000000000000000000000000000000100…00000000000000000000000000000000 a209a209
256256 1000…000000000000000000000000000000001000…00000000000000000000000000000000 a209a209
图2所示场景中的设备210可根据表2-10进一步获得如表2-12所示的转发表,具体方法可参见设备206获得表2-3的方法,在此不再赘述。表2-12中的…表示对为空的内容的省略,X可以是0或空。The device 210 in the scenario shown in FIG. 2 can further obtain the forwarding table shown in Table 2-12 according to Table 2-10. For the specific method, refer to the method for obtaining Table 2-3 by the device 206, which is not repeated here. ... in Table 2-12 indicates the omission of empty content, and X can be 0 or empty.
表2-12Table 2-12
SNSN 11 22 33 44 4-144-14 1515 1616
1-161-16 a209a209 a209a209 a209a209 a209a209 XX XX
17-3217-32 XX XX XX XX XX XX
241-256241-256 XX XX XX XX a209a209 a209a209
举例说明,设备210将表2-10中的M个NBR存放到表2-12中的一条表项中(一行中),即表2-12中除SN标识的列之外的列数为M。M为设备210的读取位宽,可以与设备206、设备208或设备209的读取位宽相同。如果设备210的读取位宽与设备206、设备208或设备209的读取位宽不同,则表2-12中除SN表示的列之外的列的个数不是16,具体可根据设备2-12的读取位宽进行调整,比如:32或者8,本申请实施例对此不再逐一举例说明。表2-10中每一条表项的NBR的标识存储于NBR对应的SN在表2-12对应的单元格中,比如:表2-10中的SN为1的表项中,数值为a209的NBR的标识被存储于数值为1的SN在表2-12对应的单元格中,即SN为1-16对应的行与标号为1列交叉的单元格。表2-10中的SN为2的表项中,数值为a209的NBR的标识被存储于数值为2的SN在表2-12对应的单元格中,即SN为1-16对应的行与标号为2列交叉的单元格。表2-10中的SN为3的表项中,数值为a209的NBR的标识被存储于数值为3的SN在表2-12对应的单元格中,即SN为1-16对应的行与标号为3列交叉的单元格。表2-10中的SN为4的表项中,数值为a209的NBR的标识被存储于数值为4的SN在表2-12对应的单元格中,即SN为1-16对应的行与标号为4列交叉的单元格。表2-10中的SN为255的表项中,数值为a209的NBR的标识被存储于数值为255的SN在表2-9对应的单元格中,即SN为241-256对应的行与标号为15列交叉的单元格。表2-10中的SN为256的表项中,数值为a209的NBR的标识被存储于数值为256的SN在表2-12对应的单元格中,即SN为241-256对应的行与标号为16列交叉的单元格。表2-12中,16个SN所在的行可用行号表示,比如SN为1-16对应的行可用行号1表示,SN为17-32对应的行可用行号2表示。For example, the device 210 stores the M NBRs in Table 2-10 into one entry (in one row) in Table 2-12, that is, the number of columns in Table 2-12 other than the column identified by SN is M . M is the read bit width of the device 210 , which may be the same as the read bit width of the device 206 , the device 208 , or the device 209 . If the read bit width of device 210 is different from the read bit width of device 206, device 208, or device 209, the number of columns other than the columns indicated by SN in Table 2-12 is not 16, which can be determined according to device 2 The read bit width of -12 is adjusted, for example: 32 or 8, which is not described one by one in this embodiment of the present application. The NBR identifier of each entry in Table 2-10 is stored in the corresponding SN of the NBR in the cell corresponding to Table 2-12. For example, in the entry whose SN is 1 in Table 2-10, the value is a209. The identifier of the NBR is stored in the cell corresponding to the SN of 1 in Table 2-12, that is, the cell where the row corresponding to the SN of 1-16 intersects with the column labeled 1. In the table entry with SN of 2 in Table 2-10, the identifier of the NBR with the value of a209 is stored in the cell corresponding to the SN of 2 in Table 2-12, that is, the row corresponding to the SN of 1-16 and Label the cells where the 2 columns intersect. In the table entry with SN of 3 in Table 2-10, the identifier of the NBR with the value of a209 is stored in the cell corresponding to the SN of 3 in Table 2-12, that is, the row corresponding to the SN of 1-16 and Label the cells that intersect with 3 columns. In the table entry with SN of 4 in Table 2-10, the identifier of the NBR with the value of a209 is stored in the cell corresponding to the SN of 4 in Table 2-12, that is, the row corresponding to the SN of 1-16 and Cells are labeled as 4-column intersections. In the table entry with SN of 255 in Table 2-10, the identifier of the NBR with the value of a209 is stored in the cell corresponding to the SN of 255 in Table 2-9, that is, the row corresponding to the SN of 241-256 and Label the 15-column intersecting cells. In the table entry with SN of 256 in Table 2-10, the identifier of the NBR with the value of a209 is stored in the cell corresponding to the SN of 256 in Table 2-12, that is, the row corresponding to the SN of 241-256 and Label the 16-column intersecting cells. In Table 2-12, the row where the 16 SNs are located can be represented by the row number. For example, the row corresponding to the SN of 1-16 can be represented by the row number 1, and the row corresponding to the SN of 17-32 can be represented by the row number 2.
上述表2-1、表2-3、表2-4、表2-6、表2-7、表2-9、表2-10和表2-12是以M为16为例,对于BSL为256bit的BIER网络场景来说,上述转发表可包括16条表项。由于省略了每条F-BM占用的256bit,当M为16时,对于BSL为512bit的BIER网络场景来说,上述转发表可扩展至包括32条表项,对于BSL为1024bit的BIER网络场景来说,上述转发表可扩展至包括64条BIFT表项。转发硬件由于无需再读取通常的BIFT表项包括的256bit的F-BM,即便对于BSL为512bit或1024bit的网络场景,转发硬件在无需进行性能提升的情况下快速的完成表项查找和转发,进一步提高了转发效率。The above Table 2-1, Table 2-3, Table 2-4, Table 2-6, Table 2-7, Table 2-9, Table 2-10 and Table 2-12 take M as 16 as an example. For BSL For a 256-bit BIER network scenario, the above forwarding table may include 16 entries. Since the 256 bits occupied by each F-BM is omitted, when M is 16, for the BIER network scenario where the BSL is 512 bits, the above forwarding table can be extended to include 32 entries. For the BIER network scenario where the BSL is 1024 bits, Said that the above forwarding table can be expanded to include 64 BIFT entries. Since the forwarding hardware does not need to read the 256-bit F-BM included in the usual BIFT entry, even in the network scenario where the BSL is 512-bit or 1024-bit, the forwarding hardware can quickly complete the entry lookup and forwarding without performance improvement. The forwarding efficiency is further improved.
本申请实施例一中提及的被置1的bit的偏移量(也可称为被置1的bit在bit string的偏移量)为被置1的bit在从右至左的方向上相对bit string的偏移量。上述从右至左的方向是基于转发硬件的数据读取方式而确定的方式,从右至左的方向也可替换为从左至右的方向。如果采用从左至右的方向来确定被置1的bit的偏移量,则本申请实施例一中被置1的比特位在bit string中的偏移量也会发生相应的改变,例如:对于表2-12来说,对于BFR-id为1、2、3、4、255和256来说,bit string会表示成1111…0000000000000000000000000000011,表2-12的内容不发生改变,BFIR在进行BIER组播报文转发时,沿从左至右的方向读取BIER组播报文中的bit string。The offset of the bit that is set to 1 mentioned in the first embodiment of this application (also called the offset of the bit that is set to 1 in the bit string) is the bit that is set to 1 in the right-to-left direction Offset relative to the bit string. The above-mentioned right-to-left direction is determined based on the data reading method of the forwarding hardware, and the right-to-left direction can also be replaced with a left-to-right direction. If the left-to-right direction is used to determine the offset of the bit that is set to 1, the offset of the bit that is set to 1 in the first embodiment of the present application in the bit string will also change accordingly, for example: For Table 2-12, for BFR-id 1, 2, 3, 4, 255 and 256, the bit string will be represented as 1111...00000000000000000000000000000000000000000000000000011, the content of Table 2-12 does not change, BFIR is performing BIER When a multicast packet is forwarded, the bit string in the BIER multicast packet is read from left to right.
本申请实施例一获取的转发表中的SN的数值是一种举例说明,SN还可是BFR-id的整数倍,或者是BFR-id的整数倍与常量的和。bit string的从右至左的首个bit可称为第1bit,则左侧的最后1bit称为第256bit,或者bit string的从右至左的首个bit可称为第0bit,则左侧的最后1bit称为第255bit。本申请实施例对于上述表现形式不进行限定。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 BFR-id, or the sum of an integer multiple of BFR-id and a constant. The first bit from right to left of the bit string can be called the 1st bit, then the last 1bit on the left is called the 256th bit, or the first bit from right to left of the bit string can be called the 0th bit, then the left The last 1 bit is called the 255th bit. The embodiments of the present application do not limit the above expression forms.
本申请实施例提供的获取转发表项的方法中,作为BFIR的设备或作为中间BFR的设备可通过控制面实现转发表项的配置。本申请实施例提供的转发表项中,与BFR-id对应的SN直接用于确定作为下一跳的NBR,省去了存储F-BM的空间以及读取F-BM操作所耗费的硬件资源,能够降低对转发硬件的性能要求。In the method for obtaining a forwarding entry provided by the embodiment of the present application, a device serving as a BFIR or a device serving as an intermediate BFR can configure the forwarding entry through the control plane. In the forwarding entry provided in the embodiment of the present application, the SN corresponding to the BFR-id is directly used to determine the NBR as the next hop, which saves the space for storing the F-BM and the hardware resources consumed by the F-BM reading operation. , which can reduce the performance requirements on the forwarding hardware.
实施例二Embodiment 2
图4为本申请实施例二提供的转发组播报文的方法流程图。实施例二中提及的用于转发BIER组播报文的表项为实施例一中获取的转发表项。实施例二中以从右至左的方向读取bit string为例进行说明。在另一实施例,可以用从左至右的方向替换从右至左的方向来读取bit string,本申请实施例不在对上述从左至右的方向进行举例说明。下面结合图2、图3和图4,对本申请实施例二提供的转发组播报文的方法进行说明。FIG. 4 is a flowchart of a method for forwarding a multicast packet according to Embodiment 2 of the present application. The entry for forwarding the BIER multicast message mentioned in the second embodiment is the forwarding entry obtained in the first embodiment. In the second embodiment, the bit string is read from right to left as an example for description. In another embodiment, the left-to-right direction may be used instead of the right-to-left direction to read the bit string, and the above-mentioned left-to-right direction is not exemplified in this embodiment of the present application. The method for forwarding a multicast packet provided by Embodiment 2 of the present application will be described below with reference to FIG. 2 , FIG. 3 , and FIG. 4 .
S401,设备210根据来自组播源的组播报文,获得第一BIER组播报文。S401, the device 210 obtains a first BIER multicast packet according to the multicast packet from the multicast source.
举例说明,设备210根据来自组播源的组播报文,获得第一BIER组播报文包括:设备210根据一个或多个组播接收者连接的BFER的BFR-id,获得bit string;设备210在接收到的组播报文上封装BIER头,获得第一BIER组播报文,BIER头包括bit string。可选地,设备210还可根据一个或多个组播接收者连接的BFER的BFR-id,获得bit string所属的SI。第一BIER组播报文包括的BIER头还包括bit string所属的SI。在图2所示的BIER网络场景中,设备210根据配置获知组播接收者2和组播接收者6需要获得组播源发送的组播报文。组播接收者2与作为BFER的设备102连接。组播接收者6与作为BFER的设备256连接。设备102的BFR-id是2,设备256的BFR-id是256。由于设备102和设备256的BFR-id未超过256的范围,设备102和设备256属于同一SI,比如SI可为0。设备210所获得的bit string可表示为1000…00000000000000000000000000000010。上述bit string省略了中间数值为0的220bit。设备210所获得的第一BIER组播报文中的BIER头包括上述获得的bit string。For example, the device 210 obtaining the first BIER multicast message according to the multicast message from the multicast source includes: the device 210 obtains the bit string according to the BFR-id of the BFER connected to one or more multicast receivers; the device 210 Encapsulate a BIER header on the received multicast message to obtain a first BIER multicast message, where the BIER header includes a bit string. Optionally, the device 210 may also obtain the SI to which the bit string belongs according to the BFR-id of the BFER connected to one or more multicast receivers. The BIER header included in the first BIER multicast packet also includes the SI to which the bit string belongs. In the BIER network scenario shown in FIG. 2 , the device 210 learns according to the configuration that the multicast receiver 2 and the multicast receiver 6 need to obtain the multicast packets sent by the multicast source. The multicast receiver 2 is connected to the device 102 as BFER. Multicast receiver 6 is connected to device 256 as BFER. The BFR-id of device 102 is 2 and the BFR-id of device 256 is 256. Since the BFR-ids of the device 102 and the device 256 do not exceed the range of 256, the device 102 and the device 256 belong to the same SI, for example, the SI may be 0. The bit string obtained by device 210 may be represented as 1000...0000000000000000000000000000010. The above bit string omits the 220 bits whose intermediate value is 0. The BIER header in the first BIER multicast packet obtained by the device 210 includes the bit string obtained above.
S402,设备210根据其配置的转发表项,确定其自身下一跳并发送第一BIER组播报文。S402, the device 210 determines its own next hop according to the forwarding entry configured by the device 210 and sends the first BIER multicast packet.
举例说明,设备210的下一跳指代的是从组播源到组播接收者的方向上到达一个或多个组播接收者连接的BFER所经过的下一个节点,比如图2中的设备209。For example, the next hop of the device 210 refers to the next node that the BFER connected to one or more multicast receivers passes through in the direction from the multicast source to the multicast receiver, such as the device in FIG. 2 209.
举例说明,设备210确定其自身下一跳的方法可包括以下两种:For example, the method for the device 210 to determine its own next hop may include the following two:
在第一种实现方式中,设备210获取第一BIER组播报文的bit string中从右至左的方向上被置1的bit的偏移量,比如偏移量为2和256。设备210以2和256为SN查实施例一中的表2-10或表2-11,获得数值为a209的NBR。或者设备210以2和256为索引查找表2-12 匹配的单元格,即SN为1-16所在的行第2列单元格中的a209,和SN为241-256所在的行第16列单元格中的a209。具体地,设备210以数值为2的SN和数值为16的读取位宽的商所对应的行号1(表2-12中数值为1-16的SN所在的行),确定需要读取行号1所标识的转发表项。设备210从表2-12的行号1所标识的转发表项中,根据数值为2的SN确定的NBR的位置获取数值为a209的NBR(行号1所标识的行与数值为2所标识的列交叉的单元格内的NBR为与数值为2的SN对应的数值为a209的NBR)。设备210以数值为256的SN和数值为16的读取位宽的商所对应的行号16(表2-12中数值为241-16的SN所在的行),确定需要读取行号16所标识的转发表项。设备210从表2-12的行号16所标识的转发表项中,根据数值为256的SN确定的NBR的位置获取数值为a209的NBR(行号16所标识的行与数值为16所标识的列交叉的单元格内的NBR为与数值为256的SN对应的数值为a209的NBR)。In the first implementation manner, the device 210 obtains the offset of the bit set to 1 in the right-to-left direction in the bit string of the first BIER multicast packet, for example, the offsets are 2 and 256. The device 210 checks Table 2-10 or Table 2-11 in the first embodiment with 2 and 256 as the SN, and obtains an NBR with a value of a209. Or the device 210 uses 2 and 256 as indexes to look up the matching cells in table 2-12, that is, a209 in the second column cell of the row where SN is 1-16, and the 16th column cell of the row where SN is 241-256 a209 in the grid. Specifically, the device 210 uses the row number 1 corresponding to the quotient of the SN with a value of 2 and the read bit width with a value of 16 (the row where the SN with a value of 1-16 in Table 2-12 is located) determines that it needs to be read The forwarding entry identified by line number 1. The device 210 obtains an NBR with a value of a209 from the forwarding entry identified by the row number 1 in Table 2-12 according to the position of the NBR determined by the SN with a value of 2 (the row identified by the row number 1 and the row identified by the numerical value of 2). The NBR in the cell where the column intersects is the NBR with the value a209 corresponding to the SN with the value 2). The device 210 determines that the line number 16 needs to be read based on the line number 16 corresponding to the quotient of the SN with the value of 256 and the read bit width with the value of 16 (the line where the SN with the value of 241-16 is located in Table 2-12). The identified forwarding entry. The device 210 obtains the NBR with a value of a209 from the forwarding entry identified by the row number 16 in Table 2-12 according to the position of the NBR determined by the SN with the value of 256 (the row identified by the row number 16 and the row identified by the numerical value of 16). The NBR in the cell where the column intersects is the NBR with a value of a209 corresponding to the SN with a value of 256).
在第二种实现方式中,设备210获取第一BIER组播报文的bit string中从右至左的方向上首个被置1的bit的偏移量,比如偏移量为2。设备210以2为SN查实施例一中的表2-10或表2-11,获得数值为a209的NBR。或者设备210以2为索引查找表2-12匹配的单元格,即SN为1-16所在的行第2列单元格中的a209。设备210将从右至左的方向上第2bit置0后,获取1000…00000000000000000000000000000000。设备210确定从右至左的方向上首个被置1的比特位的偏移量为256。设备210以256为SN查实施例一中的表2-10或表2-11,获得数值为a209的NBR。或者设备210以256为索引查找表2-12匹配的单元格,即SN为241-256所在的行第16列单元格中的a209。设备210查表2-12确定下一跳的方法可参见上述第一种实现方式中的方法,在此不再赘述。In the second implementation manner, the device 210 obtains the offset of the first bit set to 1 in the right-to-left direction in the bit string of the first BIER multicast packet, for example, the offset is 2. The device 210 uses 2 as the SN to look up Table 2-10 or Table 2-11 in the first embodiment, and obtains an NBR whose value is a209. Or the device 210 uses 2 as the index to look up the matching cell of table 2-12, that is, a209 in the second column of the row where the SN is 1-16. The device 210 acquires 1000...00000000000000000000000000000000 after setting the second bit to 0 in the direction from right to left. The device 210 determines the offset of the first bit set to 1 in the right-to-left direction to be 256. The device 210 checks Table 2-10 or Table 2-11 in Embodiment 1 with 256 as the SN, and obtains an NBR with a value of a209. Or the device 210 uses 256 as the index to look up the matching cell in Table 2-12, that is, the SN is a209 in the 16th column cell of the row where 241-256 is located. For the method for the device 210 to look up Table 2-12 to determine the next hop, reference may be made to the method in the above-mentioned first implementation manner, and details are not described herein again.
其中,设备210在查表2-11时,可直接根据SN确定与其对应的NBR,而无需查找表2-11中的F-BM。设备210在查表2-12时,可利用第一BIER组播报文的bit string中从右至左的方向上首个被置1的bit的偏移量确定与所述偏移量对应的序列号,根据所确定的序列号和读取位宽的商,确定SN所在的行号,读取该行内由SN确定的排序位置的NRB,比如第一BIER组播报文的bit string中数值为2的偏移量确定SN为2,数值为2的SN和数值为16的读取位宽的商确定数值为2的SN对应的行号为1。第一BIER组播报文的bit string中数值为256的偏移量确定SN为256,数值为256的SN偏移量和数值为16的读取位宽的商确定数值为256的SN对应的行号为16。上述查表确定NBR的方法无需读取通常的F-BM,可以提高转发效率和降低对转发硬件的性能需求。Wherein, when looking up Table 2-11, the device 210 can directly determine the corresponding NBR according to the SN, without looking up the F-BM in Table 2-11. When looking up Table 2-12, the device 210 can use the offset of the first bit set to 1 in the right-to-left direction in the bit string of the first BIER multicast packet to determine the offset corresponding to the offset. Serial number, according to the quotient of the determined serial number and the read bit width, determine the row number where the SN is located, and read the NRB in the row in the sorting position determined by the SN, such as the value in the bit string of the first BIER multicast packet The offset of 2 determines the SN to be 2, and the quotient of the SN of 2 and the read bit width of 16 determines that the row number corresponding to the SN of 2 is 1. The offset of 256 in the bit string of the first BIER multicast packet determines the SN of 256, and the quotient of the SN offset of 256 and the read bit width of 16 determines the corresponding SN of 256 The line number is 16. The above method of looking up the table to determine the NBR does not need to read the usual F-BM, which can improve the forwarding efficiency and reduce the performance requirement on the forwarding hardware.
相比于通常的BIFT查表方法(读取表1-4所示的BIFT表项需要读取32条表项,表1-4中的每条表项占用256bit的F-BM和8bit的BFR-NBR的标识,总共需要读取8448bit),设备210所采用的查表方法,能够降低对转发硬件的性能需求,且表2-10、表2-11和表2-12的表项还可进一步根据BSL的数值进行扩展,在不提高转发硬件的性能需求的前提下,可以满足BSL为512和1024的bit string的查表转发需求。Compared with the usual BIFT table lookup method (32 entries are required to read the BIFT entries shown in Table 1-4, each entry in Table 1-4 occupies 256 bits of F-BM and 8 bits of BFR. -The identifier of the NBR, a total of 8448 bits need to be read), the table lookup method adopted by the device 210 can reduce the performance requirements of the forwarding hardware, and the table entries in Table 2-10, Table 2-11 and Table 2-12 can also be Further expansion according to the value of the BSL can meet the table lookup and forwarding requirements of bit strings with BSLs of 512 and 1024 without increasing the performance requirements of the forwarding hardware.
举例说明,设备210获取发送给下一跳的BIER组播报文包括以下三种实现方式:For example, the device 210 obtains the BIER multicast packet sent to the next hop, including the following three implementations:
在第一种可能的实现方式中,由于设备210在采用表2-10和表2-12确定NBR时,设备210到达第一BIER组播报文中被置1的第2bit和第256bit对应的BFER的下一跳均为设备209,则设备210只发送一份第一BIER组播报文,且不对第一BIER组播报文中的bit string进行替换。In the first possible implementation manner, since the device 210 uses Table 2-10 and Table 2-12 to determine the NBR, the device 210 reaches the BFER corresponding to the 2nd bit and the 256th bit set to 1 in the first BIER multicast packet. If the next hop is the device 209, the device 210 only sends one copy of the first BIER multicast packet, and does not replace the bit string in the first BIER multicast packet.
在第二种可能的实现方式中,设备210可在采用表2-11确定NBR时,由于NBR相同,设备210将SN为2中的F-BM的bit string和SN为256中的F-BM的bit string按照一定顺序 与第一BIER组播报文中的bit string进行与操作,获得数值为1000…00000000000000000000000000000010的bit sting。按照一定顺序可以是先将SN为2中的F-BM的bit string与第一BIER组播报文中的bit string进行与操作,将与操作后的结果与SN为256中的F-BM的bit string再进行一次与操作。或者按照一定顺序可以是先将SN为256中的F-BM的bit string与第一BIER组播报文中的bit string进行与操作,将与操作后的结果与SN为2中的F-BM的bit string再进行一次与操作。或者按照一定顺序可以是先将SN为2中的F-BM的bit string与SN为256中的F-BM的bit string进行与操作,将与操作后的结果与第一BIER组播报文中的bit string再进行一次与操作。上述两次与操作所获得bit string与第一BIER组播报文中的bit string相同,则不进行bit string替换操作。In the second possible implementation manner, when the device 210 determines the NBR by using Table 2-11, since the NBR is the same, the device 210 converts the bit string of the F-BM whose SN is 2 and the bit string of the F-BM whose SN is 256. perform AND operation with the bit string in the first BIER multicast message in a certain order to obtain a bit sting with a value of 1000…0000000000000000000000000000010. According to a certain order, the bit string of the F-BM in the SN of 2 can be ANDed with the bit string in the first BIER multicast message, and the result after the AND operation can be combined with the bit string of the F-BM in the SN of 256. Perform the AND operation again. Or according to a certain order, the bit string of the F-BM in the SN of 256 can be ANDed with the bit string in the first BIER multicast message, and the result after the AND operation can be combined with the bit of the F-BM in the SN of 2. The string is ANDed again. Or according to a certain order, the bit string of the F-BM in the SN of 2 and the bit string of the F-BM in the SN of 256 can be ANDed, and the result of the AND operation can be combined with the bit string in the first BIER multicast message. The string is ANDed again. The bit string obtained by the above two AND operations is the same as the bit string in the first BIER multicast message, and the bit string replacement operation is not performed.
在第三种可能的实现方式中,设备210可在查表2-11时,确定SN为2的表项用于转发第一BIER组播报文。设备210将SN为2的表项中的F-BM与第一BIER组播报文中的bit string进行与操作,获得000…00000000000000000000000000000010。设备210用与操作后的结果替换第一BIER组播报文中的bit string,获得第一子报文。第一子报文报文的bit string为000…00000000000000000000000000000010。设备210可在查表2-11时,确定SN为256的表项用于转发第一BIER组播报文,比如在完成SN为2的查表操作后,将第一BIER组播报文的bit string中从右至左的第2bit清0后的bit string中首个被置1的bit的偏移量作为新的SN,即SN为256。设备210将SN为256的表项中的F-BM与第一BIER组播报文中的bit string进行与操作,获得100…00000000000000000000000000000000。设备210用与操作后的结果替换第一BIER组播报文中的bit string,获得第二子报文。第二子报文的bit string为100…00000000000000000000000000000000。设备210可将第二子报文和第一子报文作为第一BIER组播报文发给设备209。在该种实现方式中,第一BIER组播报文包括第一子报文和第二子报文,第一BIER组播报文是一个集合的概念。In a third possible implementation manner, the device 210 may, when looking up the table 2-11, determine that the entry whose SN is 2 is used to forward the first BIER multicast packet. The device 210 performs an AND operation between the F-BM in the entry with the SN of 2 and the bit string in the first BIER multicast message, and obtains 000...00000000000000000000000000000010. The device 210 replaces the bit string in the first BIER multicast packet with the result of the AND operation to obtain the first sub-packet. The bit string of the first sub-packet is 000…0000000000000000000000000000010. The device 210 may determine that the entry with the SN of 256 is used to forward the first BIER multicast packet when looking up the table 2-11. The offset of the first bit set to 1 in the bit string after the 2nd bit from right to left in the bit string is cleared to 0 is used as the new SN, that is, the SN is 256. The device 210 performs an AND operation on the F-BM in the 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 packet with the result of the AND operation to obtain the second sub-packet. 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 manner, 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.
对于设备210获取发送给下一跳的BIER组播报文的可能的实现方式,第一种可能的实现方式和第二种可能的实现方式,能够节省设备210与设备209之间的带宽。第三种可能的实现方式可避免后续中间BFR进行复制操作。For the possible implementation manners for the device 210 to obtain the BIER multicast packet sent to the next hop, the first possible implementation manner and the second possible implementation manner can save the bandwidth between the device 210 and the device 209 . The third possible implementation avoids subsequent intermediate BFRs for copying operations.
S403,设备209根据其配置的表项和第一BIER组播报文中的bit string,确定其自身的下一跳并发送。S403, the device 209 determines its own next hop and sends it according to the configured entry and the bit string in the first BIER multicast message.
举例说明,设备209的下一跳指代的是从组播源到组播接收者的方向上到达一个或多个组播接收者连接的BFER所经过的下一个节点,比如图2中的设备205、设备206、设备207和设备208。对于本申请实施例二中的第一BIER组播报文来说,根据第一BER组播报文中被置1的bit在bit string中的偏移量,设备209确定其下一跳是图2中的设备206和设备208。For example, the next hop of the device 209 refers to the next node that the BFER connected to one or more multicast receivers passes through in the direction from the multicast source to the multicast receiver, such as the device in Figure 2 205, Device 206, Device 207, and Device 208. For the first BIER multicast packet in the second embodiment of the present application, according to the offset of the bit set to 1 in the first BER multicast packet in the bit string, the device 209 determines that its next hop is the one in FIG. 2 device 206 and device 208.
举例说明,设备209确定下一跳的方法可包括以下两种:For example, the method for the device 209 to determine the next hop may include the following two:
在第一种实现方式中,设备209获取第一BIER组播报文包括的bit string中从右至左的方向上被置1的比特位在bit string中的偏移量,比如偏移量为2和256。设备209以2和256为SN直接查实施例一中的表2-7或表2-8,获得数值为a206和a208的NBR。设备209需要复制一份第一BIER组播报文。或者设备209以2和256为索引查找表2-9匹配的单元格,即SN为1-16所在的行第2列单元格中的a206,和SN为241-256所在的行第16列单元格中的a208。具体地,设备209以数值为2的SN和数值为16的读取位宽的商所对应的行号1(表2-9中数值为1-16的SN所在的行),确定需要读取行号1所标识的转发表项。设备209从表2-9的行号1所标识的转发表项中,根据数值为2的SN确定的NBR的位置获取数值为a206的NBR(行号1所标识的行与数值为2所标识的列交叉的单元格内的NBR为与数值为2的 SN对应的数值为a206的NBR)。设备209以数值为256的SN和数值为16的读取位宽的商所对应的行号16(表2-9中数值为241-16的SN所在的行),确定需要读取行号16所标识的转发表项。设备209从表2-9的行号16所标识的转发表项中,根据数值为256的SN确定的NBR的位置获取数值为a208的NBR(行号16所标识的行与数值为16所标识的列交叉的单元格内的NBR为与数值为256的SN对应的数值为a208的NBR)。In the first implementation manner, the device 209 obtains the offset in the bit string of the bit set to 1 in the right-to-left direction in the bit string included in the first BIER multicast packet, for example, the offset is 2 and 256. The device 209 directly looks up Table 2-7 or Table 2-8 in Embodiment 1 with 2 and 256 as the SN, and obtains NBRs with values a206 and a208. The device 209 needs to copy a copy of the first BIER multicast message. Or the device 209 uses 2 and 256 as indexes to look up the matching cells in table 2-9, that is, a206 in the second column cell of the row where the SN is 1-16, and the 16th column cell of the row where the SN is 241-256 a208 in the grid. Specifically, the device 209 uses the row number 1 corresponding to the quotient of the SN with a value of 2 and the read bit width with a value of 16 (the row where the SN with a value of 1-16 in Table 2-9 is located) determines that it needs to be read The forwarding entry identified by line number 1. The device 209 obtains the NBR with a value of a206 from the forwarding entry identified by the row number 1 in Table 2-9 according to the position of the NBR determined by the SN with the value of 2 (the row identified by the row number 1 and the row identified by the numerical value of 2). The NBR in the cell where the column intersects is the NBR with a value of a206 corresponding to the SN with a value of 2). The device 209 uses the line number 16 corresponding to the quotient of the SN with the value of 256 and the read bit width with the value of 16 (the line where the SN with the value of 241-16 in Table 2-9 is located) determines that the line number 16 needs to be read. The identified forwarding entry. The device 209 obtains the NBR with a value of a208 from the forwarding entry identified by the row number 16 in Table 2-9 according to the position of the NBR determined by the SN with the value of 256 (the row identified by the row number 16 and the row identified by the numerical value of 16). The NBR in the cell where the column intersects is the NBR with a value of a208 corresponding to the SN with a value of 256).
在第二种实现方式中,设备209获取第一BIER组播报文的bit string中从右至左的方向上首个被置1的bit的偏移量,比如偏移量为2。设备209以2为SN查实施例一中的表2-7或表2-8,获得数值为a206的NBR。或者设备209以2为索引查找表2-9匹配的单元格,即SN为1-16所在的行第2列单元格中的a206。设备209将从右至左的方向上第2bit置0后,获取1000…00000000000000000000000000000000。设备209确定从右至左的方向上首个被置1的比特位的偏移量为256。设备209以256为SN查实施例一中的表2-7或表2-8,获得数值为a208的NBR。或者设备209以256为索引查找表2-9匹配的单元格,即SN为241-256所在的行第16列单元格中的a208。设备209查表2-9确定下一跳的方法可参见上述第一种实现方式中的方法,在此不再赘述。In the second implementation manner, the device 209 obtains the offset of the first bit set to 1 in the right-to-left direction in the bit string of the first BIER multicast packet, for example, the offset is 2. The device 209 uses 2 as the SN to look up Table 2-7 or Table 2-8 in the first embodiment, and obtains the NBR whose value is a206. Or the device 209 uses 2 as the index to look up the matching cell of table 2-9, that is, the SN is a206 in the second column cell of the row where 1-16 is located. The device 209 acquires 1000...00000000000000000000000000000000 after setting the second bit to 0 in the direction from right to left. The device 209 determines that the offset of the first bit set to 1 in the right-to-left direction is 256. The device 209 uses 256 as the SN to look up Table 2-7 or Table 2-8 in the first embodiment, and obtains an NBR whose value is a208. Or the device 209 uses 256 as the index to look up the matching cell of Table 2-9, that is, the SN is a208 in the 16th column cell of the row where 241-256 is located. For the method for the device 209 to look up Table 2-9 to determine the next hop, reference may be made to the method in the above-mentioned first implementation manner, and details are not described herein again.
其中,设备209在查表2-8时,可直接根据SN确定与其对应的NBR,而无需查找表2-8的F-BM所包含的bit string。设备209在查表2-9时,可利用第一BIER组播报文的bit string中从右至左的方向上首个被置1的bit的偏移量确定与所述偏移量对应的序列号,根据所确定的序列号和读取位宽的商,确定SN所在的行号,读取该行内由SN确定排序位置的NRB,避免读取通常的F-BM和降低对转发硬件的性能需求。Wherein, when looking up Table 2-8, the device 209 can directly determine the corresponding NBR according to the SN without looking up the bit string contained in the F-BM of Table 2-8. When looking up Table 2-9, the device 209 can use the offset of the first bit set to 1 in the right-to-left direction in the bit string of the first BIER multicast packet to determine the offset corresponding to the offset. Serial number, according to the quotient of the determined serial number and the read bit width, determine the row number where the SN is located, and read the NRB in the row whose sorting position is determined by the SN, avoiding reading the usual F-BM and reducing the impact on the forwarding hardware. performance requirements.
相比于通常的BIFT查表方法(读取表1-3所示的BIFT表项需要读取32条表项,表1-3中的每条表项占用256bit的F-BM和8bit的BFR-NBR的标识,总共需要读取8448bit),设备209所采用的查表方法,能够降低对转发硬件的性能需求,且表2-7、表2-8和表2-9的表项还可进一步根据BSL的数值进行扩展,在不提高转发硬件的性能需求的前提下,可以满足BSL为512和1024的bit string的查表转发需求。Compared with the usual BIFT table lookup method (32 entries are required to read the BIFT entries shown in Table 1-3, each entry in Table 1-3 occupies 256 bits of F-BM and 8 bits of BFR. -The identifier of the NBR, a total of 8448 bits need to be read), the table lookup method adopted by the device 209 can reduce the performance requirements of the forwarding hardware, and the table entries in Table 2-7, Table 2-8 and Table 2-9 can also be used. Further expansion according to the value of the BSL can meet the table lookup and forwarding requirements of bit strings with BSLs of 512 and 1024 without increasing the performance requirements of the forwarding hardware.
举例说明,设备209获取发送给下一跳的BIER组播报文包括以下两种实现方式:For example, the device 209 can obtain the BIER multicast packet sent to the next hop in the following two ways:
在第一种可能的实现方式中,由于设备209在采用表2-7和表2-9确定NBR时,设备209到达第一BIER组播报文中被置1的第2bit对应的BFER的下一跳为设备206,设备209到达第一BIER组播报文中被置1的第256bit对应的BFER的下一跳为设备208,则设备209需要进行报文复制和bit string替换操作。具体地,设备209确定SN为2的表项可用来转发第一BIER组播报文,设备209将第一BIER组播报文中的bit string中从右至左方向上被置1的第2bit保留(与SN为2对应的bit),将其它bit清零,获得数值为0000…00000000000000000000000000000010的bit sting。设备209根据第一BIER组播报文和数值为0000…00000000000000000000000000000010的bit sting获得第二BIER组播报文。第二BIER组播报文包括0000…00000000000000000000000000000010的bit sting。设备209向SN为2的表项中的NBR,即设备206,发送第二BIER组播报文。设备209可将第一BIER组播报文中bit string中从右至左的方向上被置1的第2bit清0后,获得数值为1000…00000000000000000000000000000000的bit sting。由于数值为1000…00000000000000000000000000000000的bit sting非全0,则设备209复制一份第一BIER组播报文。设备209可用1000…00000000000000000000000000000000替换第一BIER组播报文中的bit string,获得第三BIER组播报文。或者设备209可根据SN为256的查表结果保留第一BIER组播报文中与SN对应的bit(从右至左的方向上第256bit)不变,将其他bit 清零,获得数值为1000…00000000000000000000000000000000的bit sting。设备209根据第一BIER组播报文和数值为1000…00000000000000000000000000000000的bit sting,获得第三BIER组播报文。所述第三组播报文包括数值为1000…00000000000000000000000000000000的bit sting。设备209向SN为256的表项中的NBR,即设备208,发送第三BIER组播报文。In the first possible implementation manner, since the device 209 uses Table 2-7 and Table 2-9 to determine the NBR, the device 209 reaches the next hop of the BFER corresponding to the 2th bit set to 1 in the first BIER multicast packet For the device 206, the next hop of the device 209 to the BFER corresponding to the 256th bit set to 1 in the first BIER multicast message is the device 208, then the device 209 needs to perform packet copy and bit string replacement operations. Specifically, the device 209 determines that the entry whose SN is 2 can be used to forward the first BIER multicast packet, and the device 209 reserves the second bit that is set to 1 from right to left in the bit string in the first BIER multicast packet ( The bit corresponding to SN is 2), clear the other bits to zero, and obtain a bit sting with a value of 0000...0000000000000000000000000000010. The device 209 obtains the second BIER multicast packet according to the first BIER multicast packet and the bit sting with a value of 0000...0000000000000000000000000000010. The second BIER multicast packet includes a bit sting of 0000...0000000000000000000000000000010. The device 209 sends the second BIER multicast packet to the NBR in the entry with the SN of 2, that is, the device 206 . The device 209 may clear the second bit that is set to 1 in the right-to-left direction in the bit string of the first BIER multicast packet to 0, and obtain a bit sting with a value of 1000...00000000000000000000000000000000. Since the bit sting whose value is 1000...00000000000000000000000000000000 is not all 0, the device 209 copies a copy of the first BIER multicast packet. The device 209 can replace the bit string in the first BIER multicast packet with 1000...00000000000000000000000000000000 to obtain the third BIER multicast packet. Or the device 209 can keep the bit corresponding to the SN in the first BIER multicast packet (the 256th bit in the direction from right to left) unchanged according to the table lookup result with the SN of 256, and clear the other bits to zero to obtain a value of 1000…0000000000000000000000000000000 bit sting. The device 209 obtains the third BIER multicast packet according to the first BIER multicast packet and the bit sting with a value of 1000...00000000000000000000000000000000. The third multicast packet includes a bit sting with a value of 1000...00000000000000000000000000000000. The device 209 sends the third BIER multicast packet to the NBR in the entry with the SN of 256, that is, the device 208 .
在第二种可能的实现方式中,设备209在查表2-8时,确定SN为2的表项用于转发第一BIER组播报文。设备209将SN为2的表项中的F-BM与第一BIER组播报文中的bit string进行与操作,获得000…00000000000000000000000000000010。设备209用与操作后的结果替换第一BIER组播报文中的bit string,获得第二BIER组播报文。第二BIER组播报文报文的bit string为000…00000000000000000000000000000010。设备209向SN为2的表项中的NBR,即设备206,发送第二BIER组播报文。设备209可在查表2-8时,确定SN为256的表项用于转发第一BIER组播报文。设备209确定SN为256的表项用于转发第一BIER组播报文的方法可参见设备210所采用的方法,在此不再赘述。设备209将SN为256的表项中的F-BM与第一BIER组播报文中的bit string进行与操作,获得100…00000000000000000000000000000000。设备209用与操作后的结果替换第一BIER组播报文中的bit string,获得第三BIER组播报文。第三BIER组播报文的bit string为100…00000000000000000000000000000000。设备209向SN为256的表项中的NBR,即设备208,发送第三BIER组播报文。In the second possible implementation manner, the device 209 determines that the entry with the SN of 2 is used to forward the first BIER multicast packet when looking up the table 2-8. The device 209 performs an AND operation on the F-BM in the entry with the 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 message with the result of the AND operation to obtain the second BIER multicast message. The bit string of the second BIER multicast packet is 000…0000000000000000000000000000010. The device 209 sends the second BIER multicast packet to the NBR in the entry with the SN of 2, that is, the device 206 . The device 209 may determine that the entry whose SN is 256 is used to forward the first BIER multicast packet when looking up Tables 2-8. The method for the device 209 to determine that the entry whose SN is 256 is used to forward the first BIER multicast packet may refer to the method adopted by the device 210, and details are not described herein again. The device 209 performs an AND operation between the F-BM in the entry with the SN of 256 and the bit string in the first BIER multicast message, and obtains 100...00000000000000000000000000000000. The device 209 replaces the bit string in the first BIER multicast packet with the result of the AND operation to obtain a third BIER multicast packet. The bit string of the third BIER multicast packet is 100…0000000000000000000000000000000. The device 209 sends the third BIER multicast packet to the NBR in the entry with the SN of 256, that is, the device 208 .
在第三种可能的实现方式中,设备209收到的是包括第一子报文和第二子报文的第一BIER组播报文。设备209可采用上述第一种可能的实现方式或第二种可能的实现方式来获取第二BIER组播报文和第三BIER组播报文。与上述第一种可能的实现方式或第二种可能的实现方式不同之处在于,由于设备210已经进行了报文复制,设备209无需再进行报文复制和bit string替换。具体的,由于第一子报文包括的bit string中只包括一位被置1的bit,即从右至左方向上的第2bit,设备209将第一子报文作为第二BIER组播报文。设备209向SN为2的表项中的NBR,即设备206,发送第二BIER组播报文。由于第二子报文包括的bit string中只包括一位被置1的bit,即从右至左方向上的第256bit,设备209将第二子报文作为第三BIER组播报文。设备209向SN为256的表项中的NBR,即设备208,发送第三BIER组播报文。In a third possible implementation manner, what the device 209 receives is the first BIER multicast packet including the first sub-packet and the second sub-packet. The device 209 may acquire the second BIER multicast packet and the third BIER multicast packet by adopting the above-mentioned first possible implementation manner or the second possible implementation manner. The difference from the above-mentioned first possible implementation manner or the second possible implementation manner is that, since the device 210 has already performed packet duplication, the device 209 does not need to perform packet duplication and bit string replacement. Specifically, since the bit string included in the first sub-packet includes only one bit that is set to 1, that is, the second bit in the right-to-left direction, the device 209 uses the first sub-packet as the second BIER multicast report Arts. The device 209 sends the second BIER multicast packet to the NBR in the entry with the SN of 2, that is, the device 206 . Since the bit string included in the second sub-packet includes only one bit set to 1, that is, the 256th bit in the right-to-left direction, the device 209 regards 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 the SN of 256, that is, the device 208 .
S404,设备206根据其配置的BIFT表项和第二BIER组播报文,确定其自身的下一跳并发送。S404, the device 206 determines its own next hop according to the configured BIFT entry and the second BIER multicast packet and sends it.
举例说明,设备206的下一跳指代的是从组播源到组播接收者的方向上到达一个或多个组播接收者连接的BFER所经过的下一个节点,比如图2中的设备102和设备103。本申请实施例二是对组播接收者2和组播接收者6需要从组播源接收组播报文为例进行说明,则根据第二BIER组播报文中被置1的bit在bit string中的偏移量,设备206确定第二BIER组播报文的下一跳为设备102。For example, the next hop of the device 206 refers to the next node that the BFER connected to one or more multicast receivers passes through in the direction from the multicast source to the multicast receiver, such as the device in FIG. 2 102 and equipment 103. The second embodiment of this application is to illustrate that the multicast receiver 2 and the multicast receiver 6 need to receive multicast packets from the multicast source as an example. According to the second BIER multicast packet, the bit set to 1 is in the bit string The device 206 determines that the next hop of the second BIER multicast packet is the device 102.
举例说明,设备206确定下一跳的方法可包括:设备206获取第二BIER组播报文包括的bit string中从右至左的方向上被置1的比特位在bit string中的偏移量,比如偏移量为2。设备206以2为SN查实施例一中的表2-1或表2-2,获得数值为a102的NBR。或者设备206以2为索引查找表2-3匹配的单元格,即SN为1-16所在的行第2列单元格中的a102的NBR。其中,设备206在查表2-2时,可直接根据SN确定与其对应的NBR,而无需查找表2-2中的F-BM。设备206在查表2-3时,可利用第二BIER组播报文的bit string中从右至左的方向上首个被置1的bit的偏移量和读取位宽的商,确定SN所在的行号,读取该行内的NRB,比 如数值为2的偏移量和数值为16的读取位宽的商为0,确定SN所在的行号为1。相比于通常的BIFT查表方法(读取表1-1所示的BIFT表项需要读取32条表项,表1-1中的每条表项占用256bit的F-BM和8bit的BFR-NBR的标识,总共需要读取8448bit),设备206所采用的查表方法,能够降低对转发硬件的性能需求,且表2-1、表2-2和表2-3的表项还可进一步根据BSL的数值进行扩展,在不提高转发硬件的性能需求的前提下,可以满足BSL为512和1024的bit string的查表转发需求。上述设备206查表2-3确定下一跳的方法可参见设备209查表2-9确定下一跳的方法,在此不再赘述。For example, the method for the device 206 to determine the next hop may include: the device 206 obtains the offset in the bit string of the bit set to 1 in the right-to-left direction in the bit string included in the second BIER multicast packet , for example, the offset is 2. The device 206 checks Table 2-1 or Table 2-2 in Embodiment 1 with 2 as the SN, and obtains an NBR with a value of a102. Or the device 206 uses 2 as an index to look up the matching cell of table 2-3, that is, the SN is the NBR of a102 in the cell in the second column of the row where 1-16 is located. Wherein, when the device 206 looks up the table 2-2, it can directly determine the NBR corresponding to it according to the SN, without looking up the F-BM in the table 2-2. When looking up Table 2-3, the device 206 can use the offset of the first bit set to 1 in the right-to-left direction in the bit string of the second BIER multicast message and the quotient of the read bit width to determine The line number where the SN is located, and the NRB in the line is read. For example, the quotient of the offset with a value of 2 and the read bit width with a value of 16 is 0, and the line number where the SN is located is determined to be 1. Compared with the usual BIFT table lookup method (32 entries are required to read the BIFT entries shown in Table 1-1, each entry in Table 1-1 occupies 256 bits of F-BM and 8 bits of BFR. -The identifier of the NBR, a total of 8448 bits need to be read), the table lookup method adopted by the device 206 can reduce the performance requirements of the forwarding hardware, and the table entries in Table 2-1, Table 2-2 and Table 2-3 can also be Further expansion according to the value of the BSL can meet the table lookup and forwarding requirements of bit strings with BSLs of 512 and 1024 without increasing the performance requirements of the forwarding hardware. For the method for the device 206 to look up Table 2-3 to determine the next hop, reference may be made to the method for the device 209 to look up Table 2-9 to determine the next hop, which will not be repeated here.
举例说明,设备206获取发送给下一跳的BIER组播报文包括以下两种实现方式:For example, the device 206 obtains the BIER multicast packet sent to the next hop, including the following two implementations:
在第一种可能的实现方式中,由于设备206在采用表2-1和表2-3确定NBR时,设备206到达第二BIER组播报文中被置1的第2bit对应的BFER的下一跳为设备102,则设备206不需要进行报文复制和bit string替换操作。设备206向SN为2的表项中的NBR,即设备102,发送第二BIER组播报文。设备206可将第二BIER组播报文中bit string中从右至左的方向上被置1的第2bit清0后,获得数值为0000…00000000000000000000000000000000的bit sting,全0,则设备206不再复制报文。In the first possible implementation manner, since the device 206 uses Table 2-1 and Table 2-3 to determine the NBR, the device 206 reaches the next hop of the BFER corresponding to the 2th bit set to 1 in the second BIER multicast packet For device 102, device 206 does not need to perform packet copying and bit string replacement operations. The device 206 sends the second BIER multicast packet to the NBR in the entry with the SN of 2, that is, the device 102 . The device 206 can clear the second bit, which is set to 1 in the right-to-left direction in the second BIER multicast packet, to 0, and obtain a bit sting with a value of 0000... Arts.
在第二种可能的实现方式中,设备206在查表2-2时,确定SN为2的表项用于转发第二BIER组播报文。设备206将SN为2的表项中的F-BM与第二BIER组播报文中的bit string进行与操作,获得000…00000000000000000000000000000010,与第二BIER组播报文中的bit string相同,不进行替换和复制操作。设备206向SN为2的表项中的NBR,即设备102,发送第二BIER组播报文。设备206可将第二BIER组播报文中bit string中从右至左的方向上被置1的第2bit清0后,获得数值为0000…00000000000000000000000000000000的bit sting,全0,则设备206不再复制报文。In a second possible implementation manner, when looking up Table 2-2, the device 206 determines that the entry whose SN is 2 is used to forward the second BIER multicast packet. The device 206 performs an AND operation on the F-BM in the entry whose SN is 2 and the bit string in the second BIER multicast packet, and obtains 000...000000000000000000000000000000010, which is the same as the bit string in the second BIER multicast packet, and does not perform replacement and duplication operate. The device 206 sends the second BIER multicast packet to the NBR in the entry with the SN of 2, that is, the device 102 . The device 206 can clear the second bit, which is set to 1 in the right-to-left direction in the second BIER multicast packet, to 0, and obtain a bit sting with a value of 0000... Arts.
S405,设备208根据其配置的BIFT表项和第三BIER组播报文,确定其自身的下一跳并发送。S405, the device 208 determines its own next hop according to the configured BIFT entry and the third BIER multicast packet and sends it.
举例说明,设备208的下一跳指代的是从组播源到组播接收者的方向上到达一个或多个组播接收者连接的BFER所经过的下一个节点,比如图2中的设备255和设备256。本申请实施例二是对组播接收者2和组播接收者6需要从组播源接收组播报文为例进行说明,则根据第三BIER组播报文中被置1的bit在bit string中的偏移量,设备208确定第三BIER组播报文的下一跳为设备256。By way of example, the next hop of the device 208 refers to the next node through which the BFER connected to one or more multicast receivers is reached in the direction from the multicast source to the multicast receiver, such as the device in FIG. 2 255 and equipment 256. The second embodiment of the present application is to illustrate that the multicast receiver 2 and the multicast receiver 6 need to receive multicast packets from the multicast source as an example, then according to the bit set to 1 in the third BIER multicast packet is in the bit string The device 208 determines that the next hop of the third BIER multicast packet is the device 256.
举例说明,设备208确定下一跳的方法可包括:设备208获取第三BIER组播报文包括的bit string中从右至左的方向上被置1的比特位在bit string中的偏移量,比如偏移量为256。设备208以256为SN查实施例一中的表2-4或表2-5,获得数值为a256的NBR。或者设备208以256为索引查找表2-6匹配的单元格,即SN为241-256所在的行第16列单元格中的a256的NBR。其中,设备208在查表2-5时,可直接根据SN确定与其对应的NBR,而无需查找表2-5中的F-BM。设备208在查表2-6时,可利用第三BIER组播报文的bit string中从右至左的方向上首个被置1的bit的偏移量和读取位宽的商,确定SN所在的行号,读取该行内的NRB,比如数值为256的偏移量和数值为16的读取位宽的商为16,确定SN所在的行号为16。相比于通常的BIFT查表方法(读取表1-2所示的BIFT表项需要读取32条表项,表1-2中的每条表项占用256bit的F-BM和8bit的BFR-NBR的标识,总共需要读取8448bit),设备208所采用的查表方法,能够降低对转发硬件的性能需求,且表2-4、表2-5和表2-6的表项还可进一步根据BSL的数值进行扩展,在不提高转发硬件的性能需求的前提下,可以满足BSL为512和1024的bit string的查表转发需求。上述设备208查表2-6确定下一跳的方 法可参见设备209查表2-9确定下一跳的方法,在此不再赘述。For example, the method for the device 208 to determine the next hop may include: the device 208 obtains the offset in the bit string of the bit set to 1 in the right-to-left direction in the bit string included in the third BIER multicast packet , for example, the offset is 256. The device 208 looks up Table 2-4 or Table 2-5 in Embodiment 1 with 256 as the SN, and obtains an NBR whose value is a256. Or the device 208 uses 256 as the index to look up the matching cell of Table 2-6, that is, the NBR of a256 in the 16th column cell of the row where the SN is 241-256. Wherein, when the device 208 looks up the table 2-5, it can directly determine the NBR corresponding to it according to the SN, without looking up the F-BM in the table 2-5. When looking up Table 2-6, the device 208 can use the offset of the first bit set to 1 in the right-to-left direction in the bit string of the third BIER multicast message and the quotient of the read bit width to determine The line number where the SN is located, and the NRB in the line is read. For example, the quotient of the offset with a value of 256 and the read bit width with a value of 16 is 16, and the line number where the SN is located is 16. Compared with the usual BIFT table lookup method (32 entries are required to read the BIFT entries shown in Table 1-2, each entry in Table 1-2 occupies 256 bits of F-BM and 8 bits of BFR. -The identifier of the NBR, a total of 8448 bits need to be read), the table lookup method adopted by the device 208 can reduce the performance requirement of the forwarding hardware, and the table entries in Table 2-4, Table 2-5 and Table 2-6 can also be Further expansion according to the value of the BSL can meet the table lookup and forwarding requirements of bit strings with BSLs of 512 and 1024 without increasing the performance requirements of the forwarding hardware. For the method for the device 208 to look up Table 2-6 to determine the next hop, reference may be made to the method for the device 209 to look up Table 2-9 to determine the next hop, which will not be repeated here.
举例说明,设备208获取发送给下一跳的BIER组播报文包括以下两种实现方式:For example, the device 208 can obtain the BIER multicast packet sent to the next hop in the following two ways:
在第一种可能的实现方式中,由于设备208在采用表2-1和表2-3确定NBR时,设备208到达第三BIER组播报文中被置1的第256bit对应的BFER的下一跳为设备256,则设备208不需要进行报文复制和bit string替换操作。设备208向SN为256的表项中的NBR,即设备256,发送第三BIER组播报文。设备208可将第三BIER组播报文中bit string中从右至左的方向上被置1的第2bit清0后,获得数值为0000…00000000000000000000000000000000的bit sting,全0,则设备208不再复制报文。In the first possible implementation manner, since the device 208 uses Table 2-1 and Table 2-3 to determine the NBR, the device 208 reaches the next hop of the BFER corresponding to the 256th bit set to 1 in the third BIER multicast packet For device 256, device 208 does not need to perform packet copy and bit string replacement operations. The device 208 sends the third BIER multicast packet to the NBR in the entry with the SN of 256, that is, the device 256. The device 208 can clear the second bit, which is set to 1 in the right-to-left direction in the bit string of the third BIER multicast message, to 0, and obtain a bit sting with a value of 0000... Arts.
在第二种可能的实现方式中,设备208在查表2-2时,确定SN为256的表项用于转发第三BIER组播报文。设备208将SN为256的表项中的F-BM与第三BIER组播报文中的bit string进行与操作,获得100…00000000000000000000000000000000,与第三BIER组播报文中的bit string相同,不进行替换和复制操作。设备208向SN为256的表项中的NBR,即设备256,发送第三BIER组播报文。设备208可将第三BIER组播报文中bit string中从右至左的方向上被置1的第2bit清0后,获得数值为0000…00000000000000000000000000000000的bit sting,全0,则设备208不再复制报文。In the second possible implementation manner, when looking up Table 2-2, the device 208 determines that the entry whose SN is 256 is used to forward the third BIER multicast packet. The device 208 performs an AND operation between the F-BM in the entry with the SN of 256 and the bit string in the third BIER multicast message, and obtains 100...0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, which is the same as the bit string in the third BIER multicast message, and does not perform replacement and replication operate. The device 208 sends the third BIER multicast packet to the NBR in the entry with the SN of 256, that is, the device 256. The device 208 can clear the second bit, which is set to 1 in the right-to-left direction in the bit string of the third BIER multicast message, to 0, and obtain a bit sting with a value of 0000... Arts.
S406,作为BFER的设备获得组播报文并发送给组播接收者。S406, the device serving as the BFER obtains the multicast packet and sends it to the multicast receiver.
举例说明,作为BFER的设备102接收到第二BIER组播报文后,根据第二BIER组播报文中的数值为0000…00000000000000000000000000000010的bit string,确定bit string包括其自身的BFR-id,即从右至左的被置1的第2bit表示设备102的BFR-id。作为BFER的设备102剥离第二BIER组播报文中的BIER头,并发送给与自身连接的组播接收者2。作为BFER的设备256接收到第三BIER组播报文后,根据第三BIER组播报文中的数值为1000…00000000000000000000000000000000的bit string,确定bit string包括其自身的BFR-id,即从右至左的被置1的第256bit表示设备256的BFR-id。作为BFER的设备256剥离第三BIER组播报文中的BIER头,并发送给与自身连接的组播接收者6。For example, after receiving the second BIER multicast packet, the device 102 serving as BFER determines that the bit string includes its own BFR-id according to the bit string whose value in the second BIER multicast packet is 0000...0000000000000000000000000000010. The second bit from the left, which is set to 1, represents the BFR-id of the device 102 . The device 102 serving as 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 message, the device 256 serving as BFER determines that the bit string includes its own BFR-id according to the bit string whose value in the third BIER multicast message is 1000...0000000000000000000000000000000000000000000000000000000 The 256th bit, which is set to 1, represents the BFR-id of the device 256. The device 256 serving as BFER strips the BIER header in the third BIER multicast packet, and sends it to the multicast receiver 6 connected to itself.
本申请实施例一提供的方法中,BIER网络场景中的转发设备,比如作为BFIR、中间BFR或BFER的设备,可通过控制面获取本申请实施例提供的优化后的BIFT表项,利用本申请实施例提供的优化后的BIFT表项进行BIER组播报文的转发,省去了读取通常的BIFT表项包括的由BSL确定的F-BM中的bit string的操作,在不提高转发硬件性能的情况下,提高了转发效率和可扩展性。In the method provided in Embodiment 1 of the present application, a forwarding device in a BIER network scenario, such as a device serving as a BFIR, an intermediate BFR, or a BFER, can obtain the optimized BIFT entry provided by the embodiment of the present application through the control plane, and use the The optimized BIFT entry provided by the embodiment forwards the BIER multicast message, and the operation of reading the bit string in the F-BM determined by the BSL included in the usual BIFT entry is omitted, and the forwarding hardware is not improved. In the case of performance, the forwarding efficiency and scalability are improved.
图5为本申请实施例提供的另一BIER网络场景示意图。图5所示的BIER网络场景与图2所示的BIER网络场景不同之处在于,图5所示的BIER网络场景是在图2所示的网络场景的基础上,增加了希望接收组播源发送的组播报文的组播接收者7。组播接收者通7通过作为BFER的设备511连接设备509。设备509连接设备510、设备505、设备506、设备507和设备508。设备510连接组播源。作为BFER的设备511被分配的BFR-id为31。图5所示的BIER网络场景中与图2中标号相同的设备的功能相同,在此不再赘述。设备505、设备506、设备507、设备508和设备509为中间BFR。设备210为BFIR。图5所示的BIER网络场景中,组播接收者2、组播接收者6和组播接收者7需要接收组播源发送的组播报文。FIG. 5 is a schematic diagram of another BIER network scenario provided by an embodiment of the present application. The difference between the BIER network scenario shown in FIG. 5 and the BIER network scenario shown in FIG. 2 is that the BIER network scenario shown in FIG. 5 is based on the network scenario shown in FIG. Multicast receiver 7 of the sent multicast packet. Multicast recipients connect to device 509 through device 511 acting as a BFER. Device 509 connects device 510 , device 505 , device 506 , device 507 and device 508 . Device 510 connects to a multicast source. The BFR-id assigned to the device 511 as a BFER is 31. In the BIER network scenario shown in FIG. 5 , the functions of the devices with the same reference numerals in FIG. 2 are the same, and details are not repeated 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 Figure 5, multicast receiver 2, multicast receiver 6, and multicast receiver 7 need to receive multicast packets sent by the multicast source.
实施例三Embodiment 3
图6为本申请实施例三提供的获取转发表项的方法流程示意图。图6对应的实施例是针对组播接收者2、组播组播接收者6和组播接收者7接收组播源的组播报文这一场景,图6及相应实施例中的BFIR可以是图5所示的BIER网络场景中的设备510。图6及相应实施例 中的中间BFR可以是图5所示的BIER网络场景中的设备509、设备506或设备508。图6及相应实施例中的BFER可以是图5所示的BIER网络场景中的设备102、设备256或设备511。下面结合图5和图6,对本申请实施例提供的获取转发表项的方法进行说明。FIG. 6 is a schematic flowchart of a method for obtaining a forwarding entry according to Embodiment 3 of the present application. The embodiment corresponding to FIG. 6 is for a scenario in which multicast receiver 2, multicast receiver 6, and multicast receiver 7 receive multicast packets from a multicast source. The BFIR in FIG. 6 and the corresponding embodiment can be is the 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 the device 102 , the device 256 or the device 511 in the BIER network scenario shown in FIG. 5 . The method for obtaining a forwarding entry provided by this embodiment of the present application will be described below with reference to FIG. 5 and FIG. 6 .
S601,BFER通过IGP发布其自身的BFR-id和设备标识。S601, BFER publishes its own BFR-id and device ID through IGP.
S601的内容具体可参见实施例一中的S301的内容。图5所示的场景中,作为BFER的设备可采用S301中的方法来发布自身的BFR-id和设备标识。设备511发布自身的BFR-id和设备标识的方法可参见S301中任一作为BFER的设备采用的方法。设备511的设备标识为a511。For details of the content of S601, refer to the content of S301 in the first embodiment. In the scenario shown in FIG. 5 , the device serving as the BFER may use the method in S301 to publish its own BFR-id and device identifier. For the method for the device 511 to publish its own BFR-id and device identity, reference may be made to the method adopted by any device serving as the BFER in S301. The device ID of device 511 is a511.
S602,中间BFR通过IGP发布其自身的设备标识和BFER的BFR-id。S602, the intermediate BFR publishes its own device identifier and the BFR-id of the BFER through the IGP.
S602的内容具体可参见实施例一中的S302的内容。除了设备509之外的中间BFR可采用S302中的方法发布自身的设备表示和BFER的BFR-id。与实施例一中的S302相比,作为中间BFR的设备509通过IGP泛洪发布a209、数值为1、2、3、4、31、255和256的BFR-id。For details of the content of S602, refer to the content of S302 in the first embodiment. The intermediate BFRs other than the device 509 can use the method in S302 to publish their own device representation and the BFR-id of the BFER. Compared with S302 in the first embodiment, the device 509 serving as the intermediate BFR publishes the BFR-ids of a209 with values of 1, 2, 3, 4, 31, 255 and 256 through IGP flooding.
S603,中间BFR根据通过IGP泛洪获取的参数,获得第一转发表,所述第一转发表包括下一跳的标识。S603, the intermediate BFR obtains a first forwarding table according to parameters obtained through IGP flooding, where the first forwarding table includes an identifier of the next hop.
在图5所示的场景中,设备506可采用实施例一中S303的方法获得与实施例一表2-3相同的表项。设备506基于所获得的与表2-3相同的表项,将NBR划分到标识集,比如将表2-3中包括的256个NBR划分成32个标识集,每个标识集包括按照SN排序的8个NBR的划分。设备506将获取的根据SN排序划分出的32个标识集(如下述Bi,i的取值范围在0和31之间),按照移动窗口对32个标识集进行划分,比如数值为5的移动窗口,第一移动窗口包括B0-B4,第二移动窗口包括B1-B5,第三移动窗口包括B2-B6…第二十八移动窗口包括B27-B31,第二十九移动窗口包括B28-B31,第三十移动窗口包括B29-B31,第31移动窗口包括B30和B31。设备506将每个移动窗口所包括的Bi进行组合获得表3-1中每行所包括的Bi。表3-1中,B0所对应的标识集包括数值为a102的NBR。In the scenario shown in FIG. 5 , the device 506 can obtain the same table entry as Table 2-3 in the first embodiment by using the method of S303 in the first embodiment. The device 506 divides the NBRs into identity sets based on the obtained entries that are the same as those in Table 2-3, for example, divides the 256 NBRs included in Table 2-3 into 32 identity sets, and each identity set includes sorting by SN. The division of the 8 NBRs. The device 506 divides the acquired 32 identification sets according to the SN sorting (such as the following Bi, the value range of i is between 0 and 31), and divides the 32 identification sets according to the moving window, for example, the mobile value is 5. Window, 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, and the twenty-ninth moving window includes B28-B31 , the thirtieth moving window includes B29-B31, and the thirty-first 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 identity set corresponding to B0 includes the NBR whose value is a102.
表3-1Table 3-1
index index 00 11 22 33 44 55 66 77
00 B0B0 B1B1 B0B0 B2B2 B0B0 B3B3 B0B0 B4B4
11 B1B1 B2B2 B1B1 B3B3 B1B1 B4B4 B1B1 B5B5
22 B2B2 B3B3 B2B2 B4B4 B2B2 B5B5 B2B2 B6B6
2727 B27B27 B28B28 B27B27 B29B29 B27B27 B30B30 B27B27 B31B31
2828 B28B28 B29B29 B28B28 B30B30 B28B28 B31B31      
2929 B29B29 B30B30 B29B29 B31B31            
3030 B30B30 B31B31                  
举例说明,设备506可通过控制面,对表2-3中每一行的8bit的标识进行划分获得Bi标识的标识集。其中,表3-1中的B0表示表2-3中SN为1-16的表项中第1列至第8列的标识形成的标识集。表3-1中的B1表示表2-3中SN为1-16的表项中第9列至第16列的标识形成的标识集。表3-1中的B2表示表2-3中SN为17-32的表项中第1列至第8列的标识形成的标识集。表3-1中的B3表示表2-3中SN为17-32的表项中第9列至第16列的标识形成的标识集。表3-1中的B30表示表2-3中SN为241-256的表项中第1列至第8列的标识形成的 标识集。表3-1中的B31表示表2-3中SN为241-256的表项中第9列至第16列的标识形成的标识集。根据上述的方法,将表2-3中的256个标识转换成上述的B0至B31这32个标识集。表3-1中的Bi所标识的标识集在表2-1中对应的列数可根据M与Y的商来确定。在实施例三中,M为16,Y为2,其中,Y还可以是其它能被16整除的数值。本申请实施例是从Y的可能取值中选择了能够提高转发硬件性能的数值,即Y为2。设备206可通过控制面,将B0至B31的31个标识集进行分组,分组包括32个标识集为例进行说明,即对每个分组包括的32个标识集进行全组合,比如两两组合,获得表3-2形式的表项。For example, through the control plane, the device 506 may divide the 8-bit identifiers in each row in Table 2-3 to obtain the identifier set of Bi identifiers. Wherein, B0 in Table 3-1 represents an identification set formed by the identifications in the first column to the eighth column in the table entry whose SN is 1-16 in Table 2-3. B1 in Table 3-1 represents an identifier set formed by the identifiers in the 9th to 16th columns in the table entry with SN of 1-16 in Table 2-3. B2 in Table 3-1 represents an identifier set formed by the identifiers in the 1st to 8th columns in the table entry whose SN is 17-32 in Table 2-3. B3 in Table 3-1 represents an identifier set formed by the identifiers in the 9th to 16th columns in the table entry whose SN is 17-32 in Table 2-3. B30 in Table 3-1 represents the identifier set formed by the identifiers in the 1st to 8th columns in the entry with SN 241-256 in Table 2-3. B31 in Table 3-1 represents the identifier set formed by the identifiers in the 9th to 16th columns in the table entry whose SN is 241-256 in Table 2-3. According to the above method, the 256 identities in Table 2-3 are converted into the above-mentioned 32 identities of B0 to B31. The number of columns corresponding to the identity set identified by Bi in Table 3-1 in Table 2-1 can be determined according to the quotient of M and Y. In the third embodiment, M is 16 and Y is 2, wherein Y can also be other values that can be divisible by 16. In this embodiment of the present application, a value that can improve the performance of the forwarding hardware is selected from the possible values of Y, that is, Y is 2. The device 206 can group the 31 identification sets from B0 to B31 through the control plane, and the grouping includes 32 identification sets as an example for illustration, that is, a full combination of the 32 identification sets included in each group is performed, such as a pairwise combination, Obtain entries in the form of Table 3-2.
表3-2Table 3-2
index index 00 11
00 B0B0 B1B1
11 B0B0 B2B2
22 B0B0 B3B3
33 B0B0 B4B4
44 B1B1 B2B2
55 B1B1 B3B3
66 B1B1 B4B4
77 B1B1 B5B5
88 B2B2 B3B3
99 B2B2 B4B4
1010 B2B2 B5B5
1111 B2B2 B6B6
     
116116 B29B29 B30B30
117117 B29B29 B31B31
     
120120 B30B30 B31B31
在图5所示的场景中,设备508可采用实施例一的S303中设备208所采用的方法,获得和实施例一中的表2-6相同的表项。设备508基于所获得的与表2-6相同的表项,按照上述设备506所采用的方法,进行NBR的划分,获得表3-3。设备508所获得的表3-3中,B31包含了与组播接收者6相关的NBR,即a256。设备508所连接的设备256的BFR-id为256,则设备508所生成的表3-3增加了一行索引为121的表项。In the scenario shown in FIG. 5 , the device 508 may use the method used by the device 208 in S303 of the first embodiment to obtain the same table entries as those of Tables 2-6 in the first embodiment. The device 508 performs NBR division based on the obtained table entries that are the same as those in Table 2-6, and obtains Table 3-3 according to the method adopted by the above-mentioned device 506 . In Table 3-3 obtained by the device 508, B31 contains the NBR associated with the multicast receiver 6, that is, a256. If the BFR-id of the device 256 connected to the device 508 is 256, then a table entry with an index of 121 is added to the table 3-3 generated by the device 508 .
表3-3Table 3-3
index index 00 11
00 B0B0 B1B1
11 B0B0 B2B2
22 B0B0 B3B3
33 B0B0 B4B4
44 B1B1 B2B2
55 B1B1 B3B3
66 B1B1 B4B4
77 B1B1 B5B5
88 B2B2 B3B3
99 B2B2 B4B4
1010 B2B2 B5B5
1111 B2B2 B6B6
     
116116 B29B29 B30B30
117117 B29B29 B31B31
     
120120 B30B30 B31B31
121121 B31 B31 00
在图5所示的场景中,设备509可采用实施例一的S303中设备209所采用的方法,获得表3-4。表3-4中的…表示对为空的内容的省略,X可以是0或空。In the scenario shown in FIG. 5 , the device 509 may use the method used by the device 209 in S303 of the first embodiment to obtain Tables 3-4. ... in Table 3-4 indicates the omission of empty content, X can be 0 or empty.
表3-4Table 3-4
SNSN 11 22 33 44 4-144-14 1515 1616
1-161-16 a205a205 a206a206 a206a206 a207a207 XX XX
17-3217-32 XX XX XX XX a511a511 XX
241-256241-256 XX XX XX XX a208a208 a208a208
表3-4中,a205是连接设备101的设备505的设备标识。a206是连接设备102和设备103的设备506的设备标识。a207是连接设备104的设备507的设备标识。a511是连接组播接收者7的设备511的设备标识。a208是连接设备255和设备256的设备208的设备标识。设备101的BFR-id是1。设备102的BFR-id是2。设备103的BFR-id是3。设备104的BFR-id是4。设备255的BFR-id是255。设备256的BFR-id是256。设备511的BFR-id是31。表3-4中NBR与SN的对应关系与表2-7相同,在此不再赘述。In Table 3-4, a205 is the device identifier of the device 505 connected to the device 101. a206 is the device identifier of the device 506 that connects the device 102 and the device 103 . a207 is the device ID of the device 507 connected to the device 104 . a511 is the device identifier of the device 511 connected to the multicast receiver 7 . a208 is the device ID of device 208 connecting device 255 and 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 of device 255 is 255. The BFR-id of device 256 is 256. The BFR-id of device 511 is 31. The correspondence between NBR and SN in Table 3-4 is the same as that in Table 2-7, and is not repeated here.
举例说明,设备509基于表3-4,按照上述设备506所采用的方法,进行NBR的划分,获得表3-5。设备509所获得的表3-5中,B0包含了与组播接收者2相关的NBR,即a206。B3包含了与组播接收者7相关的NBR,即a511。B31包含了与组播接收者6相关的NBR,即a208。设备509的表3-5中索引为121的表项的含义与表3-3相同,即设备509能够与BFR-id为256的设备256进行通信。For example, based on Tables 3-4, the device 509 divides the NBR according to the method adopted by the above-mentioned device 506, and obtains Tables 3-5. In Table 3-5 obtained by the device 509, B0 contains the NBR related to the multicast receiver 2, that is, a206. B3 contains the NBR associated with multicast receiver 7, namely a511. B31 contains the NBR associated with multicast receiver 6, ie a208. The meaning of the entry whose index is 121 in Table 3-5 of the device 509 is the same as that in Table 3-3, that is, the device 509 can communicate with the device 256 whose BFR-id is 256.
表3-5Table 3-5
index index 00 11
00 B0B0 B1B1
11 B0B0 B2B2
22 B0B0 B3B3
33 B0B0 B4B4
44 B1B1 B2B2
55 B1B1 B3B3
66 B1B1 B4B4
77 B1B1 B5B5
88 B2B2 B3B3
99 B2B2 B4B4
1010 B2B2 B5B5
1111 B2B2 B6B6
     
116116 B29B29 B30B30
117117 B29B29 B31B31
     
120120 B30B30 B31B31
121121 B31 B31 00
S604,BFIR根据通过IGP泛洪获取的参数,获得第二转发表,所述第二转发表包括下一跳的标识。S604, the BFIR obtains a second forwarding table according to the parameters obtained through IGP flooding, where the second forwarding table includes an identifier of the next hop.
图5所示的场景中,设备510可采用实施例一的S304中设备210采用的方法,获得表3-6。表3-6中的…表示对为空的内容的省略,X可以是0或空。表3-6中,a209是设备509的设备标识。In the scenario shown in FIG. 5 , the device 510 may use the method used by the device 210 in S304 of the first embodiment to obtain Tables 3-6. ... in Table 3-6 indicates the omission of empty content, and X can be 0 or empty. In Table 3-6, a209 is the device ID of the device 509.
表3-6Table 3-6
SNSN 11 22 33 44 4-144-14 1515 1616
1-161-16 a209a209 a209a209 a209a209 a209a209 XX XX
17-3217-32 XX XX XX XX a209a209 XX
241-256241-256 XX XX XX XX a209a209 a209a209
举例说明,设备510基于表3-6,按照上述设备506所采用的方法,进行NBR的划分,获得表3-7。设备510所获得的表3-7中,B0包含了与组播接收者2相关的NBR,即a209。B3包含了与组播接收者7相关的NBR,即a209。B31包含了与组播接收者6相关的NBR,即a209。设备510的表3-7中索引为121的表项的含义与表3-4相同,即设备510能够与BFR-id为256的设备256进行通信。For example, based on Tables 3-6, the device 510 performs NBR division according to the method adopted by the above-mentioned device 506, and obtains Tables 3-7. In Table 3-7 obtained by the device 510, B0 contains the NBR related to the multicast receiver 2, that is, a209. B3 contains the NBR associated with multicast receiver 7, namely a209. B31 contains the NBR associated with multicast receiver 6, namely a209. The meaning of the entry whose index is 121 in Table 3-7 of the device 510 is the same as that of Table 3-4, that is, the device 510 can communicate with the device 256 whose BFR-id is 256.
表3-7Table 3-7
index index 00 11
00 B0B0 B1B1
11 B0B0 B2B2
22 B0B0 B3B3
33 B0B0 B4B4
44 B1B1 B2B2
55 B1B1 B3B3
66 B1B1 B4B4
77 B1B1 B5B5
88 B2B2 B3B3
99 B2B2 B4B4
1010 B2B2 B5B5
1111 B2B2 B6B6
     
116116 B29B29 B30B30
117117 B29B29 B31B31
     
120120 B30B30 B31B31
121121 B31 B31 00
上述表3-1至表3-7形式的表是以M为16为例,对于BSL为256bit的BIER网络场景来说。由于省略了每条F-BM占用的256bit,当M为16时,对于BSL为512bit或1024bit的BIER网络场景来说,上述转发表可进一步扩展。转发硬件由于无需再读取通常的BIFT表项包括的256bit的F-BM,即便对于BSL为512bit或1024bit的网络场景,转发硬件在无需进行性能提升的情况下快速的完成表项查找和转发,进一步提高了转发效率。The above tables in the form of Table 3-1 to Table 3-7 take M as 16 as an example, for the BIER network scenario where the BSL is 256 bits. Since the 256 bits occupied by each F-BM is omitted, when M is 16, for the BIER network scenario where the BSL is 512 bits or 1024 bits, the above forwarding table can be further expanded. Since the forwarding hardware does not need to read the 256-bit F-BM included in the usual BIFT entry, even in the network scenario where the BSL is 512-bit or 1024-bit, the forwarding hardware can quickly complete the entry lookup and forwarding without performance improvement. The forwarding efficiency is further improved.
本申请实施例提供的转发表项中,包含了多个NBR的Bi可根据其对应的bit string中的bit是否被置1而被直接索引到,即直接获得作为下一跳的NBR,省去了存储F-BM的空间以及读取F-BM操作所耗费的硬件资源,能够降低对转发硬件的性能要求。In the forwarding table entry provided by this embodiment of the present application, Bi containing multiple NBRs can be directly indexed according to whether the bit in the corresponding bit string is set to 1, that is, the NBR as the next hop is directly obtained, omitting The space for storing the F-BM and the hardware resources consumed by the F-BM reading operation can be reduced, and the performance requirements on the forwarding hardware can be reduced.
实施例四Embodiment 4
图7为本申请实施例四提供的转发组播报文的方法流程图。实施例四中的表项是在实施例三获得的表项。实施例四中的组播接收者2、组播接收者6和组播接收者7需要从组播源获取组播报文。下面结合图5、图6和图7,对本申请实施例四提供的转发组播报文的方法进行说明。FIG. 7 is a flowchart of a method for forwarding a multicast packet according to Embodiment 4 of the present application. The entry in the fourth embodiment is the entry obtained in the third embodiment. The multicast receiver 2, the multicast receiver 6, and the multicast receiver 7 in the fourth embodiment need to obtain multicast packets from the multicast source. The method for forwarding a multicast packet provided in Embodiment 4 of the present application will be described below with reference to FIG. 5 , FIG. 6 , and FIG. 7 .
S701,设备510根据来自组播源的组播报文,获得第一BIER组播报文。S701, the device 510 obtains a first BIER multicast packet according to the multicast packet from the multicast source.
该实施例中设备510可采用实施例二的S401中的方法获取第一BIER组播报文,在此不再赘述。实施例四中的第一BIER组播报文包括的bit string不同于实施例一中的第一BIER组播报文包括的bit sting。实施例四中的第一BIER组播报文包括的bit string为1000…01000000000000000000000000000010,即实施例四中的第一BIER组播报文中的bit string的从右至左的第2bit、第31bit和第256bit被置1。In this embodiment, the device 510 may obtain the first BIER multicast packet by using the method in S401 of the second embodiment, which will not be repeated here. The bit string included in the first BIER multicast message in the fourth embodiment is different from the bit sting included in the first BIER multicast message in the first embodiment. The bit string included in the first BIER multicast packet in the fourth embodiment is 1000...0100000000000000000000000000010, that is, the 2nd bit, the 31st bit and the 256th bit from right to left of the bit string in the first BIER multicast packet in the fourth embodiment is set to 1.
S702,设备510根据其配置的表转发项,确定其自身下一跳并发送第一BIER组播报文。S702, the device 510 determines its own next hop and sends the first BIER multicast packet according to the forwarding entry in the table configured by the device 510.
举例说明,设备510根据第一BIER组播报文包括的bit string中从右至左的方向上包含8bit的数据块是否全0来确定所需查找的表3-7中的表项。设备510从第一BIER组播报文的bit string中沿从右至左的方向读取32个8bit数据块,即1000…01000000000000000000000000000010沿从右至左的第1个数据块(第1bit至第8bit)、第4个数据块(第25bit至第32bit)和第32个数据块(第249bit至第256bit)包含置1的比特位。第1个数据块对应B0。第4个数据块对应B3。第32个数据块对应B31。Bi所标识的标识集是n个NBR的集合,n的数值为M与Y的商。根据表3-7的内容,B0所标识的标识集中与第2bit对应的NBR为a209。B3所标识的标识集中与第31bit对应的NBR为a209。B31所标识的标识集中与第256bit对应的NBR为a209。设备510根据第一BIER组播报文的bit string中被置1的bit的偏移量,比如2和31,确定B0和B3是与置1的bit相关的标识集。设备510在表3-7中查找包含B0和B3的行,读取B0中与第2bit对应的NBR和B3中与第31bit对应的NBR,获得a209。设备510将第一BIER组播报文包括的bit string中从右向左的第2bit和第31bit清0(即将B0和B3所标识的标识集在bit string中对应的比特位清0),获取数值为1000…00000000000000000000000000000000的bit string。设备510确定数值为1000…00000000000000000000000000000000的bit string的第32个数据块包含被置1的bit, 则用与第31个数据块对应的B31查表3-7,读取B31中与第256bit对应的NBR,获得a209。设备510向a209发送第一BIER组播报文。For example, the device 510 determines the table entry in Table 3-7 to be searched according to whether the data block containing 8 bits in the right-to-left direction in the bit string included in the first BIER multicast packet is all 0s. The device 510 reads 32 8-bit data blocks in the right-to-left direction from the bit string of the first BIER multicast message, that is, 1000... ), the 4th data block (25th to 32nd bit) and the 32nd data block (249th to 256th bit) contain bits set to 1. The first data block corresponds to B0. The fourth data block corresponds to B3. The 32nd data block corresponds to B31. The identity set identified by Bi is a set of n NBRs, and the value of n is the quotient of M and Y. According to the contents of Table 3-7, the NBR corresponding to the second bit in the identity set identified by B0 is a209. The NBR corresponding to the 31st bit in the identity set identified by B3 is a209. The NBR corresponding to the 256th bit in the identification set identified by B31 is a209. The device 510 determines, according to the offset of the bit set to 1 in the bit string of the first BIER multicast packet, such as 2 and 31, that B0 and B3 are the identification sets related to the bit set to 1. The device 510 searches for the row containing B0 and B3 in Table 3-7, reads the NBR corresponding to the 2nd bit in B0 and the NBR corresponding to the 31st bit in B3, and obtains a209. The device 510 clears the 2nd bit and the 31st bit from right to left in the bit string included in the first BIER multicast message (that is, clears the corresponding bits of the identification set identified by B0 and B3 in the bit string to 0), and obtains A bit string with the value 1000…0000000000000000000000000000000. The device 510 determines that the 32nd data block of the bit string whose value is 1000...0000000000000000000000000000000 contains the bit set to 1, then uses the B31 corresponding to the 31st data block to look up Table 3-7, and reads the B31 corresponding to the 256th bit. NBR, get a209. The device 510 sends the first BIER multicast packet to a209.
S703,设备509根据其配置的转发表项和第一BIER组播报文中的bit string,确定其自身的下一跳并发送。S703, the device 509 determines its own next hop according to its configured forwarding entry and the bit string in the first BIER multicast packet and sends it.
举例说明,设备509从第一BIER组播报文的bit string中从右至左读取4个8bit数据块,即1000…01000000000000000000000000000010从右至左的第1个数据块、第4个数据块和第32个数据块包含置1的比特位。第1个数据块对应B0。第4个数据块对应B3。第32个数据块对应B31。根据表3-5的内容,B0所标识的标识集中与第2bit对应的NBR为a206。B3所标识的标识集中与第31bit对应的NBR为a511。B31所标识的标识集中与第256bit对应的NBR为a208。设备509根据第一BIER组播报文的bit string中被置1的bit的偏移量,确定B0和B3是与置1的bit相关的标识集。设备509在表3-5中查找包含B0和B3的行,读取B0中与第2bit对应的NBR(a206)和B3中与第31bit对应的NBR(a511)。设备509复制一份第一BIER组播报文。设备509将除第2bit之外的bit清零,获得数值为0000…00000000000000000000000000000010的bit string。设备509用0000…00000000000000000000000000000010替换第一BIER组播报文中的bit string,获得第二BIER组播报文。设备509向a206发送第二BIER组播报文。设备509将除第31bit之外的bit清零,获得数值为0000…01000000000000000000000000000000的bit string。设备509用0000…01000000000000000000000000000000替换复制的第一BIER组播报文中的bit string,获得第四BIER组播报文。设备509向a511发送第四BIER组播报文。设备509将第一BIER组播报文包括的bit string中从右向左的第2bit和第31bit清0(即将B0和B3所标识的标识集在bit string中对应的比特位清0),获取数值为1000…00000000000000000000000000000000的bit string。设备509确定数值为1000…00000000000000000000000000000000的bit string的第32个数据块包含被置1的bit,则用与第32个数据块对应的B31查表3-5,读取B31中与第256bit对应的NBR,获得a208。设备509复制一份第一BIER组播报文。设备509用1000…00000000000000000000000000000000替换复制的第一BIER组播报文中的bit string,获得第三BIER组播报文。设备509向a208发送第三BIER组播报文。For example, the device 509 reads four 8-bit data blocks from right to left from the bit string of the first BIER multicast packet, that is, the first data block, the fourth data block and the The 32nd data block contains bits set to 1. The first data block corresponds to B0. The fourth data block corresponds to B3. The 32nd data block corresponds to B31. According to the contents of Table 3-5, the NBR corresponding to the second bit in the identity set identified by B0 is a206. The NBR corresponding to the 31st bit in the identity set identified by B3 is a511. The NBR corresponding to the 256th bit in the identification set identified by B31 is a208. The device 509 determines, according to the offset of the bit set to 1 in the bit string of the first BIER multicast packet, that B0 and B3 are the identification sets related to the bit set to 1. The device 509 looks up the row containing B0 and B3 in Table 3-5, and reads the NBR (a206) corresponding to the 2nd bit in B0 and the NBR (a511) corresponding to the 31st bit in B3. Device 509 copies a copy of the first BIER multicast message. The device 509 clears the bits other than the second bit to zero, and obtains a bit string with a value of 0000...0000000000000000000000000000010. 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 the second BIER multicast packet to a206. The device 509 clears the bits other than the 31st bit to zero, and obtains a bit string whose value is 0000...0100000000000000000000000000000. The device 509 replaces the bit string in the copied first BIER multicast packet with 0000...0100000000000000000000000000000 to obtain a fourth BIER multicast packet. The device 509 sends the fourth BIER multicast packet to a511. The device 509 clears the 2nd bit and the 31st bit from right to left in the bit string included in the first BIER multicast message (that is, clears the corresponding bits of the identification set identified by B0 and B3 in the bit string to 0), and obtains A bit string with the value 1000…0000000000000000000000000000000. Device 509 determines that the 32nd data block of the bit string of 1000 ... 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 The 32nd data block contains the BIT of 1, and the B31 checksum 3-5 corresponding to the 32nd data block is used, and the B31 corresponds to the 256bit corresponding to the 256bit. NBR, get a208. 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. Device 509 sends a third BIER multicast packet to a208.
S704,设备506根据其配置的BIFT表项和第二BIER组播报文,确定其自身的下一跳并发送第二BIER组播报文。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.
该实施例中设备506采用实施例一中设备206所采用的方法,确定下一跳为设备102,并向设备102发送第二BIER组播报文。设备506确定下一跳的方法与上述设备509所采用的方法相似,即根据第二BIER组播报文的bit string中被置1的bit的偏移量,即偏移量为2,查找第2bit所对应的B0包括的NBR,即a102。设备506向a102发送第二BIER组播报文。In this embodiment, the device 506 adopts the method adopted by the device 206 in the first embodiment to determine that the next hop is the device 102 , and sends the second BIER multicast packet to the device 102 . The method used by the device 506 to determine the next hop is similar to the method used by the above-mentioned device 509, that is, according to the offset of the bit set to 1 in the bit string of the second BIER multicast packet, that is, the offset is 2, to find the first hop. The NBR included in B0 corresponding to 2bit is a102. The device 506 sends the second BIER multicast packet to a102.
S705,设备508根据其配置的BIFT表项和第三BIER组播报文,确定其自身的下一跳并发送第三BIER组播报文。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.
该实施例中设备508采用实施例一中设备208所采用的方法,确定下一跳为设备256,并向设备256发送第三BIER组播报文。设备508确定下一跳的方法与上述设备509所采用的方法相似,即根据第三BIER组播报文的bit string中被置1的bit的偏移量,即偏移量为256,查找第256bit所对应的B31包括的NBR,即a256。设备508向a256发送第三BIER组播报文。In this embodiment, the device 508 adopts the method used by the device 208 in the first embodiment to determine that the next hop is the device 256 , and sends the third BIER multicast packet to the device 256 . The method used by the device 508 to determine the next hop is similar to the method used by the above-mentioned device 509, that is, according to the offset of the bit set to 1 in the bit string of the third BIER multicast packet, that is, the offset is 256, find the first hop. The NBR included in B31 corresponding to 256bit is a256. The device 508 sends the third BIER multicast packet to a256.
S706,作为BFER的设备获得组播报文并发送给组播接收者。S706, the device serving as the BFER obtains the multicast packet and sends it to the multicast receiver.
举例说明,作为BFER的设备102、设备256和设备511获得组播报文并发送的方法可 参见实施例一中设备102所采用方法,在此不再赘述。For example, the method for obtaining and sending the multicast packet by the device 102, the device 256, and the device 511 serving as BFER may refer to the method adopted by the device 102 in the first embodiment, and details are not repeated here.
实施例二提供的方法中,BIER网络场景中的转发设备,比如作为BFIR、中间BFR或BFER的设备,可通过控制面进一步优化实施例一中提供的表项,以获取本申请实施例二提供的优化后的表项,相比于实施例一的转发方法,能够进一步减少每次转发查表时读取的数据量,比如实施例二中读取了128bit和2的乘积的数据量(一个Bi标识集为128bit,读取2个标识集即可),相比于实施例一进一步少读取128bit数据量,在不提高转发硬件性能的情况下,提高了转发效率和可扩展性。In the method provided in the second embodiment, the forwarding device in the BIER network scenario, such as a device serving as a BFIR, an intermediate BFR, or a BFER, can further optimize the table entries provided in the first embodiment through the control plane to obtain the information provided in the second embodiment of the present application. Compared with the forwarding method in the first embodiment, the optimized table entry can further reduce the amount of data read when the table is forwarded each time, such as the amount of data read in the product of 128bit and 2 in the second embodiment (one The Bi identifier set is 128 bits, and 2 identifier sets can be read). Compared with the first embodiment, the amount of 128 bits of data read is further reduced, and the forwarding efficiency and scalability are improved without improving the performance of the forwarding hardware.
本申请实施例二和实施例四中提及的任一BIER组播报文中bit string的携带方式可以包括以下几种方式:The carrying mode of the bit string in any BIER multicast message mentioned in Embodiment 2 and Embodiment 4 of this application may include the following modes:
方式1,bit string携带在BIER组播报文包括的IPv6头之后的目的地选项头(destination options header,DOH)中,参见图8所示的报文格式。IPv6头中的下一报文头(next header)的赋值为60,表示IPv6头后为DOH。DOH中的next header为4表示其后的payload中为第四版互联网协议(Internet Protocol version 4,IPv4)组播报文。DOH中的next header为41表示其后的payload中为第六版互联网协议(Internet Protocol version 6,IPv6)组播报文。DOH还包括bit string字段(图8中未示出),该bit string用来携带BIER组播报文中的bit string。In mode 1, the bit string is carried in the destination options header (DOH) after the IPv6 header included in the BIER multicast message. See the message format shown in Figure 8. The next header in the IPv6 header is assigned a value of 60, indicating that the IPv6 header is followed by DOH. The next header in DOH is 4, indicating that the following payload is an Internet Protocol version 4 (IPv4) multicast packet. The next header in the DOH is 41, indicating that the subsequent payload is an Internet Protocol version 6 (IPv6) multicast packet. The DOH also includes a bit string field (not shown in Figure 8), which is used to carry the bit string in the BIER multicast message.
方式2,bit string携带在BIER组播报文包括的IPv6头之后的目的地选项头(destination options header,DOH)中,参见图9所示的报文格式。IPv6头中的next header的赋值为0,表示IPv6头后为逐跳选项头(hop by hop option header,HBH option header)。逐跳选项头的next header的赋值为60,表示逐跳选项头后为DOH。DOH中的next header为4表示其后的payload中为第四版互联网协议(Internet Protocol version 4,IPv4)组播报文。DOH中的next header为41表示其后的payload中为第六版互联网协议(Internet Protocol version 6,IPv6)组播报文。DOH还包括bit string字段(图8中未示出),该bit string用来携带BIER组播报文中的bit stringIn mode 2, the bit string is carried in the destination options header (DOH) after the IPv6 header included in the BIER multicast message. See the message format shown in FIG. 9 . The next header in the IPv6 header is assigned a value of 0, indicating that the IPv6 header is followed by a hop by hop option header (HBH option header). The next header of the hop-by-hop option header is assigned a value of 60, indicating that the hop-by-hop option header is followed by DOH. The next header in DOH is 4, indicating that the following payload is an Internet Protocol version 4 (IPv4) multicast packet. The next header in the DOH is 41, indicating that the subsequent payload is an Internet Protocol version 6 (IPv6) multicast packet. The DOH also includes a bit string field (not shown in Figure 8), which is used to carry the bit string in the BIER multicast message
方式3,bit string携带在BIER组播报文包括的IPv6头之后的IPv6扩展头中,参见图10所示的报文格式。IPv6扩展头中的BIER头可用来携带本申请实施例的BIER组播报文中的bit string。图10中的组播数据报文可以是IPv4组播报文或者IPv6组播报文。Mode 3, the bit string is carried in the IPv6 extension header after the IPv6 header included in the BIER multicast message, see the message format shown in Figure 10. The BIER header in the IPv6 extension header may be used to carry the bit string in the BIER multicast message in this embodiment of the present application. The multicast data packet in FIG. 10 may be an IPv4 multicast packet or an IPv6 multicast packet.
图11为本申请实施例提供的转发设备的结构示意图。图11对应的实施例提供的转发装置1100是从逻辑结构的角度进行的描述,可设置于上述实施例一至实施例四中任一实施例提及的作为BFIR的设备或作为中间BFR的设备,比如图2所示的场景中的设备210、设备209、设备206或设备208等,图5所示的场景中的设备510、设备509、设备506或设备508等。下面结合图11,对本申请实施例提供的转发设备的结构进行说明。FIG. 11 is a schematic structural diagram of a forwarding device provided by an embodiment of the present application. The forwarding apparatus 1100 provided by the embodiment corresponding to FIG. 11 is described from the perspective of the logical structure, and can be set to the device as the BFIR mentioned in any one of the foregoing Embodiments 1 to 4 or as the device as the intermediate BFR, For example, device 210, device 209, device 206, or device 208 in the scene shown in FIG. 2, and device 510, device 509, device 506, or device 508, etc. in the scene shown in FIG. 5. The following describes the structure of the forwarding device provided by the embodiment of the present application with reference to FIG. 11 .
转发设备1100包括:接收单元1101、确定单元1102和获得单元1103。其中,接收单元1101用于接收BIER组播报文,所述BIER组播报文包括第一bit string,所述第一bit stirng包括的被置1的比特bit与BFER对应。确定单元1102用于根据所述第一bit string中被置1的bit确定转发表项的索引,所述转发表项包括所述索引和作为下一跳的设备的标识。获得单元1103用于根据所述索引直接获得所述设备的标识,所述设备为所述BFER或者到达所述BFER所经过的第一中间位转发路由器BFR。转发设备1100为实施例二中的设备210,确定单元1102和获得单元1103用于支持设备210执行实施例二中的S402。转发设备1100为实施例二中的设备209,确定单元1102和获得单元1103用于支持设备209执行实施例二中的S403。转发设备1100为实施例二中的设备206,确定单元1102和获得单元1103用于支持设备206执行实施例二中的S404。转发设备1100为实施例二中的设备208,确定单元1102和 获得单元1103用于支持设备208执行实施例二中的S405。转发设备1100为实施例四中的设备510,确定单元1102和获得单元1103用于支持设备510执行实施例四中的S702。转发设备1100为实施例四中的设备509,确定单元1102和获得单元1103用于支持设备509执行实施例四中的S703。转发设备1100为实施例四中的设备506,确定单元1102和获得单元1103用于支持设备506执行实施例四中的S704。转发设备1100为实施例四中的设备508,确定单元1102和获得单元1103用于支持设备508执行实施例四中的S705。The forwarding device 1100 includes: a receiving unit 1101 , a determining unit 1102 and an obtaining unit 1103 . Wherein, the receiving unit 1101 is configured to receive a BIER multicast message, the BIER multicast message includes a first bit string, and the bits set to 1 included in the first bit stirng correspond to BFER. The determining unit 1102 is configured to determine the index of the forwarding table entry according to the bit set to 1 in the first bit string, where the forwarding table entry includes the index and the identifier of the device serving as the next hop. The obtaining unit 1103 is configured to directly obtain the identifier of the device according to the index, where the device is the BFER or the first intermediate bit forwarding router BFR through which the BFER is reached. 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 perform 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 perform 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 perform 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 perform 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 perform 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 perform 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 perform 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 perform S705 in the fourth embodiment.
在第一种可能的实现方式中,所述索引为与所述BFER的BFR-id对应的序列号,所述设备的标识对应一个序列号。该第一种可能的实现方式中的转发表项可以是实施例一种的表2-1、表2-4、表2-7或表2-10等转发表中包括的转发表项。In a first possible implementation manner, the index is a serial number corresponding to the BFR-id of the BFER, and the device identifier corresponds to a serial number. The forwarding table entry in the first possible implementation manner may be the forwarding table entry included in the forwarding table such as Table 2-1, Table 2-4, Table 2-7, or Table 2-10 in the first embodiment.
在第二种可能的实现方式中,所述转发表项基于上述第一种可能的实现方式中,还包括第二bit string。所述第二bit string有且仅有1位被置1的bit,且所述第二bit string中被置1的bit在所述第二bit string的偏移量与其所在的转发表项包括的序列号对应。该第二种可能的实现方式中的转发表项可以是实施例一中的表2-2、表2-5、表2-8或表2-11等转发表中包括的转发表项。基于上述第二种可能的实现方式的转发表项,所述获得单元1103具体用于根据所述序列号获得所述转发表项包括的所述作为下一跳的设备的标识,而不查找所述转发表项包括的所述第二bit string。In a second possible implementation manner, the forwarding table entry further includes a second bit string based on the above-mentioned first possible implementation manner. The second bit string has and only 1 bit is set to 1, and the offset of the bit set to 1 in the second bit string is included in the offset of the second bit string and the forwarding entry where it is located. corresponding to the serial number. The forwarding entry in the second possible implementation manner may be the forwarding entry included in the forwarding table such as Table 2-2, Table 2-5, Table 2-8, or Table 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 the identifier of the device as the next hop included in the forwarding table entry according to the sequence number, without searching for all The second bit string included in the forwarding table entry.
在第三种可能的实现方式中,所述转发表项包含N个标识,所述N小于或等于读取位宽的值,所述N个标识包括所述设备的标识,所述N个标识包括的任一标识在所述转发表项中的排序与所述序列号对应。该第三种可能的实现方式中的转发表项可以是实施例一中的表2-3、表2-6、表2-9或表2-12等转发表中包括的转发表项。基于上述第三种可能的实现方式的转发表项,所述获得单元1103具体用于:根据所序列号和所述读取位宽确定行号,所述行号对应所述序列号与所述读取位宽的商;获取所述行号对应的所述转发表项包括的所述N个标识。In a third possible implementation manner, the forwarding table entry includes N identifiers, the N is less than or equal to the value of the read bit width, the N identifiers include the identifier of the device, and the N identifiers The order of any of the included identifiers in the forwarding entry corresponds to the sequence number. The forwarding entry in the third possible implementation manner may be the forwarding entry included in the forwarding table such as Table 2-3, Table 2-6, Table 2-9, or Table 2-12 in the first embodiment. Based on the forwarding entry in the third possible implementation manner, the obtaining unit 1103 is specifically configured to: determine a line number according to the sequence number and the read bit width, where the line number corresponds to the sequence number and the read bit width. Read the quotient of the bit width; obtain the N identifiers included in the forwarding entry corresponding to the line number.
基于上述三种可能的实现方式的转发表项,所述确定单元1102具体用于:获取所述第一bit string中被置1的bit在所述第一bit string中的偏移量;根据所述偏移量确定所述索引,所述偏移量与所述索引对应。Based on the forwarding entries of the above three possible implementation manners, the determining unit 1102 is specifically configured to: obtain the offset of the bit set to 1 in the first bit string in the first bit string; The offset determines the index, and the offset corresponds to the index.
在第四种可能的实现方式中,所述索引用于标识M个标识集所在的行,所述M为大于或等于2的整数,所述M个标识集包括所述设备的标识,所述设备的标识所属的标识集对应所述序列号所属的数据块,所述设备的标识在其所属的标识集内的排序对应所述序列号。该第四种可能的实现方式中的转发表项可以是实施例三中的表3-2、表3-3、表3-5或表3-7等转发表中包括的转发表项。In a fourth possible implementation manner, the index is used to identify the row where M identification sets are located, where M is an integer greater than or equal to 2, the M identification sets include the identification of the device, and the The identification set to which the identification of the device belongs corresponds to the data block to which the serial number belongs, and the order of the identification of the device in the identification set to which it belongs corresponds to the serial number. The forwarding entries in the fourth possible implementation manner may be the forwarding entries included in the forwarding tables such as Table 3-2, Table 3-3, Table 3-5, or Table 3-7 in the third embodiment.
基于上述第四种可能的实现方式的转发表项,所述确定单元1102具体用于:根据所述第一bit string和读取位宽,确定所述第一bit string中被置1的bit所属的数据块;获取与所述第一bit string中被置1的bit所属的数据块对应的标识集,所述M个标识集包括所述数据块对应的所述标识集;根据所述数据块对应的所述标识集,确定所述M个标识集所在的行。所述获得单元1103具体用于:从所述索引对应的行包括的所述M个标识集获取所述设备的标识。Based on the forwarding entry in the fourth possible implementation manner, the determining unit 1102 is specifically configured to: determine, according to the first bit string and the read bit width, to which the bit set to 1 in the first bit string belongs The data block; obtain the identification set corresponding to the data block to which the bit set to 1 in the first bit string belongs, and the M identification sets include the identification set corresponding to the data block; according to the data block For the corresponding identification sets, determine the row where the M identification sets are located. The obtaining unit 1103 is specifically configured to: obtain the identification of the device from the M identification sets included in the row corresponding to the index.
举例说明,转发设备1100还可采用下述方式来获取转发表项。当转发表项是上述第一种、第二种或第三种可能的实现方式中的转发表项时,所述接收单元1101还用于接收所述设备发送的所述设备的标识和所述BFR-id。所述获得单元1103还用于:根据所述BFR-id获得与其对应的所述序列号;根据所述序列号和所述设备的标识,获得所述转发表项,所述转发表项 的索引为所述序列号,所述转发表项的下一跳为所述设备的标识。For example, the forwarding device 1100 may also obtain the forwarding entry in the following manner. When the forwarding entry is the forwarding entry in the first, second or third possible implementation manners, the receiving unit 1101 is further configured to receive the device identifier and the device identifier sent by the device. BFR-id. The obtaining unit 1103 is further configured to: obtain the corresponding serial number according to the BFR-id; obtain the forwarding entry, the index of the forwarding entry, according to the serial number and the device identifier is the sequence number, and the next hop of the forwarding entry is the identifier of the device.
举例说明,当转发表项是上述第二种可能的实现方式中的转发表项时,所述接收单元1101还用于接收所述设备发送的所述设备的标识和所述BFR-id。所述获得单元1103还用于:根据所述BFR-id获得所述第二bit string和与所述BFR-id对应的所述序列号;根据所述序列号、所述第二bit string和所述设备的标识,获得所述转发表项,所述转发表项的索引为所述序列号,所述转发表项的转发位串掩码F-BM为所述第二bit string,所述转发表项的所述转发表项的下一跳为所述设备的标识。For example, when the forwarding entry is the forwarding entry in the second possible implementation manner, the receiving unit 1101 is further configured to receive the device identifier and the BFR-id sent by the device. The obtaining unit 1103 is further configured to: obtain the second bit string and the sequence number corresponding to the BFR-id according to the BFR-id; The identifier of the device is obtained, the forwarding table entry is obtained, 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, the forwarding The next hop of the forwarding entry of the posting entry is the identifier of the device.
举例说明,当转发表项是上述第三种可能的实现方式中的转发表项时,所述接收单元1101还用于接收所述设备发送的所述设备的标识和所述BFR-id。所述获得单元1103还用于:根据所述BFR-id获得与其对应的所述序列号;按照所述读取位宽,将所述序列号和所述设备的标识进行排序,获得所述转发表项,所述转发表项所在的行号对应所述序列号与所述读取位宽的商,所述转发表项包括的所述设备的标识在所述N个标识中的排序与所述序列号对应。For example, when the forwarding entry is the forwarding entry in the third possible implementation manner, the receiving unit 1101 is further configured to receive the device identifier and the BFR-id sent by the device. The obtaining unit 1103 is further configured to: obtain the serial number corresponding to the BFR-id according to the BFR-id; sort the serial number and the device identifier according to the read bit width, and obtain the BFR-id. Publication item, the line number where the forwarding table item is located corresponds to the quotient of the serial number and the read bit width, and the ordering of the identifiers of the devices included in the forwarding table item in the N identifiers is the same as that of the N identifiers. corresponding to the serial number.
举例说明,当转发表项是上述第四种可能的实现方式中的转发表项时,所述接收单元1101还用于接收所述设备发送的所述设备的标识和所述BFR-id。所述获得单元1103还用于:根据所述BFR-id获得与其对应的所述序列号;按照序列号的排序,对序列号所对应的标识进行划分,获得L个标识集,所述L对应序列号的最大值和预设值的商,所述预设值为所述数据块包括的bit数;根据移动窗口对L个标识集进行划分,并对移动窗口内的标识集进行组合,以获得包括所述M个标识集的所述转发表项。其中,移动窗口的大小可根据需要进行设置,在本申请实施例中移动窗口为5个标识集。所述序列号的最大值为256,所述预设值为8,所述L为32,所述M为2。For example, when the forwarding entry is the forwarding entry in the fourth possible implementation manner, the receiving unit 1101 is further configured to receive the device identifier and the BFR-id sent by the device. The obtaining unit 1103 is further configured to: obtain the corresponding serial number according to the BFR-id; according to the ordering of the serial numbers, divide the identifiers corresponding to the serial numbers to obtain L identifier sets, the L corresponding to The quotient of the maximum value of the serial number and the preset value, the preset value being the number of bits included in the data block; according to the moving window, the L identification sets are divided, and the identification sets in the moving window are combined to The forwarding table entry including the M identity sets is obtained. The size of the moving window can be set as required, and in this embodiment of the present application, the moving window is 5 identification sets. The maximum value of the serial number is 256, the preset value is 8, the L is 32, and the M is 2.
图12为本申请实施例提供的生成转发表项的装置的结构示意图。图12对应的实施例提供的装置1200是从逻辑结构的角度进行的描述,可设置于上述实施例一至实施例四中任一实施例提及的作为BFIR的设备或作为中间BFR的设备,比如图2所示的场景中的设备210、设备209、设备206或设备208等,图5所示的场景中的设备510、设备509、设备506或设备508等。下面结合图12,对本申请实施例提供的生成转发表项的装置的结构进行说明。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 embodiment corresponding to FIG. 12 is described from the perspective of the logical structure, and can be set to the device as the BFIR or the device as the intermediate BFR mentioned in any of the foregoing Embodiments 1 to 4, such as The device 210 , the device 209 , the device 206 or the device 208 and so on in the scene shown in FIG. 2 , and the device 510 , the device 509 , the device 506 or the device 508 and the like in the scene shown in FIG. 5 . The following describes the structure of the apparatus for generating a forwarding entry provided by an embodiment of the present application with reference to FIG. 12 .
装置1200包括接收单元1201和获得单元1202。其中,接收单元1201用于接收设备发送的所述设备的标识和BFR-id,所述BFR-id用于标识能够与所述设备通信的BFER,所述设备为所述BFER或者到达所述BFER所经过的第一BFR。获得单元1202用于根据所述设备的标识和所述BFR-id,获取转发表项,所述转发表项的索引对应所述BFR-id,所述转发表项用于根据所述索引直接获得所述转发表项包括的作为下一跳的设备的标识。装置1200为实施例一中的设备210,获得单元1202用于支持设备210执行实施例一中的S304。装置1200为实施例一中的设备209,获得单元1202用于支持设备209执行实施例一中的S303。装置1200为实施例一中的设备206,获得单元1202用于支持设备206执行实施例一中的S303。装置1200为实施例一中的设备208,获得单元1202用于支持设备208执行实施例一中的S303。The apparatus 1200 includes a receiving unit 1201 and an obtaining unit 1202 . The receiving unit 1201 is configured to receive the device's identifier and BFR-id sent by the device, where the BFR-id is used to identify a BFER that can communicate with the device, and the device is the BFER or reaches the BFER The first BFR passed. The obtaining unit 1202 is configured to obtain a forwarding table entry according to the identification of the device and the BFR-id, the index of the forwarding table entry corresponds to the BFR-id, and the forwarding table entry is used to directly obtain according to the index The forwarding entry includes the identifier of the device as the next hop. The apparatus 1200 is the device 210 in the first embodiment, and the obtaining unit 1202 is configured to support the device 210 to perform 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 perform 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 perform S303 in the first embodiment.
在第一种可能的实现方式中,所述索引为与所述BFR-id对应的序列号,所述设备的标识对应一个序列号。该第一种可能的实现方式中的转发表项可以是实施例一种的表2-1、表2-4、表2-7或表2-10等转发表中包括的转发表项。In a first possible implementation manner, the index is a serial number corresponding to the BFR-id, and the device identifier corresponds to a serial number. The forwarding table entry in the first possible implementation manner may be the forwarding table entry included in the forwarding table such as Table 2-1, Table 2-4, Table 2-7, or Table 2-10 in the first embodiment.
在第二种可能的实现方式中,所述转发表项基于上述第一种可能的实现方式中,还包括第一bit string,所述第一bit string有且仅有1位被置1的bit,且所述第一bit string中被置1的bit在所述第一bit string的偏移量与其所在的转发表项包括的序列号对应。该第二种可能的实现方式中的转发表项可以是实施例一中的表2-2、表2-5、表2-8或表2-11等转发表中包括 的转发表项。In a second possible implementation manner, the forwarding table entry is based on the above-mentioned first possible implementation manner, and further includes a first bit string, and the first bit string has one and only one bit that is set to 1 , and the offset of the bit set to 1 in the first bit string in the first bit string corresponds to the sequence number included in the forwarding entry where it is located. The forwarding entries in the second possible implementation manner may be the forwarding entries included in the forwarding tables such as Table 2-2, Table 2-5, Table 2-8, or Table 2-11 in the first embodiment.
在第三种可能的实现方式中,所述转发表项包含N个标识,所述N小于或等于读取位宽的值,所述N个标识包括所述设备的标识,所述N个标识包括的任一标识在所述转发表项中的排序与所述序列号对应。该第三种可能的实现方式中的转发表项可以是实施例一中的表2-3、表2-6、表2-9或表2-12等转发表中包括的转发表项。In a third possible implementation manner, the forwarding table entry includes N identifiers, the N is less than or equal to the value of the read bit width, the N identifiers include the identifier of the device, and the N identifiers The order of any of the included identifiers in the forwarding entry corresponds to the sequence number. The forwarding entry in the third possible implementation manner may be the forwarding entry included in the forwarding table such as Table 2-3, Table 2-6, Table 2-9, or Table 2-12 in the first embodiment.
在第四种可能的实现方式中,所述索引用于标识M个标识集所在的行,所述M为大于或等于2的整数,所述M个标识集包括所述设备的标识,所述设备的标识所属的标识集对应所述序列号所属的数据块,所述设备的标识在其所属的标识集内的排序对应所述序列号。该第四种可能的实现方式中的转发表项可以是实施例三中的表3-2、表3-3、表3-5或表3-7等转发表中包括的转发表项。In a fourth possible implementation manner, the index is used to identify the row where M identification sets are located, where M is an integer greater than or equal to 2, the M identification sets include the identification of the device, and the The identification set to which the identification of the device belongs corresponds to the data block to which the serial number belongs, and the order of the identification of the device in the identification set to which it belongs corresponds to the serial number. The forwarding entries in the fourth possible implementation manner may be the forwarding entries included in the forwarding tables such as Table 3-2, Table 3-3, Table 3-5, or Table 3-7 in the third embodiment.
举例说明,当转发表项是上述第一种、第二种或第三种可能的实现方式中的转发表项时,所述获得单元1202还用于:根据所述BFR-id获得与其对应的所述序列号;根据所述序列号和所述设备的标识,获得所述转发表项,所述转发表项的索引为所述序列号,所述转发表项的下一跳为所述设备的标识。For example, when the forwarding entry is the forwarding entry in the first, second or third possible implementation manners, the obtaining unit 1202 is further configured to: obtain the corresponding BFR-id according to the BFR-id the serial number; according to the serial number and the device identifier, the forwarding table entry is obtained, the index of the forwarding table entry is the serial number, and the next hop of the forwarding table entry is the device 's identification.
举例说明,当转发表项是上述第二种可能的实现方式中的转发表项时,所述获得单元1202还用于:根据所述BFR-id获得所述第一bit string和与所述BFR-id对应的所述序列号;根据所述序列号、所述第一bit string和所述设备的标识,获得所述转发表项,所述转发表项的索引为所述序列号,所述转发表项的转发位串掩码F-BM为所述第一bit string,所述转发表项的所述转发表项的下一跳为所述设备的标识。For example, when the forwarding entry is the forwarding entry in the second possible implementation manner, the obtaining unit 1202 is further configured to: obtain the first bit string and the BFR according to the BFR-id The serial number corresponding to the -id; according to the serial number, the first bit string and the identifier of the device, the forwarding table entry is obtained, the index of the forwarding table entry is the serial number, the 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 of the forwarding table entry is the identifier of the device.
举例说明,当转发表项是上述第三种可能的实现方式中的转发表项时,所述获得单元1202还用于:根据所述BFR-id获得与其对应的所述序列号;按照所述读取位宽,将所述序列号和所述设备的标识进行排序,获得所述转发表项,所述转发表项所在的行号对应所述序列号与所述读取位宽的商,所述转发表项包括的所述设备的标识在所述N个标识中的排序与所述序列号对应。For example, when the forwarding entry is the forwarding entry in the third possible implementation manner, the obtaining unit 1202 is further configured to: obtain the corresponding sequence number according to the BFR-id; Read the bit width, sort the serial number and the identifier of the device, and obtain the forwarding table entry, where the line number of the forwarding table entry corresponds to the quotient of the serial number and the read bit width, The order of the identifiers of the devices included in the forwarding entry in the N identifiers corresponds to the sequence number.
举例说明,当转发表项是上述第四种可能的实现方式中的转发表项时,所述获得单元1202还用于:根据所述BFR-id获得与其对应的所述序列号;按照序列号的排序,对序列号所对应的标识进行划分,获得L个标识集,所述L对应序列号的最大值和预设值的商,所述预设值为所述数据块包括的bit数;根据移动窗口对L个标识集进行划分,并对移动窗口内的标识集进行组合,以获得包括所述M个标识集的所述转发表项。其中,移动窗口的大小可根据需要进行设置,在本申请实施例中移动窗口为5个标识集。所述序列号的最大值为256,所述预设值为8,所述L为32,所述M为2。For example, when the forwarding entry is the forwarding entry in the fourth possible implementation manner, the obtaining unit 1202 is further configured to: obtain the corresponding sequence number according to the BFR-id; The ordering, the identification corresponding to the serial number is divided, and L identification sets are obtained, the L corresponding to the maximum value of the serial number and the quotient of a preset value, and the preset value is the number of bits included in the data block; The L identification sets are divided according to the moving window, and the identification sets in the moving window are combined to obtain the forwarding table entry including the M identification sets. The size of the moving window can be set as required, and in this embodiment of the present application, the moving window is 5 identification sets. The maximum value of the serial number is 256, the preset value is 8, the L is 32, and the M is 2.
图13为本申请实施例提供的转发设备的又一结构示意图。图13对应的实施例提供的转发设备1300可以是图11对应的实施例提供的转发设备1100,或者是图12对应的实施例提供的装置1200所在的转发设备。图13对应的实施例提供的转发设备1300是从硬件结构的角度进行的描述。转发设备1300包括处理器1301、存储器1302、通信总线1304和通信接口1303。所述处理器1301、所述存储器1302和所述通信接口1303通过通信总线1304连接。所述存储器1302用于存储程序。当转发设备1300设置于作为BFIR的设备时,所述处理器1301根据从所述存储器1302中读取的程序所包括的可执行指令,执行上述实施例二中设备210执行的方法,或者执行上述实施例四中设备510执行的方法。当转发设备1300设置于作为中间BFR的设备时,所述处理器1301根据从所述存储器1302中读取的程序所包括的可执行指令,执行上述实施例二中设备209、设备206或设备208执行的方法,或者执行上述实 施例四中设备509、设备506或设备508执行的方法。FIG. 13 is another schematic structural diagram of a forwarding device provided by an embodiment of the present application. The forwarding device 1300 provided by the embodiment corresponding to FIG. 13 may be the forwarding device 1100 provided by the embodiment corresponding to FIG. 11 , or the forwarding device where the apparatus 1200 provided by the embodiment corresponding to FIG. 12 is located. The forwarding device 1300 provided by the embodiment corresponding to FIG. 13 is described from the perspective of 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 through a communication bus 1304 . The memory 1302 is used to store programs. When the forwarding device 1300 is set as a BFIR device, the processor 1301 executes the method executed by the device 210 in the second embodiment above according to the executable instructions included in the program read from the memory 1302, or executes the above The method performed by the device 510 in the fourth embodiment. When the forwarding device 1300 is set as an intermediate BFR device, the processor 1301 executes the device 209 , the device 206 or the device 208 in the second embodiment above according to the executable instructions included in the program read from the memory 1302 Execute the method, or execute the method executed by the device 509, the device 506, or the device 508 in the fourth embodiment.
图14为本申请实施例提供的生成转发表项的装置的又一结构示意图。图14对应的实施例提供的装置1400可以是图12对应的实施例提供的装置1200。图14对应的实施例提供的装置1400是从硬件结构的角度进行的描述。装置1400包括处理器1401、存储器1402、通信总线1404和通信接口1403。所述处理器1401、所述存储器1402和所述通信接口1403通过通信总线1404连接。所述存储器1402用于存储程序。当装置1400设置于作为BFIR的设备时,所述处理器1401根据从所述存储器1402中读取的程序所包括的可执行指令,执行上述实施例一中设备210执行的方法或实施例三中设备510执行的方法。当装置1400设置于作为中间BFR的设备时,所述处理器1401根据从所述存储器1402中读取的程序所包括的可执行指令,执行上述实施例一中设备209、设备206或设备208执行的方法,或者执行上述实施例三中的设备509、设备506或设备508执行的方法。FIG. 14 is another schematic structural diagram of an apparatus for generating a forwarding entry provided by an embodiment of the present application. The apparatus 1400 provided by the embodiment corresponding to FIG. 14 may be the apparatus 1200 provided by the embodiment corresponding to FIG. 12 . The apparatus 1400 provided by the embodiment corresponding to FIG. 14 is described from the perspective of hardware structure. The apparatus 1400 includes 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 through a communication bus 1404 . The memory 1402 is used to store programs. When the apparatus 1400 is set as a BFIR device, the processor 1401 executes the method executed by the device 210 in the first embodiment or the method in the third embodiment according to the executable instructions included in the program read from the memory 1402 A method performed by device 510. When the apparatus 1400 is set in a device serving as an intermediate BFR, the processor 1401 executes the device 209 , the device 206 or the device 208 in the first embodiment according to the executable instructions included in the program read from the memory 1402 . method, or perform the method performed by the device 509, the device 506, or the device 508 in the third embodiment.
本申请实施例提供了一种***,所述***包括转发设备1100或装置1200,或者所述***包括转发设备1300或装置1400。转发设备1100或转发设备1300可用于执行上述实施例二或实施例四中作为BFIR的设备所执行的方法,或者用于执行上述实施例二或实施例四中作为中间BFR的设备所执行的方法。装置1200或装置1400可用于执行上述实施例一或实施例三中作为BFIR的设备所执行的方法,或者用于执行上述实施例一或实施例三中作为中间BFR的设备所执行的方法。An 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 used to execute the method executed by the device serving as the BFIR in the second embodiment or the fourth embodiment, or 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 used to execute the method performed by the device serving as the BFIR in the first embodiment or the third embodiment, or the method performed by the device serving as the intermediate BFR in the first embodiment or the third embodiment.
本申请实施例提供了一种芯片。所述芯片可包括图13所示的存储器1301和处理器1301。所述存储器1302用于存储计算机指令。所述处理器1301用于从所述存储器1302中调用并运行所述计算机指令,以执行实施例二或实施例四提供的确定下一跳的方法。所述芯片可包括图14所示的存储器1401和处理器1401。所述存储器1402用于存储计算机指令。所述处理器1401用于从所述存储器1402中调用并运行所述计算机指令,以执行实施例一或实施例三提供生成转发表项的方法。本申请实施例提供的芯片可以设置于转发硬件上或者转发硬件包括的转发电路集成于本申请实施例提供的芯片。An embodiment of the present 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 execute the method for determining the next hop provided in the second embodiment or the fourth embodiment. The chip may include the memory 1401 and the processor 1401 shown in FIG. 14 . The memory 1402 is used to store computer instructions. The processor 1401 is configured to call and execute the computer instructions from the memory 1402 to execute the method for generating a forwarding entry provided in Embodiment 1 or Embodiment 3. The chip provided by the embodiment of the present application may be disposed on the forwarding hardware, or the forwarding circuit included in the forwarding hardware may be integrated with the chip provided by the embodiment of the present application.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包括,例如,包括了一系列步骤或单元的过程、方法、***、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth", etc. in the description and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It is to be understood that data so used may be interchanged under appropriate circumstances so that the embodiments described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having", and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those expressly listed Rather, those steps or units may include other steps or units not expressly listed or inherent to these processes, methods, products or devices.
本申请中“至少一项(个)”是指一个或者多个,“多个”是指两个或两个以上。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。本申请中认为“A和/或B”包括单独A,单独B,和A+B。In this application, "at least one item (piece)" refers to one or more, and "multiple" refers to two or more. "At least one item(s) below" or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one item (a) of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple . In this application, "A and/or B" is considered to include A alone, B alone, and A+B.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的***,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above may refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的***,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑模块划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结 合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical module division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要获取其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be acquired according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各模块单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件模块单元的形式实现。In addition, each module unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware, or may be implemented in the form of software module units.
所述集成的单元如果以软件模块单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software module unit and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .
本领域技术人员应该可以意识到,在上述一个或多个示例中,本发明所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。Those skilled in the art should appreciate that, in one or more of the above examples, the functions described in the present 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 medium can be any available medium that can be accessed by a general purpose or special purpose computer.
以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施方式而已。The specific embodiments described above further describe the objectives, technical solutions and beneficial effects of the present invention in further detail, and it should be understood that the above descriptions are only specific embodiments of the present invention.
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。As mentioned above, the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand: The technical solutions described in the embodiments are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims (60)

  1. 一种获取下一跳的方法,其特征在于,所述方法包括:A method for obtaining a next hop, characterized in that the method comprises:
    接收位索引显式复制BIER组播报文,所述BIER组播报文包括第一比特串bit string,所述第一bit stirng包括的被置1的比特bit与位转发出口路由器BFER对应;The received bit index explicitly replicates the BIER multicast message, and the BIER multicast message includes the first bit string bit string, and the bit bit that is set to 1 included in the first bit stirng corresponds to the bit forwarding export router BFER;
    根据所述第一bit string中被置1的bit确定转发表项的索引,所述转发表项包括所述索引和作为下一跳的设备的标识;Determine the index of the forwarding table entry according to the bit set to 1 in the first bit string, and the forwarding table entry includes the index and the identifier of the device used as the next hop;
    根据所述索引直接获得所述设备的标识,所述设备为所述BFER或者到达所述BFER所经过的第一中间位转发路由器BFR。The identifier of the device is directly obtained according to the index, and the device is the BFER or the first intermediate forwarding router BFR through which the BFER is reached.
  2. 根据权利要求1所述的方法,其特征在于,所述索引为与所述BFER的位转发路由器标识BFR-id对应的序列号,所述设备的标识对应一个序列号。The method according to claim 1, wherein the index is a serial number corresponding to the bit forwarding router identifier BFR-id of the BFER, and the identifier of the device corresponds to a serial number.
  3. 根据权利要求2所述的方法,其特征在于,所述转发表项还包括第二bit string,所述第二bit string有且仅有1位被置1的bit,且所述第二bit string中被置1的bit在所述第二bit string的偏移量与其所在的转发表项包括的序列号对应。The method according to claim 2, wherein the forwarding table entry further comprises a second bit string, the second bit string has and only 1 bit is set to 1, and the second bit string The offset of the bit set to 1 in the second bit string corresponds to the sequence number included in the forwarding entry where it is located.
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述索引直接获得所述设备的标识包括:The method according to claim 3, wherein the directly obtaining the identifier of the device according to the index comprises:
    根据所述序列号获得所述转发表项包括的所述作为下一跳的设备的标识,而不查找所述转发表项包括的所述第二bit string。The identifier of the device as the next hop included in the forwarding entry is obtained according to the sequence number, without searching for the second bit string included in the forwarding entry.
  5. 根据权利要求2所述的方法,其特征在于,所述转发表项包含N个标识,所述N小于或等于读取位宽的值,所述N个标识包括所述设备的标识,所述N个标识包括的任一标识在所述转发表项中的排序与所述序列号对应。The method according to claim 2, wherein the forwarding table entry includes N identifiers, the N is less than or equal to the value of the read bit width, the N identifiers include the identifier of the device, the The order of any identifier included in the N identifiers in the forwarding entry corresponds to the sequence number.
  6. 根据权利要求5所述的方法,其特征在于,所述根据所述索引直接获得所述设备的标识包括:The method according to claim 5, wherein the directly obtaining the identifier of the device according to the index comprises:
    根据所序列号和所述读取位宽确定行号,所述行号对应所述序列号与所述读取位宽的商;Determine the line number according to the serial number and the read bit width, and the line number corresponds to the quotient of the serial number and the read bit width;
    获取所述行号对应的所述转发表项包括的所述N个标识。Acquire the N identifiers included in the forwarding entry corresponding to the line number.
  7. 根据权利要求1至6任一所述的方法,其特征在于,所述根据所述第一bit string中被置1的bit确定转发表项的索引包括:The method according to any one of claims 1 to 6, wherein the determining the index of the forwarding table entry according to the bit set to 1 in the first bit string comprises:
    获取所述第一bit string中被置1的bit在所述第一bit string中的偏移量;Obtain the offset of the bit set to 1 in the first bit string in the first bit string;
    根据所述偏移量确定所述索引,所述偏移量与所述索引对应。The index is determined according to the offset, and the offset corresponds to the index.
  8. 根据权利要求1所述的方法,其特征在于,所述索引用于标识M个标识集所在的行,所述M为大于或等于2的整数,所述M个标识集包括所述设备的标识,所述设备的标识所属的标识集对应所述序列号所属的数据块,所述设备的标识在其所属的标识集内的排序对应所述序列号。The method according to claim 1, wherein the index is used to identify the row where M identification sets are located, the M is an integer greater than or equal to 2, and the M identification sets include the identification of the device , the identification set to which the identification of the device belongs corresponds to the data block to which the serial number belongs, and the order of the identification of the device in the identification set to which it belongs corresponds to the serial number.
  9. 根据权利要求8所述的方法,其特征在于,所述根据所述第一bit string中被置1的bit确定转发表项的索引包括:The method according to claim 8, wherein the determining the index of the forwarding table entry according to the bit set to 1 in the first bit string comprises:
    根据所述第一bit string和读取位宽,确定所述第一bit string中被置1的bit所属的数据块;According to the first bit string and the read bit width, determine the data block to which the bit set to 1 in the first bit string belongs;
    获取与所述第一bit string中被置1的bit所属的数据块对应的标识集,所述M个标识集包括所述数据块对应的所述标识集;Obtain the identity set corresponding to the data block to which the bit that is set to 1 in the first bit string belongs, and the M identity sets include the identity set corresponding to the data block;
    根据所述数据块对应的所述标识集,确定所述M个标识集所在的行。According to the identification set corresponding to the data block, the row where the M identification sets are located is determined.
  10. 根据权利要求8或9所述的方法,其特征在于,根据所述索引直接获得所述设备的标识包括:The method according to claim 8 or 9, wherein directly obtaining the identifier of the device according to the index comprises:
    从所述索引包括的所述M个标识集获取所述设备的标识。The identification of the device is acquired from the M identification sets included in the index.
  11. 根据权利要求2至7任一所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 2 to 7, wherein the method further comprises:
    接收所述设备发送的所述设备的标识和所述BFR-id;receiving the device identifier and the BFR-id sent by the device;
    根据所述BFR-id获得与其对应的所述序列号;Obtain the corresponding serial number according to the BFR-id;
    根据所述序列号和所述设备的标识,获得所述转发表项,所述转发表项的索引为所述序列号,所述转发表项的下一跳为所述设备的标识。The forwarding table entry is obtained according to the serial number and the identifier of the device, 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 device.
  12. 根据权利要求3或4所述的方法,其特征在于,所述方法还包括:The method according to claim 3 or 4, wherein the method further comprises:
    接收所述设备发送的所述设备的标识和所述BFR-id;receiving the device identifier and the BFR-id sent by the device;
    根据所述BFR-id获得所述第二bit string和与所述BFR-id对应的所述序列号;Obtain the second bit string and the sequence number corresponding to the BFR-id according to the BFR-id;
    根据所述序列号、所述第二bit string和所述设备的标识,获得所述转发表项,所述转发表项的索引为所述序列号,所述转发表项的转发位串掩码F-BM为所述第二bit string,所述转发表项的所述转发表项的下一跳为所述设备的标识。According to the serial number, the second bit string and the device identifier, the forwarding table entry is obtained, the index of the forwarding table entry is the serial number, and the forwarding bit string mask of the forwarding table entry F-BM is the second bit string, and the next hop of the forwarding table entry of the forwarding table entry is the identifier of the device.
  13. 根据权利要求5或6所述的方法,其特征在于,所述方法还包括:The method according to claim 5 or 6, wherein the method further comprises:
    接收所述设备发送的所述设备的标识和所述BFR-id;receiving the device identifier and the BFR-id sent by the device;
    根据所述BFR-id获得与其对应的所述序列号;Obtain the corresponding serial number according to the BFR-id;
    按照所述读取位宽,将所述序列号和所述设备的标识进行排序,获得所述转发表项,所述转发表项所在的行号对应所述序列号与所述读取位宽的商,所述转发表项包括的所述设备的标识在所述N个标识中的排序与所述序列号对应。According to the read bit width, sort the serial number and the device identifier to obtain the forwarding table entry, where the line number of the forwarding table entry corresponds to the serial number and the read bit width quotient, and the order of the identifiers of the devices included in the forwarding entry in the N identifiers corresponds to the sequence number.
  14. 根据权利要求8至10任一所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 8 to 10, wherein the method further comprises:
    接收所述设备发送的所述设备的标识和所述BFR-id;receiving the device identifier and the BFR-id sent by the device;
    根据所述BFR-id获得与其对应的所述序列号;Obtain the corresponding serial number according to the BFR-id;
    按照序列号的排序,对序列号所对应的标识进行划分,获得L个标识集,所述L对应序列号的最大值和预设值的商,所述预设值为所述数据块包括的bit数;According to the ordering of the serial numbers, the identifiers corresponding to the serial numbers are divided to obtain L identifier sets, where the L corresponds to the quotient of the maximum value of the serial numbers and a preset value, and the preset value is the value included in the data block. bit number;
    根据移动窗口对L个标识集进行划分,并对移动窗口内的标识集进行组合,以获得包括所述M个标识集的所述转发表项。The L identification sets are divided according to the moving window, and the identification sets in the moving window are combined to obtain the forwarding table entry including the M identification sets.
  15. 根据权利要求14所述的方法,其特征在于,所述序列号的最大值为256,所述预设值为8,所述L为32,所述M为2。The method according to claim 14, wherein the maximum value of the serial number is 256, the preset value is 8, the L is 32, and the M is 2.
  16. 根据权利要求1至15任一所述的方法,其特征在于,所述方法由位转发入口路由器BFIR执行或者由第二中间BFR执行。The method according to any one of claims 1 to 15, wherein the method is performed by the bit forwarding ingress router BFIR or performed by the second intermediate BFR.
  17. 一种生成转发表项的方法,其特征在于,所述方法包括:A method for generating a forwarding entry, wherein the method comprises:
    接收设备发送的所述设备的标识和位转发路由器标识BFR-id,所述BFR-id用于标识能够与所述设备通信的位转发出口路由器BFER,所述设备为所述BFER或者到达所述BFER所经过的第一中间位转发路由器BFR;The identification of the device and the bit forwarding router identification BFR-id sent by the receiving device, the BFR-id is used to identify the bit forwarding egress router BFER that can communicate with the device, and the device is the BFER or arrives at the The first intermediate forwarding router BFR that BFER passes through;
    根据所述设备的标识和所述BFR-id,获取转发表项,所述转发表项的索引对应所述BFR-id,所述转发表项用于根据所述索引直接获得所述转发表项包括的作为下一跳的设备的标识。According to the identifier of the device and the BFR-id, a forwarding table entry is obtained, the index of the forwarding table entry corresponds to the BFR-id, and the forwarding table entry is used to directly obtain the forwarding table entry according to the index The identity of the device included as the next hop.
  18. 根据权利要求17所述的方法,其特征在于,所述索引为与所述BFR-id对应的序列号,所述设备的标识对应一个序列号。The method according to claim 17, wherein the index is a serial number corresponding to the BFR-id, and the device identifier corresponds to a serial number.
  19. 根据权利要求18所述的方法,其特征在于,所述转发表项还包括第一bit string,所述第一bit string有且仅有1位被置1的bit,且所述第一bit string中被置1的bit在所述第一bit string的偏移量与其所在的转发表项包括的序列号对应。The method according to claim 18, wherein the forwarding table entry further comprises a first bit string, the first bit string has and only 1 bit is set to 1, and the first bit string The offset of the bit set to 1 in the first bit string corresponds to the sequence number included in the forwarding entry where it is located.
  20. 根据权利要求18所述的方法,其特征在于,所述转发表项包含N个标识,所述N小 于或等于读取位宽的值,所述N个标识包括所述设备的标识,所述N个标识包括的任一标识在所述转发表项中的排序与所述序列号对应。The method according to claim 18, wherein the forwarding table entry includes N identifiers, the N is less than or equal to the value of the read bit width, the N identifiers include the identifier of the device, the The order of any identifier included in the N identifiers in the forwarding entry corresponds to the sequence number.
  21. 根据权利要求17所述的方法,其特征在于,所述索引用于标识M个标识集所在的行,所述M为大于或等于2的整数,所述M个标识集包括所述设备的标识,所述设备的标识所属的标识集对应所述序列号所属的数据块,所述设备的标识在其所属的标识集内的排序对应所述序列号。The method according to claim 17, wherein the index is used to identify the row where M identification sets are located, the M is an integer greater than or equal to 2, and the M identification sets include the identification of the device , the identification set to which the identification of the device belongs corresponds to the data block to which the serial number belongs, and the order of the identification of the device in the identification set to which it belongs corresponds to the serial number.
  22. 根据权利要求18至20任一所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 18 to 20, wherein the method further comprises:
    根据所述BFR-id获得与其对应的所述序列号;Obtain the corresponding serial number according to the BFR-id;
    根据所述序列号和所述设备的标识,获得所述转发表项,所述转发表项的索引为所述序列号,所述转发表项的下一跳为所述设备的标识。The forwarding table entry is obtained according to the serial number and the identifier of the device, 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 device.
  23. 根据权利要求19所述的方法,其特征在于,所述方法还包括:The method of claim 19, wherein the method further comprises:
    根据所述BFR-id获得所述第一bit string和与所述BFR-id对应的所述序列号;Obtain the first bit string and the sequence number corresponding to the BFR-id according to the BFR-id;
    根据所述序列号、所述第一bit string和所述设备的标识,获得所述转发表项,所述转发表项的索引为所述序列号,所述转发表项的转发位串掩码F-BM为所述第一bit string,所述转发表项的所述转发表项的下一跳为所述设备的标识。The forwarding table entry is obtained according to the serial number, the first bit string and the identifier of the device, the index of the forwarding table entry is the serial number, and the forwarding bit string mask of the forwarding table entry F-BM is the first bit string, and the next hop of the forwarding table entry of the forwarding table entry is the identifier of the device.
  24. 根据权利要求20所述的方法,其特征在于,所述方法还包括:The method of claim 20, wherein the method further comprises:
    根据所述BFR-id获得与其对应的所述序列号;Obtain the corresponding serial number according to the BFR-id;
    按照所述读取位宽,将所述序列号和所述设备的标识进行排序,获得所述转发表项,所述转发表项所在的行号对应所述序列号与所述读取位宽的商,所述转发表项包括的所述设备的标识在所述N个标识中的排序与所述序列号对应。According to the read bit width, sort the serial number and the device identifier to obtain the forwarding table entry, where the line number of the forwarding table entry corresponds to the serial number and the read bit width quotient, and the order of the identifiers of the devices included in the forwarding entry in the N identifiers corresponds to the sequence number.
  25. 根据权利要求21所述的方法,其特征在于,所述方法还包括:The method of claim 21, wherein the method further comprises:
    根据所述BFR-id获得与其对应的所述序列号;Obtain the corresponding serial number according to the BFR-id;
    按照序列号的排序,对序列号所对应的标识进行划分,获得L个标识集,所述L对应序列号的最大值和预设值的商,所述预设值为所述数据块包括的bit数;According to the ordering of the serial numbers, the identifiers corresponding to the serial numbers are divided to obtain L identifier sets, where the L corresponds to the quotient of the maximum value of the serial numbers and a preset value, and the preset value is the value included in the data block. bit number;
    根据移动窗口对L个标识集进行划分,并对移动窗口内的标识集进行组合,以获得包括所述M个标识集的所述转发表项。The L identification sets are divided according to the moving window, and the identification sets in the moving window are combined to obtain the forwarding table entry including the M identification sets.
  26. 根据权利要求25所述的方法,其特征在于,所述序列号的最大值为256,所述预设值为8,所述L为32,所述M为2。The method according to claim 25, wherein the maximum value of the serial number is 256, the preset value is 8, the L is 32, and the M is 2.
  27. 根据权利要求17至26任一所述的方法,其特征在于,所述方法由位转发入口路由器BFIR执行或者由第二中间BFR执行。The method according to any one of claims 17 to 26, wherein the method is performed by the bit forwarding ingress router BFIR or performed by the second intermediate BFR.
  28. 一种转发设备,其特征在于,所述转发设备包括:A forwarding device, characterized in that the forwarding device comprises:
    接收单元,用于接收位索引显式复制BIER组播报文,所述BIER组播报文包括第一比特串bit string,所述第一bit stirng包括的被置1的比特bit与位转发出口路由器BFER对应;The receiving unit is used for receiving the bit index to explicitly copy the BIER multicast message, and the BIER multicast message includes the first bit string bit string, and the first bit string includes the set bit bit and the bit forwarding exit Router BFER corresponds;
    确定单元,用于根据所述第一bit string中被置1的bit确定转发表项的索引,所述转发表项包括所述索引和作为下一跳的设备的标识;A determination unit, used for determining the index of the forwarding table entry according to the bit set to 1 in the first bit string, and the forwarding table entry includes the index and the identification of the device as the next hop;
    获得单元,用于根据所述索引直接获得所述设备的标识,所述设备为所述BFER或者到达所述BFER所经过的第一中间位转发路由器BFR。An obtaining unit, configured to directly obtain the identifier of the device according to the index, where the device is the BFER or the first intermediate bit forwarding router BFR through which the BFER is reached.
  29. 根据权利要求28所述的转发设备,其特征在于,所述索引为与所述BFER的位转发路由器标识BFR-id对应的序列号,所述设备的标识对应一个序列号。The forwarding device according to claim 28, wherein the index is a serial number corresponding to the bit forwarding router identifier BFR-id of the BFER, and the identifier of the device corresponds to a serial number.
  30. 根据权利要求29所述的转发设备,其特征在于,所述转发表项还包括第二bit string,所述第二bit string有且仅有1位被置1的bit,且所述第二bit string中被置1的bit在所述第 二bit string的偏移量与其所在的转发表项包括的序列号对应。The forwarding device according to claim 29, wherein the forwarding table entry further comprises a second bit string, the second bit string has and only one bit is set to 1, and the second bit The offset of the bit set to 1 in the second bit string corresponds to the sequence number included in the forwarding table entry where it is located.
  31. 根据权利要求30所述的转发设备,其特征在于,The forwarding device according to claim 30, wherein:
    所述获得单元具体用于根据所述序列号获得所述转发表项包括的所述作为下一跳的设备的标识,而不查找所述转发表项包括的所述第二bit string。The obtaining unit is specifically configured to obtain the identifier of the device as the next hop included in the forwarding entry according to the sequence number, without searching for the second bit string included in the forwarding entry.
  32. 根据权利要求29所述的转发设备,其特征在于,所述转发表项包含N个标识,所述N小于或等于读取位宽的值,所述N个标识包括所述设备的标识,所述N个标识包括的任一标识在所述转发表项中的排序与所述序列号对应。The forwarding device according to claim 29, wherein the forwarding table entry includes N identifiers, the N is less than or equal to the value of the read bit width, the N identifiers include the identifier of the device, and the The order of any identifier included in the N identifiers in the forwarding entry corresponds to the sequence number.
  33. 根据权利要求32所述的转发设备,其特征在于,所述获得单元具体用于:The forwarding device according to claim 32, wherein the obtaining unit is specifically configured to:
    根据所序列号和所述读取位宽确定行号,所述行号对应所述序列号与所述读取位宽的商;Determine the line number according to the serial number and the read bit width, and the line number corresponds to the quotient of the serial number and the read bit width;
    获取所述行号对应的所述转发表项包括的所述N个标识。Acquire the N identifiers included in the forwarding entry corresponding to the line number.
  34. 根据权利要求28至33任一所述的转发设备,其特征在于,所述确定单元具体用于:The forwarding device according to any one of claims 28 to 33, wherein the determining unit is specifically configured to:
    获取所述第一bit string中被置1的bit在所述第一bit string中的偏移量;Obtain the offset of the bit set to 1 in the first bit string in the first bit string;
    根据所述偏移量确定所述索引,所述偏移量与所述索引对应。The index is determined according to the offset, and the offset corresponds to the index.
  35. 根据权利要求28所述的转发设备,其特征在于,所述索引用于标识M个标识集所在的行,所述M为大于或等于2的整数,所述M个标识集包括所述设备的标识,所述设备的标识所属的标识集对应所述序列号所属的数据块,所述设备的标识在其所属的标识集内的排序对应所述序列号。The forwarding device according to claim 28, wherein the index is used to identify a row where M identification sets are located, where M is an integer greater than or equal to 2, and the M identification sets include The identification set to which the identification of the device belongs corresponds to the data block to which the serial number belongs, and the order of the identification of the device in the identification set to which it belongs corresponds to the serial number.
  36. 根据权利要求35所述的转发设备,其特征在于,所述确定单元具体用于:The forwarding device according to claim 35, wherein the determining unit is specifically configured to:
    根据所述第一bit string和读取位宽,确定所述第一bit string中被置1的bit所属的数据块;According to the first bit string and the read bit width, determine the data block to which the bit set to 1 in the first bit string belongs;
    获取与所述第一bit string中被置1的bit所属的数据块对应的标识集,所述M个标识集包括所述数据块对应的所述标识集;Obtain the identity set corresponding to the data block to which the bit that is set to 1 in the first bit string belongs, and the M identity sets include the identity set corresponding to the data block;
    根据所述数据块对应的所述标识集,确定所述M个标识集所在的行。According to the identification set corresponding to the data block, the row where the M identification sets are located is determined.
  37. 根据权利要求35或36所述的转发设备,其特征在于,所述获得单元具体用于:The forwarding device according to claim 35 or 36, wherein the obtaining unit is specifically configured to:
    从所述索引对应的行包括的所述M个标识集获取所述设备的标识。The identification of the device is acquired from the M identification sets included in the row corresponding to the index.
  38. 根据权利要求29至34任一所述的转发设备,其特征在于,The forwarding device according to any one of claims 29 to 34, characterized in that:
    所述接收单元还用于接收所述设备发送的所述设备的标识和所述BFR-id;The receiving unit is further configured to receive the device identifier and the BFR-id sent by the device;
    所述获得单元还用于:The obtaining unit is also used for:
    根据所述BFR-id获得与其对应的所述序列号;Obtain the corresponding serial number according to the BFR-id;
    根据所述序列号和所述设备的标识,获得所述转发表项,所述转发表项的索引为所述序列号,所述转发表项的下一跳为所述设备的标识。The forwarding table entry is obtained according to the serial number and the identifier of the device, 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 device.
  39. 根据权利要求30或31所述的转发设备,其特征在于,The forwarding device according to claim 30 or 31, characterized in that:
    所述接收单元还用于接收所述设备发送的所述设备的标识和所述BFR-id;The receiving unit is further configured to receive the device identifier and the BFR-id sent by the device;
    所述获得单元还用于:The obtaining unit is also used for:
    根据所述BFR-id获得所述第二bit string和与所述BFR-id对应的所述序列号;Obtain the second bit string and the sequence number corresponding to the BFR-id according to the BFR-id;
    根据所述序列号、所述第二bit string和所述设备的标识,获得所述转发表项,所述转发表项的索引为所述序列号,所述转发表项的转发位串掩码F-BM为所述第二bit string,所述转发表项的所述转发表项的下一跳为所述设备的标识。According to the serial number, the second bit string and the device identifier, the forwarding table entry is obtained, the index of the forwarding table entry is the serial number, and the forwarding bit string mask of the forwarding table entry F-BM is the second bit string, and the next hop of the forwarding table entry of the forwarding table entry is the identifier of the device.
  40. 根据权利要求32或33所述的转发设备,其特征在于,The forwarding device according to claim 32 or 33, characterized in that:
    所述接收单元还用于接收所述设备发送的所述设备的标识和所述BFR-id;The receiving unit is further configured to receive the device identifier and the BFR-id sent by the device;
    所述获得单元还用于:The obtaining unit is also used for:
    根据所述BFR-id获得与其对应的所述序列号;Obtain the corresponding serial number according to the BFR-id;
    按照所述读取位宽,将所述序列号和所述设备的标识进行排序,获得所述转发表项,所述转发表项所在的行号对应所述序列号与所述读取位宽的商,所述转发表项包括的所述设备的标识在所述N个标识中的排序与所述序列号对应。According to the read bit width, sort the serial number and the device identifier to obtain the forwarding table entry, where the line number of the forwarding table entry corresponds to the serial number and the read bit width quotient, and the order of the identifiers of the devices included in the forwarding entry in the N identifiers corresponds to the sequence number.
  41. 根据权利要求35至37任一所述的转发设备,其特征在于,The forwarding device according to any one of claims 35 to 37, characterized in that:
    所述接收单元还用于接收所述设备发送的所述设备的标识和所述BFR-id;The receiving unit is further configured to receive the device identifier and the BFR-id sent by the device;
    所述获得单元还用于:The obtaining unit is also used for:
    根据所述BFR-id获得与其对应的所述序列号;Obtain the corresponding serial number according to the BFR-id;
    按照序列号的排序,对序列号所对应的标识进行划分,获得L个标识集,所述L对应序列号的最大值和预设值的商,所述预设值为所述数据块包括的bit数;According to the ordering of the serial numbers, the identifiers corresponding to the serial numbers are divided to obtain L identifier sets, where the L corresponds to the quotient of the maximum value of the serial numbers and a preset value, and the preset value is the value included in the data block. bit number;
    根据移动窗口对L个标识集进行划分,并对移动窗口内的标识集进行组合,以获得包括所述M个标识集的所述转发表项。The L identification sets are divided according to the moving window, and the identification sets in the moving window are combined to obtain the forwarding table entry including the M identification sets.
  42. 根据权利要求41所述的转发设备,其特征在于,所述序列号的最大值为256,所述预设值为8,所述L为32,所述M为2。The forwarding device according to 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. 根据权利要求28至42任一所述的转发设备,其特征在于,所述转发设备为位转发入口路由器BFIR或者第二中间BFR。The forwarding device according to any one of claims 28 to 42, wherein the forwarding device is a bit forwarding ingress router BFIR or a second intermediate BFR.
  44. 一种生成转发表项的装置,其特征在于,所述装置包括:A device for generating a forwarding entry, characterized in that the device comprises:
    接收单元,用于接收设备发送的所述设备的标识和位转发路由器标识BFR-id,所述BFR-id用于标识能够与所述设备通信的位转发出口路由器BFER,所述设备为所述BFER或者到达所述BFER所经过的第一中间位转发路由器BFR;A receiving unit, configured to receive the identifier of the device and the bit forwarding router identifier BFR-id sent by the device, where the BFR-id is used to identify the bit forwarding egress router BFER that can communicate with the device, and the device is the BFER or the first intermediate forwarding router BFR through which the BFER is reached;
    获得单元,用于根据所述设备的标识和所述BFR-id,获取转发表项,所述转发表项的索引对应所述BFR-id,所述转发表项用于根据所述索引直接获得所述转发表项包括的作为下一跳的设备的标识。an obtaining unit, configured to obtain a forwarding table entry according to the identifier of the device and the BFR-id, the index of the forwarding table entry corresponds to the BFR-id, and the forwarding table entry is used to directly obtain the forwarding table entry according to the index The forwarding entry includes the identifier of the device as the next hop.
  45. 根据权利要求44所述的装置,其特征在于,所述索引为与所述BFR-id对应的序列号,所述设备的标识对应一个序列号。The apparatus according to claim 44, wherein the index is a serial number corresponding to the BFR-id, and the device identifier corresponds to a serial number.
  46. 根据权利要求45所述的装置,其特征在于,所述转发表项还包括第一bit string,所述第一bit string有且仅有1位被置1的bit,且所述第一bit string中被置1的bit在所述第一bit string的偏移量与其所在的转发表项包括的序列号对应。The device according to claim 45, wherein the forwarding table entry further comprises a first bit string, the first bit string has and only one bit is set to 1, and the first bit string The offset of the bit set to 1 in the first bit string corresponds to the sequence number included in the forwarding entry where it is located.
  47. 根据权利要求45所述的装置,其特征在于,所述转发表项包含N个标识,所述N小于或等于读取位宽的值,所述N个标识包括所述设备的标识,所述N个标识包括的任一标识在所述转发表项中的排序与所述序列号对应。The apparatus according to claim 45, wherein the forwarding table entry includes N identifiers, the N is less than or equal to the value of the read bit width, the N identifiers include the identifier of the device, the The order of any identifier included in the N identifiers in the forwarding entry corresponds to the sequence number.
  48. 根据权利要求44所述的装置,其特征在于,所述索引用于标识M个标识集所在的行,所述M为大于或等于2的整数,所述M个标识集包括所述设备的标识,所述设备的标识所属的标识集对应所述序列号所属的数据块,所述设备的标识在其所属的标识集内的排序对应所述序列号。The apparatus according to claim 44, wherein the index is used to identify the row where M identification sets are located, the M is an integer greater than or equal to 2, and the M identification sets include the identification of the device , the identification set to which the identification of the device belongs corresponds to the data block to which the serial number belongs, and the order of the identification of the device in the identification set to which it belongs corresponds to the serial number.
  49. 根据权利要求44至47任一所述的装置,其特征在于,所述获得单元还用于:The device according to any one of claims 44 to 47, wherein the obtaining unit is further configured to:
    根据所述BFR-id获得与其对应的所述序列号;Obtain the corresponding serial number according to the BFR-id;
    根据所述序列号和所述设备的标识,获得所述转发表项,所述转发表项的索引为所述序列号,所述转发表项的下一跳为所述设备的标识。The forwarding table entry is obtained according to the serial number and the identifier of the device, 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 device.
  50. 根据权利要求46所述的装置,其特征在于,所述获得单元还用于:The device according to claim 46, wherein the obtaining unit is further configured to:
    根据所述BFR-id获得所述第一bit string和与所述BFR-id对应的所述序列号;Obtain the first bit string and the sequence number corresponding to the BFR-id according to the BFR-id;
    根据所述序列号、所述第一bit string和所述设备的标识,获得所述转发表项,所述转发 表项的索引为所述序列号,所述转发表项的转发位串掩码F-BM为所述第一bit string,所述转发表项的所述转发表项的下一跳为所述设备的标识。Obtain the forwarding table entry according to the serial number, the first bit string and the device identifier, the index of the forwarding table entry is the serial number, and the forwarding bit string mask of the forwarding table entry F-BM is the first bit string, and the next hop of the forwarding table entry of the forwarding table entry is the identifier of the device.
  51. 根据权利要求47所述的装置,其特征在于,所述获得单元还用于:The device according to claim 47, wherein the obtaining unit is further configured to:
    根据所述BFR-id获得与其对应的所述序列号;Obtain the corresponding serial number according to the BFR-id;
    按照所述读取位宽,将所述序列号和所述设备的标识进行排序,获得所述转发表项,所述转发表项所在的行号对应所述序列号与所述读取位宽的商,所述转发表项包括的所述设备的标识在所述N个标识中的排序与所述序列号对应。According to the read bit width, sort the serial number and the device identifier to obtain the forwarding table entry, where the line number of the forwarding table entry corresponds to the serial number and the read bit width quotient, and the order of the identifiers of the devices included in the forwarding entry in the N identifiers corresponds to the sequence number.
  52. 根据权利要求48所述的装置,其特征在于,所述获得单元还用于:The device according to claim 48, wherein the obtaining unit is further configured to:
    根据所述BFR-id获得与其对应的所述序列号;Obtain the corresponding serial number according to the BFR-id;
    按照序列号的排序,对序列号所对应的标识进行划分,获得L个标识集,所述L对应序列号的最大值和预设值的商,所述预设值为所述数据块包括的bit数;According to the ordering of the serial numbers, the identifiers corresponding to the serial numbers are divided to obtain L identifier sets, where the L corresponds to the quotient of the maximum value of the serial numbers and a preset value, and the preset value is the value included in the data block. bit number;
    根据移动窗口对L个标识集进行划分,并对移动窗口内的标识集进行组合,以获得包括所述M个标识集的所述转发表项。The L identification sets are divided according to the moving window, and the identification sets in the moving window are combined to obtain the forwarding entry including the M identification sets.
  53. 根据权利要求52所述的装置,其特征在于,所述序列号的最大值为256,所述预设值为8,所述L为32,所述M为2。The device according to claim 52, wherein the maximum value of the serial number is 256, the preset value is 8, the L is 32, and the M is 2.
  54. 根据权利要求44至53任一所述的装置,其特征在于,所述装置为位转发入口路由器BFIR或者第二中间BFR。The apparatus according to any one of claims 44 to 53, wherein the apparatus is a bit forwarding ingress router BFIR or a second intermediate BFR.
  55. 一种***,其特征在于,所述***包括如权利要求28至43任一所述的转发设备,或者如权利要求44至54任一所述的装置。A system, characterized in that the system comprises the forwarding device according to any one of claims 28 to 43, or the apparatus according to any one of claims 44 to 54.
  56. 一种芯片,其特征在于,所述芯片包括存储器和处理器,所述存储器用于存储计算机指令,所述处理器用于从所述存储器中调用并运行所述计算机指令,以执行权利要求1至16任一所述的获取下一跳的方法,或者以执行权利要求17至27任一所述的生成转发表项的方法。A chip, characterized in that the chip includes a memory and a processor, the memory is used to store computer instructions, and the processor is used to call and run the computer instructions from the memory to execute claims 1 to 16. The method for obtaining a next hop according to any one of claims 16, or to execute the method for generating a forwarding table entry according to any one of claims 17 to 27.
  57. 一种计算机程序产品,其特征在于,所述计算机程序产品包括一个或多个计算机程序指令,当所述计算机程序指令被计算机加载并执行时,使得所述计算机执行权利要求1至16任一所述的获取下一跳的方法,或者以执行权利要求17至27任一所述的生成转发表项的方法。A computer program product, characterized in that the computer program product includes one or more computer program instructions that, when loaded and executed by a computer, cause the computer to execute any one of claims 1 to 16. The method for obtaining the next hop described above, or the method for generating a forwarding table entry described in any one of claims 17 to 27.
  58. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质用于存储指令,所述指令中包括用于执行权利要求1至16任一所述的获取下一跳的方法所设计的程序,或者所述指令中包括用于执行权利要求17至27任一所述的生成转发表项的方法所设计的程序。A computer-readable storage medium, characterized in that, the computer-readable storage medium is used for storing instructions, and the instructions include designs designed for executing the method for obtaining a next hop according to any one of claims 1 to 16 The program, or the instruction includes a program designed to execute the method for generating a forwarding table entry according to any one of claims 17 to 27.
  59. 一种转发设备,其特征在于,所述转发设备包括处理器和存储供所述处理器执行的程序指令的非瞬时性计算机可读存储介质,所述程序指令指示所述处理器执行权利要求1至16任一所述的获取下一跳的方法。A forwarding device, characterized in that the forwarding device comprises 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 execute claim 1 The method for obtaining the next hop described in any of to 16.
  60. 一种生成转发表项的装置,其特征在于,所述装置包括处理器和存储供所述处理器执行的程序指令的非瞬时性计算机可读存储介质,所述程序指令指示所述处理器执行权利要求17至27任一所述的生成转发表项的方法。An apparatus for generating a forwarding entry, characterized in that the apparatus comprises 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 execute The method for generating a forwarding table entry according to any one of claims 17 to 27.
PCT/CN2021/111632 2020-09-11 2021-08-09 Method for obtaining next hop, and method and apparatus for generating forwarding-table entry WO2022052709A1 (en)

Applications Claiming Priority (4)

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

Publications (1)

Publication Number Publication Date
WO2022052709A1 true WO2022052709A1 (en) 2022-03-17

Family

ID=80632065

Family Applications (1)

Application Number Title Priority Date Filing Date
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

Country Status (1)

Country Link
WO (1) WO2022052709A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190014034A1 (en) * 2016-01-07 2019-01-10 Telefonaktiebolaget Lm Ericsson (Publ) Optimized equal-cost multi-path (ecmp) forwarding decision in bit index explicit replication (bier)
CN110784411A (en) * 2019-09-30 2020-02-11 华为技术有限公司 Method, device and system for establishing BIER forwarding table item
CN111026324A (en) * 2018-10-09 2020-04-17 华为技术有限公司 Updating method and device of forwarding table entry

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190014034A1 (en) * 2016-01-07 2019-01-10 Telefonaktiebolaget Lm Ericsson (Publ) Optimized equal-cost multi-path (ecmp) forwarding decision in bit index explicit replication (bier)
CN111026324A (en) * 2018-10-09 2020-04-17 华为技术有限公司 Updating method and device of forwarding table entry
CN110784411A (en) * 2019-09-30 2020-02-11 华为技术有限公司 Method, device and system for establishing BIER forwarding table item

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
12 January 2018 (2018-01-12), IJ. WIJNANDS, ED. CISCO SYSTEMS, INC. E. ROSEN, ED. JUNIPER NETWORKS, INC. A. DOLGANOW NOKIA J. TANTSURA INDIVIDUAL S. ALDRIN GOOG: "Encapsulation for Bit Index Explicit Replication (BIER) in MPLS and Non-MPLS Networks; rfc8296.txt", XP015122285, Database accession no. 8296 *

Similar Documents

Publication Publication Date Title
US20220224633A1 (en) Bier forwarding entry construction method, apparatus, and system
US9338079B2 (en) Method of routing multicast traffic
US9705799B2 (en) Server-side load balancing using parent-child link aggregation groups
CN104811387B (en) The equal cost multipath explicitly replicated with position index
CN109729012B (en) Unicast message transmission method and device
EP3442178B1 (en) Route searching method and apparatus
US10212069B2 (en) Forwarding of multicast packets in a network
US20180241608A1 (en) Forwarding ethernet packets
CN109639579B (en) Multicast message processing method and device, storage medium and processor
CN107547407B (en) Message transmission method, device and implementation device
CN107547346B (en) Message transmission method and device
CN112511319A (en) Information notification method, message forwarding method, message eliminating method, device, equipment and medium
KR102579060B1 (en) Routing information sending method, packet sending method, and related apparatus
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
CN111953620B (en) Method and device for reorganizing fragmented messages
CN103209128A (en) Datagram and virtual circuit simultaneously supporting data forwarding method and router
CN116094987A (en) Method and device for determining forwarding path
WO2019128905A1 (en) Network communication method and device
EP4300913A1 (en) Multicast packet sending method and device
CN115022232B (en) Multicast group management method, device, equipment and storage medium
CN110636005A (en) Knowledge routing method and device of knowledge center network
CN116527559B (en) Message forwarding processing and sending method, device, equipment and medium for network slice
CN115277720B (en) Multicast group management method, device, equipment and storage medium
US11811658B1 (en) Method for mobile ad-hoc network (manet) multi-hop routing in a broadcast domain

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21865765

Country of ref document: EP

Kind code of ref document: A1