BIERv6 message processing method, device, equipment and storage medium

By determining and editing the processing flow based on the extended header type of the IPv6 header, the problem of existing equipment being unable to support BIERv6 messages is solved, and the combination of the BIER protocol and Native IPv6 messages is realized, which reduces hardware costs and resource utilization and shortens the R&D cycle.

CN119094635BActive Publication Date: 2025-09-30FIBERHOME TELECOMMUNICATION TECHNOLOGIES CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411250805.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-06
Publication Date
2025-09-30
Estimated Expiration
2044-09-06

AI Technical Summary

Technical Problem

Existing equipment cannot effectively support the editing of BIERv6 messages, resulting in increased hardware costs, high resource utilization, and extended R&D cycles.

Method used

By determining the processing flow based on the extended header type of the IPv6 header and editing the IPv6 message using a preset strategy, the BIER protocol and the Native IPv6 message are combined, avoiding the configuration of registers in the business board and the investment in new hardware equipment.

Benefits of technology

It achieves seamless forwarding of BIER protocol and Native IPv6 messages, reduces hardware costs and resource utilization, and shortens the R&D cycle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094635B_ABST
    Figure CN119094635B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment and storage medium for processing BIERv6 messages. The method includes: determining the processing flow of IPv6 messages based on the extension header type of the IPv6 header; if it is a first-station business processing flow, editing the IPv6 message with the extension header of SRv6 based on a first preset strategy to obtain a BIERv6 message; if it is an intermediate station business processing flow, editing the IPv6 message with the extension header of BIERv6 based on a second preset strategy to obtain a BIERv6 message; if it is a last-station business processing flow, editing the IPv6 message with the extension header of BIERv6 based on a third preset strategy to obtain an IPv6 message. The present invention solves the technical problem in the prior art that in order to enable existing equipment to support the editing of BIERv6 messages, which leads to increased hardware costs, resource utilization and the research and development cycle of BIERv6.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a method, device, equipment and storage medium for processing BIERv6 messages. Background Art

[0002] BIERv6 (Bit Index Explicit Replication IPv6 encapsulation) is a highly efficient and new multicast message forwarding method. BIERv6 combines the BIER protocol with native IPv6 message forwarding, enabling seamless integration into SRv6 (Segment Routing over IPv6) networks. This simplifies the complexity of the multicast protocol and enables efficient forwarding of service multicast messages. However, existing device forwarding chips do not support BIERv6 message editing, making it impossible to combine the BIER (Bit Index Explicit Replication) protocol with native IPv6 message forwarding.

[0003] In related technologies, the editing of BIERv6 messages is supported by investing in a whole set of new hardware equipment, or configuring registers in the business board and then inserting the business board into the existing equipment, thereby realizing the combination of BIER protocol and Native IPv6 message forwarding.

[0004] However, investing in a whole new set of hardware equipment requires reselecting forwarding chips and rebuilding the hardware, which will increase the R&D cycle and hardware cost of BIERv6; configuring registers in the business board will increase the resource utilization of the business board. Summary of the Invention

[0005] The present invention provides a BIERv6 message processing method, device, equipment and storage medium, which can solve the technical problems existing in the prior art in that in order to enable existing equipment to support the editing of BIERv6 messages, the hardware cost, resource utilization rate and BIERv6 R&D cycle are increased.

[0006] To achieve the above object, the present invention provides the following technical solutions:

[0007] In a first aspect, an embodiment of the present invention provides a method for processing a BIERv6 message, the method comprising:

[0008] When receiving an IPv6 message sent by the main control disk, determining a processing flow of the IPv6 message based on an extension header type of the IPv6 header;

[0009] If the processing flow is the first-station business processing flow, the IPv6 message with the SRv6 extension header is edited based on the first preset strategy to obtain a BIERv6 message;

[0010] If the processing flow is a transit business processing flow, then based on the configuration table corresponding to the IPv6 message with the extension header of BIERv6, it is determined that the transit business processing flow is an intermediate station business processing flow or a tail station business processing flow;

[0011] If it is an intermediate station business processing process, the IPv6 message with the extension header of BIERv6 is edited based on the second preset strategy to obtain a BIERv6 message;

[0012] If it is the tail station business processing process, the IPv6 message with the extension header of BIERv6 is edited based on the third preset strategy to obtain the IPv6 message.

[0013] In a second aspect, an embodiment of the present invention provides a BIERv6 message processing device, the device comprising:

[0014] An information determination module is configured to determine, when receiving an IPv6 message sent by the main control disk, a processing flow of the IPv6 message based on an extension header type of the IPv6 header;

[0015] A message editing module is configured to edit the IPv6 message with an SRv6 extension header based on a first preset strategy to obtain a BIERv6 message if the processing flow is a first-stop service processing flow;

[0016] An information determination module is configured to determine, if the processing flow is a transit business processing flow, whether the transit business processing flow is an intermediate station business processing flow or a tail station business processing flow based on a configuration table corresponding to the IPv6 message whose extension header is BIERv6;

[0017] The message editing module is configured to edit the IPv6 message with the extension header of BIERv6 based on the second preset strategy to obtain a BIERv6 message if it is an intermediate station business processing process;

[0018] The message editing module is configured to edit the IPv6 message with the extension header of BIERv6 based on the third preset strategy to obtain the IPv6 message if it is a tail station business processing process.

[0019] In the third aspect, an embodiment of the present invention also provides an electronic device, comprising: a memory and a processor; the processor is used to read and execute a computer program stored in the memory to implement the aforementioned method for processing a BIERv6 message.

[0020] In a fourth aspect, an embodiment of the present invention further provides a computer storage medium, in which computer executable instructions are stored, and when the computer executable instructions are executed, the aforementioned method for processing a BIERv6 message is implemented.

[0021] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include:

[0022] When an IPv6 message is received from the main control disk, the processing flow of the IPv6 message is determined based on the IPv6 header extension header; if the processing flow is the first-station business processing flow, the IPv6 message with the extension header of SRv6 is edited based on the first preset strategy to obtain a BIERv6 message, thereby realizing the combination of the BIER protocol and Native IPv6 message forwarding. There is no need to configure registers in the business board, which solves the problem of high resource utilization of the business board due to the complex configuration of registers in the business board in the prior art;

[0023] If the processing flow is a transit business processing flow, then based on the configuration table corresponding to the IPv6 message with the extension header of BIERv6, it is determined that the transit business processing flow is an intermediate station business processing flow or a tail station business processing flow; if it is an intermediate station business processing flow, then based on the second preset strategy, the IPv6 message with the extension header of BIERv6 is edited to obtain a BIERv6 message; if it is a tail station business processing flow, then based on the third preset strategy, the IPv6 message with the extension header of BIERv6 is edited to obtain an IPv6 message. Without investing in new equipment, the BIER protocol and NativeIPv6 message forwarding can be combined, which solves the technical problem in the prior art that in order to enable existing equipment to support the editing of BIERv6 messages, a whole set of new hardware equipment is invested, resulting in increased hardware costs, resource utilization and BIERv6 R&D cycle. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0025] Figure 1 A flowchart of an embodiment of a method for processing BIERv6 messages according to the present invention;

[0026] Figure 2 This is a diagram of the message format of an IPv6 message with an SRv6 extension header;

[0027] Figure 3a This is a diagram of the message format of an IPv6 message with a BIERv6 extension header;

[0028] Figure 3b This is a schematic diagram of the message format processed by the BIERv6 processing unit at the end station;

[0029] Figure 3c For the tail station master control panel Figure 3b The diagram shows the message format of the message sent from the panel;

[0030] Figure 4 Schematic diagram of each configuration table in the BIERv6 processing unit of the present invention;

[0031] Figure 5 for Figure 1 Detailed flow chart of step S30;

[0032] Figure 6 for Figure 1 Detailed flow chart of step S40;

[0033] Figure 7 for Figure 1 Detailed flow chart of step S50;

[0034] Figure 8 A schematic diagram of the functional modules of an embodiment of a device for processing BIERv6 messages of the present invention;

[0035] Figure 9 The figure is a schematic structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0036] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0037] To make the objectives, technical solutions and advantages of the present invention more clear, embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0038] In a first aspect, an embodiment of the present invention provides a method for processing BIERv6 messages.

[0039] In one embodiment, referring to Figure 1 , Figure 1 Schematic diagram of a process of processing BIERv6 message of the present invention. Figure 1 As shown, the BIERv6 message processing methods include:

[0040] Step S10: When an IPv6 message is received from the main control disk, a processing flow of the IPv6 message is determined based on the extension header type of the IPv6 header;

[0041] In this embodiment, when the BIERv6 processing unit receives an IPv6 message sent by the main control disk, it reads the Next Header field corresponding to the extended header type of the IPv6 header and determines the processing flow of the IPv6 message based on the value of the Next Header field.

[0042] Step S20: If the processing flow is the first-station service processing flow, the IPv6 message with the SRv6 extension header is edited based on the first preset strategy to obtain a BIERv6 message;

[0043] In this embodiment, if the processing flow of the IPv6 message is the first-station business processing flow, the BIERv6 processing unit edits the IPv6 message with the extension header of SRv6 based on the first preset strategy, so that the IPv6 message with the extension header of SRv6 becomes a BIERv6 message, and then sends the BIERv6 message to the main control disk and exits.

[0044] The information required to encapsulate the BIERv6 message header is directly encapsulated in the SID of the IPv6 message with the SRv6 extension header and carried to the BIERv6 processing unit. The BIERv6 processing unit edits the IPv6 message with the SRv6 extension header to obtain the BIERv6 message, thereby realizing the combination of the BIER protocol and Native IPv6 message forwarding. There is no need to configure registers in the business board, which solves the problem of high resource utilization of the business board due to complex register configuration.

[0045] Step S30, if the processing flow is a transit business processing flow, then based on the configuration table corresponding to the IPv6 message with the extension header of BIERv6, determine whether the transit business processing flow is an intermediate station business processing flow or a tail station business processing flow;

[0046] In this embodiment, if the processing flow of the IPv6 message with the extension header of BIERv6 is the transit service processing flow, the configuration table corresponding to the IPv6 message with the extension header of BIERv6 is determined based on the BIFT-ID in the IPv6 message with the extension header of BIERv6. Then, based on the type (2bit) field in the configuration table corresponding to the IPv6 message with the extension header of BIERv6, it is determined whether the processing flow of the IPv6 message with the extension header of BIERv6 is the intermediate station service processing flow or the tail station service processing flow.

[0047] Step S40: If it is an intermediate station business processing process, the IPv6 message with the extension header of BIERv6 is edited based on the second preset strategy to obtain a BIERv6 message;

[0048] In this embodiment, if the processing flow of the IPv6 message with the BIERv6 extension header is the intermediate station service processing flow, the data in the Bitstring field of the IPv6 message with the BIERv6 extension header is replaced with the target F-BM value in the configuration table corresponding to the IPv6 message with the BIERv6 extension header; the DIP data of the IPv6 message with the BIERv6 extension header is replaced with the End.BIER data corresponding to the target F-BM value in the configuration table corresponding to the IPv6 message with the BIERv6 extension header; the MAC and VLAN of the IPv6 message with the BIERv6 extension header are replaced with the MAC and VLAN corresponding to the target F-BM value in the configuration table corresponding to the IPv6 message with the BIERv6 extension header; the TTL field is updated to complete the editing of the IPv6 message with the BIERv6 extension header and obtain the BIERv6 message. The BIERv6 message is then sent to the main control disk forwarding chip, which sends the BIERv6 message out of the exit according to the OUTPORT. The BIER protocol and Native IPv6 message forwarding can be combined without investing in new equipment, which solves the technical problem in the existing technology that in order to enable existing equipment to support the editing of BIERv6 messages, a whole set of new hardware equipment must be invested, resulting in increased hardware costs and the R&D cycle of BIERv6.

[0049] Step S50: If it is the tail station business processing process, the IPv6 message with the extension header of BIERv6 is edited based on the third preset strategy to obtain the IPv6 message.

[0050] In this embodiment, if the processing flow of the IPv6 message with the extension header BIERv6 is the tail station service processing flow, refer to Figure 3b , Figure 3b This is a diagram of the message format processed by the BIERv6 processing unit at the end station. Figure 3b As shown, the DIP of the IPv6 header in the IPv6 message with the BIERv6 extension header is replaced with the source IP of the IPv6 header; the length field of the IPv6 header is updated to complete the editing of the IPv6 message with the BIERv6 extension header, and the IPv6 message is obtained. Figure 3b shown.

[0051] Reference Figure 3c , Figure 3c For the tail station master control panel Figure 3b The following is a schematic diagram of the message format sent from the panel. Figure 3cAs shown, the IPv6 message is sent to the main control disk to obtain the user side multicast message. The main control disk matches End.SRC.DT according to the DIP of the IPv6 header in the user side multicast message, checks the VPN multicast routing exit, and forwards the user side multicast message from the exit. The user side multicast message forwarded from the exit is as follows Figure 3c shown.

[0052] The BIER protocol and Native IPv6 message forwarding can be combined without investing in new equipment, which solves the technical problem in the existing technology that in order to enable existing equipment to support the editing of BIERv6 messages, a whole set of new hardware equipment must be invested, resulting in increased hardware costs, resource utilization and BIERv6 R&D cycle.

[0053] In this embodiment, when an IPv6 message is received from the main control disk, the processing flow of the IPv6 message is determined based on the IPv6 header extension header; if the processing flow is the first-station business processing flow, the IPv6 message with the extension header of SRv6 is edited based on the first preset strategy to obtain a BIERv6 message, thereby realizing the combination of BIER protocol and NativeIPv6 message forwarding, and no register configuration is required in the business board, which solves the problem of high resource utilization of the business board in the prior art due to the complex configuration of registers in the business board; if the processing flow is a transit business If it is a service processing flow, then the configuration table corresponding to the IPv6 message with the extension header of BIERv6 determines whether the transit service processing flow is an intermediate station service processing flow or a tail station service processing flow; if it is an intermediate station service processing flow, then the IPv6 message with the extension header of BIERv6 is edited based on the second preset strategy to obtain a BIERv6 message; if it is a tail station service processing flow, then the IPv6 message with the extension header of BIERv6 is edited based on the third preset strategy to obtain an IPv6 message, which does not require the investment of new equipment to realize the combination of BIER protocol and Native IPv6 message forwarding, thereby solving the technical problem in the prior art that in order to realize that the existing equipment supports the editing of BIERv6 messages, a whole set of new hardware equipment is invested, resulting in increased hardware costs, resource utilization and BIERv6 research and development cycle.

[0054] Optionally, in one embodiment, the IPv6 message is a BIERv6 message.

[0055] In this embodiment, when the main control disk receives the user-side multicast message from the panel port, it queries the multicast routing table according to the user-side multicast message IP. If the next-hop exit of the queried route is a BIERv6 tunnel, it determines that the user-side multicast message needs to be encapsulated as a BIERv6 message. The main control disk receives the BIERv6 configuration of the control plane, obtains the BIFT-ID (20bit) data, BITSRING (256bit) data and OUTPORT data from the configuration, and converts the BIFT-ID (20bit) data, OUTPORT data and BITSRING (256bit) data in the BIERv6 configuration into BIFT-ID (20bit) data, OUTPORT data and BITSRING (256bit) data according to the BIERv6 configuration. Figure 2 The message format shown encapsulates the user-side multicast message to obtain an IPv6 message with an SRv6 extension header, and sends the IPv6 message with an SRv6 extension header to the BIERv6 processing unit. It is easy to imagine that the IPv6 message obtained by encapsulating the user-side multicast message belongs to a BIERv6 message. Figure 2 The IPv6 message with the SRv6 extension header shown is actually a transit message, which is used to pass the information obtained by the main control disk to the BIERv6 processing unit. The messages received by the BIERv6 processing unit are collectively called IPv6 messages.

[0056] Among them, the BIFT-ID (20bit) data, OUTPORT data and BITSRING (256bit) data in the BIERv6 configuration are Figure 2 The specific steps for encapsulating a user-side multicast message in the packet format shown in the figure to obtain an IPv6 message with an SRv6 extension header are as follows:

[0057] Reference Figure 2 , Figure 2 The following is a schematic diagram of the IPv6 message format with an SRv6 extension header according to the present invention: Figure 2As shown, fill the BIFT-ID (20bit) data in the BIERv6 configuration into the BIFTID (20bit) position of the IPv6 message with an SRv6 extension header; fill the OUTPORT data in the BIERv6 configuration into the OUTPORT position of the IPv6 message with an SRv6 extension header; fill the BITSRING (256bit) data in the BIERv6 configuration into the SID1~SID2 (256bitstring) positions of the IPv6 message with an SRv6 extension header, and obtain the IPv6 message with an SRv6 extension header. Among them, SID1~SID2 (256bitstring) are used to carry the necessary information for editing the Bierv6 header and the actual service output port information; OUTPORT represents the actual output port of the message, so that after the BIERv6 disk completes editing the BIERv6 header, it is forwarded from the main control disk according to the OUTPORT, and the main control disk sends it from the corresponding port to the line according to the OUTPORT of the private header.

[0058] Figure 2 In the L2 Header, the destination MAC, source MAC, protocol number, and VLAN are included;

[0059] Version: version;

[0060] Traffic Class: traffic class;

[0061] Flow Label: flow label;

[0062] Payload Length: payload length;

[0063] Next Header: next header;

[0064] Hop Limits: hop limit;

[0065] IPv6 header: Next Header = 43 indicates SRv6 encapsulation; END.SRC.DT: indicates the IPv6 address of the private network forwarding of the message payload; End.Bier is the IPv6 address of the BIERv6 message forwarding, indicating that the traffic is processed by BIERv6; SRH: IPv6 extension header;

[0066] SID0 means End.Bier;

[0067] SID2~SID1: BITSTRING, used to identify the set of destination nodes of the multicast message;

[0068] SID3 includes BIFT-ID, PORT_TYPE, RESERVE, and OUT_PORT, which are explained as follows:

[0069] BIFT-ID: Indicates the ID of the Bit Index Forwarding Table (BIFT). It consists of a 4-bit BSL, an 8-bit Sub-Domain, and an 8-bit Set ID.

[0070] PORT_TYPE: indicates the export type, which is fixed to 0 in this solution;

[0071] RESERVE: reserved field;

[0072] OUT_PORT: actual export port of the business.

[0073] In another embodiment, if the multicast routing table is queried based on the IP of the user-side multicast message, and the next-hop exit of the queried route is not a BIERv6 tunnel, the default behavior is followed.

[0074] When the main control panel receives an IPv6 message from the panel port, it checks whether the IPv6 header DIP of the received IPv6 message belongs to the local End.BIER. If the IPv6 header DIP of the IPv6 message belongs to the local End.BIER, it determines that the IPv6 message belongs to the BIERv6 message of this station, and sends the IPv6 message to the BIERv6 processing unit.

[0075] In another embodiment, if the IPv6 header DIP of the IPv6 message does not belong to the local End.BIER, it is determined that the IPv6 message does not belong to the BIERv6 message of this site, and is processed according to the default behavior.

[0076] Optionally, in one embodiment, the step of determining the processing flow of the IPv6 message based on the extension header type of the IPv6 header includes:

[0077] Read the field corresponding to the extension header type of the IPv6 header;

[0078] If the field is a first preset value, determining that the processing flow of the IPv6 message is a first-station service processing flow;

[0079] If the field is a second preset value, it is determined that the processing flow of the IPv6 message is a transit service processing flow.

[0080] In this embodiment, the field corresponding to the extended header type of the IPv6 header is the Next Header field, and the IPv6 message is composed of an IPv6 standard header + extended headers (0 to n) + a payload. Read the Next Header field of the IPv6 header.

[0081] If Next Header = 0x2B (i.e., the header type value is 43), it indicates SRv6 encapsulation and the extension header is SRH, confirming that the IPv6 packet processing flow is the first-stop service processing flow. The Segment Routing Header (SRH) is a new IPv6 extension header added to the Segment Routing over IPv6 (SRv6) protocol.

[0082] If Next Header = 0x3C, that is, the message header type value is 60, it means that the BIERv6 message header adopts the DOH (Destination Options Header) definition in the IPv6 protocol extension message header, and the processing flow of the IPv6 message is determined to be the transit service processing flow.

[0083] Optionally, in one embodiment, the step of editing the IPv6 message based on the first preset strategy to obtain a BIERv6 message includes:

[0084] Delete the data of SID0 to SID3 and the SRH extension header in the IPv6 message whose extension header is SRv6, and add a BIERv6 extension header between End.Bier and Payload of the IPv6 message whose extension header is SRv6;

[0085] Fill the data of SID1 to SID2 in the IPv6 message with an SRv6 extension header into the BITSTRING of the BIERv6 extension header;

[0086] Fill the first 20 bits of SID3 in the IPv6 message with an SRv6 extension header into the BIFT-ID of the BIERv6 extension header;

[0087] Fill the last 4 bytes of SID3 in the IPv6 message with an SRv6 extension header into the OUTPORT of the private header;

[0088] Update the length field of the IPv6 header to obtain the BIERv6 message.

[0089] In this embodiment, the data of SID1 to SID2 in the IPv6 message with the SRv6 extension header is read, saved as BITSTRING and stored in the cache; the first 20 bits of SID3 in the IPv6 message with the SRv6 extension header is read, saved as BIFT-ID and stored in the cache; the last 4 bytes of SID3 in the IPv6 message with the SRv6 extension header is read, saved as OUTPORT and stored in the cache. Delete the data of SID0 to SID3 and the SRH extension header in the IPv6 message with the SRv6 extension header, and add a BIERv6 extension header between End.Bier and Payload of the IPv6 message with the SRv6 extension header. Referring to Figure 3, Figure 3 is a schematic diagram of the message format of the BIERv6 message of the present invention. The BIERv6 extension header added between End.Bier and Payload of the IPv6 message is as shown in FIG. Figure 3a shown.

[0090] Figure 3a In the figure, the L2 Header includes the destination MAC, source MAC, protocol number, and VLAN. The IPv6 header: Next Header = 43 indicates SRv6 encapsulation. END.SRC.DT: indicates the IPv6 address of the private network forwarding of the message payload. End.Bier is the IPv6 address forwarded by the BIERv6 message, indicating that the traffic is processed by BIERv6. The red part is the BIERv6 extension header, which mainly includes the following fields:

[0091] Next Header: Payload type;

[0092] Ext Header Len: refers to the length of the BIERv6 message header excluding the first 8 bytes (the first 8 bytes are fixed length), in units of 8 bytes;

[0093] Option Type: 0x7A in BIERv6, indicating a BIERv6 Option;

[0094] Option Length: BIERv6 header length in bytes, excluding the Option Type and Option Length fields;

[0095] BIFT-ID: indicates the ID of the Bit Index Forwarding Table (BIFT), which consists of a 4-bit BSL, an 8-bit Sub-Domain, and an 8-bit Set ID.

[0096] BITSTRING: A set of nodes used to identify the destination of a multicast message.

[0097] Then, the BITSTRING stored in the cache, that is, the data of SID1 to SID2 in the IPv6 message with SRv6 extension header, is filled into the BITSTRING of the BIERv6 header; the BIFT-ID stored in the cache, that is, the first 20 bits of SID3 in the IPv6 message with SRv6 extension header, is filled into the BIFT-ID of the BIERv6 header; the OUTPORT stored in the cache, that is, the last 4 bytes of SID3 in the IPv6 message with SRv6 extension header, is filled into the OUTPORT of the private header.

[0098] The specific steps to update the length field of the IPv6 header are as follows:

[0099] Let the original outer IPv6 header payload_lenth = X, the length of the deleted SRH extension header Y = (LE+1)*16+8; the length of the newly added BIERv6 header Z = 8+Hdr Ext Len*8; the length field of the updated IPv6 header X′ = X-Y+Z.

[0100] After updating the length field of the IPv6 header, the BIERv6 processing unit converts the IPv6 message with the SRv6 extension header that it is about to receive into a BIERv6 message.

[0101] Optionally, in one embodiment, referring to Figure 5 , Figure 5 for Figure 1 Detailed flow chart of step S30 in FIG. Figure 5 As shown, the step of determining that the transit service processing flow is an intermediate station service processing flow or a tail station service processing flow based on the configuration table corresponding to the IPv6 message with the extension header being BIERv6 includes:

[0102] Step S301, selecting any F-BM value as a target F-BM value from each row of F-BM values ​​contained in the F-BM column of the configuration table corresponding to the IPv6 message whose extension header is BIERv6;

[0103] Step S302, performing an AND operation on the target F-BM value and the Bitstring field in the IPv6 message whose extension header is BIERv6;

[0104] Step S303: If the result of the operation is one, obtain the type field corresponding to the target F-BM value;

[0105] Step S304: If the type field is a third preset value, determining that the transit service processing flow is an intermediate service processing flow;

[0106] Step S305: If the type field is a fourth preset value, determining that the transit service processing flow is a last-station service processing flow;

[0107] Step S306, detecting whether there is an unselected F-BM value in each row of F-BM values ​​contained in the F-BM column in the configuration table corresponding to the IPv6 message whose extension header is BIERv6;

[0108] Step S307, select any F-BM value from the F-BM values ​​that have not been selected as the target F-BM value, and return to execute the step of performing the AND operation on the target F-BM value and the Bitstring field in the IPv6 message whose extension header is BIERv6, until all F-BM values ​​have been selected.

[0109] In this embodiment, the configuration table corresponding to BIFD-ID-1 to BIFT-ID-n is established by the adaptation application of the BIERv6 processing unit with BIFT-ID as the keyword. The value of n depends on the register space size of the BIERv6 disk. The larger the register space size, the more F-BM tables can be accommodated, that is, the larger the value of n. Figure 4 , Figure 4 Schematic diagram of each configuration table in the BIERv6 processing unit of the present invention. Figure 4 As shown, if the BIFD-ID of the IPv6 message with the BIERv6 extension header is BIFD-ID-1, then based on the correspondence between BIFD-ID and the configuration table, it can be determined that the configuration table corresponding to the IPv6 message with the BIERv6 extension header is the first table.

[0110] From the configuration table corresponding to the IPv6 message with the BIERv6 extension header, that is, the three rows of F-BM values ​​contained in the F-BM column of the first table, select any F-BM value as the target F-BM value.

[0111] If the selected target F-BM value is 0010 (256 bits), perform an AND operation on 0010 (256 bits) and the Bitstring field in the IPv6 message whose extension header is BIERv6. If the result of the AND operation is one, obtain type (2 bits) + Intf2 (outport 4B), that is, the type field of the BFR-NBR-IF column corresponding to 0010 (256 bits), and read the export value.

[0112] If type=0, the processing flow of the IPv6 message with the extension header of BIERv6 is determined to be the intermediate station business processing flow; if type=1, the processing flow of the IPv6 message with the extension header of BIERv6 is determined to be the tail station business processing flow.

[0113] Then, it is detected whether there is an unselected F-BM value in each row of F-BM values ​​contained in the F-BM column in the configuration table corresponding to the IPv6 message with the extension header of BIERv6. If there is an unselected F-BM value, any F-BM value is selected from the unselected F-BM values ​​in the first table, that is, 0100 (256 bits) and 1000 (256 bits) as the target F-BM value, and the execution of steps S301 to S305 is returned until all the F-BM values ​​in the first table have been selected.

[0114] In another embodiment, if the F-BM values ​​in the first table have all been selected and the results of the AND operation with the Bitstring field in the IPv6 message with the BIERv6 extension header are all zero, the received IPv6 message with the BIERv6 extension header will be discarded.

[0115] Optionally, in one embodiment, referring to Figure 6 , Figure 6 for Figure 1 Detailed flow chart of step S40 in FIG. Figure 6 As shown, the step of editing the IPv6 message with the extension header of BIERv6 based on the second preset strategy to obtain the BIERv6 message includes:

[0116] Step S401, replacing the data of the Bitstring field of the IPv6 message whose extension header is BIERv6 with the target F-BM value in the configuration table;

[0117] Step S402, replacing the DIP data of the IPv6 message whose extension header is BIERv6 with the End.BIER data corresponding to the target F-BM value in the configuration table;

[0118] Step S403, replace the MAC and VLAN of the IPv6 message whose extension header is BIERv6 with the MAC and VLAN corresponding to the target F-BM value in the configuration table;

[0119] Step S404, update the TTL field and obtain the BIERv6 message.

[0120] In this embodiment, continue to refer to Figure 4 When it is determined that the processing flow of the IPv6 message with the extension header of BIERv6 is the intermediate station business processing flow, the configuration table corresponding to the IPv6 message with the extension header of BIERv6 is read, that is, the PE2.End.BIER of the NEXTHOP END.BIER column corresponding to the target F-BM value 0010 (256bit) in the first table, and the ARP (MAC+VLAN) of the L2Header column corresponding to the target F-BM value 0010 (256bit).

[0121] Replace the data in the Bitstring field of the IPv6 message with the BIERv6 extension header with the target F-BM value in the configuration table; replace the DIP data in the IPv6 message with the BIERv6 extension header with the End.BIER data corresponding to the target F-BM value in the configuration table; replace the MAC and VLAN in the IPv6 message with the BIERv6 extension header with the MAC and VLAN corresponding to the target F-BM value in the configuration table, and update the TTL field to obtain the BIERv6 message. The specific steps for updating the TTL field are: TTL field after update = TTL field - 1.

[0122] It is easy to understand that if the configuration table corresponding to the IPv6 message with the BIERv6 extension header, that is, the result of the AND operation of the three F-BM values ​​in the first table with the Bitstring field in the IPv6 message with the BIERv6 extension header is all 1, then the target F-BM values ​​include 0010 (256bit), 0100 (256bit) and 1000 (256bit). Then, the values ​​of the NEXTHOP END.BIER column and the L2 Header column corresponding to 0010 (256bit), 0100 (256bit) and 1000 (256bit) are read respectively, and then based on the read values, the IPv6 message with the BIERv6 extension header is edited separately through the second preset strategy, that is, three BIERv6 messages are obtained. Then, they are sent to the main control disk respectively, and the three BIERv6 messages are sent out through the main control disk.

[0123] Optionally, in one embodiment, referring to Figure 7 , Figure 7 for Figure 1 Detailed flow chart of step S50 in FIG. Figure 7 As shown, the step of editing the IPv6 message with the extension header of BIERv6 based on the third preset strategy to obtain the BIERv6 message includes:

[0124] Step S501, delete the BIERv6 extension header of the IPv6 header in the IPv6 message whose extension header is BIERv6;

[0125] Step S502, replacing the DIP of the IPv6 header in the IPv6 message whose extension header is BIERv6 with the source IP of the IPv6 header;

[0126] Step S503, replacing the Next Header field of the IPv6 header based on the Multicast Packet in the IPv6 message whose extension header is BIERv6;

[0127] Step S504: Update the length field of the IPv6 header to obtain an IPv6 message.

[0128] In this embodiment, when it is determined that the processing flow of the IPv6 message with the extension header of BIERv6 is the tail station business processing flow, the BIERv6 processing unit needs to delete the BIERv6 extension header of the IPv6 header in the IPv6 message with the extension header of BIERv6, and then replace the DIP of the IPv6 header with the source IP of the IPv6 header, and replace the Next Header field of the IPv6 header based on the Multicast Packet in the IPv6 message with the extension header of BIERv6. Specifically, Figure 3b As shown, if the Multicast Packet in the IPv6 message with the BIERv6 extension header is IPv4, the Next Header field of the IPv6 header is replaced with IPv4, that is, Next Header = 4; if the Multicast Packet in the IPv6 message with the BIERv6 extension header is IPv6, the Next Header field of the IPv6 header is replaced with IPv6, that is, Next Header = 41.

[0129] Finally, update the length field of the IPv6 header to complete the editing of the IPv6 message with the extension header BIERv6, and obtain the IPv6 message. The obtained IPv6 message is as follows Figure 3b The specific steps for updating the length field of the IPv6 header are as follows: new IPv6 header payload length = original IPv6 header payload length-option length-4.

[0130] In the second aspect, an embodiment of the present invention also provides a BIERv6 message processing device.

[0131] In one embodiment, referring to Figure 8 , Figure 8 Schematic diagram of the functional modules of an embodiment of a BIERv6 message processing device of the present invention. Figure 8 As shown, the BIERv6 message processing device includes:

[0132] The information determination module 10 is configured to, when receiving an IPv6 message sent by the main control disk, determine the processing flow of the IPv6 message based on the extension header type of the IPv6 header;

[0133] The message editing module 20 is configured to edit the IPv6 message with the extension header of SRv6 based on a first preset strategy to obtain a BIERv6 message if the processing flow is a first-stop service processing flow;

[0134] The information determination module 10 is configured to determine whether the transit business processing flow is an intermediate station business processing flow or a tail station business processing flow based on the configuration table corresponding to the IPv6 message with the extension header of BIERv6 if the processing flow is a transit business processing flow;

[0135] The message editing module 20 is configured to edit the IPv6 message with the extension header being BIERv6 based on a second preset strategy to obtain a BIERv6 message if it is an intermediate station business processing process;

[0136] The message editing module 20 is configured to edit the IPv6 message with the extension header of BIERv6 based on the third preset strategy to obtain an IPv6 message if it is a tail station business processing process.

[0137] Optionally, in one embodiment, the IPv6 message is a BIERv6 message.

[0138] Optionally, in one embodiment, the information determination module 10 is configured to:

[0139] Read the field corresponding to the extension header type of the IPv6 header;

[0140] If the field is a first preset value, determining that the processing flow of the IPv6 message is a first-station service processing flow;

[0141] If the field is a second preset value, it is determined that the processing flow of the IPv6 message is a transit service processing flow.

[0142] Optionally, in one embodiment, the message editing module 20 is configured to:

[0143] Delete the data of SID0 to SID3 and the SRH extension header in the IPv6 message whose extension header is SRv6, and add a BIERv6 extension header between End.Bier and Payload of the IPv6 message whose extension header is SRv6;

[0144] Fill the data of SID1 to SID2 in the IPv6 message with an SRv6 extension header into the BITSTRING of the BIERv6 extension header;

[0145] Fill the first 20 bits of SID3 in the IPv6 message with an SRv6 extension header into the BIFT-ID of the BIERv6 extension header;

[0146] Fill the last 4 bytes of SID3 in the IPv6 message with an SRv6 extension header into the OUTPORT of the BIERv6 extension header;

[0147] Update the length field of the IPv6 header to obtain the BIERv6 message.

[0148] Optionally, in one embodiment, the information determination module 10 is configured to:

[0149] Select any F-BM value from each row of F-BM values ​​contained in the F-BM column of the configuration table corresponding to the IPv6 message whose extension header is BIERv6 as the target F-BM value;

[0150] Perform an AND operation on the target F-BM value and the Bitstring field in the IPv6 message whose extension header is BIERv6;

[0151] If the result of the operation is one, then obtain the type field corresponding to the target F-BM value;

[0152] If the type field is a third preset value, it is determined that the transit service processing flow is an intermediate station service processing flow;

[0153] If the type field is a fourth preset value, it is determined that the transit service processing flow is a last-station service processing flow;

[0154] Detect whether there is an unselected F-BM value in each row of F-BM values ​​contained in the F-BM column in the configuration table corresponding to the IPv6 message with the extension header of BIERv6;

[0155] Select any F-BM value from the F-BM values ​​that have not been selected as the target F-BM value, and return to execute the step of performing the AND operation on the target F-BM value and the Bitstring field in the IPv6 message whose extension header is BIERv6, until all F-BM values ​​have been selected.

[0156] Optionally, in one embodiment, the message editing module 20 is configured to:

[0157] Replace the data of the Bitstring field of the IPv6 message whose extension header is BIERv6 with the target F-BM value in the configuration table;

[0158] Replace the DIP data of the IPv6 message whose extension header is BIERv6 with the End.BIER data corresponding to the target F-BM value in the configuration table;

[0159] Replace the MAC and VLAN of the IPv6 message with the BIERv6 extension header with the MAC and VLAN corresponding to the target F-BM value in the configuration table;

[0160] Update the TTL field and obtain the BIERv6 message.

[0161] Optionally, in one embodiment, the message editing module 20 is configured to:

[0162] Delete the BIERv6 extension header of the IPv6 header in the IPv6 message whose extension header is BIERv6;

[0163] Replace the DIP of the IPv6 header in the IPv6 message whose extension header is BIERv6 with the source IP of the IPv6 header;

[0164] Replace the Next Header field of the IPv6 header based on the Payload in the IPv6 message whose extension header is BIERv6;

[0165] Update the length field of the IPv6 header to obtain the IPv6 packet.

[0166] Among them, the functional implementation of each module in the above-mentioned BIERv6 message processing device corresponds to the various steps in the above-mentioned BIERv6 message processing method embodiment, and its functions and implementation process will not be repeated here one by one.

[0167] In a third aspect, an embodiment of the present invention further provides an electronic device, the structure of which is as follows: Figure 9 As shown, it includes: a memory and a processor, and the processor is used to read and execute the computer program stored in the memory to implement the aforementioned BIERv6 message processing method.

[0168] In a fourth aspect, an embodiment of the present invention further provides a computer storage medium, in which computer executable instructions are stored, and when the computer executable instructions are executed, the aforementioned method for processing a BIERv6 message is implemented.

[0169] In the fifth aspect, an embodiment of the present invention provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned BIERv6 message processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0170] Finally, it should be noted that some of the processes described in the embodiments of the present invention include multiple operations or steps that appear in a specific order. However, it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present invention, or may be executed in parallel. The sequence numbers of the operations are only used to distinguish different operations and do not represent any order of execution. In addition, these processes may include more or fewer operations, and these operations or steps may be executed sequentially or in parallel, and these operations or steps may be combined.

[0171] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein with equivalents. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for processing BIERv6 messages, characterized in that: The method comprises: When receiving an IPv6 message sent by the main control disk, determining a processing flow of the IPv6 message based on an extension header type of the IPv6 header; If the processing flow is the first-station business processing flow, the IPv6 message with the SRv6 extension header is edited based on the first preset strategy to obtain a BIERv6 message; If the processing flow is a transit business processing flow, then based on the configuration table corresponding to the IPv6 message with the extension header of BIERv6, it is determined that the transit business processing flow is an intermediate station business processing flow or a tail station business processing flow; If it is an intermediate station business processing process, the IPv6 message with the extension header of BIERv6 is edited based on the second preset strategy to obtain a BIERv6 message; If it is a tail station business processing process, the IPv6 message with the extension header of BIERv6 is edited based on the third preset strategy to obtain an IPv6 message; The step of editing the IPv6 message with the SRv6 extension header based on the first preset strategy to obtain a BIERv6 message includes: Delete the data of SID0~SID3 and the SRH extension header in the IPv6 message whose extension header is SRv6, and add a BIERv6 extension header between End.Bier and Payload of the IPv6 message whose extension header is SRv6; Fill the data of SID1~SID2 in the IPv6 message with SRv6 extension header into the BITSTRING of the BIERv6 extension header; Fill the first 20 bits of SID3 in the IPv6 message with an SRv6 extension header into the BIFT-ID of the BIERv6 extension header; Fill the last 4 bytes of SID3 in the IPv6 message with an SRv6 extension header into the OUTPORT of the private header; Update the length field of the IPv6 header to obtain the BIERv6 message.

2. The method for processing BIERv6 messages according to claim 1, wherein: The IPv6 message belongs to a BIERv6 message.

3. The method for processing BIERv6 messages according to claim 1, wherein: The step of determining the processing flow of the IPv6 message based on the extension header type of the IPv6 header includes: Read the field corresponding to the extension header type of the IPv6 header; If the field is a first preset value, determining that the processing flow of the IPv6 message is a first-station service processing flow; If the field is a second preset value, it is determined that the processing flow of the IPv6 message is a transit service processing flow.

4. The method for processing BIERv6 messages according to claim 1, wherein: The step of determining whether the transit service processing flow is an intermediate station service processing flow or a tail station service processing flow based on the configuration table corresponding to the IPv6 message whose extension header is BIERv6 includes: Select any F-BM value from each row of F-BM values ​​contained in the F-BM column of the configuration table corresponding to the IPv6 message whose extension header is BIERv6 as the target F-BM value; Perform an AND operation on the target F-BM value and the Bitstring field in the IPv6 message whose extension header is BIERv6; If the result of the operation is one, then obtain the type field corresponding to the target F-BM value; If the type field is a third preset value, it is determined that the transit service processing flow is an intermediate station service processing flow; If the type field is a fourth preset value, it is determined that the transit service processing flow is a last-station service processing flow; Detect whether there is an unselected F-BM value in each row of F-BM values ​​contained in the F-BM column in the configuration table corresponding to the IPv6 message with the extension header of BIERv6; Select any F-BM value from the F-BM values ​​that have not been selected as the target F-BM value, and return to execute the step of performing the AND operation on the target F-BM value and the Bitstring field in the IPv6 message whose extension header is BIERv6, until all F-BM values ​​have been selected.

5. The method for processing BIERv6 messages according to claim 1, wherein: The step of editing the IPv6 message with the BIERv6 extension header based on the second preset strategy to obtain the BIERv6 message includes: Replace the data of the Bitstring field of the IPv6 message whose extension header is BIERv6 with the target F-BM value in the configuration table, wherein any F-BM value is selected as the target F-BM value from each row of F-BM values ​​contained in the F-BM column of the configuration table corresponding to the IPv6 message whose extension header is BIERv6; Replace the DIP data of the IPv6 message whose extension header is BIERv6 with the End.BIER data corresponding to the target F-BM value in the configuration table; Replace the MAC and VLAN of the IPv6 message with the BIERv6 extension header with the MAC and VLAN corresponding to the target F-BM value in the configuration table; Update the TTL field and obtain the BIERv6 message.

6. The method for processing BIERv6 messages according to claim 1, wherein: The step of editing the IPv6 message with the extension header being BIERv6 based on the third preset strategy to obtain the IPv6 message includes: Delete the BIERv6 extension header of the IPv6 header in the IPv6 message whose extension header is BIERv6; Replace the DIP of the IPv6 header in the IPv6 message whose extension header is BIERv6 with the source IP of the IPv6 header; Replace the Next Header field of the IPv6 header based on the Payload in the IPv6 message whose extension header is BIERv6; Update the length field of the IPv6 header to obtain the IPv6 packet.

7. A BIERv6 message processing device, characterized in that: The device comprises: An information determination module is configured to determine, when receiving an IPv6 message sent by the main control disk, a processing flow of the IPv6 message based on an extension header type of the IPv6 header; A message editing module is configured to edit the IPv6 message with an SRv6 extension header based on a first preset strategy to obtain a BIERv6 message if the processing flow is a first-stop service processing flow; The message editing module is specifically configured to: Delete the data of SID0~SID3 and the SRH extension header in the IPv6 message whose extension header is SRv6, and add a BIERv6 extension header between End.Bier and Payload of the IPv6 message whose extension header is SRv6; Fill the data of SID1~SID2 in the IPv6 message with SRv6 extension header into the BITSTRING of the BIERv6 extension header; Fill the first 20 bits of SID3 in the IPv6 message with an SRv6 extension header into the BIFT-ID of the BIERv6 extension header; Fill the last 4 bytes of SID3 in the IPv6 message with an SRv6 extension header into the OUTPORT of the private header; Update the length field of the IPv6 header to obtain the BIERv6 message; An information determination module is configured to determine, if the processing flow is a transit business processing flow, whether the transit business processing flow is an intermediate station business processing flow or a tail station business processing flow based on a configuration table corresponding to the IPv6 message whose extension header is BIERv6; The message editing module is configured to edit the IPv6 message with the extension header of BIERv6 based on the second preset strategy to obtain a BIERv6 message if it is an intermediate station business processing process; The message editing module is configured to edit the IPv6 message with the extension header of BIERv6 based on the third preset strategy to obtain the IPv6 message if it is a tail station business processing process.

8. An electronic device, characterized in that: include: memory and processor; The processor is used to read and execute the computer program stored in the memory to implement the steps of the BIERv6 message processing method as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which, when executed, implement the steps of the BIERv6 message processing method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Stream detection method and electronic equipment

    CN115280745A