BIERv6 multicast message forwarding method and equipment
By learning and distributing BIERv6 multicast packet forwarding table entries in the CPU, the problem of excessive resource and bandwidth consumption in BIERv6 multicast packet forwarding is solved, achieving efficient forwarding and meeting network performance and security requirements.
Patent Information
- Application Number
- CN202511849234.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-09
- Publication Date
- 2026-02-24
AI Technical Summary
In the current BIERv6 multicast message forwarding process, excessive chip resources and bandwidth are consumed, resulting in low forwarding efficiency and failing to meet network bandwidth, latency, and performance requirements.
By learning BitString and Bit Index Forwarding Table (BIFT) in the Central Processing Unit (CPU), forwarding table entries are generated and sent to the forwarding chip for software processing of BitString AND logic, replacing hardware calculation.
It saves chip resources, improves forwarding efficiency, reduces forwarding latency, and meets the service requirements for network bandwidth, latency, performance, and security.
Smart Images

Figure CN121567640A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of multicast forwarding technology, and in particular to a BIERv6 multicast message forwarding method and device. Background Technology
[0002] Within a BIERv6 (Bit Index Explicit Replication IPv6 encapsulation) domain, each intermediate forwarding node (BFR) advertises its local BFR prefix, sub-domain ID, BFR identifier (BFR-ID), BSL (Bit String Length), and path calculation algorithm to other BFR nodes. Each BFR node calculates the path to its BFR neighbors (BFERs) and generates a BIRT (Bit Index Routing Table), ultimately obtaining the FBM (Forwarding Bit Mask). Upon receiving a BIERv6 multicast message, the device performs a bitwise AND operation between the bit string (BitString) and the FBM to obtain a new BitString for forwarding.
[0003] Currently, during the forwarding process, BIERv6 processes the operations of the bit string (BitString) and the Frame Bus (FBM) using the chip's BIERv6 hardware processing module for parallel forwarding. Multiple packets are copied based on the effective number of bits in the BitString, and each packet undergoes an FBM mask operation to obtain a new BitString for forwarding. However, many chips do not support the BIERv6 hardware processing module. If the BitString is learned serially through hardware, BIERv6 may loop many times internally, consuming significant chip resources and bandwidth, and reducing forwarding efficiency. This fails to meet the service requirements for network bandwidth, latency, performance, and security. Summary of the Invention
[0004] The purpose of this application is to provide a BIERv6 multicast message forwarding method and device to solve the problems of high chip resource and bandwidth consumption and low forwarding efficiency in existing BIERv6 multicast message forwarding.
[0005] In a first aspect, embodiments of this application provide a method for monitoring BIERv6 multicast packet forwarding, the method comprising: When receiving a multicast message and determining to perform BIERv6 forwarding, parse the bit string BitString and the bit index forwarding table identifier Bift-id in the multicast message; Use the BitString and Bift-id as keys to look up forwarding entries. If a matching forwarding entry is found, forward the multicast message according to the matching forwarding entry. If no matching forwarding table entry is found, the message information is sent to the central processing unit (CPU), and the message information includes the BitString and Bift-id. The CPU receives forwarding table entries obtained by learning the message information and combining it with the local Bit Index Forwarding Table (BIFT).
[0006] In some possible embodiments, the CPU learns based on the message information and its local Bit Index Forwarding Table (BIFT), including: Write the BitString and Bift-id as table entry indexes into the first table entry; Perform a bitwise AND operation between the BitString and the forward mask FBM in BIFT to obtain the number of packet copies, the new BitString corresponding to each packet, and the forwarding port, and generate a second entry identifier; Write the second entry identifier and the number of message copies as the entry content into the first entry; write the second entry identifier and the sequence number of message copies as the index into the second entry; and write the new BitString and forwarding port corresponding to each message as the entry content into the second entry. The first and second entries will be forwarded as forwarding entries.
[0007] In some possible embodiments, the method further includes at least one of the following steps: After completing the AND operation, set the valid bit VALID of the first entry to valid; Write the BitString and the intermediate forwarding node identifier (BFR-ID) corresponding to each message into the index of the first table entry; When it is determined that the multicast message needs to be forwarded from this node via IP multicast, the local identifier LOCAL in the second entry is set to valid; otherwise, it is set to invalid. If it is determined that the next-hop device does not support BIERv6 forwarding, set the enable EN in the second entry to invalid; otherwise, set it to valid.
[0008] In some possible embodiments, the message information further includes at least one of the following: The Information Processing Instruction (OPT) is used to instruct message information to be used for learning or aging of forwarding table entries. The hot limit (HOP LIMIT) value indicates the number of router hops a BIERV6 multicast packet passes through for forwarding. If the HOP LIMIT value is within the set range, the message information will be sent to the CPU first.
[0009] In some possible embodiments, the step of using the BitString and Bift-id as key values to look up the forwarding table entry includes: Use the BitString and Bitft-id as the key to look up the first table entry; If a first entry is found, obtain the second entry identifier and the number of message copies from the first entry. Use the obtained second entry identifier and message copy number as an index to look up the second entry; If a matching second entry exists, retrieve the new BitString and forwarding port corresponding to each packet from the matching second entry; The new BitString is encapsulated into a replicated multicast message and forwarded through the corresponding forwarding port.
[0010] In some possible embodiments, obtaining the second entry identifier and the number of message copies from the first hit entry includes: If the VALID setting in the first matched entry is valid, obtain the second entry identifier and the number of message copies from the first matched entry.
[0011] In some possible embodiments, encapsulating the new BitString into a replicated multicast message and forwarding it through the corresponding forwarding port includes: If the LOCAL setting in the second entry is valid, then the multicast route is found, the new BitString is encapsulated into the replicated multicast message, and forwarded based on the found multicast route. If the second entry LOCAL is set to invalid, the new BitString is encapsulated into a replicated multicast message and forwarded through the corresponding forwarding port.
[0012] In some possible embodiments, encapsulating the new BitString into a replicated multicast message and forwarding it through the corresponding forwarding port includes: If the EN in the second entry is valid, encapsulate the new BitString in the second entry into a multicast message and forward it from the corresponding forwarding port; If the EN in the second entry is invalid, the new BitString in the second entry is encapsulated in the multicast packet, then encapsulated with an IPv6 header, and forwarded from the corresponding forwarding port.
[0013] In some possible embodiments, the method further includes: After the aging time is reached, the message information is sent to the central processing unit (CPU), and the CPU is instructed to perform aging processing on the corresponding forwarding table entries through the OPT in the message information. When the CPU determines that the aging conditions are met, it deletes the corresponding forwarding table entries based on the BitString and Bift-id in the message information. The aging conditions include OPT indicating aging of the corresponding forwarding table entries, or the HOP LIMIT value indicating that the number of router hops through which a BIERV6 multicast message is forwarded is greater than a set high threshold.
[0014] In some possible embodiments, uploading the message information to the central processing unit (CPU) includes: The message information of different multicast messages is placed into the scheduling queue, and the CPU obtains the message information based on the scheduling queue; After the message information of any multicast message is sent to the CPU, if the corresponding forwarding table entry is not learned after a set interval, the message information of the multicast message mentioned last time is sent again.
[0015] Secondly, embodiments of this application provide a BIERv6 multicast message forwarding device, including a forwarding chip and a CPU, wherein: The forwarding chip receives multicast packets and, when determining to perform BIERv6 forwarding, parses the bit string (BitString) and the bit index forwarding table identifier (Bift-id) in the multicast packet; uses the BitString and Bift-id as a key to look up a forwarding table entry; if a matching forwarding table entry exists, the multicast packet is forwarded according to the matching entry; if no matching forwarding table entry exists, the packet information, including the BitString and Bift-id, is sent to the central processing unit (CPU); the forwarding table entry obtained by the CPU based on the packet information and by learning from the local Bit Index Forwarding Table (BIFT) is received.
[0016] The CPU is used to learn forwarding table entries based on the message information and the local Bit Index Forwarding Table (BIFT), and then send the forwarding table entries to the forwarding chip.
[0017] The BIERv6 multicast message forwarding method and device provided in this application have the following beneficial effects: 1) The problem of the chip not supporting BIERv6 hardware calculation and processing has been solved. It is only necessary to send the message information and process the bit string AND logic through software to support BIERv6 function. Since the forwarding process of BIERv6 requires copying multiple BIERv6 multicast packets for forwarding calculations, the hardware processing capability of BIERv6 needs to support the ability to copy a single BIERv6 multicast packet multiple times, while also having the ability to process and calculate in parallel. This is not supported by most forwarding chips, especially ASIC forwarding chips. Therefore, this application effectively solves this problem.
[0018] 2) The AND logic of BitString requires too many chip resources such as instructions and table entries. By learning BitString through software, performing AND logic and issuing forwarding table entries, chip resources can be saved, forwarding efficiency can be improved, forwarding latency can be reduced, and the requirements of services for network bandwidth, latency, performance, security and other aspects can be met.
[0019] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0020] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a schematic diagram of the network structure of IPv6 networks in related technologies; Figure 2 A flowchart illustrating the process of forwarding BIERv6 multicast messages in related technologies; Figure 3 A schematic diagram of the BIERv6 multicast message forwarding method provided in this application embodiment; Figure 4 A schematic diagram of the BIERv6 header format for a BIERv6 multicast message; Figure 5 A structural diagram of a BIERv6 multicast message forwarding device provided in this application embodiment; Figure 6 This is an overall flowchart of the forwarding chip performing multicast message forwarding and the software learning module performing forwarding table entry learning in this embodiment of the application. Detailed Implementation
[0022] To further illustrate the technical solutions provided in the embodiments of this application, a detailed description is provided below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiments of this application provide method operation steps as shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on conventional or non-inventive effort. For steps that do not logically have a necessary causal relationship, the execution order of these steps is not limited to the execution order provided in the embodiments of this application. In actual processing or when the control device executes the method, it may be executed sequentially or in parallel according to the method shown in the embodiments or drawings.
[0023] With the continuous development of the Internet, the amount of data, voice, and video information exchanged on the network is increasing, and emerging services such as e-commerce, online conferencing, online auctions, video-on-demand, and distance learning are also gradually emerging. Most of these services conform to a point-to-multipoint model, which places high demands on information security, payment, and network bandwidth.
[0024] BIERv6 (Bit Index Explicit Replication IPv6 encapsulation) is a multicast scheme in IPv6 networks that encapsulates the set of destination nodes of multicast packets as a bit string in the packet header. This eliminates the need for intermediate network nodes to build multicast distribution trees and maintain stream states for each multicast stream; they only need to replicate and forward the packets based on the bit string in the packet header. This scheme reduces resource consumption and can support large-scale multicast services. The specific network structure of an IPv6 network is as follows: Figure 1 As shown.
[0025] In related technologies, the forwarding chip performs bit string AND logic through hardware, which requires ANDing each FBM in the BIFT table. In large-scale, complex BIERv6 networks at the carrier level, there are many corresponding edge nodes, which may result in tens of thousands of FBM mask entries. In ordinary enterprise-level BIERv6 networks, there may also be thousands of FBM mask entries.
[0026] Assume the FBM mask table has 10,000 entries, as shown in Table 1.
[0027] Table 1
[0028] The BitString will be ANDed with 10,000 FBM table entries, requiring 10,000 AND instructions and storing all 10,000 results in each entry. However, when the forwarding chip does not support parallel forwarding, each AND operation can only store the BitString and the FBM table result once. After the calculation, the new BitString needs to be forwarded, and then looped through the chip's loop to the pipeline for the next FBM table AND operation. This causes the packet to loop back and forth within the chip 10,000 times, reducing the chip's forwarding bandwidth to one ten-thousandth. The specific process is as follows... Figure 2 As shown, the main steps include: obtaining BitString1111…1011; setting the value n of the intermediate forwarding node identifier BFR-ID; starting from n=1, performing a bitwise AND operation between BitString and the nth BFM entry; determining whether the newly generated BitString is equal to 0; if it is not equal to 0, then continue performing the bitwise AND operation after n+1; if the newly generated BitString is equal to 0, then end the operation.
[0029] In view of the above-mentioned technical problems existing in related technologies, the embodiments of this application provide a BIERv6 multicast message forwarding method, apparatus and device, which can learn the BIERv6 BitString through software, perform AND operation between the BitString and the BIFT table through software, and send the learned forwarding table entries to the forwarding chip, thereby reducing the computational complexity of the chip, saving chip resources, improving forwarding efficiency and reducing forwarding latency.
[0030] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings.
[0031] The BIERv6 multicast message forwarding method in the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0032] See Figure 3 The BIERv6 multicast packet forwarding method provided in this application embodiment is applied to a BIERv6 multicast packet forwarding device and mainly includes: Step 301: Receive multicast message, determine when to perform BIERv6 forwarding, and parse the bit string BitString and bit index forwarding table identifier Bift-id in the multicast message; The multicast message mentioned above is a BIERv6 multicast message. When the forwarding chip receives the multicast message, it parses the multicast message and determines whether to execute the BIERv6 forwarding process based on the destination address of the message. The specific process is as follows: If the DIP (Destination IP) in the BIERv6 header of the multicast message is matched, and End.Bier Sid is matched, it means that BIERv6 forwarding is required at this node, and the BIERv6 forwarding process is entered. If End.Bier Sid is not matched, the normal IPv6 routing forwarding is entered.
[0033] Step 302: Use BitString and Bift-id as keys to look up forwarding entries. If a matching forwarding entry is found, forward the multicast message according to the matching forwarding entry. In the BIERv6 forwarding process, the BitString and Bift-id fields in the Destination Options Header (DOH) of the IPv6 protocol extension header of the multicast packet are first parsed, such as... Figure 4 The diagram shows the format of the BIERv6 header, including the definition of the DOH header. The parsed BitString and Bift-id are used as keys to look up forwarding table entries.
[0034] Step 303: If no matching forwarding table entry is found, the message information is sent to the central processing unit (CPU). The message information includes the BitString and Bift-id mentioned above. When parsing the DOH, the parsed BitString and Bift-id are used as keys to look up forwarding table entries. When a forwarding table entry cannot be found, the forwarding chip will send message information, and the BitString and Bift-id will be sent to the CPU for software learning.
[0035] Step 304: The receiving CPU learns the forwarding table entries based on the message information and the local Bit Index Forwarding Table (BIFT). When the same multicast message comes in again, since the forwarding table entries have been learned, the relevant forwarding table entries can be matched, and the forwarding process can be directly initiated. The forwarding table entries include the number of copies of the message, the new BitString corresponding to each message, and the forwarding port. Based on the number of copies, multiple multicast messages are directly copied, and then the multicast messages are forwarded according to the new BitString and the forwarding exit information.
[0036] The structure of the BIERv6 multicast message forwarding device in this application embodiment is as follows: Figure 5 As shown, it mainly includes a forwarding chip and a CPU, where the CPU can be understood as a software learning module. The forwarding chip sends packet information to the software learning module via an uploading module. The forwarding chip receives multicast packets and, when determining to perform BIERv6 forwarding, parses the bit string (BitString) and the bit index forwarding table identifier (Bift-id) in the multicast packet; uses the BitString and Bift-id as a key to look up a forwarding table entry; if a matching forwarding table entry exists, the multicast packet is forwarded according to the matching entry; if no matching forwarding table entry exists, the packet information, including the BitString and Bift-id, is sent to the central processing unit (CPU); the forwarding table entry obtained by the CPU based on the packet information and by learning from the local Bit Index Forwarding Table (BIFT) is received.
[0037] The CPU is used to learn forwarding table entries based on the message information and the local Bit Index Forwarding Table (BIFT), and then send the forwarding table entries to the forwarding chip.
[0038] In some possible embodiments, the forwarding entries in this application are stored in two tables: one table is the BIER_ONE table where the first entry is located, and the other table is the BIER_TWO table where the second entry is located. The CPU learns based on the packet information and the local bit index forwarding table BIFT, including: writing the BitString and Bift-id as entry indexes into the first entry of the BIER_ONE table; performing a bitwise AND operation between the BitString and the forward mask FBM in the BIFT to obtain the packet replication number NUM and the new BitString and forwarding port PORT corresponding to each packet, and generating the second entry identifier INDEX. Note that the packet replication number NUM here is the total number of copies. Write the second entry identifier INDEX and the number of message replicas NUM as the entry content to the first entry of the BIER_ONE table. Write the second entry identifier INDEX and the sequence number of message replicas NUM as the index to the second entry of the BIER_TWO table. Write the new BitString and forwarding port PORT corresponding to each message as the entry content to the second entry of the BIER_TWO table. Note that the sequence number of message replicas NUM here represents which replica message. The first and second table entries are sent as forwarding table entries, so that multicast message forwarding can be achieved by querying the BIER_ONE and BIER_TWO tables.
[0039] The embodiment of this application designs two tables, mainly because the maximum value of a typical chip forwarding table entry is 320 bits, so it cannot store two BitStrings with a maximum value of 256 bits.
[0040] When the forwarding table entry includes the first and second table entries mentioned above, use BitString and Bift-id as the key to look up the forwarding table entry, including: Use the BitString and Bift-id as the key to search for the first entry in the BIER_ONE table. If a matching entry exists, retrieve the second entry identifier INDEX and the number of message replicas NUM from the matching entry. Use the retrieved second entry identifier INDEX and the number of message replicas NUM as an index to search for the second entry in the BIER_TWO table. If a matching entry exists, retrieve the new BitString and forwarding port PORT for each message from the matching entry. Encapsulate the new BitString into the replicated multicast message and forward it through the corresponding forwarding port PORT.
[0041] This embodiment of the application saves 10,000 AND instructions by uploading BitString and Bift-id via unknown multicast learning and placing the AND operation with FBM in the software learning module. Compared with Table 1, this saves 10,000 AND instructions. At the same time, by calculating the number of copy packets and the new BitString in the software, the packets are copied in advance in the uplink, avoiding the problem that the chip forwarding bandwidth drops to one ten-thousandth due to the 10,000 loops of BIERv6 multicast packets in the internal loop.
[0042] In some possible embodiments, the first entry of the BIER_ONE table also includes VALID, which defaults to invalid. After the AND operation is completed, the valid bit VALID of the first entry is set to valid. This allows the value of VALID to determine whether the forwarding entry learning is complete. During multicast packet forwarding, if the VALID in the first entry is found to be valid, the second entry identifier INDEX and the number of packet replications NUM are retrieved from the first entry.
[0043] In this embodiment, the index of the first entry includes a Bift-id, which includes SI (Forwarding Domain Identifier, SetId), Sub-Domain Identifier SD (Sub-Domain ID), and BSL (BitString Length). Furthermore, the index of the first entry also includes a BitString and an intermediate forwarding node identifier BFR-ID. During the forwarding entry learning process, the BitString and the intermediate forwarding node identifier BFR-ID are written into the index of the first entry.
[0044] In some possible embodiments, the second entry of the BIER_TWO table also includes the local identifier LOCAL. During the forwarding entry learning process, if it is determined that a multicast packet needs to be forwarded from this node via IP multicast, the LOCAL in the second entry is set to valid; otherwise, it is set to invalid. During multicast packet forwarding, if the LOCAL in the matched second entry is set to valid, the multicast route is searched, the new BitString is encapsulated in the replicated multicast packet, and forwarding is performed based on the searched multicast route. If the LOCAL in the matched second entry is set to invalid, the new BitString is encapsulated in the replicated multicast packet, and forwarding is performed through the corresponding forwarding port.
[0045] When traversing non-BIERv6 scenarios, there may be devices that do not support BIERv6 forwarding. When a device that does not support BIERv6 forwarding receives a BIERv6 multicast message, it may fail to parse the message, resulting in a large number of messages being sent to the CPU or the message being dropped, causing service interruption.
[0046] In some possible embodiments, the second entry of the BIER_TWO table also includes enabling EN. During the forwarding table entry learning process, if it is determined that the next-hop device does not support BIERv6 forwarding, the enabled EN in the second entry is set to invalid; otherwise, it is set to valid. During multicast packet forwarding, if the EN in the matched second entry is valid, the new BitString from the matched second entry is encapsulated in the multicast packet and forwarded from the corresponding forwarding port; if the EN in the matched second entry is invalid, the new BitString from the matched second entry is encapsulated in the multicast packet, then encapsulated with an IPv6 header before being forwarded from the corresponding forwarding port.
[0047] In some possible embodiments, the above message information may further include at least one of the following: The HOP LIMIT value indicates the number of router hops a BIERV6 multicast packet passes through for forwarding. The initial value of HOP LIMIT is set to the maximum by default, and it gradually decreases as the number of packet forwardings increases.
[0048] If the HOP LIMIT value is within the set range, the packet information will be sent to the CPU first. If it is within the set range, it means that the BIERV6 multicast packet is normal and the number of router hops it has passed through is large, so it needs to be reported for learning first.
[0049] In some possible implementations, uploading the message information to the CPU can also trigger the forwarding table entry aging process, entering the BitString software aging process. Specifically, the aging can be performed in the following ways: 1) After the aging time is reached, the forwarding plane sends the message information to the central processing unit (CPU). The CPU is instructed to age the corresponding forwarding table entries by using the OPT value in the message information. For example, an OPT value of 1 can be used to indicate forwarding table entry learning, and an OPT value of 2 can be used to indicate forwarding table entry aging. After receiving the message information, the software learning module finds that OPT equals 2, indicating that the corresponding forwarding table entry needs to be aged. The format of the message information is shown in Table 2. Table 2
[0050] 2) When the CPU determines that the aging conditions are met, it deletes the corresponding forwarding table entries based on the BitString and Bift-id in the message information. The aging conditions include the OPT instruction to age the corresponding forwarding table entries, or the number of router hops through which the BIERV6 multicast message is forwarded, as indicated by the HOP LIMIT value, is greater than the set high threshold.
[0051] The HOP LIMIT field decreases as the number of router hops a BIERV6 multicast packet passes through increases. If the aging time has not been reached, but the HOP LIMIT field of a BIERV6 multicast packet is less than 64, it indicates that the number of router hops a BIERV6 multicast packet has passed through is too high and may be abnormal. In this case, aging should be triggered and the corresponding forwarding table entry should be aged.
[0052] The specific method for aging the software learning module corresponding to the forwarding table entries is as follows: delete the information in the BIER_ONE and BIER_TWO tables based on the BitString and Bift-id in the message information. In this way, when the new BitString queries the BIER_ONE table, it will not be found in the table and will be sent for relearning.
[0053] When a BIERv6 multicast packet fails to find a match in the BIER_ONE table, it enters the forwarding table entry software learning process. The packet is sent to the software learning module via the CPU. Because multicast traffic is relatively large, it can affect the bandwidth of control packets. Therefore, rate limiting is applied to the sent packet information. Specifically, rate limiting can be implemented using any of the following methods: 1) Rate-limited upload: The message information of different multicast messages is put into the scheduling queue, and the CPU obtains the message information based on the scheduling queue; 2) Delayed upload: After the message information of any multicast message is uploaded to the CPU, if the corresponding forwarding table entry is not learned after a set interval, the message information of the multicast message is uploaded again. For example, it can be uploaded once every 100ms, which can effectively solve the problem of sudden unknown multicast uploads.
[0054] The following describes the implementation method for the forwarding chip to perform multicast packet forwarding and the software learning module to perform forwarding table entry learning. The overall process is as follows: Figure 6 As shown, the details are as follows: Step 1: Receive BIERv6 multicast messages; Step 2: Parse the BIERv6 multicast packet and decapsulate the IPv6 header; Step 3: Determine the route based on the DIP (Destination IP) in the IPv6 header; Step 4: Determine if End.Bier Sid is matched. If End.Bier Sid is matched, it means that BIERv6 forwarding needs to be performed on this node. Then proceed to Step 5 to execute the BIERv6 forwarding process. If End.Bier Sid is not matched, proceed to normal IPv6 routing forwarding. Step 5: In the BIERv6 forwarding process, first parse the BitString field and Bift-id field in the Destination Options Header (DOH) of the IPv6 protocol extension header; Step 6: Use the parsed BitString and Bift-id as the key to look up the BIER_ONE table. The format of the BIER_ONE table is shown in Table 3. The key values of the table entries are BitString, SI, SD, and BSL, and the data part is INDEX, NUM, and VALID. When parsing the BIERv6 multicast header, the key of the BIER_ONE table will be parsed out, and then the BIER_ONE table will be looked up. Step 7: Determine whether the BIER_ONE table is matched. If the BIER_ONE table is matched, proceed to step 8; otherwise, proceed to step 15. Step 8: If the VALID value in the matched BIER_ONE table is 1, it means that the BitString learning is complete, then obtain INDEX and NUM.
[0055] Table 3
[0056] Step 9: Continue to look up the BIER_TWO table based on INDEX and NUM to obtain the new BitString and the corresponding forwarding port PORT. The format of the BIER_TWO table is shown in Table 4. The key values are INDEX and NUM, which are obtained from the BIER_ONE table. The Date part is the new BitString that needs to be forwarded after performing a bitwise AND operation and the corresponding forwarding port PORT.
[0057] Table 4
[0058] Step 10: Determine whether the LOCAL value in the BIER_TWO table is set. If the LOCAL value is set, proceed to step 11; otherwise, proceed to step 12. Step 11: When LOCAL is set, it means that BIERv6 multicast packets need to be forwarded from this node based on IP multicast. The new BitString in the BIER_TWO table will be encapsulated in the multicast packet, and the multicast route will be found and forwarded by looking up the SIP (source IP) and GIP (multicast destination IP) of the user packet. Step 12: When the LOCAL bit of the BIER_TWO table is not set, it means that it needs to be forwarded through BIERv6. The new BitString in the BIER_TWO table will be encapsulated in the multicast message and forwarded from the corresponding PORT. Before forwarding, it is first determined whether the EN bit of the BIER_TWO table is set to 1. If the EN bit is set to 1, step 13 is executed; otherwise, step 14 is executed. Step 13: When EN in the BIER_TWO table is set to 1, it means that the next-hop device forwarded through the PORT supports BIERv6 forwarding. Then, the new BitString in the BIER_TWO table is encapsulated into the packet to obtain a new BIERv6 multicast packet and forwarded from the corresponding PORT. Step 14: When EN in the BIER_TWO table is set to 0, it indicates that the next-hop device forwarded through the PORT does not support BIERv6 forwarding. The new BitString in the BIER_TWO table is encapsulated into the packet to obtain a new BIERv6 multicast packet. After encapsulating the new BIERv6 multicast packet with an IPv6 header, it is forwarded from the corresponding PORT.
[0059] Step 15: When the BIER_ONE table cannot be matched, the message information will be sent by the forwarding chip. The BitString and Bift-id will be sent to the CPU for software learning. The format of the message information is shown in Table 5. The OPT field indicates whether the multicast message is sent for learning or aging. When OPT is set to 1, it means that learning is required and the learning process begins.
[0060] Table 5
[0061] Step 16: When sending the message information to the CPU for software learning, the HOPLIMIT field in the BIERv6 multicast message will be written into the message information. If the HOPLIMIT is low, for example, less than 128 but greater than 64, it means that the unknown multicast message has been forwarded multiple times in the network and needs to be sent first.
[0062] Step 17: After the unknown multicast message is sent, the software learning module is entered. The BitString and the FBM sent in the BIFT table issued by the control plane are ANDed. The format of the BIFT table entry is shown in Table 6. The control plane will generate the BIFT table entry based on the routing and BFR-ID information, and then send it to the forwarding plane.
[0063] Table 6
[0064] In the software learning module, based on the sent message information, BIER_ONE will be sent first, and BitString, SI, SD, and BSL will be sent to the BIER_ONE table. Then, AND operations will be performed with the FBM table in the BIFT table according to the least significant bit of BitString. Step 18: After performing a bitwise AND operation, obtain the new BitString and the number of packet replicas (NUM) to be forwarded, determine the corresponding forwarding port (PORT), generate the INDEX for BIER_TWO, write NUM and INDEX to the BIER_ONE table, and set VALID to 1. If the original packet's BitString is 1101, then the generated BIER_ONE is shown in Table 7: Table 7
[0065] Step 19: The new BitString, NUM, and corresponding PORT obtained by the AND operation are written to the BIER_TWO table. The KEY of BIER_TWO is the INDEX and NUM in BIER_ONE, and NUM is the serial number of the copy number. The number of entries in the corresponding BIER_TWO table is shown in Table 8. Table 8
[0066] Step 20: If the control protocol determines that a BIERv6 multicast message needs to be forwarded from this node via IP multicast, set LOCAL to 1; otherwise, set it to 0. Step 21: The control plane obtains the BIERv6 forwarding capability of the next-hop device through the control protocol. If the next-hop device does not support BIERv6 forwarding, the EN field in the BIER_TWO table is set to 0; otherwise, the EN field in the BIER_TWO table is set to 1. Step 22: Send the BIER_ONE table and BIER_TWO table to the forwarding chip.
[0067] This application's embodiments solve the problem that forwarding chips do not support BIERv6 hardware calculation and processing. By simply sending packet information and processing the bitstring AND logic through software, BIERv6 functionality can be supported. Bitstring AND logic consumes too many chip resources such as instructions and table entries. By learning the bitstring through software, performing the AND logic, and sending forwarding table entries, chip resources can be saved, forwarding efficiency can be improved, forwarding latency can be reduced, and the requirements of services for network bandwidth, latency, performance, and security can be met.
[0068] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0069] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A BIERv6 multicast message forwarding method, characterized in that, The method includes: When receiving a multicast message and determining to perform BIERv6 forwarding, parse the bit string BitString and the bit index forwarding table identifier Bift-id in the multicast message; Use the BitString and Bift-id as keys to look up forwarding entries. If a matching forwarding entry is found, forward the multicast message according to the matching forwarding entry. If no matching forwarding table entry is found, the message information is sent to the central processing unit (CPU), and the message information includes the BitString and Bift-id. The CPU receives forwarding table entries obtained by learning the message information and combining it with the local Bit Index Forwarding Table (BIFT).
2. The method according to claim 1, characterized in that, The CPU learns from the message information and its local Bit Index Forwarding Table (BIFT), including: Write the BitString and Bift-id as table entry indexes into the first table entry; Perform a bitwise AND operation between the BitString and the forward mask FBM in BIFT to obtain the number of packet copies, the new BitString corresponding to each packet, and the forwarding port, and generate a second entry identifier; Write the second entry identifier and the number of message copies as the entry content into the first entry; write the second entry identifier and the sequence number of message copies as the index into the second entry; and write the new BitString and forwarding port corresponding to each message as the entry content into the second entry. The first and second entries will be forwarded as forwarding entries.
3. The method according to claim 2, characterized in that, It also includes at least one of the following steps: After completing the AND operation, set the valid bit VALID of the first entry to valid; Write the BitString and the intermediate forwarding node identifier (BFR-ID) corresponding to each message into the index of the first table entry; When it is determined that the multicast message needs to be forwarded from this node via IP multicast, the local identifier LOCAL in the second entry is set to valid; otherwise, it is set to invalid. If it is determined that the next-hop device does not support BIERv6 forwarding, set the enable EN in the second entry to invalid; otherwise, set it to valid.
4. The method according to claim 1 or 2, characterized in that, The message information also includes at least one of the following: The Information Processing Instruction (OPT) is used to instruct message information to be used for learning or aging of forwarding table entries. The hot limit (HOP LIMIT) value indicates the number of router hops a BIERV6 multicast packet passes through for forwarding. If the HOP LIMIT value is within the set range, the message information will be sent to the CPU first.
5. The method according to claim 2 or 3, characterized in that, The step of using the BitString and Bift-id as key values to look up forwarding entries includes: Use the BitString and Bitft-id as the key to look up the first table entry; If a first entry is found, obtain the second entry identifier and the number of message copies from the first entry. Use the obtained second entry identifier and message copy number as an index to look up the second entry; If a matching second entry exists, retrieve the new BitString and forwarding port corresponding to each packet from the matching second entry; The new BitString is encapsulated into a replicated multicast message and forwarded through the corresponding forwarding port.
6. The method according to claim 5, characterized in that, The step of obtaining the second entry identifier and the number of message copies from the first matched entry includes: If the VALID setting in the first matched entry is valid, obtain the second entry identifier and the number of message copies from the first matched entry.
7. The method according to claim 5, characterized in that, The step of encapsulating the new BitString into a replicated multicast message and forwarding it through the corresponding forwarding port includes: If the LOCAL setting in the second entry is valid, then the multicast route is found, the new BitString is encapsulated into the replicated multicast message, and forwarded based on the found multicast route. If the second entry LOCAL is set to invalid, the new BitString is encapsulated into a replicated multicast message and forwarded through the corresponding forwarding port.
8. The method according to claim 5, characterized in that, The step of encapsulating the new BitString into a replicated multicast message and forwarding it through the corresponding forwarding port includes: If the EN in the second entry is valid, encapsulate the new BitString in the second entry into a multicast message and forward it from the corresponding forwarding port; If the EN in the second entry is invalid, the new BitString in the second entry is encapsulated in the multicast packet, then encapsulated with an IPv6 header, and forwarded from the corresponding forwarding port.
9. The method according to claim 4, characterized in that, Also includes: After the aging time is reached, the message information is sent to the central processing unit (CPU), and the CPU is instructed to perform aging processing on the corresponding forwarding table entries through the OPT in the message information. When the CPU determines that the aging conditions are met, it deletes the corresponding forwarding table entries based on the BitString and Bift-id in the message information. The aging conditions include OPT indicating aging of the corresponding forwarding table entries, or the HOP LIMIT value indicating that the number of router hops through which a BIERV6 multicast message is forwarded is greater than a set high threshold.
10. The method according to claim 1, characterized in that, The step of uploading the message information to the central processing unit (CPU) includes: The message information of different multicast messages is placed into the scheduling queue, and the CPU obtains the message information based on the scheduling queue; After the message information of any multicast message is sent to the CPU, if the corresponding forwarding table entry is not learned after a set interval, the message information of the multicast message mentioned last time is sent again.
11. A BIERv6 multicast message forwarding device, characterized in that, Including the forwarding chip and CPU, among which: The forwarding chip receives multicast packets and, when determining to perform BIERv6 forwarding, parses the bit string (BitString) and the bit index forwarding table identifier (Bift-id) in the multicast packet; uses the BitString and Bift-id as a key to look up a forwarding table entry; if a matching forwarding table entry exists, the multicast packet is forwarded according to the matching entry; if no matching forwarding table entry exists, the packet information, including the BitString and Bift-id, is sent to the central processing unit (CPU); the forwarding table entry obtained by the CPU based on the packet information and by learning from the local Bit Index Forwarding Table (BIFT) is received. The CPU is used to learn forwarding table entries based on the message information and the local Bit Index Forwarding Table (BIFT), and then send the forwarding table entries to the forwarding chip.