A message forwarding method and device applied to an SRv6 SFC system
By configuring dynamic flow classification type SID and generating a re-entry flow forwarding table in the SFF node, the problems of high SID resource consumption and complex configuration in the SRv6 SFC system are solved, achieving simplified configuration and resource saving.
Patent Information
- Application Number
- CN202211257569.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-14
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2042-10-14
AI Technical Summary
In the SRv6 SFC system, existing technologies require the allocation of multiple SIDs for each forwarding device and third-party service, resulting in high SID resource consumption and complex configuration, making it difficult to simplify the configuration of packet-related information.
Configure a dynamic flow classification type SID in the SFF node so that multiple SRv6 packets can share a single SID, and reduce SID usage and configuration complexity by dynamically generating a re-forwarding table.
By dynamically generating the re-redirection table, the configuration of SFF nodes is simplified, SID resources are saved, and the resource utilization efficiency of the system is improved.
Smart Images

Figure CN117938767B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of information processing, and particularly relates to a packet forwarding method and device applied to an SRv6 SFC system. BACKGROUND
[0002] Service Function Chaining (SFC) is a mechanism for deploying value-added services. In network communication, a group of devices with service processing functions (such as firewall, network address translation (nat), deep packet inspection (dpi), etc.) are combined in order, and the traffic passing through these service functions constitutes an SFC. The basic architecture of SFC includes control nodes, classification nodes, service function forwarding nodes and service function nodes, etc. The standard of SFC is Network Service Header (NSH), and NSH additionally adds a packet header, which can save information such as service sequence to be bypassed. When the head node diverts, as long as the service sequence to be bypassed is filled in the packet, the service chain function can be realized.
[0003] SRv6 (Segment Routing IPv6, IPv6 source routing) technology is that the source routing specifies the traffic forwarding path by arranging a Segment ID (SID) list at the head node, and the SID of SRv6 supports flexible forwarding programmable capability, and the SRv6 technology can meet the needs of SFC.
[0004] SRv6 SFC technology is to use the source routing technology of SRv6 to logically connect the devices and services on the network at the head node to form an ordered service combination, thereby realizing the service chain function.
[0005] Currently, in the SRv6 SFC system, for service traffic forwarding, a SID needs to be allocated for each forwarding device and a third-party service that needs to be bypassed, and the function of the SFC service chain is realized by arranging a SID sequence in the SR header node. Because SRv6 only diverts at the head node and does not re-divert at the forwarding node, different proxy (Proxy) SIDs need to be generated for different service traffic at the forwarding node. When diverting at the head node, different proxy SIDs are used to distinguish different service traffic. For example, service 1 needs to pass through SF1 (as a proxy of SFF1), and service 2 needs to pass through SF1 and SF2 (as a proxy of SFF2), so two proxy SIDs need to be allocated for SFF1 device, one proxy SID1 for service 1 and the other proxy SID2 for service 2. When diverting at the head node R1, service 1 will arrange proxy SID1 in the SID sequence, and service 2 will arrange proxy SID2 in the SID sequence. When there is more service traffic, more SID resources are occupied by using this scheme, and the configuration is complex.
[0006] Therefore, in the process of service traffic forwarding, how to simplify the configuration of the system for the related information of the forwarding message and reduce the occupation of SIDs is a problem that needs to be solved at present. SUMMARY
[0007] The present application provides a message forwarding method applied to an SRv6 SFC system to simplify the configuration of the system for the related information of the forwarding message and reduce the occupation of SIDs.
[0008] In a first aspect, a message forwarding method applied to an SRv6 SFC system is provided, the SRv6 SFC system including a head node, a service function forwarding SFF node and a service function SF node, the SFF node being connected with the SF node, and including:
[0009] The SFF node receives N SRv6 packets from the head node; wherein the N SRv6 packets are SRv6 packets encapsulated by the head node according to a configured SRv6 TE Policy after the head node receives M original packets from a user end, and N = M, and N is an integer greater than 0; the SFF node identifies the N SRv6 packets, and when it is identified that the SID of the N SRv6 packets is a dynamic flow classification type SID, a re-redirect forwarding table is dynamically generated according to the N SRv6 packets; wherein the dynamic flow classification type SID is used to represent that the N SRv6 packets passing through the SF node share the dynamic flow classification type SID; the SFF node strips the respective SRH from the N SRv6 packets to obtain the M original packets, and sends the M original packets to the SF node for processing; the SFF node receives a first original packet processed by the SF node, determines the SRH of the first original packet according to the re-redirect forwarding table, and the first original packet is any one of the M original packets; and the SFF node re-encapsulates and forwards the first original packet according to the SRH of the first original packet.
[0010] Optionally, the SFF node comprises a forwarding layer and a control layer; and the dynamically generating a re-redirect forwarding table according to the N SRv6 packets comprises:
[0011] The forwarding layer of the SFF node sends the N SRv6 packets to the control layer of the SFF node after copying the N SRv6 packets; the control layer of the SFF node analyzes the N SRv6 packets to obtain the respective packet quintuple information and SRH of the N SRv6 packets; and the control layer of the SFF node dynamically generates the re-redirect forwarding table according to the respective packet quintuple information and SRH of the N SRv6 packets.
[0012] Optionally, the re-redirect forwarding table comprises a mapping relationship between the packet quintuple information of the N SRv6 packets and the SRH of the N SRv6 packets; and the SFF node receives a first original packet processed by the SF node, and determines the SRH of the first original packet according to the re-redirect forwarding table, which comprises: querying the re-redirect forwarding table according to the packet quintuple information in the first original packet; and if the first packet quintuple information in the re-redirect forwarding table matches the packet quintuple information in the first original packet, taking the first SRH corresponding to the first packet quintuple information in the re-redirect forwarding table as the SRH of the first original packet.
[0013] Optionally, the SFF node is configured with the dynamic flow classification type entry interface, and the dynamic flow classification type entry interface is used to represent that original packets passing through the dynamic flow classification type entry interface need to perform a dynamic re-redirecting operation; the SFF node receives the first original packet processed by the SF node, and determines the SRH of the first original packet according to the re-redirecting forwarding table, including:
[0014] If the SFF node receives the first original packet from the SF node, and the occupied entry interface is the entry interface occupied by the dynamic flow classification type SID, the SRH of the first original packet is determined according to the re-redirecting forwarding table.
[0015] Optionally, the packet quintuple information includes at least one of a source IP address, a source port, a destination address, and a destination port.
[0016] In a second aspect, a packet forwarding device applied to an SRv6 SFC system is provided, including:
[0017] A receiving module is configured to receive N SRv6 packets from a head node; wherein the N SRv6 packets are SRv6 packets encapsulated by the head node according to a configured SRv6 TE Policy after the head node receives M original packets from a user end, and N = M, and N is an integer greater than 0; a re-redirecting forwarding table generating module is configured to identify the N SRv6 packets, and when it is identified that the SID of the N SRv6 packets is a dynamic flow classification type SID, dynamically generate a re-redirecting forwarding table according to the N SRv6 packets; wherein the dynamic flow classification type SID is used to represent that the N SRv6 packets passing through the SF node share the dynamic flow classification type SID; a forwarding process processing module is configured to strip the SRH of each SRv6 packet from the N SRv6 packets to obtain the M original packets, and send the M original packets to the SF node for processing; and receive a first original packet processed by the SF node, instruct the re-redirecting forwarding table generating module to determine the SRH of the first original packet according to the re-redirecting forwarding table, the first original packet being any one of the M original packets, and re-encapsulate and forward the first original packet according to the SRH of the first original packet.
[0018] Optionally, the device includes a forwarding layer and a control layer; and the re-redirecting forwarding table generating module is specifically configured to:
[0019] indicate the control layer to analyze the N SRv6 messages to obtain message quintuple information and SRH corresponding to each of the N SRv6 messages; and indicate the control layer to dynamically generate the re-redirecting forwarding table according to the message quintuple information and SRH corresponding to each of the N SRv6 messages.
[0020] Optionally, the re-redirecting forwarding table comprises mapping relationship between message quintuple information of the N SRv6 messages and SRH of the N SRv6 messages.
[0021] indicate the re-redirecting forwarding table generation module to query the re-redirecting forwarding table according to message quintuple information in the first original message; and if the first message quintuple information in the re-redirecting forwarding table matches the message quintuple information in the first original message, indicate the re-redirecting forwarding table generation module to take first SRH corresponding to the first message quintuple information in the re-redirecting forwarding table as SRH of the first original message.
[0022] In a third aspect, an electronic device is provided, comprising:
[0023] a memory for storing a computer program; and a processor for executing the computer program stored in the memory to implement the method steps of any one of the first aspect.
[0024] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. When the computer program is executed by a processor, the method steps of any one of the first aspect are implemented.
[0025] In the embodiments of the present application, based on the SRv6 SFC system, since the SRv6 message passing through the SF node can be pre-configured with a dynamic flow classification type SID in the SFF node, and the SRv6 TE Policy is pre-configured in the header node, the SRv6 message can be prevented from occupying a SID, and the SID space is saved; since the SFF node receives N SRv6 messages after the M original files are SRv6 encapsulated from the header node, the SFF node identifies the N SRv6 messages, when the SID of the N SRv6 messages is identified as the dynamic flow classification type SID, a re-redirect forwarding table is dynamically generated according to the N SRv6 messages, the SFF node peels off the respective extended route header SRH from the N SRv6 messages to obtain the respective corresponding M original messages, and sends the M original messages to the SF node for processing, the SFF node receives the first original message (any one of the M original messages) processed from the SF node, and determines the SRH of the first original message according to the re-redirect forwarding table; the SFF node re-encapsulates the first original message according to the SRH of the first original message, and forwards it to the SFF node, so that the SFF node does not need to pre-configure the related SRH information for each SRv6 message, but analyzes each SRv6 message, and stores the respective corresponding characteristic information (for example, the respective message quintuple information, SRH, etc.) of each SRv6 message in real time through the dynamically generated re-redirect forwarding table, which further simplifies the configuration of the SFF node, saves resources, and meets the user experience.
[0026] The above-mentioned various aspects in the second aspect to the fourth aspect and the technical effects that can be achieved by the various aspects will be described in the above-mentioned technical effect description of the first aspect or the various possible schemes in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0027] Figure 1 A signaling interaction diagram currently using a static mode for message forwarding;
[0028] Figure 2 A structure schematic diagram of an SRv6 SFC system provided by the embodiments of the present application;
[0029] Figure 3 A message forwarding method flowchart applied to the SRv6 SFC system provided by the embodiments of the present application;
[0030] Figure 4 A logic schematic diagram of message forwarding applied to the SRv6 SFC system provided by the embodiments of the present application;
[0031] Figure 5A structural schematic diagram of a message forwarding device applied to an SRv6 SFC system is provided for an embodiment of the present application.
[0032] Figure 6 A structural schematic diagram of an electronic device is provided for an embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings. The specific operation methods in the method embodiments can also be applied to the device embodiments or system embodiments. It should be noted that in the description of the present application, “multiple” is understood as “at least two”. “And / or” describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can represent the following three cases: A exists alone, A and B exist together, and B exists alone. A is connected with B, which means that A is directly connected with B and A is connected with B through C. In addition, in the description of the present application, “first”, “second”, etc. are used only for the purpose of distinguishing the description, and cannot be understood as indicating or implying relative importance, nor can it be understood as indicating or implying order.
[0034] The embodiments of the present application will be described in detail below with reference to the drawings.
[0035] In order to better understand the embodiments of the present application, first, some terms in the embodiments of the present application will be explained below, so as to facilitate the understanding of the skilled in the art.
[0036] (1) SRv6 TE Policy uses the source routing mechanism of Segment Routing (SR technology) to guide the message to pass through the network by encapsulating an ordered instruction list (path information) at the head node. SRv6 TE Policy is used to implement traffic engineering, improve network quality, and meet the end-to-end needs of business.
[0037] (2) The Segment Routing Header (SRH) is a new IPv6 extension header added by SRv6. The SRH specifies an explicit path of IPv6, uses the address of IPv6 as SID, and adds SID in the SRH. The node can realize the forwarding function according to the path information contained in the SRH extension header.
[0038] Currently, in the process of packet forwarding, one proxy SID and one service traffic are strongly bound, and when there is a large amount of service traffic, a large number of proxy SIDs need to be consumed. Each proxy SID needs to statically configure SRH information (for example, SID List in the packet header, source IP address, packet priority, TTL) and the like, and for packet forwarding, a static configuration mode is used to achieve it. Taking two services (original packets) as an example, as shown in Figure 1 The signaling interaction diagram for packet forwarding in a static mode is exemplarily shown, wherein the service function forwarding node acts as a proxy for the service function node, and the statically configured proxy scheme for the two services (original packets) is an END.AS type SID (for example, the SID of original packet 1 uses 2001::100; the SID of original packet 2 uses 2001::101). Since different original packets use different END.AS type SIDs, the classification node pre-configures a Segment List used by the SRv6 TE Policy for the two original packets (as shown in Table 1 below), and respectively configures the original packet 1 and the original packet 2 with their own SRH information. Table 1 exemplarily shows the configuration information of the original packet 1 and the original packet 2 in the classification node.
[0039] Table 1: Segment List of original packet 1 and original packet 2 in classification node
[0040]
[0041] As shown in FIG. 1, the following steps are included:
[0042] 101: The user equipment sends the original packet 1 and the original packet 2 to the classification node.
[0043] 102: After receiving the original packet 1 and the original packet 2, the classification node encapsulates the original packet 1 and the original packet 2 according to the respectively configured SRv6 TE Policy, and sends the encapsulated SRv6 packet 1 and SRv6 packet 2 to the service function forwarding node.
[0044] For example, after receiving the original packet 1 and the original packet 2, the classification node introduces the traffic (original packet 1 and original packet 2) into the SRv6 TE Policy based on the matching diversion strategy, and then encapsulates the SRv6 packet according to the SRv6 TE Policy. The SID sequence of the SRv6 TE Policy can be (D2, D1, C, B).
[0045] 103: After the service function forwarding node receives the SRv6 message 1 and the SRv6 message 2, the service function forwarding node identifies the SRv6 message 1 and the SRv6 message 2 respectively, and when the SID of the SRv6 message 1 and the SID of the SRv6 message 2 are identified as the SID in the local END.AS type, the service function forwarding node strips the respective SRH corresponding to the SRv6 message 1 and the SRv6 message 1, and sends the original message 1 and the original message 2 to the function node.
[0046] 104: After the function node receives the original message 1 and the original message 2, the function node processes the original message 1 and the original message 2 respectively, and sends the processed original message 1 and the processed original message 2 to the service function forwarding node.
[0047] 105: After the service function forwarding node receives the processed original message 1 and the processed original message 2, the service function forwarding node re-encapsulates the original message 1 and the original message 2 according to the SRH information configured for the respective END.AS type, restores the original message 1 and the original message 2 into the SRv6 message 1 and the SRv6 message 2, and forwards the SRv6 message 1 and the SRv6 message 2 to the next node.
[0048] Through the above static processing mode, the forwarding of each service (message) is realized, and different SIDs corresponding to different services need to be respectively pre-configured with respective related configuration information in the service function forwarding node and the head node, which is complex in configuration, and each service occupies one SID, which also increases the resource occupancy rate of the SID.
[0049] Therefore, in the embodiments of the present application, the proxy SID and the service are decoupled, and only one proxy SID needs to be configured for the corresponding service function forwarding node. Through the mapping relationship between the message characteristics (for example, the message quintuple information) and the SRH, the dynamic re-flow function is realized on the service function forwarding node, so as to reduce the static configuration.
[0050] Figure 2 A structure diagram of an SRv6 SFC system provided by the embodiments of the present application is shown in FIG. 2. Figure 2 As shown in FIG. 2, the SRv6 SFC system 200 mainly includes a head node 20, an SFF node 21, an SF node 22, a node C, and a node D. The head node 20 is connected with the SFF node 21, the SFF node 21 is connected with the SF node 22, the SF node 22 is connected with the node C, and the node C is connected with the node D. For the convenience of description, the configuration and function of each node in the system are described below by taking the original message 1 and the original message 2 as examples.
[0051] The head node 20 (classification node) can communicate with the user terminal, for example, receive the original message 1 and the original message 2 sent by the user terminal, and the head node 20 can be configured with a Segment List commonly used by the SRv6 TE Policy for the original message 1 and the original message 2 in advance. As shown in Table 2, the Segment List configured by the head node 20 for the original message 1 and the original message 2 is exemplified.
[0052] Table 2: Segment List commonly used by the original message 1 and the original message 2
[0053]
[0054] Further, after the head node 20 receives the original message 1 and the original message 2, the original message 1 and the original message 2 are respectively encapsulated into SRv6 messages according to the configured SRv6 TE Policy, and then sent to the SFF node 21.
[0055] The SFF node 21 (service function forwarding node) can be pre-configured with a dynamic flow classification type (END.ADC) SID commonly used by the SRv6 message 1 (encapsulated original message 1) and the SRv6 message 2 (encapsulated original message 2), for example, the configured SID is 2001::100, and can also be configured with a dynamic flow classification type in interface and a dynamic flow classification type out interface, so as to facilitate the differentiation with other types of SIDs. The dynamic flow classification type in interface is used to indicate that the original message sent by the SF node 22 to the SFF node 21 via the dynamic flow classification type in interface needs to perform a dynamic reflow operation. The dynamic flow classification type out interface is used to indicate that after the SFF node 21 performs SRH stripping on the SRv6 message of the dynamic flow classification type SID, the original message 1 and the original message 2 are sent to the F node 22 via the dynamic flow classification type out interface. For example, after the SFF node 22 receives the SRv6 message 1 and the SRv6 message 2, the SFF node 22 can perform a dynamic proxy operation (strip the SRH of the SRv6 message 1 and the SRv6 message 2) on the SRv6 message 1 and the SRv6 message 2 respectively, and then forward the original message 1 and the original message 2 to the SF node 22 through the dynamic flow classification type out interface.
[0056] After the SF node 22 receives the original message 1 and the original message 2, the SF node 22 can process the original message 1 and the original message 2 respectively, for example, perform service flow cleaning and service flow acceleration, and then send the processed original message 1 and the original message 2 to the SFF node 21, so that the SFF node 21 can re-encapsulate the processed original message 1 and the original message 2, restore them into the SRv6 message 1 and the SRv6 message 2, and then forward them to the node C.
[0057] The node C can be a transit node. After receiving the SRv6 message 1 and the SRv6 message 2 from the SFF node 21, the node C processes according to the original SRv6 forwarding process, for example, determines that the next destination address of the SRv6 message 1 and the SRv6 message 2 is the node D, and forwards the SRv6 message 1 and the SRv6 message 2 to the node D.
[0058] The node D can be an SRv6 Segment Endpoint Node, and also processes according to the original SRv6 forwarding process after receiving the SRv6 message 1 and the SRv6 message 2 from the node C.
[0059] It should be noted that the SRv6 SFC system 200 is only an example, and the entire service function chain can be improved or increased according to actual business needs, for example, the node C supports the SRv6 function as a service function forwarding node, and the like, which is not limited in the embodiments of the present application. Figure 2 The functions that can be achieved by each device (node) of the SRv6 SFC system will be described in subsequent method embodiments, and will not be described in detail here.
[0060] Although the embodiments of the present application provide the method operation steps as shown in the following embodiments or drawings, more or fewer operation steps can be included in the method based on conventional or non-creative labor. The execution order of these steps is not limited to the execution order provided by the embodiments of the present application in steps that do not have necessary causal relationships in logic. The method can be executed or executed in parallel according to the method order shown in the embodiments or drawings during actual processing or device execution.
[0061] In order to facilitate understanding, the following will describe in detail a message forwarding method applied to an SRv6 SFC system provided by the present application through specific embodiments, Figure 3 A flowchart of a message forwarding method applied to an SRv6 SFC system provided by the embodiments of the present application is used to simplify the configuration information of the system for the to-be-forwarded message, and reduce the occupation of the SID. As shown in the Figure 3 The flowchart includes the following steps:
[0062] 301: The SFF node receives N SRv6 messages from a head node.
[0063] Wherein, the N SRv6 packets are the packets after the head node receives M original packets from the user end, and respectively performs SRv6 encapsulation on the M original packets according to the configured SRv6 TE Policy, N=M, and is an integer greater than 0. Taking the original packet 1 as an example, after the head node receives the original packet 1 (for example, an original IPv4 packet) from the user end, the flow is introduced into the SRv6 TE Policy by matching the diversion strategy, and the head node performs SRv6 packet encapsulation according to the configured SRv6 TE Policy. The SID sequence of the SRv6 TE Policy is (D2, D1, C, SFF END.ADC).
[0064] The SFF node can be specifically Figure 2 The head node can be specifically Figure 2 The head node in the network.
[0065] 302: The SFF node identifies the N SRv6 packets, and when the SID of the N SRv6 packets is identified as a dynamic flow classification type SID, a re-diversion forwarding table is dynamically generated according to the N SRv6 packets.
[0066] Wherein, the dynamic flow classification type SID is used to represent that the N SRv6 packets that need to pass through the SF node share the dynamic flow classification type SID.
[0067] Optionally, the re-diversion forwarding table is dynamically generated according to the N SRv6 packets, which can be achieved by the following way:
[0068] The forwarding layer of the SFF node copies the above-mentioned N SRv6 packets and sends them to the control layer of the SFF node; the control layer of the SFF node analyzes the N SRv6 packets to obtain the respective packet quintuple information and SRH of the N SRv6 packets; and the control layer of the SFF node dynamically generates a re-diversion forwarding table according to the respective packet quintuple information and SRH of the N SRv6 packets. The re-diversion forwarding table includes the mapping relationship between the packet quintuple information of the N SRv6 packets and the SRH of the N SRv6 packets, and can also include a DSCP used to distinguish service marks and the like. As shown in Table 3, the re-diversion forwarding table is exemplarily shown.
[0069] Table 3: Re-diversion forwarding table
[0070]
[0071] Optionally, the packet quintuple information can include a source IP address, a source port, a destination address, a destination port, and the like.
[0072] In the embodiments of the present application, after the SFF node receives the SRv6 packet of the END.ADC type SID, the forwarding plane normally forwards the SRv6 packet, without affecting the normal forwarding performance, and the forwarding plane copies a copy of the SRv6 packet to the control plane, and the control plane dynamically learns to generate a re-redirect forwarding table for buffering the related data of each SRv6 packet. Compared with the SRv6 packet of other types of SIDs, the SFF node does not need to pre-configure the SRH information of each SRv6 packet, thereby simplifying the configuration of the SFF node.
[0073] 303: The SFF node strips the SRH of each SRv6 packet from the N SRv6 packets to obtain M original packets, and sends the M original packets to the SF node for processing.
[0074] The SF node can be specifically Figure 2 The SF node can be specifically
[0075] 304: The SFF node receives the first original packet processed by the SF node, and determines the SRH of the first original packet according to the re-redirect forwarding table. The first original packet is any one of the M original packets.
[0076] Optionally, the SFF node is configured with a dynamic flow classification type SID in interface. If the SFF node receives the first original packet from the SF node, the in interface occupied by the first original packet is the dynamic flow classification type in interface, and the SRH of the first original packet is determined according to the re-redirect forwarding table.
[0077] Optionally, the SRH of the first original packet is determined according to the re-redirect forwarding table, which can be achieved by the following method:
[0078] According to the packet five tuple information in the first original packet, the re-redirect forwarding table (such as Table 3) is queried. If the first packet five tuple information (for example, the packet five tuple information of the SRv6 packet 1 in Table 3) in the re-redirect forwarding table matches the packet five tuple information in the first original packet, the first SRH corresponding to the first packet five tuple information in Table 3 is determined as the SRH of the first original packet.
[0079] 305: The SFF node re-encapsulates and forwards the first original packet according to the SRH of the first original packet.
[0080] Taking the first SRH as the SRH of the first original packet as an example, the SFF node re-encapsulates the first original packet in the first SRH, restores the first original packet to the SRv6 packet 1, and then forwards the SRv6 packet 1 to the next SFF node or a transit node that does not support the SRv6 function for subsequent processing.
[0081] In some embodiments, after re-encapsulating and forwarding the first original packet to the next SFF node, the re-redirect forwarding table can be updated, for example, the packet five-tuple information and the SRH of the first original packet in the re-redirect forwarding table can be deleted, so that the resources can be cleaned up in real time and the resource occupation can be reduced.
[0082] In the embodiments of the present application, based on the SRv6 SFC system, since the SRv6 packet passing through the SFF node can be pre-configured with a dynamic flow classification type SID in the SFF node, and the SRv6 TE Policy is pre-configured in the head node, the SRv6 packet can avoid occupying a SID and save the SID space. In addition, the SFF node receives N SRv6 packets after the M original files are encapsulated by the head node, the SFF node identifies the N SRv6 packets, and when the SID of the N SRv6 packets is identified as the dynamic flow classification type SID, a re-redirect forwarding table is dynamically generated according to the N SRv6 packets. The SFF node strips the respective extended route header SRH from the N SRv6 packets to obtain the respective corresponding M original packets, and sends the M original packets to the SF node for processing. The SFF node receives the first original packet (any one of the M original packets) after the processing of the SF node, determines the SRH of the first original packet according to the re-redirect forwarding table, re-encapsulates the first original packet according to the SRH of the first original packet, and forwards the first original packet to the next node. Therefore, the SFF node does not need to pre-configure the related SRH information for each SRv6 packet, but analyzes each SRv6 packet, buffers the respective characteristic information (for example, the respective packet five-tuple information and SRH) of each SRv6 packet in real time through the dynamically generated re-redirect forwarding table, further simplifies the configuration of the SFF node, saves the resources, and meets the user experience.
[0083] Based on the above Figure 3 , Figure 4 An exemplary logic diagram of a packet forwarding applied to an SRv6 SFC system is shown. Taking the original packet 1 as an example, as shown in Figure 4 , the user end sends the original packet 1 to the head node (for example, Figure 2The head node receives the original message 1, encapsulates the original message 1 to obtain an SRv6 message 1, and forwards the SRv6 message 1 to the SFF node (for example, the SFF node 21 in FIG. 1). Figure 2 The forwarding layer of the SFF node receives the SRv6 message 1, copies a copy of the SRv6 message 1 to the control layer, so that the control layer analyzes the SRv6 message 1, dynamically generates a re-redirecting forwarding table, the re-redirecting forwarding table includes the packet quintuple information of the original message 1 in the SRv6 message 1 and the SRH, the forwarding layer of the SFF node pops the SRH of the SRv6 message 1, and sends the original message 1 to the SF node for processing. After the SF node processes the original message 1, the processed original message 1 is returned to the SFF node. After the SFF node receives the processed original message 1, the SRH corresponding to the original message 1 is determined according to the re-redirecting forwarding table, and the original message 1 is re-encapsulated to restore the SRv6 message 1, and then the SRv6 message 1 is forwarded to the next node (for example, the node C in FIG. 1). Figure 2
[0084] Based on the same technical concept, the present application also provides a structure diagram of a message forwarding device applied to an SRv6 SFC system.
[0085] Figure 5 The structure diagram of the message forwarding device applied to the SRv6 SFC system provided in the present application is shown in FIG. 5, which includes a receiving module 501, a re-redirecting forwarding table generating module 502, and a forwarding flow processing module 503. Figure 5
[0086] The receiving module 501 is configured to receive N SRv6 messages from a head node. The N SRv6 messages are SRv6 encapsulated messages of M original messages received by the head node from a user end, and the N=M, and N is an integer greater than 0.
[0087] The re-redirecting forwarding table generating module 502 is configured to identify the N SRv6 messages, and when the SID of the N SRv6 messages is a dynamic flow classification type SID, dynamically generate a re-redirecting forwarding table according to the N SRv6 messages. The dynamic flow classification type SID is used to represent that the N SRv6 messages passing through the SF node share the dynamic flow classification type SID.
[0088] The forwarding flow processing module 503 is configured to strip the SRH of each of the N SRv6 packets to obtain the M original packets, and send the M original packets to the SF node processing; and receive a first original packet from the SF node processing, instruct the re-redirecting forwarding table generation module to determine the SRH of the first original packet according to the re-redirecting forwarding table, the first original packet being any one of the M original packets, and re-encapsulate and forward the first original packet according to the SRH of the first original packet.
[0089] Optionally, the apparatus comprises a forwarding layer and a control layer; the re-redirecting forwarding table generation module 502 is specifically configured to:
[0090] instruct the forwarding layer to send the N SRv6 packets to the control layer after copying the N SRv6 packets; instruct the control layer to analyze the N SRv6 packets to obtain the packet five-tuple information and the SRH corresponding to each of the N SRv6 packets; and instruct the control layer to dynamically generate the re-redirecting forwarding table according to the packet five-tuple information and the SRH corresponding to each of the N SRv6 packets.
[0091] Optionally, the re-redirecting forwarding table comprises a mapping relationship between the packet five-tuple information of the N SRv6 packets and the SRH of the N SRv6 packets; and the forwarding flow processing module 503 is specifically configured to:
[0092] instruct the re-redirecting forwarding table generation module to query the re-redirecting forwarding table according to the packet five-tuple information in the first original packet; and if the first packet five-tuple information in the re-redirecting forwarding table matches the packet five-tuple information in the first original packet, use the first SRH corresponding to the first packet five-tuple information in the re-redirecting forwarding table as the SRH of the first original packet.
[0093] Optionally, the apparatus is configured with an ingress interface and an egress interface occupied by the dynamic flow classification type SID; and the forwarding flow processing module 503 is specifically configured to:
[0094] if the SFF node receives the first original packet from the SF node, and the ingress interface occupied by the first original packet is the ingress interface occupied by the dynamic flow classification type SID, determine the SRH of the first original packet according to the re-redirecting forwarding table.
[0095] It should be noted that the above apparatus provided by the embodiments of the present application can implement all the method steps in the above-mentioned packet forwarding method applied to the SRv6 SFC system, and achieve the same technical effects. Therefore, the same parts and beneficial effects of the method embodiments will not be described in detail.
[0096] Based on the same technical concept, the embodiments of the present application also provide an electronic device, which can realize the functions of the foregoing packet forwarding device applied to the SRv6 SFC system.
[0097] Figure 6 The structural schematic diagram of the electronic device provided in the embodiments of the present application is shown in the figure.
[0098] The at least one processor 601 and the memory 602 connected with the at least one processor 601, the specific connection medium between the processor 601 and the memory 602 is not limited in the embodiments of the present application, Figure 6 In the embodiments of the present application, the connection between the processor 601 and the memory 602 through the bus 600 is taken as an example. The bus 600 is used to connect the above-mentioned components in the electronic device, Figure 6 In the embodiments of the present application, the connection between the processor 601 and the memory 602 through the bus 600 is taken as an example. The bus 600 is used to connect the above-mentioned components in the electronic device, Figure 6 In the embodiments of the present application, the connection between the processor 601 and the memory 602 through the bus 600 is taken as an example. The bus 600 is used to connect the above-mentioned components in the electronic device,
[0099] In the embodiments of the present application, the memory 602 stores instructions executable by the at least one processor 601, and the at least one processor 601 can execute the foregoing packet forwarding method applied to the SRv6 SFC system by executing the instructions stored in the memory 602. The processor 601 can realize the functions of various modules in the device shown in the figure. Figure 5
[0100] The processor 601 is the control center of the device, can connect each part of the whole control device through various interfaces and lines, and through running or executing the instructions stored in the memory 602 and calling the data stored in the memory 602, the device can process data and realize various functions, thereby monitoring the whole device.
[0101] In a possible design, the processor 601 can include one or more processing units, and the processor 601 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, the driver interface and the application program, etc., and the modem processor mainly processes the wireless communication. It can be understood that the foregoing modem processor can also not be integrated into the processor 601. In some embodiments, the processor 601 and the memory 602 can be realized on the same chip, and in some embodiments, they can also be realized on independent chips respectively.
[0102] The processor 601 can be a general processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic component, a discrete hardware component, and can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general processor can be a microprocessor or any conventional processor. The steps of the method for packet forwarding applied to the SRv6 SFC system disclosed in the embodiments of the present application can be directly embodied by a hardware processor for execution, or by a combination of hardware and software modules in the processor for execution.
[0103] The memory 602 is a non-volatile computer readable storage medium, which can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 602 can include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. The memory 602 is any other medium capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by a computer, but is not limited thereto. The memory 602 in the embodiments of the present application can also be a circuit or any other device capable of realizing a storage function, used for storing program instructions and / or data.
[0104] By designing and programming the processor 601, the code corresponding to the method for packet forwarding applied to the SRv6 SFC system introduced in the foregoing embodiments can be fixed into the chip, so that the chip can execute the method for packet forwarding applied to the SRv6 SFC system of the embodiments shown in the running time. Figure 3 It is known to those skilled in the art how to design and program the processor 601, which will not be described here.
[0105] It should be noted that the above general electronic device provided by the embodiments of the present application can realize all method steps realized by the above method embodiments, and can achieve the same technical effects, and the same parts and beneficial effects of the method embodiments will not be described here.
[0106] The embodiment of the present application further provides a computer readable storage medium, which stores computer executable instructions, and the computer executable instructions are used for causing a computer to execute the packet forwarding method applied to the SRv6 SFC system in the above embodiment.
[0107] The embodiment of the present application further provides a computer program product, which, when invoked by a computer, causes the computer to execute the packet forwarding method applied to the SRv6 SFC system in the above embodiment.
[0108] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. In addition, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage media, etc.) containing computer-usable program code.
[0109] The present application is described with reference to flowcharts and / or block diagrams of the method, device (system), and computer program product according to the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus produce a device implemented in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that implements the function specified in the flow or flows and / or block or blocks.
[0110] These computer program instructions can also be stored in a computer readable memory that can direct the computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including instruction apparatus, which implements the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that implements the function specified in the flow or flows and / or block or blocks.
[0111] These computer program instructions can also be loaded into a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable data processing apparatus to produce a computer implemented process, so that the instructions executed on the computer or other programmable data processing apparatus provide a process for implementing the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1steps of a function specified in a block or blocks.
Claims
1. A method for forwarding a packet applied to an SRv6 SFC system, the SRv6 SFC system comprising a head node, a service function forwarding (SFF) node and a service function (SF) node, the SFF node being connected with the SF node, characterized in that, Comprise: The SFF node receives N SRv6 messages from the head node; wherein the N SRv6 messages are the M original messages received by the head node from the user end, and the M original messages are respectively encapsulated by the SRv6 TE Policy configured by the head node, and N=M, and N is an integer greater than 0; The SFF node identifies the N SRv6 messages, and when the SID of the N SRv6 messages is identified as a dynamic flow classification type SID, a reflow forwarding table is dynamically generated according to the N SRv6 messages; wherein the dynamic flow classification type SID is used to represent that the N SRv6 messages passing through the SF node share the dynamic flow classification type SID; The SFF node strips the respective extended routing header SRH from the N SRv6 messages to obtain the M original messages, and sends the M original messages to the SF node for processing; The SFF node receives a first original message from the SF node after processing, determines the SRH of the first original message according to the reflow forwarding table, and the first original message is any one of the M original messages; The SFF node re-encapsulates and forwards the first original message according to the SRH of the first original message.
2. The method of claim 1, wherein, The SFF node comprises a forwarding layer and a control layer; The reflow forwarding table is dynamically generated according to the N SRv6 messages, comprising: The forwarding layer of the SFF node copies the N SRv6 messages and sends them to the control layer of the SFF node; The control layer of the SFF node analyzes the N SRv6 messages to obtain the respective packet quintuple information and SRH of the N SRv6 messages; The control layer of the SFF node dynamically generates the reflow forwarding table according to the respective packet quintuple information and SRH of the N SRv6 messages.
3. The method of claim 1 or 2, wherein, The reflow forwarding table comprises the mapping relationship between the packet quintuple information of the N SRv6 messages and the SRH of the N SRv6 messages; The SFF node receives a first original message from the SF node after processing, determines the SRH of the first original message according to the reflow forwarding table, comprising: Query the reflow forwarding table according to the packet quintuple information in the first original message; If the first packet quintuple information in the reflow forwarding table matches the packet quintuple information in the first original message, the first SRH corresponding to the first packet quintuple information in the reflow forwarding table is taken as the SRH of the first original message.
4. The method of claim 1, wherein, The SFF node is configured with a dynamic flow classification type interface, and the dynamic flow classification type interface is used to represent that the original message passing through the dynamic flow classification type interface needs to perform a dynamic reflow operation; The SFF node receives a first original message from the SF node after processing, determines the SRH of the first original message according to the reflow forwarding table, comprising: If the SFF node receives a first original packet from the SF node, the occupied ingress interface is the dynamic flow classification type ingress interface, and the SRH of the first original packet is determined according to the re-redirect forwarding table.
5. The method of claim 2, wherein, The packet quintuple information includes at least one of a source IP address, a source port, a destination address, and a destination port.
6. A packet forwarding device applied to an SRv6 SFC system, characterized in that, Comprise: The receiving module is configured to receive N SRv6 packets from a head node; wherein the N SRv6 packets are SRv6 packets obtained by performing SRv6 encapsulation on M original packets received by the head node from a user terminal according to a configured SRv6 TE Policy, and N = M, and N is an integer greater than 0; The re-redirect forwarding table generation module is configured to identify the N SRv6 packets, and when it is identified that the SID of the N SRv6 packets is a dynamic flow classification type SID, to dynamically generate a re-redirect forwarding table according to the N SRv6 packets; wherein the dynamic flow classification type SID is used to represent that the N SRv6 packets passing through a service function (SF) node share the dynamic flow classification type SID; The forwarding process processing module is configured to strip the respective SRHs from the N SRv6 packets to obtain the M original packets, and send the M original packets to the SF node for processing; and receive a first original packet processed by the SF node, instruct the re-redirect forwarding table generation module to determine the SRH of the first original packet according to the re-redirect forwarding table, the first original packet being any one of the M original packets, and re-encapsulate and forward the first original packet according to the SRH of the first original packet.
7. The apparatus of claim 6, wherein, The device comprises a forwarding layer and a control layer; The re-redirect forwarding table generation module is specifically configured to: Instruct the forwarding layer to send the N SRv6 packets to the control layer after copying the N SRv6 packets; Instruct the control layer to analyze the N SRv6 packets to obtain the respective packet quintuple information and SRH of the N SRv6 packets; Instruct the control layer to dynamically generate the re-redirect forwarding table according to the respective packet quintuple information and SRH of the N SRv6 packets.
8. The apparatus of claim 6 or 7, wherein, The re-redirect forwarding table comprises a mapping relationship between the packet quintuple information of the N SRv6 packets and the SRH of the N SRv6 packets; The forwarding process processing module is specifically configured to: Instruct the re-redirect forwarding table generation module to query the re-redirect forwarding table according to the packet quintuple information in the first original packet; If the first packet quintuple information in the re-redirect forwarding table matches the packet quintuple information in the first original packet, the first SRH corresponding to the first packet quintuple information in the re-redirect forwarding table is taken as the SRH of the first original packet.
9. An electronic device, comprising: Comprise: A memory for storing a computer program; A processor for executing the computer program stored in the memory to implement the method of any one of claims 1-5.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method in any one of claims 1-5.
Citation Information
Patent Citations
Message packaging method, message forwarding method, notification method, electronic equipment and storage medium
CN112511428A
Message forwarding method and device
CN112953831A