Message forwarding methods, node devices, and SRv6 networks
By combining the forwarding chip and the CPU, SRv6 tunnel encapsulation forwarding is achieved, solving the problems of heavy CPU load and high hardware forwarding difficulty in the existing technology, and improving forwarding performance and flexibility.
Patent Information
- Application Number
- CN202411878502.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-12-19
AI Technical Summary
In existing technologies, the SRv6 tunnel encapsulation forwarding scheme suffers from heavy CPU load and poor forwarding performance, while the hardware forwarding scheme is difficult and costly to implement and has poor flexibility.
By querying service routing table entries in the forwarding chip and performing SRH encapsulation in conjunction with the CPU, the forwarding chip performs ACL packet feature matching, and the CPU performs tunnel identifier encapsulation, SRv6 tunnel encapsulation forwarding is achieved.
It reduces the implementation difficulty and cost of forwarding chips, improves the forwarding performance of the CPU, and enhances the flexibility of packet forwarding.
Smart Images

Figure CN119697111B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network communication technology, and more specifically, to a message forwarding method, a node device, and an SRv6 network. Background Technology
[0002] Segment Routing (SR) is a technology for forwarding data packets over a network based on the concept of source routing. SRv6 Traffic Engineering (SRv6 TE) is a TE tunneling technology based on SRv6. The industry typically uses SRv6 TE Policies to define an SRv6 TE tunnel. SRv6 TE policies generally use Color (tunnel color identifier) and Endpoint (tunnel tail node address) as keywords. An SRv6 TE Policy contains one or more Segment Lists, each containing multiple SIDs (Segment Identifications). Segment Lists are also called SID linked lists or SID address stacks, with each SID corresponding to a node or link in the packet forwarding path. The SRv6 tunnel head node encapsulates the SRH (Segment Routing Header) based on the Segment List and the service SID of the routing table entry in the SRv6TE Policy. Based on the forwarding information corresponding to the first SID in the Segment List, the packet is forwarded to the next-hop device, thereby realizing SRv6 tunnel encapsulation and forwarding.
[0003] Currently, there are two implementation schemes for SRv6 tunnel encapsulation and forwarding. The first is a CPU-based software forwarding scheme. This involves creating software routing tables and SRv6 tunnel entries at the software level. A software program running on the CPU processes data packets, looking up the appropriate routing table entry, flow policy table entry, SRv6 TEPolicy, Segment List, and header next hop information based on the packet's destination address or 5-tuple information. It then encapsulates the SRH (Signaling Header Message) and forwards the packet to the next hop. The second scheme is a chip-based hardware forwarding scheme. Hardware routing tables and hardware tunnel entries are installed in the forwarding chip, relying on hardware to implement SRv6 tunnel encapsulation and forwarding.
[0004] However, the first approach requires the CPU to perform multiple table lookups and packet feature matching operations, resulting in a heavy CPU load and poor forwarding performance. Because SRv6 offers highly flexible packet processing, and because it encapsulates a large number of SIDs and has a long packet header, the second approach is more difficult and costly to implement, and also less flexible. Summary of the Invention
[0005] The purpose of this application is to address the shortcomings of the prior art by providing a message forwarding method, node device, and SRv6 network, so as to solve the problems of heavy CPU load and poor forwarding performance when forwarding messages based on CPU, and high implementation difficulty, cost, and poor flexibility when forwarding messages based on forwarding chips.
[0006] To achieve the above objectives, the technical solution adopted in this application is as follows:
[0007] In a first aspect, this application provides a message forwarding method applied to a head node device in an SRv6 network, the head node device including a forwarding chip and a CPU, the method comprising:
[0008] The forwarding chip determines the forwarding identification information of the data packet according to the pre-installed hardware forwarding table, and sends the data packet and the forwarding identification information to the CPU;
[0009] The CPU determines the service SID, tunnel tail node address, and tunnel color identifier of the data packet based on the forwarding identifier information and the software forwarding table.
[0010] The CPU determines the segment list of the data packet based on the SRv6 TE Policy forwarding table, the tunnel tail node address, and the tunnel color identifier.
[0011] The CPU encapsulates the data packet according to the service SID and Segment List to obtain the encapsulated packet, and sends the encapsulated packet to the forwarding chip;
[0012] The forwarding chip forwards the encapsulated message.
[0013] Optionally, the hardware forwarding table includes a routing table;
[0014] The step of the forwarding chip determining the forwarding identification information of the data packet according to the pre-installed hardware forwarding table and sending the data packet and the forwarding identification information to the CPU includes:
[0015] The routing table is queried based on the destination IP address of the data packet to determine the tunnel identifier that matches the data packet, and it is determined whether an access control list exists in the hardware forwarding table;
[0016] If the access control list exists and an entry matching the data packet is found, the flow rule identifier matching the data packet is obtained, and the tunnel identifier and the flow rule identifier are sent to the CPU together with the data packet as the forwarding identifier information;
[0017] If the access control list does not exist or no entry matching the data packet is found in the access control list, the tunnel identifier is sent to the CPU along with the data packet as the forwarding identifier information, based on the routing table.
[0018] Optionally, the software forwarding table includes an SRv6 tunnel encapsulation information table and a flow policy rule table;
[0019] The CPU determines the service SID, tunnel tail node address, and tunnel color identifier of the data packet based on the forwarding identifier information and the software forwarding table, including:
[0020] The tunnel identifier is searched in the SRv6 tunnel encapsulation information table to determine the tunnel encapsulation information table entry that matches the tunnel identifier, and the service SID, tunnel tail node address and tunnel color identifier in the tunnel encapsulation information table entry are obtained.
[0021] If the forwarding identifier information does not include the flow rule identifier, then the service SID, tunnel tail node address and tunnel color identifier in the tunnel encapsulation information table entry shall be used as the service SID, tunnel tail node address and tunnel color identifier of the data packet.
[0022] If the forwarding identifier information includes a flow rule identifier, then the flow policy rule table is searched to determine the flow policy rule table entry that matches the flow rule identifier. The service SID, tunnel tail node address, and tunnel color identifier in the flow policy rule table entry are obtained. The service SID, tunnel tail node address, and tunnel color identifier of the data packet are determined according to the tunnel encapsulation information table entry and the flow policy rule table entry.
[0023] Optionally, the step of determining the service SID, tunnel tail node address, and tunnel color identifier of the data packet based on the tunnel encapsulation information table entry and the flow policy rule table entry includes:
[0024] If the service SID, tunnel tail node address, and tunnel color identifier in the tunnel encapsulation information table are different from those in the flow policy rule table, then the service SID, tunnel tail node address, and tunnel color identifier in the flow policy rule table shall be used as the service SID, tunnel tail node address, and tunnel color identifier of the data packet. Alternatively, if the flow policy rule table contains a tunnel color identifier, then the service SID, tunnel tail node address, and tunnel color identifier of the data packet shall be determined based on the tunnel color identifier in the flow policy rule table and the service SID and tunnel tail node address in the tunnel encapsulation information table.
[0025] Optionally, the CPU determines the Segment List of the data packet based on the SRv6 TE Policy forwarding table, the tunnel tail node address, and the tunnel color identifier, including:
[0026] The CPU searches the SRv6 TE Policy forwarding table based on the tunnel tail node address and tunnel color identifier to determine the SRv6 TE Policy entry that matches the tunnel tail node address and tunnel color identifier, and uses the Segment List in the SRv6 TE Policy entry as the Segment List of the data packet.
[0027] Optionally, the forwarding chip forwards the encapsulated message, including:
[0028] The forwarding chip determines the next-hop information of the encapsulated message, edits the Ethernet header of the encapsulated message based on the next-hop information, and forwards the edited encapsulated message to the next node device.
[0029] Secondly, this application provides a message forwarding method applied to other node devices in an SRv6 network, wherein the other node devices include: intermediate node devices or tail node devices, and the other node devices include: a forwarding chip and a CPU, and the method includes:
[0030] The forwarding chip determines the SID index corresponding to the destination address of the encapsulated packet according to the pre-installed hardware routing table, and sends the encapsulated packet and the SID index to the CPU.
[0031] The CPU determines the SID entry corresponding to the destination address of the encapsulated packet based on the SID index and the SID forwarding table.
[0032] The CPU processes the encapsulated message according to the processing action in the SID table entry to obtain a data packet, and sends the data packet to the forwarding chip.
[0033] The forwarding chip forwards the data packets.
[0034] Optionally, if the other node device is a tail node device, the step of the CPU processing the encapsulated message according to the processing action in the SID table entry to obtain a data packet includes:
[0035] The CPU performs SRv6 decapsulation on the encapsulated message according to the processing action in the SID table entry to obtain a data packet, and sends the data packet to the forwarding chip.
[0036] The forwarding chip forwards the data packets in the following steps:
[0037] The forwarding chip determines the next-hop information of the data packet according to the hardware routing table, edits the Ethernet header of the data packet based on the next-hop information, and forwards the edited data packet to the destination device.
[0038] Thirdly, this application embodiment also provides a node device, which is a head node device, an intermediate node device, or a tail node device in the SRv6 network;
[0039] If the node device is a head node device, then the node device includes: a processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform the steps of the message forwarding method as described in the first aspect.
[0040] If the node device is an intermediate node device or a tail node device, the node device includes: a processor, a storage medium, and a bus. The storage medium stores program instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus. The processor executes the program instructions to perform the steps of the message forwarding method as described in the second aspect.
[0041] Fourthly, embodiments of this application also provide an SRv6 network, including a head node device that performs the method described in the first aspect, and an intermediate node device and a tail node device that perform the method described in the second aspect.
[0042] The beneficial effects of this application are as follows: By using a forwarding chip to perform service routing table lookups and the CPU to perform SRH encapsulation, the forwarding chip only needs to perform service routing table lookups, reducing its implementation difficulty and cost. Furthermore, the CPU does not need to perform routing table lookups; it only needs to perform SRH encapsulation based on the tunnel identifier, reducing the CPU's matching workload and thus improving its data packet forwarding performance. In addition, the integration of the forwarding chip and CPU enhances the flexibility of packet forwarding function expansion.
[0043] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0045] Figure 1 A schematic diagram of the architecture of an SRv6 network provided in an embodiment of this application is shown;
[0046] Figure 2 This illustration shows an architectural diagram of a node device provided in an embodiment of this application;
[0047] Figure 3 A flowchart of a packet forwarding method in a head node device provided in an embodiment of this application is shown;
[0048] Figure 4 This application provides a flowchart for determining forwarding identifier information according to an embodiment of the present application.
[0049] Figure 5 This document illustrates a flowchart illustrating how to determine a service SID, tunnel tail node address, and tunnel color identifier according to an embodiment of this application.
[0050] Figure 6 This document illustrates a flowchart of a header node device performing packet forwarding, as provided in an embodiment of this application.
[0051] Figure 7 This document illustrates a flowchart of another header node device performing message forwarding, as provided in an embodiment of this application.
[0052] Figure 8 A flowchart of a packet forwarding method in another node device provided in an embodiment of this application is shown;
[0053] Figure 9 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation
[0054] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0055] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.
[0056] There are two implementation schemes for SRv6 tunnel encapsulation forwarding in the existing technology. The first is a software forwarding scheme based on CPU. However, this method requires the software program running on the CPU to process data packets. During the forwarding process, the CPU needs to perform multiple table lookups and packet feature matching operations, so the CPU load is heavy and the forwarding performance needs to be improved.
[0057] The second type is a hardware forwarding scheme based on a forwarding chip. However, when this scheme is applied to SRv6 packet forwarding, the processing of packets by SRv6 is very flexible, and the number of SIDs encapsulated by SRv6 is large, and the encapsulated packet header is long, which exceeds the processing capacity of general forwarding chips. Therefore, the implementation cost and difficulty of the hardware forwarding scheme are high, and it also has the problem of poor flexibility.
[0058] Based on this, this application proposes a packet forwarding method that integrates a forwarding chip with a CPU to achieve the forwarding of SRv6 packets. The forwarding chip performs service routing table lookups and ACL packet feature matching, while the CPU performs SRH encapsulation. The forwarding chip and CPU work together to complete SRv6 encapsulation and forwarding. Compared to software forwarding schemes, this application reduces the CPU's workload and improves CPU performance. Compared to hardware forwarding schemes, this application reduces the implementation difficulty and cost of the forwarding chip and offers greater flexibility.
[0059] Figure 1 This is a schematic diagram of an SRv6 network architecture provided in this application, for reference. Figure 1 The network includes a head node device PE1, intermediate node devices P1 and P2, and a tail node device PE2. The method of this application can be applied to the head node device, intermediate node device, or tail node device in the network. The following section describes the process of SRv6 packet forwarding by each device based on the packet forwarding method of this application.
[0060] Figure 2 This is a schematic diagram of the structure of a node device. A node device can be... Figure 1 The device can be a head node, intermediate node, or tail node. The node device includes a forwarding chip and a CPU. The forwarding chip can be a switching chip. The CPU mentioned below refers to the software program running on the CPU that forwards SRv6 packets.
[0061] like Figure 3 The diagram illustrates the method steps performed by the head node device when the method of this application is applied to the head node device. (Refer to...) Figure 3 The steps of the packet forwarding method in the head node device include:
[0062] S301, the forwarding chip determines the forwarding identification information of the data packet according to the pre-installed hardware forwarding table, and sends the data packet and the forwarding identification information of the data packet to the CPU.
[0063] Optionally, the forwarding chip can be a switching chip. The hardware forwarding table entries include: a routing table, which contains multiple routing entries, each corresponding to a routing tunnel identifier. After receiving a data packet, the head node device can obtain the source and destination addresses from the data packet, look up the routing table based on these addresses, and upon finding a matching entry, use the tunnel identifier corresponding to that entry as the forwarding identifier for the data packet. This forwarding identifier is then placed in the packet descriptor and sent to the CPU along with the data packet.
[0064] As another optional implementation, this application can determine the forwarding identifier information of a data packet not only based on the packet's routing information, but also based on the packet's five-tuple characteristics. In this case, the hardware forwarding table can include a hardware ACL (Access Control List). The ACL includes the packet's five-tuple, DSCP value (Differentiated Services Code Point), flow rule identifier, and processing action. The processing action in this step can be to hand the data packet over to the CPU for SRv6 tunnel encapsulation. After receiving the data packet, the head node device can search the ACL based on the data packet's five-tuple information and DSCP value to determine the corresponding flow rule identifier and processing action. The flow rule identifier and the tunnel identifier determined based on the routing table are used as forwarding identifier information. The processing action is to put the forwarding identifier information into the packet descriptor and send it to the CPU along with the data packet. The flow rule identifier is used to indicate the traffic redirection strategy used for data packet forwarding, and the head node device can determine the tunnel used for data packet forwarding based on the traffic redirection strategy.
[0065] The tunnel identifier is used to uniquely identify a tunnel in the SRv6 forwarding system, see reference. Figure 1 The SRv6 forwarding system shown includes Figure 1 The tunnel policy 1 and tunnel policy 2.
[0066] In one possible implementation, the head node device in SRv6 can learn the routing information of each node device through the BGP protocol, build a routing table based on the learned routing information of each node device, and store the routing table in the forwarding chip.
[0067] S302, CPU determines the service SID, tunnel tail node address and tunnel color identifier of the data packet based on the forwarding identification information and the software forwarding table.
[0068] After obtaining the forwarding identification information, the forwarding chip can send the forwarding identification information and the data packet to the CPU, which will then perform further matching on the data packet.
[0069] The tunnel tail node address can be the address identifier of the last node device in the tunnel, and the tunnel color identifier can be a keyword used to uniquely identify the tunnel. (See reference...) Figure 1 If the tail node device of both tunnel policy1 and tunnel policy2 is PE2, then the tunnel tail node address Endpoint can be represented as 2::2.
[0070] In the first implementation, if the hardware forwarding table only includes a routing table, the software forwarding table can include an SRv6 tunnel encapsulation information table. This SRv6 tunnel encapsulation information table can be generated based on SRv6 service routes, for example, learned by the head node device using the BGP routing protocol. The key to the SRv6 tunnel encapsulation information table is the tunnel identifier. Each entry contains one or more of the following: tunnel endpoint address, service SID, and tunnel color identifier. After receiving the forwarding identifier information, the CPU can look up the tunnel identifier in the SRv6 tunnel encapsulation information table to determine the corresponding target entry. The Endpoint and Color of the target entry are then used as the tunnel endpoint address and tunnel color identifier for the data packet.
[0071] In the second implementation, if the hardware forwarding table includes a routing table and an ACL, the software forwarding table can include an SRv6 tunnel encapsulation information table and a flow policy rule table. The key to the flow policy rule table is the flow rule identifier, and the flow policy rule table entries include one or more of the following: Endpoint, Service SID, and Color. After receiving the forwarding identifier information, the CPU can determine the target entry in the SRv6 tunnel encapsulation information table based on the tunnel identifier, and it can also determine the target entry in the flow policy rule table based on the flow rule identifier determined by the ACL. Finally, it determines the tunnel tail node address and tunnel color identifier of the data packet based on the target entries in the SRv6 tunnel encapsulation information table and the flow policy rule table. The flow policy rule table can be generated based on the traffic redirection policy configured on the node device, such as PBR (Policy-based route).
[0072] S303 and CPU determine the segment list of data packets based on the SRv6 TE Policy forwarding table, the tunnel tail node address, and the tunnel color identifier.
[0073] The CPU includes an SRv6 TE Policy forwarding table. The key words in the table are the tunnel tail node address (Endpoint) and Color. The SRv6 TE Policy forwarding table contains one or more candidate paths. When searching for an SRv6TE Policy based on the tunnel tail node address and tunnel color identifier, the candidate path with the highest priority can be selected from multiple candidate paths as the path used for forwarding.
[0074] Determining the segment list of a data packet can involve determining the number of SIDs in the forwarding table corresponding to the header node device. The segment list can indicate the number of SIDs that the data packet needs to pass through before reaching the destination address. After the CPU determines the path used for forwarding, it can determine the segment list of the data packet based on the number of node devices included in the forwarding path.
[0075] For example, refer to Figure 1 Based on the tunnel tail node address and tunnel color identifier, the tunnel policy2 is found in the SRv6 TE Policy forwarding table, and the segment list of tunnel policy2 is used as the segment list of the data packet.
[0076] S304: The CPU encapsulates the data packet according to the service SID and Segment List, obtains the encapsulated packet, and sends the encapsulated packet to the forwarding chip.
[0077] The CPU encapsulates the data packet by adding an SRH header to obtain the encapsulated packet. The SRH header includes multiple fields, such as the Tag field, the Segments Left field, and the Segment List[]. The Tag field is used to fill the segment list index, the Segments Left field is used to fill the number of SIDs, the Segment List[0] field is used to fill the service SID, and the remaining positions in the Segment List[] are used to fill the tunnel Segment List SID. The CPU can fill the number of SIDs indicated by the Segment List into the Segments Left field, fill the service SID into the Segment List[0] field, and fill the tunnel Segment List SID into the remaining positions in the Segment List[] to obtain the SRH header. The CPU then uses the SRH header as the header of the data packet to encapsulate the data packet, resulting in the encapsulated packet.
[0078] It should be noted that after adding an SRH header to the data packet, IPv6 encapsulation is also required. In the first implementation, the CPU can perform IPv6 encapsulation on the encapsulated packet, adding an SRH and an IPv6 header to obtain the encapsulated SRv6 packet, and then send the encapsulated SRv6 packet to the forwarding chip.
[0079] In the second implementation, the CPU can send the encapsulated message to the forwarding chip, which will then perform IPv6 encapsulation and forwarding.
[0080] Before sending the encapsulated message to the forwarding chip, the CPU can set the next-hop information based on the first SID and determine the outgoing interface.
[0081] S305, the forwarding chip forwards the encapsulated message.
[0082] In the first implementation, the CPU can encapsulate the encapsulated message into IPv6 and send the encapsulated SRv6 message to the forwarding chip. The forwarding chip can forward the encapsulated SRv6 message according to the destination address of the IPv6 message header.
[0083] In the second implementation, the CPU can send the encapsulated message to the forwarding chip, which performs IPv6 encapsulation on the encapsulated message to obtain the encapsulated SRv6 message, and then forwards the encapsulated SRv6 message to the next node device.
[0084] In this embodiment, the forwarding chip determines the forwarding identifier information of the data packet according to the pre-installed hardware forwarding table, and sends the data packet and the forwarding identifier information to the CPU. The CPU determines the service SID, tunnel tail node address and tunnel color identifier of the data packet according to the forwarding identifier information and the software forwarding table. The CPU determines the segment list of the data packet according to the SRv6TE Policy forwarding table, the tunnel tail node address and the tunnel color identifier. The CPU encapsulates the data packet according to the service SID and the segment list to obtain the encapsulated packet, and sends the encapsulated packet to the forwarding chip. The forwarding chip forwards the encapsulated packet.
[0085] By using a forwarding chip to perform service routing table lookups and the CPU to perform SRH encapsulation, the forwarding chip only needs to perform service routing table lookups, reducing its implementation difficulty and cost. Furthermore, the CPU does not need to perform routing table lookups; it only needs to perform SRH encapsulation based on the tunnel identifier, reducing the CPU's matching workload and thus improving its data packet forwarding performance. In addition, this integration of the forwarding chip and CPU also enhances the flexibility of packet forwarding function expansion.
[0086] Optionally, the hardware forwarding table includes a routing table. The following is a further explanation of how the forwarding chip determines the forwarding identification information of data packets based on the pre-installed hardware forwarding table, such as... Figure 4 As shown, the above step S301 includes:
[0087] S401. Query the routing table based on the destination IP address of the data packet to determine the tunnel identifier that matches the data packet, and check whether an access control list exists in the hardware forwarding table.
[0088] The forwarding chip can look up the routing table based on the destination address of the data packet and use the tunnel identifier in the matched routing table entry as the tunnel identifier of the data packet.
[0089] For example, if the source address of the data packet is 10.0.0.1 and the destination address of the data packet is 20.0.0.1, the routing table is searched based on the source and destination addresses of the data packet. The tunnel identifier 10 in the matched routing table entry can be used as the tunnel identifier of the data packet. The tunnel identifier is recorded in the packet description to obtain the packet descriptor.
[0090] The forwarding chip can first determine whether a pre-configured access control list exists in the hardware forwarding table, i.e., whether a PBR policy is pre-configured on the forwarding chip. The access control list can be an ACL, as mentioned earlier, which records the packet's 5-tuple, DSCP value, flow rule identifier, and processing action. By searching the ACL based on the data packet's 5-tuple information and DSCP value, the corresponding flow rule identifier and processing action for the data packet can be obtained.
[0091] S402. If an access control list exists and an entry matching the data packet is found, obtain the flow rule identifier matching the data packet, and send the tunnel identifier and flow rule identifier as forwarding identifier information together with the data packet to the CPU.
[0092] If the forwarding chip includes an ACL (Access Control List), meaning the PBR (Passive Flow Registry) policy is pre-configured on the forwarding chip, then data packets can be redirected based on packet characteristics. The forwarding chip can parse the data packets to obtain the 5-tuple information and DSCP value of the data packets. Based on the 5-tuple information and DSCP value of the data packets, it searches in the ACL, uses the flow rule identifier that matches the ACL entry as the flow rule identifier of the data packets, and uses the flow rule identifier and tunnel identifier as forwarding identifier information. According to the processing action of the matched ACL entry, the data packets and forwarding identifier information are sent to the CPU.
[0093] The forwarding chip can record the tunnel identifier and flow rule identifier as forwarding identification information of the data packet in the packet descriptor, and send the packet descriptor to the CPU along with the data packet.
[0094] S403. If no access control list exists or no entry matching the data packet is found in the access control list, the tunnel identifier is sent to the CPU along with the data packet as forwarding identification information according to the routing table.
[0095] If no ACL is installed in the forwarding chip, the data packets are routed using the forwarding method. The forwarding chip only records the tunnel identifier as the forwarding identifier information of the data packet in the packet description to obtain the packet descriptor, and sends the packet descriptor to the CPU along with the data packet.
[0096] In another possible implementation, the forwarding chip has an ACL installed, but no ACL entry matching the data packet is found in the ACL. In this case, the forwarding chip can also record the tunnel identifier as the forwarding identifier information of the data packet in the packet descriptor and send the packet descriptor to the CPU along with the data packet.
[0097] Optionally, the software forwarding table includes: a tunnel encapsulation information table and a flow policy rule table.
[0098] The routing table outputs tunnel identifiers as its key, and the tunnel encapsulation information table also uses the tunnel identifier as its key. These entries include the service SID, tunnel tail node address, and tunnel color identifier. The CPU can determine the data packet's entry in the tunnel encapsulation information table based on the tunnel identifier. The ACL entry matches the flow rule identifier, and the flow policy rule table also uses the flow rule identifier as its key. Flow policy rule entries include one or more of the following information: Endpoint, service SID, and Color. The CPU can determine the data packet's Endpoint, service SID, and Color based on the flow rule identifier.
[0099] In step S302 above, the CPU determines the service SID, tunnel tail node address, and tunnel color identifier of the data packet based on the forwarding identifier information and the software forwarding table, as follows: Figure 5 Shown, including:
[0100] S501. Based on the tunnel identifier, search the SRv6 tunnel encapsulation information table, determine the tunnel encapsulation information table entry that matches the tunnel identifier, and obtain the service SID, tunnel tail node address, and tunnel color identifier from the tunnel encapsulation information table entry.
[0101] The CPU retrieves the tunnel identifier from the forwarding identification information in the packet descriptor and looks up the SRv6 tunnel encapsulation information table based on the tunnel identifier. Each entry in the SRv6 tunnel encapsulation information table includes: tunnel identifier, service SID, tunnel tail node address, and tunnel color identifier. By matching the tunnel identifier determined by the forwarding chip based on the hardware forwarding table with the keywords of each entry in the SRv6 tunnel encapsulation information table, tunnel encapsulation information entries with keywords matching the tunnel identifier can be obtained. The keyword for each entry in the SRv6 tunnel encapsulation information table is the tunnel identifier.
[0102] S502. If the forwarding identification information does not include the flow rule identifier, then the service SID, tunnel tail node address, and tunnel color identifier in the tunnel encapsulation information table entry shall be used as the service SID, tunnel tail node address, and tunnel color identifier of the data packet.
[0103] If the hardware forwarding table of the forwarding chip does not include ACL, the software forwarding table of the CPU may also not include the flow policy rule table. In this case, the forwarding identification information retrieved by the CPU from the packet descriptor does not include the flow rule identifier. The tunnel encapsulation information table entry can be determined directly based on the tunnel identifier, and the service SID in the tunnel encapsulation information table entry can be used as the service SID of the data packet, the tunnel tail node address in the tunnel encapsulation information table entry can be used as the tunnel tail node address of the data packet, and the tunnel color identifier in the tunnel encapsulation information table entry can be used as the tunnel color identifier of the data packet.
[0104] S503. If the forwarding identification information includes a flow rule identifier, then look up the flow policy rule table, determine the flow policy rule table entry that matches the flow rule identifier, obtain the service SID, tunnel tail node address and tunnel color identifier from the flow policy rule table entry, and determine the service SID, tunnel tail node address and tunnel color identifier of the data packet based on the tunnel encapsulation information table entry and the flow policy rule table entry.
[0105] If the forwarding identifier information retrieved by the CPU from the packet descriptor includes a flow rule identifier, it indicates that the method used is packet feature-based traffic redirection. Therefore, the CPU can search for the flow policy rule entry corresponding to the flow rule identifier in the flow policy rule table. Each entry in the flow policy rule table includes a flow rule identifier, a service SID, a tunnel tail node address, and a tunnel color identifier. The CPU can find flow policy rule entries with the same flow rule identifier.
[0106] It should be noted that the entries in the flow policy rule table and the SRv6 tunnel encapsulation information table may not correspond. In this case, based on the user's selection, the service SID, tunnel tail node address, and tunnel color identifier from either the flow policy rule table or the SRv6 tunnel encapsulation information table can be used as the service SID, tunnel tail node address, and tunnel color identifier for the data packet. For example, assuming that a packet feature-based traffic redirection method is preferred, the entries in the flow policy rule table shall prevail when the entries in the flow policy rule table and the SRv6 tunnel encapsulation information table differ.
[0107] In this embodiment of the application, by pre-configuring ACL in the forwarding chip and pre-configuring the flow policy rule table corresponding to ACL in the CPU, the forwarding chip can perform the step of ACL packet feature matching and determine the flow redirection policy adopted when forwarding data packets. This allows the CPU to determine the encapsulation information of data packets based on the flow redirection policy and perform SRH encapsulation on the data packets.
[0108] The following is a further explanation of the determination of the service SID, tunnel tail node address, and tunnel color identifier of the data packet based on the tunnel encapsulation information table entry and the flow policy rule table entry. The above S502 step includes:
[0109] If the service SID, tunnel tail node address, and tunnel color identifier in the tunnel encapsulation information table are different from those in the flow policy rule table, then the service SID, tunnel tail node address, and tunnel color identifier in the flow policy rule table will be used as the service SID, tunnel tail node address, and tunnel color identifier of the data packet; or if the flow policy rule table contains a tunnel color identifier, then the service SID, tunnel tail node address, and tunnel color identifier of the data packet will be determined based on the tunnel color identifier in the flow policy rule table and the service SID and tunnel tail node address in the tunnel encapsulation information table.
[0110] Optionally, if the service SID in the tunnel encapsulation information table is different from the service SID in the flow policy rule table, the service SID in the flow policy rule table can be used as the service SID of the data packet. If the tunnel tail node address in the tunnel encapsulation information table is different from the tunnel tail node address in the flow policy rule table, the tunnel tail node address in the flow policy rule table can be used as the tunnel tail node address of the data packet. If the tunnel color identifier in the tunnel encapsulation information table is different from the tunnel color identifier in the flow policy rule table, the tunnel color identifier in the flow policy rule table can be used as the tunnel color identifier of the data packet.
[0111] If the flow policy rule entry contains partial information from the service SID, tunnel tail node address, and tunnel color identifier, then the service SID, tunnel tail node address, and tunnel color identifier of the data packet are determined based on the partial information in the flow policy rule entry and the tunnel encapsulation information entry.
[0112] The flow policy rule entry may only include part of the information such as the service SID, tunnel tail node address, and tunnel color identifier. In this case, the content contained in the flow policy rule entry can be used as the information of the data packet, and the missing information in the flow policy rule entry can be determined. The content corresponding to the missing information in the tunnel encapsulation information entry can be used as the information of the data packet.
[0113] For example, if the flow policy rule entry only includes a tunnel color identifier, then the tunnel color identifier in the flow policy rule entry can be used as the tunnel color identifier of the data packet, and the service SID and tunnel tail node address can be obtained from the tunnel encapsulation information entry. The service SID of the tunnel encapsulation information entry can be used as the service SID of the data packet, and the tunnel tail node address of the tunnel encapsulation information entry can be used as the tunnel tail node address of the data packet.
[0114] It should be understood that traffic redirection strategies based on packet characteristics have greater flexibility and are generally more in line with actual business needs. Therefore, when the contents of the tunnel encapsulation information table and the flow policy rule table are different, the contents of the flow policy rule table shall prevail, which can further improve the flexibility of data packet forwarding and reduce the possibility of network congestion.
[0115] The following is a further explanation of how the CPU determines the segment list of data packets based on the SRv6 TE Policy forwarding table, the tunnel tail node address, and the tunnel color identifier. Step S303 above includes:
[0116] The CPU searches the SRv6 TE Policy forwarding table based on the tunnel tail node address and tunnel color identifier to determine the SRv6 TE Policy entry that matches the tunnel tail node address and tunnel color identifier. The Segment List in the SRv6 TE Policy entry is then used as the Segment List for the data packet.
[0117] Using the tunnel tail node address and tunnel color identifier as keywords, match them with the tunnel tail node address and tunnel color identifier of each entry in the SRv6 TE Policy forwarding table. If the currently matched tunnel tail node address and tunnel color identifier are the same as the tunnel tail node address and tunnel color identifier determined in step S302 above, then the currently matched entry is taken as the SRv6 TE Policy entry corresponding to the tunnel tail node address and tunnel color identifier.
[0118] The SRv6 TE Policy forwarding table records at least one candidate path, and the candidate path with the highest priority among all candidate paths can be used for forwarding. The forwarding path can be a SID forwarding table, which indicates the remaining node devices that the data packet needs to pass through before reaching the destination address. Based on the forwarding path and the current node devices, the number of remaining node devices can be determined, and the number of remaining node devices is used as the segment list of the data packet.
[0119] The following is a further explanation of how the aforementioned forwarding chip forwards the encapsulated message. This step includes:
[0120] The forwarding chip determines the next-hop information of the encapsulated message, edits the Ethernet header of the encapsulated message based on the next-hop information, and forwards the edited encapsulated message to the next node device.
[0121] The next-hop information can be the index value of the next-hop device. The CPU can add the index value of the next-hop device to the packet descriptor and send the packet descriptor and the encapsulated packet to the forwarding chip. After receiving the packet descriptor, the forwarding chip can obtain the index value of the next-hop device from the packet descriptor and edit the Ethernet header of the encapsulated packet based on the index value of the next-hop device to obtain the edited encapsulated packet.
[0122] The following section will further explain the steps for data packet encapsulation and forwarding in the head node device described above, using two examples.
[0123] In the first example, the routing table is pre-configured in the forwarding chip, and the SRv6 tunnel encapsulation information table and SRv6 TE Policy forwarding table are pre-configured in the CPU. (Refer to...) Figure 6 After receiving a data packet, the head node device's forwarding chip matches the data packet against the routing table based on the source and destination addresses. If a routing table entry is matched, the tunnel identifier in the matched routing table entry is sent to the CPU as a forwarding identifier, and the CPU performs SRH encapsulation.
[0124] Reference Figure 1 When forwarding data packets, PE1 receives data packets from CE1. PE1's forwarding chip first receives the data packet with a source IP address of 10.0.0.1 and a destination IP address of 20.0.0.1. It looks up the routing table based on the destination IP address and finds a matching entry, obtaining a tunnel identifier value of 10. This tunnel identifier is recorded as forwarding identification information in the packet descriptor. The next-hop information in the routing table entry indicates that the data packet should be sent to the CPU for SRv6 encapsulation; therefore, the forwarding chip delivers the packet to the CPU.
[0125] After receiving the forwarding identification information, the CPU retrieves the tunnel identifier from the packet descriptor and looks up the SRv6 tunnel encapsulation information table based on the tunnel identifier, obtaining Endpoint 2::2, Service SID 200::400, and Color 100. The CPU continues to look up the SRv6 TE Policy forwarding table based on the Endpoint and Color to obtain tunnel policy2. It then encapsulates an SRH and an outer IPv6 header based on the Service SID and the Segment List of policy2. The destination address of the outer IPv6 header is the first segment SID of policy2.
[0126] If the first SID of policy2 is Figure 1 The intermediate node device P2's End SID needs to be used for forwarding based on its routing table entry. Therefore, the CPU hands the encapsulated packet to the forwarding chip. Before sending the encapsulated packet to the next node device, the forwarding chip can select a route based on the destination address in the outer IPv6 header and edit the Ethernet header. The forwarding chip looks up the routing table based on the packet's destination address, obtains P2's routing table entry, and then forwards the encapsulated packet to P2.
[0127] In the second example, the routing table and ACL are pre-configured in the forwarding chip of the head node device, and the flow policy rule table, SRv6 tunnel encapsulation information table and SRv6 TE Policy forwarding table are pre-configured in the CPU. Figure 7 This is a flowchart illustrating the packet forwarding process of the head node device. Figure 1 The network topology shown depicts two SRv6 TE policies: policy1 and policy2, created on PE1. Policy1 has an Endpoint of 2::2 and a Color of 100, while policy2 has an Endpoint of 2::2 and a Color of 200. PE1 then installs the corresponding entries for policy1 and policy2 into the SRv6 TE Policy table.
[0128] PE1 and PE2 establish a BGP neighbor relationship. PE1 learns CE2's routing information via the BGP protocol and generates an SRv6 tunnel encapsulation information table and a hardware routing table based on the learned routing information. The SRv6 tunnel encapsulation information table has a routing tunnel identifier of 10, a corresponding Endpoint of 2::2, and a service SID derived from PE2's End.DT4 SID, with a value of 200::400. The destination network segment in the routing table is 20.0.0.1 / 32, and the routing tunnel identifier is 10.
[0129] Suppose the service requires traffic with a source address of 10.0.0.1 and a destination address of 20.0.0.1 to travel through the SRv6 tunnel policy1. Then, PBR (Policy-Based Routing) can be configured on the PE1 device. PE1 installs a flow policy rule table and a hardware ACL. The flow rule identifier value in the flow policy rule table is 1, corresponding to a Color value of 100. An ACL entry matching a packet with a source address of 10.0.0.1 and a destination address of 20.0.0.1 corresponds to the action of reporting the data packet to the CPU, with the flow rule identifier set to 1.
[0130] After the forwarding chip receives the data packet, the head node device PE1 receives the data packet from CE1. The forwarding chip of PE1 first receives the data packet, analyzes it and finds that the source IP address of the packet is 10.0.0.1 and the destination IP address is 20.0.0.1. By looking up the routing table and finding the entry, the routing tunnel identifier value is found to be 10. The routing tunnel identifier is recorded in the packet descriptor.
[0131] Next, the forwarding chip performs ACL matching. If an ACL entry is matched, the flow rule identifier value is 1, and this value is recorded in the packet descriptor. Following the processing action instruction for the matched entry, the packet is handed over to the CPU. At this point, the packet descriptor carries the tunnel identifier and the flow rule identifier.
[0132] The CPU receives packets from the forwarding chip and extracts the tunnel identifier and flow rule identifier from the packet descriptor. Based on the tunnel identifier, it looks up the SRv6 tunnel encapsulation information table to obtain Endpoint 2::2 and service SID 200::400. Based on the flow rule identifier, it looks up the flow policy rule table to obtain the Color value 100. The CPU continues to look up the SRv6 TE Policy forwarding table based on the Endpoint and Color to obtain tunnel policy1. Based on the service SID and the Segment List of policy1, it encapsulates the SRH and outer IPv6 header to obtain the encapsulated packet.
[0133] Assuming the first SID of policy1 is the End.X SID of PE1, the software obtains the next-hop index based on the next-hop information associated with the first SID, sets the next-hop index in the packet descriptor, and hands the encapsulated packet to the forwarding chip. The forwarding chip retrieves the next-hop index from the packet descriptor, obtains the hardware next-hop information, performs Ethernet header editing, and then forwards the encapsulated packet to the next-hop device.
[0134] After the head node device forwards the encapsulated packet to other node devices, the other node devices can also forward packets using a combination of forwarding chips and CPUs. These other node devices can be intermediate or tail node devices. The following is a further explanation of the packet forwarding methods performed by intermediate and tail node devices. The structures of intermediate and tail node devices can be as follows: Figure 2 As shown, the forwarding chip can be a switching chip, and the CPU refers to the software program running on the CPU for forwarding SRv6 packets.
[0135] Reference Figure 8 The steps of the message forwarding method in intermediate node devices and tail node devices include:
[0136] S801: The forwarding chip determines the SID index corresponding to the destination address of the encapsulated packet based on the pre-installed hardware routing table, and sends the encapsulated packet and its SID index to the CPU.
[0137] Routing tables can be pre-configured in the forwarding chips of other node devices. It should be noted that the contents of the routing table entries in other node devices are different from those in the head node device. The routing table entries in other node devices include the SID index corresponding to the destination address. After the forwarding chip receives the encapsulated packet, it can perform a routing table lookup on the encapsulated packet, find the matching routing table entry, obtain the SID index corresponding to the destination address in the routing table entry corresponding to the encapsulated packet, and send the SID index and the encapsulated packet to the CPU.
[0138] The routing table includes the routing addresses and SID index values of each node device. The forwarding chip can look up the routing table based on the destination address of the encapsulated packet, find the entry containing the SID index corresponding to the destination address, and use the SID index value contained in the found entry as the SID index of the encapsulated packet.
[0139] S802 and CPU determine the SID entry corresponding to the destination address of the encapsulated packet based on the SID index and the SID forwarding table.
[0140] The SID entry records the processing actions for the encapsulated message. The processing action of the intermediate node device can be to forward the encapsulated message to the next node device, and the processing action of the tail node device can be to decapsulate the encapsulated message and forward the decapsulated data packet.
[0141] The CPU is pre-configured with a SID forwarding table. The key in the SID forwarding table is the SID index, and the output information is the SID table entry. The CPU looks up the SID index sent by the forwarding chip in the SID forwarding table to obtain the corresponding SID table entry. The CPU then sends the encapsulated packet and the encapsulated packet's SID table entry to the forwarding chip, which then performs the next step of processing based on the processing actions in the SID table entry.
[0142] S803 and CPU process the encapsulated message according to the processing action in the SID table, obtain the data packet, and send the data packet to the forwarding chip.
[0143] SID entries can indicate processing actions. After receiving a SID entry, the CPU can process the encapsulated message according to the processing action in the SID entry to obtain a data message. The data message can be a decapsulated data message.
[0144] S804, the forwarding chip forwards data packets.
[0145] The forwarding chip can determine the destination address of the data packet, that is, the destination address of the decapsulated data packet, and forward the data packet to the device indicated by the destination address.
[0146] In this embodiment, the SID index of the encapsulated packet is obtained by querying the routing table through the forwarding chip, and the SID entry of the encapsulated packet is obtained by querying the SID entry through the CPU. Finally, the CPU processes the encapsulated packet according to the processing actions in the SID entry to obtain a data packet, and sends the data packet to the forwarding chip for forwarding. The forwarding chip only needs to perform routing table lookups and packet forwarding, which reduces the implementation difficulty and cost. The CPU only needs to perform SID entry lookups, which reduces the workload and improves the performance of the CPU in forwarding packets.
[0147] If other node devices are tail node devices, the steps described above, in which the CPU forwards the encapsulated packet according to the SID entry of the encapsulated packet, include:
[0148] The CPU performs SRv6 decapsulation on the encapsulated message according to the processing action in the SID table, obtains the data packet, and sends the data packet to the forwarding chip.
[0149] If the current node device is the tail node device, the processing action of the SID table entry can be to decapsulate the encapsulated packet using SRv6. At this time, the CPU can strip the outer packet header of the encapsulated packet, retain the inner IP packet header of the encapsulated packet, and send the packet after stripping the outer packet header to the forwarding chip. The forwarding chip will then look up the destination routing information corresponding to the inner IP packet header in a preset mapping table based on the inner IP packet header, and forward the data packet based on the destination routing information.
[0150] The destination routing information can be the VPN routing information of the destination device, and the preset mapping table can be the VPN routing table. After the forwarding chip looks up the VPN routing table to obtain the VPN routing information of the data packet, it can forward the data packet to the device indicated by the VPN routing information based on the VPN routing information.
[0151] The steps by which the aforementioned forwarding chip forwards data packets include:
[0152] The forwarding chip determines the next-hop information of the data packet based on the hardware routing table, edits the Ethernet header of the data packet based on the next-hop information, and forwards the edited data packet to the destination device.
[0153] The hardware routing table records the routing information of each node device along the data packet forwarding path, as well as the routing information of the destination device. When forwarding data packets, the forwarding chip of the tail node device can find the next-hop information of the data packet in the hardware routing table based on the destination address of the data packet, obtain the routing information of the destination device, edit the Ethernet header of the data packet based on the routing information of the destination device, and forward the edited data packet to the destination device.
[0154] In this embodiment, by using a combination of forwarding chips and CPUs on intermediate node devices and tail node devices for packet forwarding, not only can the implementation difficulty and cost of forwarding chips be reduced, but the performance of CPU packet forwarding can also be improved.
[0155] This application also provides a node device, which can be a head node device, intermediate node device, or tail node device in an SRv6 network. For example... Figure 9 The diagram shown is a schematic of a node device structure provided in an embodiment of the present invention, including a processor 901, a memory 902, and a bus. The memory 902 stores machine-readable instructions executable by the processor 901. When the computer device is running, the processor 901 and the memory 902 communicate via the bus. When the machine-readable instructions are executed by the processor 901, the aforementioned message forwarding method is performed.
[0156] This application also provides an SRv6 network, see embodiments thereof. Figure 1 An SRv6 network includes at least one node device, which includes a head node device, an intermediate node device, and a tail node device.
[0157] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The protection scope of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application. All should be covered within the protection scope of this application. Therefore, the protection scope of this application should be determined by the protection scope of the claims.
Claims
1. A message forwarding method, characterized in that, A head node device applied in an SRv6 network, the head node device including a forwarding chip and a CPU, the method comprising: The forwarding chip determines the forwarding identification information of the data packet according to the pre-installed hardware forwarding table, and sends the data packet and the forwarding identification information to the CPU; The CPU determines the service SID, tunnel tail node address, and tunnel color identifier of the data packet based on the forwarding identifier information and the software forwarding table. The CPU determines the segment list of the data packet based on the SRv6 TE Policy forwarding table, the tunnel tail node address, and the tunnel color identifier. The CPU encapsulates the data packet according to the service SID and Segment List to obtain the encapsulated packet, and sends the encapsulated packet to the forwarding chip; The forwarding chip forwards the encapsulated message.
2. The method according to claim 1, characterized in that, The hardware forwarding table includes a routing table; The step of the forwarding chip determining the forwarding identification information of the data packet according to the pre-installed hardware forwarding table and sending the data packet and the forwarding identification information to the CPU includes: The routing table is queried based on the destination IP address of the data packet to determine the tunnel identifier that matches the data packet, and it is determined whether an access control list exists in the hardware forwarding table; If the access control list exists and an entry matching the data packet is found, the flow rule identifier matching the data packet is obtained, and the tunnel identifier and the flow rule identifier are sent to the CPU together with the data packet as the forwarding identifier information; If the access control list does not exist or no entry matching the data packet is found in the access control list, the tunnel identifier is sent to the CPU along with the data packet as the forwarding identifier information, based on the routing table.
3. The method according to claim 2, characterized in that, The software forwarding table includes an SRv6 tunnel encapsulation information table and a flow policy rule table; The CPU determines the service SID, tunnel tail node address, and tunnel color identifier of the data packet based on the forwarding identifier information and the software forwarding table, including: The SRv6 tunnel encapsulation information table is searched based on the tunnel identifier to determine the tunnel encapsulation information table entry that matches the tunnel identifier, and the service SID, tunnel tail node address, and tunnel color identifier in the tunnel encapsulation information table entry are obtained. If the forwarding identifier information does not include the flow rule identifier, then the service SID, tunnel tail node address and tunnel color identifier in the tunnel encapsulation information table entry shall be used as the service SID, tunnel tail node address and tunnel color identifier of the data packet. If the forwarding identifier information includes a flow rule identifier, then the flow policy rule table is searched to determine the flow policy rule table entry that matches the flow rule identifier. The service SID, tunnel tail node address, and tunnel color identifier in the flow policy rule table entry are obtained. The service SID, tunnel tail node address, and tunnel color identifier of the data packet are determined according to the tunnel encapsulation information table entry and the flow policy rule table entry.
4. The method according to claim 3, characterized in that, The step of determining the service SID, tunnel tail node address, and tunnel color identifier of the data packet based on the tunnel encapsulation information table entry and the flow policy rule table entry includes: If the service SID, tunnel tail node address, and tunnel color identifier in the tunnel encapsulation information table are different from those in the flow policy rule table, then the service SID, tunnel tail node address, and tunnel color identifier in the flow policy rule table shall be used as the service SID, tunnel tail node address, and tunnel color identifier of the data packet, or... If the flow policy rule entry contains a tunnel color identifier, then the service SID, tunnel tail node address, and tunnel color identifier of the data packet are determined based on the tunnel color identifier in the flow policy rule entry and the service SID and tunnel tail node address in the tunnel encapsulation information entry.
5. The method according to claim 1, characterized in that, The CPU determines the segment list of the data packet based on the SRv6 TE Policy forwarding table, the tunnel tail node address, and the tunnel color identifier, including: The CPU searches the SRv6 TE Policy forwarding table based on the tunnel tail node address and tunnel color identifier to determine the SRv6 TE Policy entry that matches the tunnel tail node address and tunnel color identifier, and uses the Segment List in the SRv6 TE Policy entry as the Segment List of the data packet.
6. The method according to claim 1, characterized in that, The forwarding chip forwards the encapsulated message in the following steps: The forwarding chip determines the next-hop information of the encapsulated message, edits the Ethernet header of the encapsulated message based on the next-hop information, and forwards the edited encapsulated message to the next node device.
7. A message forwarding method, characterized in that, The method is applied to other node devices in an SRv6 network, including intermediate node devices or tail node devices, each of which includes a forwarding chip and a CPU. The forwarding chip determines the SID index corresponding to the destination address of the encapsulated packet according to the pre-installed hardware routing table, and sends the encapsulated packet and the SID index to the CPU. The CPU determines the SID entry corresponding to the destination address of the encapsulated packet based on the SID index and the SID forwarding table. The CPU processes the encapsulated message according to the processing action in the SID table entry to obtain a data packet, and sends the data packet to the forwarding chip. The forwarding chip forwards the data packets.
8. The method according to claim 7, characterized in that, If the other node device is a tail node device, the CPU processes the encapsulated message according to the processing action in the SID table entry to obtain a data packet, including: The CPU performs SRv6 decapsulation on the encapsulated message according to the processing action in the SID table entry to obtain a data packet, and sends the data packet to the forwarding chip. The forwarding chip forwards the data packets in the following steps: The forwarding chip determines the next-hop information of the data packet according to the hardware routing table, edits the Ethernet header of the data packet based on the next-hop information, and forwards the edited data packet to the destination device.
9. A node device, characterized in that, The node device is the head node device, intermediate node device, or tail node device in the SRv6 network. If the node device is a head node device, then the node device includes: a processor, a storage medium, and a bus. The storage medium stores program instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus. The processor executes the program instructions to perform the steps of the message forwarding method as described in any one of claims 1-6. If the node device is an intermediate node device or a tail node device, the node device includes: a processor, a storage medium, and a bus. The storage medium stores program instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus. The processor executes the program instructions to perform the steps of the message forwarding method as described in claim 7 or 8.
10. An SRv6 network system, characterized in that, It includes a head node device that performs the message forwarding method as described in any one of claims 1-6, and also includes an intermediate node device and a tail node device that perform the message forwarding method as described in claim 7 or 8.
Citation Information
Patent Citations
Method and system for implementing data stream hardware forwarding, and network routing device
CN101404612A
Message forwarding method and device
CN108259293A