Message forwarding method and device, SFF node and storage medium
By pre-stored SFC entries in the SFF node and using the special identifier in the IPv6 message to determine the original identifier and SRH information, the problem that the SF node in the SRv6 SFC cannot identify the SRv6 message is solved, achieving more efficient message forwarding and Larger SFC service scale.
Patent Information
- Application Number
- CN202411389363.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-09-30
AI Technical Summary
There are SF nodes in SRv6 SFC that cannot identify SRv6 packets, resulting in complex decapsulation and encapsulation processing of SFF nodes, and the number of interfaces is limited, limiting the number of SFC service instances and service scale.
Store the SFC table in the SFF node in advance, and determine the corresponding original logo and SRH information through the dedicated logo in the receiving IPv6 packet, and re -encapsulate and forward it to avoid independent interface configuration of each SFC service instance.
The implementation and maintenance complexity of the message forwarding scheme is reduced, the scale of SFC services is improved, the accuracy of the reposting of the message is ensured, and the processing and forwarding efficiency are improved.
Smart Images

Figure CN119341964A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a message forwarding method, device, SFF node and storage medium. Background Art
[0002] Segment Routing Internet Protocol Version 6 (SRv6) Service Function Chain (SFC) is a technology that adds SRv6 path information to the original message to guide the message to pass through the application layer service device in sequence along the specified path. However, there are application service (SF) nodes in SRv6 SFC that cannot recognize SRv6 messages.
[0003] For this type of SF node, the Service Function Forwarder (SFF) node in the SRv6 SFC needs to decapsulate the SRv6 message to obtain the original message and forward the original message to the SF node; and, according to the corresponding SRv6 path information, encapsulate the original message from the SF node to obtain the SRv6 message, and forward the SRv6 message along the specified path.
[0004] At present, in order to ensure that the SFF node accurately forwards the original message from the SF node, it is necessary to associate the SRv6 path information with the interface on the SFF node that connects to the SF node, that is, an SFC service instance occupies an independent interface, and different SFC service instances cannot share an interface to ensure that the message is forwarded along the specified path. The solution implementation and maintenance are relatively complex. In addition, the number of interfaces on the SFF node is limited, which results in the number of SFC service instances that the SFF node can provide being limited by the number of interfaces on the SFF node, and the service scale of SFC is limited. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a message forwarding method, device, SFF node and storage medium to reduce the complexity of implementing and maintaining the message forwarding solution and improve the service scale of SFC. The specific technical solution is as follows:
[0006] In a first aspect, an embodiment of the present application provides a message forwarding method, which is applied to an SFF node, and the method includes:
[0007] Receiving, through the target interface, a first IPv6 message sent by the SF node, wherein a message header of the first IPv6 message carries a target-specific identifier;
[0008] Determine the target original identifier and target SRH information corresponding to the target dedicated identifier according to the pre-stored SFC table entry, wherein the SFC table entry records the dedicated identifier, the original identifier and the SRH information;
[0009] Modify the target-specific identifier carried in the message header of the first IPv6 message to the target original identifier to obtain a second IPv6 message;
[0010] Encapsulating an SRv6 header for the second IPv6 message according to the target SRH information to obtain a first SRv6 message;
[0011] The first SRv6 message is forwarded according to the SRH information carried by the first SRv6 message.
[0012] In some embodiments, the step of determining the target original identifier and target SRH information corresponding to the target dedicated identifier according to the pre-stored SFC table entry includes: searching for the target SFC table entry recording the target dedicated identifier from the pre-stored SFC table entry; obtaining the original identifier from the target SFC table entry as the target original identifier corresponding to the target dedicated identifier, and obtaining SRH information from the target SFC table entry as the target SRH information corresponding to the target dedicated identifier; or,
[0013] The target-specific identifier includes a target service instance identifier, and the SFC table entry also records a service instance identifier; the step of determining the target original identifier and target SRH information corresponding to the target-specific identifier based on the pre-stored SFC table entry includes: extracting the target service instance identifier from the target-specific identifier; searching for the target SFC table entry recording the target service instance identifier from the pre-stored SFC table entry; obtaining the original identifier from the target SFC table entry as the target original identifier corresponding to the target-specific identifier, and obtaining SRH information from the target SFC table entry as the target SRH information corresponding to the target-specific identifier.
[0014] In some embodiments, the target-specific identifier includes an SFC flag;
[0015] Before determining the target original identifier and the target SRH information corresponding to the target dedicated identifier according to the pre-stored SFC table entry, the method further includes:
[0016] Determine whether the SFC flag bit included in the target-specific identifier is a first preset value, where the first preset value indicates that the first IPv6 message belongs to an SFC service flow;
[0017] If yes, the step of determining the target original identifier and the target SRH information corresponding to the target dedicated identifier according to the pre-stored SFC table entry is performed;
[0018] If not, forward the first IPv6 message.
[0019] In some embodiments, before determining the target original identifier and the target SRH information corresponding to the target dedicated identifier according to the pre-stored SFC table entry, the method further includes:
[0020] Determine whether the target interface enables the SFC function;
[0021] If yes, the step of determining the target original identifier and the target SRH information corresponding to the target dedicated identifier according to the pre-stored SFC table entry is performed;
[0022] If not, forward the first IPv6 message.
[0023] In some embodiments, the method further comprises:
[0024] Receive a second SRv6 message sent by another node, where the payload of the second SRv6 message is a third IPv6 message, and the destination IP address of the second SRv6 message is a target IP address;
[0025] If the target IP address is a segment identifier SID of a preset type, determining a target-specific identifier corresponding to the target IP address according to a pre-stored SFC table entry, wherein the SFC table entry also records the IP address;
[0026] Modify the target original identifier carried in the message header of the third IPv6 message to the target dedicated identifier to obtain a fourth IPv6 message;
[0027] The fourth IPv6 message is sent to the SF node, so that the SF node feeds back the first IPv6 message to the SFF node.
[0028] In some embodiments, the step of determining the target-specific identifier corresponding to the target IP address according to the pre-stored SFC table entry includes:
[0029] Searching for a target SFC table entry recording the target IP address from pre-stored SFC table entries;
[0030] If the target SFC table entry is found, obtaining a dedicated identifier from the target SFC table entry as the target dedicated identifier corresponding to the target IP address;
[0031] If the target SFC table entry is not found, a target SFC table entry is generated, and the dedicated identifier recorded in the target SFC table entry is used as the target dedicated identifier corresponding to the target IP address.
[0032] In some embodiments, the step of generating a target SFC entry includes:
[0033] Extracting the target original identifier carried in the message header of the third IPv6 message, and obtaining the target SRH information corresponding to the target IP address;
[0034] Determine the target-specific identifier corresponding to the target original identifier;
[0035] A target SFC table entry is generated according to the target IP address, the target original identifier, the target dedicated identifier and the target SRH information.
[0036] In some embodiments, the step of determining the target-specific identifier corresponding to the target original identifier includes:
[0037] Assigning a target service instance identifier to the target IP address;
[0038] The first preset value, the second preset value and the target service instance identifier are combined to obtain a target-specific identifier, wherein the first preset value indicates that the first IPv6 message belongs to an SFC service flow.
[0039] In some embodiments,
[0040] The step of generating a target SFC table entry according to the target IP address, the target original identifier, the target dedicated identifier and the target SRH information comprises: recording the corresponding relationship between the target IP address, the target original identifier, the target dedicated identifier and the target SRH information to obtain a target SFC table entry; or,
[0041] The target-specific identifier includes a target service instance identifier; the step of generating a target SFC table entry based on the target IP address, the target original identifier, the target-specific identifier and the target SRH information includes: recording the correspondence between the target IP address, the target original identifier, the target-specific identifier, the target service instance identifier and the target SRH information to obtain the target SFC table entry.
[0042] In some embodiments, in the message header of the first IPv6 message, the flow label field carries the target-specific identifier.
[0043] In some embodiments, the target dedicated identifier includes an SFC flag bit, a second preset value, and a target service instance identifier, and the flow label field includes an SFC flag bit subfield, a reserved bit subfield, and a service instance identifier subfield;
[0044] The SFC flag subfield is used to carry the SFC flag;
[0045] The reserved bit subfield is the second preset value;
[0046] The service instance identifier subfield is used to carry the target service instance identifier.
[0047] In a second aspect, an embodiment of the present application provides a message forwarding device, which is applied to an SFF node, and the device includes:
[0048] A first receiving module, configured to receive, through a target interface, a first IPv6 message sent by a SF node, wherein a message header of the first IPv6 message carries a target-specific identifier;
[0049] The first obtaining module is used to determine the target original identifier and the target segment routing header (SRH) information corresponding to the target dedicated identifier according to the pre-stored SFC table entry, and the SFC table entry records the dedicated identifier, the original identifier and the SRH information;
[0050] A first modification module, used to modify the target-specific identifier carried in the message header of the first IPv6 message to the target original identifier, so as to obtain a second IPv6 message;
[0051] an encapsulation module, configured to encapsulate an SRv6 header for the second IPv6 message according to the target SRH information to obtain a first SRv6 message;
[0052] A forwarding module is used to forward the first SRv6 message according to the SRH information carried by the first SRv6 message.
[0053] In some embodiments, the first obtaining module is specifically used to: search for a target SFC table entry recording the target dedicated identifier from a pre-stored SFC table entry; obtain an original identifier from the target SFC table entry as a target original identifier corresponding to the target dedicated identifier, and obtain SRH information from the target SFC table entry as target SRH information corresponding to the target dedicated identifier; or,
[0054] The target-specific identifier includes a target service instance identifier, and the SFC table entry also records a service instance identifier; the first obtaining module is specifically used to: extract the target service instance identifier from the target-specific identifier; search for a target SFC table entry that records the target service instance identifier from a pre-stored SFC table entry; obtain an original identifier from the target SFC table entry as the target original identifier corresponding to the target-specific identifier, and obtain SRH information from the target SFC table entry as the target SRH information corresponding to the target-specific identifier.
[0055] In some embodiments, the target-specific identifier includes an SFC flag;
[0056] The first obtaining module is also used for: before determining the target original identifier and target SRH information corresponding to the target dedicated identifier according to the pre-stored SFC table entry, judging whether the SFC flag bit included in the target dedicated identifier is a first preset value, and the first preset value indicates that the first IPv6 message belongs to the SFC service flow; if so, executing the step of determining the target original identifier and target SRH information corresponding to the target dedicated identifier according to the pre-stored SFC table entry; if not, forwarding the first IPv6 message.
[0057] In some embodiments, the first obtaining module is also used to: before determining the target original identifier and target SRH information corresponding to the target dedicated identifier according to a pre-stored SFC table entry, determine whether the target interface enables the SFC function; if so, execute the step of determining the target original identifier and target SRH information corresponding to the target dedicated identifier according to the pre-stored SFC table entry; if not, forward the first IPv6 message.
[0058] In some embodiments, the apparatus further comprises:
[0059] A second receiving module, used to receive a second SRv6 message sent by another node, where the payload of the second SRv6 message is a third IPv6 message, and the destination IP address of the second SRv6 message is a target IP address;
[0060] A second obtaining module is used to determine the target dedicated identifier corresponding to the target IP address according to a pre-stored SFC table entry if the target IP address is a segment identifier SID of a preset type, and the SFC table entry also records the IP address;
[0061] A second modification module, configured to modify the target original identifier carried in the message header of the third IPv6 message to the target dedicated identifier, to obtain a fourth IPv6 message;
[0062] The sending module is used to send the fourth IPv6 message to the SF node, so that the SF node feeds back the first IPv6 message to the SFF node.
[0063] In some embodiments, the second obtaining module is specifically used to:
[0064] Searching for a target SFC table entry recording the target IP address from pre-stored SFC table entries;
[0065] If the target SFC table entry is found, obtaining a dedicated identifier from the target SFC table entry as the target dedicated identifier corresponding to the target IP address;
[0066] If the target SFC table entry is not found, a target SFC table entry is generated, and the dedicated identifier recorded in the target SFC table entry is used as the target dedicated identifier corresponding to the target IP address.
[0067] In some embodiments, the second obtaining module is specifically used to:
[0068] Extracting the target original identifier carried in the message header of the third IPv6 message, and obtaining the target SRH information corresponding to the target IP address;
[0069] Determine the target-specific identifier corresponding to the target original identifier;
[0070] A target SFC table entry is generated according to the target IP address, the target original identifier, the target dedicated identifier and the target SRH information.
[0071] In some embodiments, the second obtaining module is specifically used to:
[0072] Assigning a target service instance identifier to the target IP address;
[0073] The first preset value, the second preset value and the target service instance identifier are combined to obtain a target-specific identifier, wherein the first preset value indicates that the first IPv6 message belongs to an SFC service flow.
[0074] In some embodiments, the second obtaining module is specifically used to: record the corresponding relationship between the target IP address, the target original identifier, the target dedicated identifier and the target SRH information to obtain the target SFC table entry; or,
[0075] The target-specific identifier includes a target service instance identifier; the second obtaining module is specifically used to: record the correspondence between the target IP address, the target original identifier, the target-specific identifier, the target service instance identifier and the target SRH information to obtain a target SFC table entry.
[0076] In some embodiments, in the message header of the first IPv6 message, the flow label field carries the target-specific identifier.
[0077] In some embodiments, the target dedicated identifier includes an SFC flag bit, a second preset value, and a target service instance identifier, and the flow label field includes an SFC flag bit subfield, a reserved bit subfield, and a service instance identifier subfield;
[0078] The SFC flag subfield is used to carry the SFC flag;
[0079] The reserved bit subfield is the second preset value;
[0080] The service instance identifier subfield is used to carry the target service instance identifier.
[0081] In a third aspect, an embodiment of the present application provides an SFF node, comprising a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor is prompted by the machine-executable instructions to implement any of the methods described in the first aspect above.
[0082] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any method described in the first aspect is implemented.
[0083] In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any method described in the first aspect of the above embodiments.
[0084] Beneficial effects of the embodiments of the present application:
[0085] In the technical solution provided by the embodiment of the present application, the SFF node pre-stores an SFC table entry recording the original identifier and SRH information. After receiving the IPv6 message sent by the SF node, the SFF node determines the original identifier and SRH information corresponding to the IPv6 message according to the dedicated identifier carried in the message header of the IPv6 message, modifies the dedicated identifier carried in the message header of the IPv6 message back to the original identifier, and re-encapsulates the SRv6 header according to the SRH information to obtain the SRv6 message. Furthermore, the SFF node can forward the obtained SRv6 message according to the SRH information. Applying the technical solution provided by the embodiment of the present application, the SFF node does not need to configure an independent interface for each SFC service instance, but determines the corresponding SRH and SRv6 path information by carrying a dedicated identifier, re-encapsulates and forwards, reduces the complexity of the message forwarding solution implementation and maintenance, and ensures the accuracy of message forwarding. At the same time, the number of SFC service instances that the SFF node can provide is not limited by the number of interfaces on the SFF node, which improves the service scale of the SFC.
[0086] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0088] Figure 1 A schematic diagram of a first flow chart of a message forwarding method provided in an embodiment of the present application;
[0089] Figure 2 A schematic diagram of the IPv6 standard header;
[0090] Figure 3 A schematic diagram of a flow label field provided in an embodiment of the present application;
[0091] Figure 4 A schematic diagram of an SFC table item provided in an embodiment of the present application;
[0092] Figure 5 A second flow chart of the message forwarding method provided in the embodiment of the present application;
[0093] Figure 6 A third flow chart of the message forwarding method provided in an embodiment of the present application;
[0094] Figure 7A fourth flow chart of the message forwarding method provided in an embodiment of the present application;
[0095] Figure 8 A fifth flow chart of the message forwarding method provided in the embodiment of the present application;
[0096] Fig. 9 A sixth flow chart of the message forwarding method provided in an embodiment of the present application;
[0097] Fig.10 A schematic diagram of message forwarding provided in an embodiment of the present application;
[0098] Fig.11 A first structural diagram of a message forwarding device provided in an embodiment of the present application;
[0099] Fig.12 A second structural diagram of the message forwarding device provided in an embodiment of the present application;
[0100] Fig.13 A schematic diagram of the structure of an SFF node provided in an embodiment of the present application. DETAILED DESCRIPTION
[0101] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.
[0102] The following is an explanation of the relevant concepts involved in the embodiments of the present application.
[0103] Segment Routing (SR): The original node path selection mechanism is adopted, and the segment identifier (SID) of the segment that the path will pass through is pre-encapsulated in the original node. When the message passes through the SR node, the SR node forwards the message according to the SID of the message.
[0104] SRv6: SR nodes are used in Internet Protocol Version 6 (IPv6) networks to forward messages using IPv6 addresses as SIDs.
[0105] SRH: A routing extension header with a routing type value of 4. The source node adds an SRH to the IPv6 message, and the intermediate node can forward the message according to the path information contained in the SRH.
[0106] SRv6 SFC: A technology that adds SRv6 path information to the original message to guide the message to pass through the application layer service device in sequence along the specified path.
[0107] Service Classifier (SC) node: Located at the edge of the SRv6 SFC network, it is the original node of the service chain path. SC can use different diversion methods to introduce service data packets into the SRv6 Traffic Engineering Policy (TE) policy tunnel for forwarding.
[0108] SF node: A node that provides specific application services for service traffic (i.e., service data packets). SF nodes that cannot recognize SRv6 packets are called SRv6-unaware SF nodes, and SF nodes that can recognize SRv6 packets are called SRv6-aware SF nodes.
[0109] SFF node: As the service chain agent of the SF node, it forwards the received message to several SF nodes associated with the SFF node according to the SRv6 encapsulation information. After the SF node processes the message, it returns the message to the SFF node, and the SFF node decides whether to continue forwarding the message.
[0110] Virtual Local Area Network (VLAN): A physical Local Area Network (LAN) is divided into multiple logical LANs - VLANs. Hosts in the same VLAN (such as the above-mentioned SFF nodes, SF nodes, etc.) can communicate directly with each other, while hosts in different VLANs cannot communicate directly with each other, thereby enhancing the security of the LAN. After VLAN division, broadcast messages are limited to the same VLAN, that is, each VLAN is a broadcast domain, which effectively limits the scope of the broadcast domain. VLAN can be used to divide different hosts into different workgroups, and hosts in the same workgroup can be located in different physical locations, making network construction and maintenance more convenient and flexible.
[0111] At present, in order to meet the needs of user business security and stability, when data packets are transmitted in the network, they often need to pass through various service nodes in sequence according to business logic, such as firewalls, intrusion prevention systems, application accelerators, and address translation. The SRv6 SFC technology can easily meet the above needs. However, there are SF nodes in the SRv6 SFC that cannot recognize SRv6 messages.
[0112] For this type of SF node, the SFF node needs to decapsulate the SRv6 message to obtain the original message and forward the original message to the SF node; and, according to the corresponding SRv6 path information, encapsulate the original message from the SF node to obtain the SRv6 message and forward the SRv6 message according to the specified path. In SRv6 SFC, different SRv6 path information and VLANs correspond to different SFC service instances (SFC Instance).
[0113] To ensure that the SFF node accurately forwards the original message from the SF node, it is necessary to associate the SRv6 path information with the interface on the SFF node that connects to the SF node. That is, one SFC service instance occupies an independent interface, and different SFC service instances cannot share an interface to ensure that the message is forwarded along the specified path.
[0114] In the existing scheme, the proxy mode of the SFF node can be divided into the service chain static proxy mode (Static SRProxy SFC) and the service chain dynamic proxy mode (Dynamic SRProxy SFC). For the convenience of description, the service chain static proxy mode is referred to as the static proxy mode, and the service chain dynamic proxy mode is referred to as the dynamic proxy mode.
[0115] In static proxy mode, the SFF node receives SRv6 messages sent by other nodes, decapsulates the SRv6 messages, obtains the service chain static proxy (End.AS) SID representing the SF node in the SRv6 SFC, and corresponds to the SFC service instance according to the End.ASSID, and forwards the original message to the SF node through the outbound interface associated with the SFC service instance; after receiving the original message from the SF node, the SFF node determines whether to continue forwarding the message in the SRv6 SFC network; if the message continues to be forwarded in the SRv6 SFC network, the SFF node needs to associate with the SFC service instance according to the inbound interface or the inbound interface and VLAN of the received original message, and re-encapsulate the processed original message from the SF node according to the manually configured SID list (List) (i.e., SRv6 path information) corresponding to the SFC service instance.
[0116] In dynamic proxy mode, the SFF node can dynamically learn the SID list from the SRv6 message without manually configuring the SID list. The SFF node receives the SRv6 message sent by other nodes, decapsulates the SRv6 message, obtains the service chain dynamic proxy (End.AD) SID representing the SF node in the SRv6 SFC, and corresponds to the SFC service instance according to the End.AD SID, and forwards the original message to the SF node through the outbound interface associated with the SFC service instance; after receiving the original message from the SF node, if the SFF node determines to continue forwarding the message in the SRv6 SFC network, it needs to associate the inbound interface or the inbound interface and VLAN of the original message to the SFC service instance, and re-encapsulate the processed original message from the SF node according to the dynamically learned SID list corresponding to the SFC service instance.
[0117] In the above two modes, since the original message does not carry any information related to SFC when forwarded from the SF node to the SFF node, it is necessary to associate the SFC service instance with the interface on the SFF node one by one. When the user needs to purchase, cancel, or change the SFC service, the interface configuration may need to be changed on the SFF node, which brings great challenges to the manual configuration of SFC, orchestrator, controller, and the implementation and operation of SFC. For example, when designing the orchestrator and controller, the relationship between the interface, interface address, VLAN and SFC needs to be considered, which makes the solution implementation and maintenance more complicated. In addition, the number of interfaces on the SFF node is limited, which means that the number of SFC service instances that the SFF node can provide is limited by the number of interfaces on the SFF node, and the service scale of SFC is limited.
[0118] In order to reduce the complexity of implementing and maintaining the message forwarding solution and improve the service scale of SFC, the embodiment of the present application provides a message forwarding method, which is applied to an SFF node, and the SFF node is connected to one or more SF nodes that cannot recognize SRv6 messages. Figure 1 , Figure 1 The first flow chart of the message forwarding method provided in the embodiment of the present application. The message forwarding method comprises the following steps.
[0119] Step S11: receiving a first IPv6 message sent by the SF node through a target interface, wherein a message header of the first IPv6 message carries a target-specific identifier.
[0120] Step S12: determining the target original identifier and target SRH information corresponding to the target dedicated identifier according to the pre-stored SFC table entry, wherein the SFC table entry records the dedicated identifier, the original identifier and the SRH information.
[0121] Step S13: modify the target-specific identifier carried in the message header of the first IPv6 message to the target original identifier to obtain a second IPv6 message.
[0122] Step S14: encapsulate an SRv6 header for the second IPv6 message according to the target SRH information to obtain a first SRv6 message.
[0123] Step S15: forward the first SRv6 message according to the SRH information carried by the first SRv6 message.
[0124] In the technical solution provided by the embodiment of the present application, the SFF node pre-stores an SFC table entry recording the original identifier and SRH information. After receiving the IPv6 message sent by the SF node, the SFF node determines the original identifier and SRH information corresponding to the IPv6 message according to the dedicated identifier carried in the message header of the IPv6 message, modifies the dedicated identifier carried in the message header of the IPv6 message back to the original identifier, and re-encapsulates the SRv6 header according to the SRH information to obtain the SRv6 message. Furthermore, the SFF node can forward the obtained SRv6 message according to the SRH information. Applying the technical solution provided by the embodiment of the present application, the SFF node does not need to configure an independent interface for each SFC service instance, but determines the corresponding SRH and SRv6 path information by carrying a dedicated identifier, re-encapsulates and forwards, reduces the complexity of the message forwarding solution implementation and maintenance, and ensures the accuracy of message forwarding. At the same time, the number of SFC service instances that the SFF node can provide is not limited by the number of interfaces on the SFF node, which improves the service scale of the SFC.
[0125] In the above step S11, the target interface is any interface on the SFF node; the first IPv6 message is any IPv6 message sent to the SFF node by any SF node connected to the SFF node; the target dedicated identifier is the dedicated identifier carried in the message header of the first IPv6 message, which is used to indicate the SFC service instance to which the first IPv6 message belongs.
[0126] The SFF node can receive an IPv6 message sent by any SF node through the target interface, and use the IPv6 message as the first IPv6 message.
[0127] In the embodiment of the present application, the message header of the IPv6 message received by the SFF node is a standard IPv6 header, such as Figure 2The IPv6 standard header shown includes: version number (Version, Ver) field, traffic class (Traffic Class) field, flow label (Flow Label) field, payload length (Payload Length) field, next header (Next Header) field, hop limit (Hop Limit) field, source address (Source Address, SA) field, destination address (Destination Address, DA) field, and the numbers 0, 11, and 31 above the message header represent bit positions.
[0128] The dedicated identifier can be carried in a preset field in the message header of the IPv6 message that does not affect the SF node processing and forwarding the message. For example, the preset field can be a flow label field, that is, the flow label field carries the dedicated identifier, and the length of the dedicated identifier is the length of the flow label field, which is 20 bits. In this case, the flow label field in the message header of the first IPv6 message carries the target dedicated identifier. After receiving the first IPv6 message, the SFF node can extract the content in the flow label field to obtain the target dedicated identifier.
[0129] Other fields in the message header of the IPv6 message can also carry a dedicated identifier. For example, other fields can be a traffic level field or a next header field. Correspondingly, the length of the dedicated identifier is the length of the corresponding other fields. For example, the length of the dedicated identifier can be 8 bits. In this case, other fields in the message header of the first IPv6 message (such as the traffic level field or the next header field) carry the target dedicated identifier. After receiving the first IPv6 message, the SFF node can extract the content in other fields to obtain the target dedicated identifier. For the convenience of description, the flow label field is used to carry the dedicated identifier in the following, and it does not play a limiting role.
[0130] In an embodiment of the present application, the dedicated identifier may include an SFC flag, a second preset value, and a service instance identifier. The SFC flag is used to indicate whether the IPv6 message belongs to an SFC service flow. When the SFC flag is a first preset value, it indicates that the IPv6 message belongs to an SFC service flow, and the SFF node enters the SFC processing flow to process the IPv6 message. When the SFC flag is not a first preset value, it indicates that the IPv6 message does not belong to an SFC service flow, and the SFF node forwards the IPv6 message normally. The second preset value is the value of the reserved bit. The service instance identifier is the identifier of the SFC service instance to which the IPv6 message belongs.
[0131] In the case of using the flow label field to carry a dedicated identifier, the flow label field may include an SFC flag bit subfield, a reserved bit subfield, and a service instance identifier subfield, such as Figure 3In the flow label field shown in the figure, the numbers 0, 1, 3, and 19 above the packet header indicate the bit positions.
[0132] The SFC flag (S) subfield is used to carry the SFC flag included in the dedicated identifier, and may be 2 bits long and located at bits 0 to 1. The first preset value may be 11 or other values, which are not limited.
[0133] The reserved bit (R) subfield is a second preset value, which is a field that can be used by other extended functions, and can be 2 bits long, located at bits 2 to 3. The second preset value can be 00, or other values, which are not limited.
[0134] The service instance identifier (IDentity, ID) subfield is used to carry the service instance identifier included in the dedicated identifier. The length can be 16 bits, the value range is 0 to 65535, and it is located at the 4th to 19th bits.
[0135] There is no limitation on the length of each subfield and its position in the flow label field.
[0136] In an embodiment of the present application, when the dedicated identifier includes an SFC flag, a second preset value and a service instance identifier, the target dedicated identifier obtained by the SFF node may include an SFC flag, a second preset value and a target service instance identifier, the SFC flag is used to indicate whether the first IPv6 message belongs to an SFC service flow, the target service instance identifier is the identifier of the SFC service instance to which the first IPv6 message belongs, and the positions of the SFC flag, the second preset value and the target service instance identifier in the target dedicated identifier are the same as the positions of the corresponding subfields in the flow label field.
[0137] In the flow label field of the message header of the first IPv6 message, the SFC flag subfield is used to carry the SFC flag included in the target dedicated identifier, and the service instance identifier subfield is used to carry the target service instance identifier included in the target dedicated identifier. After receiving the first IPv6 message, the SFF node can extract the content in the SFC flag subfield to obtain the SFC flag, and extract the content in the service instance identifier subfield to obtain the target service instance identifier.
[0138] In the above step S12, SFC table entries are pre-stored in the SFF node, each SFC table entry corresponds to an SFC service instance processed by the SFF node, and each SFC table entry records the dedicated identifier, original identifier and SRH information of the corresponding SFC service instance, indicating the correspondence between the dedicated identifier, original identifier and SRH information of the SFC service instance.
[0139] The original identifier is the original content of the corresponding dedicated identifier in the IPv6 message, that is, the original content carried by the preset field (such as the flow label field) carrying the corresponding dedicated identifier, and the length is the same as the dedicated identifier. For example, the length of the original identifier can also be 20 bits. The SRH information is the SRv6 path information of the corresponding SFC service instance. The SRH information includes a SID list, which can be a manually configured SID list in static proxy mode, or a SID list obtained from the SRv6 message corresponding to the first IPv6 message (such as the second SRv6 message) in dynamic proxy mode. There is no limitation on this. The second SRv6 message is a message sent by other nodes to the SFF node that needs to be processed by the SF node. The process of the SFF node processing the second SRv6 message will be described in detail later, which will not be described in detail here. The SRH information can also include other fields such as the segment index (Segments Left, SL) and routing type (Routing Type) in the SRH. The acquisition method of other fields is the same as the acquisition method of the above-mentioned SID list, and there is no limitation on this.
[0140] In an embodiment of the present application, a service instance identifier and / or an IP address may also be recorded in the SFC table entry. The service instance identifier is the identifier of the corresponding SFC service instance. The IP address is the destination IP address of the second SRv6 message sent by the SFF node to other nodes. The IP addresses are all preset types of SIDs. The preset types of SIDs may be End.AS SID or End.AD SID representing the SF node. Other nodes may be other SFF nodes, SC nodes, end nodes (Endpoint) or other switching devices, etc., which are not limited to this.
[0141] like Figure 4 The SFC table entry shown is explained by taking the SFC table entry recording the IP address, service instance identifier, SRH information, original identifier and dedicated identifier as an example. The SFC table entry includes: End.ASSID / End.AD SID (i.e., the IP address of the SFC service instance), service instance identifier (i.e., the identifier of the SFC service instance), SRH (i.e., the SRH information of the SFC service instance), original flow label (Original Flow Label) (i.e., the original identifier of the SFC service instance) and SFC exclusive flow label (SFC Exclusive Flow Label) (i.e., the dedicated identifier of the SFC service instance). Among them, SRH may include a segment index (Segments Left, SL) and a SID list. In an embodiment of the present application, the lengths of the IP address, service instance identifier, SRH information, original identifier and dedicated identifier recorded in the SFC table entry may be different, Figure 4 The examples are for illustration only and are not intended to be limiting.
[0142] In the embodiment of the present application, after obtaining the target-specific identifier, the SFF node determines the SFC service instance (such as the target SFC service instance) represented by the target-specific identifier according to the pre-stored SFC table entry, and the target SFC service instance is the SFC service instance to which the first IPv6 message belongs. Furthermore, the SFF node determines the original identifier and SRH information corresponding to the target SFC service instance, the original identifier is the target original identifier corresponding to the target-specific identifier, and the SRH information is the target SRH information corresponding to the target-specific identifier.
[0143] In an embodiment of the present application, the SFF node may be unable to determine the target SFC service instance, that is, unable to determine the target original identifier and the target SRH information. If the SFF node determines that the first IPv6 message does not need to be forwarded further in the SRv6 SFC network, the first IPv6 message can be forwarded normally according to the message header of the first IPv6 message.
[0144] In the above step S13, after obtaining the target original identifier, the SFF node modifies the target-specific identifier carried in the message header of the first IPv6 message to the target original identifier, that is, the content of the preset field in the message header of the first IPv6 message is modified to the target original identifier, and the modified IPv6 message is obtained, and the modified IPv6 message is the second IPv6 message.
[0145] In the above step S14, after obtaining the target SRH information, the SFF node subtracts 1 from the SL value recorded in the target SRH information to obtain the processed target SRH information, that is, to obtain the processed target SRH. The SFF node constructs an SRv6 header including an IPv6 header and a processed target SRH, the IPv6 header being the same as the header of the second IPv6 message, and the destination IP address of the IPv6 header being the IP address of the next node of the SF node in the SID list. The SFF node encapsulates the SRv6 message header in the second IPv6 message to re-encapsulate the SRv6 path information of the corresponding SFC service instance in the second IPv6 message, and obtains the encapsulated SRv6 message, which is the first SRv6 message.
[0146] In the above step S15, the SFF node forwards the first SRv6 message according to the SRH information carried by the first SRv6 message, that is, according to the SRv6 path information of the corresponding SFC service instance.
[0147] In some embodiments, the SFF node may implement the above step S12 in the following two ways.
[0148] Mode 1: The SFF node can directly match the target dedicated identifier in the SFC table entry to obtain the target original identifier and the target SRH information. The above step S12 can be implemented by the following steps: searching the target SFC table entry that records the target dedicated identifier from the pre-stored SFC table entry; obtaining the original identifier from the target SFC table entry as the target original identifier corresponding to the target dedicated identifier, and obtaining the SRH information from the target SFC table entry as the target SRH information corresponding to the target dedicated identifier.
[0149] In the embodiment of the present application, after extracting the target dedicated identifier from the first IPv6 message, the SFF node searches for the target dedicated identifier in the dedicated identifiers recorded in the pre-stored SFC table entry, and the SFC table entry recording the target dedicated identifier is the target SFC table entry. The SFF node determines whether the target dedicated identifier is the same as the dedicated identifier recorded in the pre-stored SFC table entry by searching the target SFC table entry, and then determines whether the target dedicated identifier is pre-stored in the SFF node.
[0150] When the target dedicated identifier includes the target service instance identifier, the SFF node searches for the dedicated identifier including the target service instance identifier in the dedicated identifiers of the pre-stored SFC table entry records, such as the SFF node can search for the dedicated identifier whose 4th to 19th bits are the target service instance identifier. When the target dedicated identifier includes the SFC flag bit and the target service instance identifier, the SFF node searches for the dedicated identifier including the SFC flag bit and the target service instance identifier in the dedicated identifiers of the pre-stored SFC table entry records, such as the SFF node can search for the dedicated identifier whose 0th to 1st bits are the SFC flag bit and whose 4th to 19th bits are the target service instance identifier.
[0151] In the embodiment of the present application, in the process of searching for the target dedicated identifier and determining the target SFC table entry, the reserved bit may not be matched, and only the SFC flag bit and the target service instance identifier may be matched.
[0152] If the target SFC table entry is found, the SFF node determines that the target dedicated identifier is the same as the dedicated identifier recorded in the pre-stored SFC table entry, obtains the original identifier recorded in the target SFC table entry as the target original identifier, and obtains the SRH information recorded in the target SFC table entry as the target SRH information.
[0153] If the target SFC table entry is not found, the SFF node determines that the target dedicated identifier is different from the dedicated identifier recorded in the pre-stored SFC table entry, and the first IPv6 message does not need to be forwarded in the SRv6 SFC network. The SFF node can forward the first IPv6 message normally according to the message header of the first IPv6 message.
[0154] Mode 2: When the target dedicated identifier includes the target service instance identifier and the SFC table entry also records the service instance identifier, the SFF node can also match the target service instance identifier in the SFC table entry to obtain the target original identifier and the target SRH information. The above step S12 can be implemented by the following steps: extracting the target service instance identifier from the target dedicated identifier; searching the target SFC table entry that records the target service instance identifier from the pre-stored SFC table entry; obtaining the original identifier from the target SFC table entry as the target original identifier corresponding to the target dedicated identifier, and obtaining the SRH information from the target SFC table entry as the target SRH information corresponding to the target dedicated identifier.
[0155] In an embodiment of the present application, the SFC table entry pre-stored in the SFF node also records the service instance identifier, that is, each SFC table entry pre-stored in the SFF node records the service instance identifier, dedicated identifier, original identifier and SRH information of the corresponding SFC service instance, indicating the correspondence between the service instance identifier, dedicated identifier, original identifier and SRH information of the SFC service instance.
[0156] The SFF node extracts the value of the position of the service instance identifier in the target dedicated identifier, such as extracting the values of the 4th to 19th bits of the target dedicated identifier, to obtain the target service instance identifier included in the target dedicated identifier.
[0157] The SFF node searches for the target service instance identifier in the service instance identifiers recorded in the pre-stored SFC table entries, and the SFC table entry recording the target service instance identifier is the target SFC table entry. The SFF node searches for the target SFC table entry to determine whether the target service instance identifier is the same as the service instance identifier recorded in the pre-stored SFC table entry, and then determines whether the target service instance identifier is pre-stored in the SFF node.
[0158] If the target SFC table entry is found, the SFF node determines that the target service instance identifier is the same as the service instance identifier recorded in the pre-stored SFC table entry, obtains the original identifier recorded in the target SFC table entry as the target original identifier, and obtains the SRH information recorded in the target SFC table entry as the target SRH information.
[0159] If the target SFC table entry is not found, the SFF node determines that the target service instance identifier is different from the service instance identifier recorded in the pre-stored SFC table entry, and the first IPv6 message does not need to be forwarded in the SRv6 SFC network. The SFF node can forward the first IPv6 message normally according to the message header of the first IPv6 message.
[0160] In an embodiment of the present application, when the target-specific identifier includes a target service instance identifier and the SFC table entry also records the service instance identifier, the SFF node can also use the above-mentioned method 1 to obtain the target original identifier and target SRH information. For details, please refer to the relevant description of the above-mentioned method 1, and no limitation is made to this.
[0161] In some embodiments, when the target-specific identifier includes an SFC flag, the SFF node may process the first IPv6 message according to the SFC flag. Figure 5 , Figure 5 A second flow chart of the message forwarding method provided in the embodiment of the present application. The message forwarding method may further include the following steps.
[0162] Step S51, receiving a first IPv6 message sent by a SF node through a target interface, wherein the message header of the first IPv6 message carries a target-specific identifier, which is the same as the above step S11.
[0163] Step S52, determining whether the SFC flag bit included in the target-specific identifier is a first preset value, the first preset value indicating that the first IPv6 message belongs to an SFC service flow. If yes, executing step S53, if no, executing step S57.
[0164] Step S53, according to the pre-stored SFC table entry, determine the target original identifier and target SRH information corresponding to the target dedicated identifier, the SFC table entry records the dedicated identifier, the original identifier and the SRH information. This is the same as the above step S12.
[0165] Step S54, modifying the target-specific identifier carried in the message header of the first IPv6 message to the target original identifier, to obtain a second IPv6 message. This is the same as the above step S13.
[0166] Step S55, encapsulating the second IPv6 message with an SRv6 header according to the target SRH information to obtain a first SRv6 message, which is the same as the above step S14.
[0167] Step S56: forwarding the first SRv6 message according to the SRH information carried in the first SRv6 message. This is the same as the above step S15.
[0168] Step S57: forward the first IPv6 message.
[0169] In the technical solution provided in the embodiment of the present application, the SFF node first determines whether the first IPv6 message belongs to the SFC service flow based on the SFC flag bit included in the target-specific identifier, and then performs subsequent processing to improve the message processing and forwarding efficiency when it is determined that the first IPv6 message belongs to the SFC service flow.
[0170] In the above step S53, the SFF node extracts the SFC flag from the target-specific identifier, that is, extracts the value of the position of the SFC flag in the target-specific identifier, such as extracting the value of the 0th to 1st bits of the target-specific identifier, to obtain the SFC flag included in the target-specific identifier.
[0171] The SFF node determines whether the SFC flag is a first preset value to determine whether the first IPv6 message belongs to an SFC service flow.
[0172] If the SFC flag is the first preset value, the SFF node determines that the first IPv6 message belongs to the SFC service flow, and the SFF node may execute steps S53 to S56 for subsequent processing and forwarding.
[0173] If the SFC flag is not the first preset value, the SFF node determines that the first IPv6 message does not belong to the SFC service flow, and the first IPv6 message does not need to be forwarded in the SRv6 SFC network. The SFF node can execute step S57 and forward the first IPv6 message normally according to the message header of the first IPv6 message.
[0174] In some embodiments, the SFF node may process the first IPv6 packet according to whether the SFC function is enabled on the target interface receiving the first IPv6 packet. Figure 6 , Figure 6 The third flow chart of the message forwarding method provided in the embodiment of the present application. The message forwarding method may also include the following steps.
[0175] Step S61, receiving a first IPv6 message sent by the SF node through the target interface, wherein the message header of the first IPv6 message carries a target-specific identifier, which is the same as the above step S11.
[0176] Step S62, determine whether the target interface enables the SFC function. If yes, execute step S63, if not, execute step S67.
[0177] Step S63, determining the target original identifier and target SRH information corresponding to the target dedicated identifier according to the pre-stored SFC table entry, the SFC table entry records the dedicated identifier, the original identifier and the SRH information. This is the same as the above step S12.
[0178] Step S64, modifying the target-specific identifier carried in the message header of the first IPv6 message to the target original identifier, to obtain a second IPv6 message. This is the same as the above step S13.
[0179] Step S65, encapsulating the second IPv6 message with an SRv6 header according to the target SRH information to obtain a first SRv6 message, which is the same as the above step S14.
[0180] Step S66: forwarding the first SRv6 message according to the SRH information carried in the first SRv6 message. This is the same as the above step S15.
[0181] Step S67: forward the first IPv6 message.
[0182] In the technical solution provided in the embodiment of the present application, the SFF node first makes a judgment based on whether the target interface enables the SFC function, and then performs subsequent processing when it is determined that the target interface enables the SFC function to improve the message processing and forwarding efficiency.
[0183] In the above step S62, the SFF node determines whether the target interface enables the SFC function. If the target interface enables the SFC function, the SFF node can execute steps S63 to S66 for subsequent processing and forwarding.
[0184] If the target interface does not enable the SFC function, the SFF node determines that the first IPv6 message does not need to be forwarded in the SRv6 SFC network, and the SFF node may execute step S67 to forward the first IPv6 message normally according to the message header of the first IPv6 message.
[0185] See also Figure 7 , Figure 7 The fourth flow chart of the message forwarding method provided in the embodiment of the present application. The message forwarding method may also include the following steps.
[0186] Step S71, receiving an IPv6 message.
[0187] In the embodiment of the present application, the SFF node receives the IPv6 message (ie, the first IPv6 message mentioned above) sent by the SF node.
[0188] Step S72, determining whether the SFC function is enabled on the interface.
[0189] In the embodiment of the present application, the SFF node determines whether the interface (ie, the target interface) receiving the IPv6 message has the SFC function enabled. If yes, step S73 is executed, and if no, step S78 is executed.
[0190] Step S73, checking the flow label field in the IPv6 standard header.
[0191] In the embodiment of the present application, the IPv6 standard header is the header of the received IPv6 message, and the SFF node obtains the value of the flow label field in the header of the IPv6 message, and the obtained value of the flow label field is the above-mentioned target-specific identifier.
[0192] Step S74, determine whether the lower 2 bits in the flow label field are preset values.
[0193] In the embodiment of the present application, the SFF node determines whether the value of the 0th to 1st bit in the flow label field is a preset value (i.e., the first preset value), that is, whether the value of the 0th to 1st bit of the target dedicated identifier is the preset value 11. If yes, step S75 is executed, and if no, step S78 is executed.
[0194] Step S75, obtain the SFC index of the 4th to 19th bits of the flow label field.
[0195] In the embodiment of the present application, the SFF node extracts the 4th to 19th bits of the flow label field as the SFC index, which is the target service instance identifier. Step S75 is that the SFF node extracts the target service instance identifier from the target dedicated identifier.
[0196] Step S76, determining whether the SFC index is the same as the locally configured SFC instance identifier.
[0197] In the embodiment of the present application, the locally configured SFC instance identifier is the service instance identifier recorded in the SFC table item pre-stored in the SFF node, and step S75 is the SFF node determining whether the target service instance identifier is the same as the service instance identifier recorded in the pre-stored SFC table item. If yes, step S77 is executed, and if no, step S78 is executed.
[0198] Step S77, replace the value of the flow label field with the original flow label value recorded in the SFC table entry corresponding to the SFC instance identifier, and re-encapsulate the SRv6 message according to the SRH including the SID list configured in the static proxy mode, or the SRH including the SID list obtained in the dynamic proxy mode. The SL value in the SRH is the recorded SL value minus 1.
[0199] In an embodiment of the present application, the SFF node replaces the value in the flow label field of the IPv6 message according to the original flow label value (i.e., the target original identifier) recorded in the SFC table entry (i.e., the target SFC table entry) corresponding to the SFC instance identifier that is the same as the SFC index, that is, the target dedicated identifier is modified to the target original identifier. The SFF node obtains the SRH (i.e., the target SRH information) recorded in the SFC table entry corresponding to the SFC instance identifier that is the same as the SFC index. In static proxy mode, the SRH includes a manually configured SID list; in dynamic proxy mode, the SRH includes a directly obtained SID list. The SFF node subtracts 1 from the SL value in the SRH and re-encapsulates the SRv6 message according to the processed SRH.
[0200] Step S78, forwarding the received IPv6 message as a common IPv6 message.
[0201] In the embodiment of the present application, the SFF node normally forwards the first IPv6 message according to the IPv6 standard header of the IPv6 message.
[0202] For details of the above steps S71 to S78, please refer to the above Figure 1 to Figure 6 Related description.
[0203] Applying the technical solution provided in the embodiment of the present application, the SFF node first makes a judgment based on whether the SFC function is enabled on the target interface. When it is determined that the SFC function is enabled on the target interface, the flow label field is checked again, and the SFC flag is used to determine whether the IPv6 message belongs to the SFC service flow. When it is determined that the IPv6 message belongs to the SFC service flow, the SFC index and the corresponding SRH are searched, and the SRv6 header is re-encapsulated for the IPv6 message. There is no need to configure an independent interface for each SFC service instance on the SFF node, which reduces the complexity of implementing and maintaining the message forwarding solution and ensures the accuracy of message forwarding. The number of SFC service instances that the SFF node can provide is not limited by the number of interfaces on the SFF node, which increases the service scale of the SFC and improves the message processing and forwarding efficiency.
[0204] In some embodiments, the SFF node can send an IPv6 message to the SF node, see Figure 8 , Figure 8 A fifth flow chart of the message forwarding method provided in the embodiment of the present application. The message forwarding method may further include the following steps.
[0205] Step S81: Receive a second SRv6 message sent by other nodes, the payload of the second SRv6 message is the third IPv6 message, and the destination IP address of the second SRv6 message is the target IP address.
[0206] Step S82, determine whether the target IP address is a SID of a preset type. If yes, execute step S83; if no, execute step S86.
[0207] Step S83, determining the target dedicated identifier corresponding to the target IP address according to the pre-stored SFC table entry, the SFC table entry also records the IP address.
[0208] Step S84: modify the target original identifier carried in the message header of the third IPv6 message to a target-specific identifier to obtain a fourth IPv6 message.
[0209] Step S85: Send a fourth IPv6 message to the SF node, so that the SF node feeds back the first IPv6 message to the SFF node.
[0210] Step S86: forward the second SRv6 message.
[0211] In the technical solution provided by the embodiment of the present application, after receiving the SRv6 message sent by other nodes, the SFF node determines the dedicated identifier according to the destination IP address of the SRv6 message, and the determined dedicated identifier corresponds to the original identifier carried in the message header of the payload (i.e., IPv6 message) of the SRv6 message, and the SRH information of the SRv6 message. The SFF node sends the IPv6 message carrying the dedicated identifier to the SF node, so that the IPv6 message fed back by the SF node also carries the dedicated identifier, and then the SFF node can determine the corresponding original identifier and SRH information through the dedicated identifier. Applying the technical solution provided by the embodiment of the present application, the SFF node does not need to configure an independent interface for each SFC service instance, but determines the SRH and SRv6 path information by carrying the corresponding dedicated identifier, re-encapsulates and forwards, reduces the complexity of the message forwarding solution implementation and maintenance, and ensures the accuracy of message forwarding. At the same time, the number of SFC service instances that the SFF node can provide is not limited by the number of interfaces on the SFF node, which improves the service scale of the SFC.
[0212] In the above step S81, the second SRv6 message is any SRv6 message sent by any other node to the SFF node. For the description of other nodes, please refer to the above step S12.
[0213] The SFF node receives any SRv6 message sent by any other node and regards the SRv6 message as the second SRv6 message. The SFF node performs SRv6 decapsulation on the second SRv6 message and parses the destination IP address of the second SRv6 message, that is, extracts the destination IP address from the destination address field of the message header of the second SRv6 message, and the destination IP address is the target IP address.
[0214] In the above step S82, the SFF node determines whether the target IP address is a preset type of SID to determine whether the second SRv6 message needs to be processed and forwarded to the SF node. The description of the preset type of SID can be found in the above step S12.
[0215] If the SFF node determines that the target IP address is a SID of a preset type, it means that the SFF node needs to process the second SRv6 message, and the SFF node executes step S83.
[0216] If the SFF node determines that the target IP address is not a SID of the preset type, it means that the SFF node does not need to process the second SRv6 message and forward it to the SF node. The SFF node executes step S86 and directly forwards the second SRv6 message according to the SRH information carried by the second SRv6 message.
[0217] In the above step S83, the SFC table entry pre-stored in the SFF node also records the IP address of the corresponding SFC service instance, that is, each SFC table entry pre-stored in the SFF node records the IP address, dedicated identifier, original identifier and SRH information of the corresponding SFC service instance, indicating the correspondence between the IP address, dedicated identifier, original identifier and SRH information of the SFC service instance.
[0218] The SFF node determines the SFC service instance (such as the target SFC service instance) corresponding to the target IP address based on the pre-stored SFC table entry, and the target SFC service instance is the SFC service instance to which the second SRv6 message belongs. Furthermore, the SFF node determines the target dedicated identifier corresponding to the target SFC service instance, and the target dedicated identifier is the target dedicated identifier corresponding to the target IP address.
[0219] In the above step S84, after decapsulating the second SRv6 message, the SFF node may strip off the message header of the second SRv6 message to obtain the payload of the second SRv6 message, which is an IPv6 message, that is, the third IPv6 message.
[0220] Since the second SRv6 message belongs to the target SFC service instance, the original identifier carried in the message header of the third IPv6 message is the original identifier of the target SFC service instance, that is, the target original identifier. The SFF node modifies the target original identifier carried in the message header of the third IPv6 message into a target-specific identifier to obtain a modified IPv6 message, which is the fourth IPv6 message.
[0221] In the above step S85, the SFF node sends the fourth IPv6 message to the SF node, the SF node receives the fourth IPv6 message, processes the fourth IPv6 message, and obtains the processed IPv6 message, which is the first IPv6 message. The SF node feeds back the first IPv6 message to the SFF node, the SFF node receives the first IPv6 message and performs subsequent processing, for details, please refer to the above Figure 1 Part of the description.
[0222] In some embodiments, the SFF node can match the target IP address in the SFC table entry to obtain the target dedicated identifier. The above step S83 can be implemented by the following steps: from the pre-stored SFC table entries, searching for the target SFC table entry that records the target IP address; if the target SFC table entry is found, obtaining the dedicated identifier from the target SFC table entry as the target dedicated identifier corresponding to the target IP address; if the target SFC table entry is not found, generating the target SFC table entry, and using the dedicated identifier recorded in the target SFC table entry as the target dedicated identifier corresponding to the target IP address.
[0223] In the embodiment of the present application, the SFF node searches for the target IP address in the IP addresses recorded in the pre-stored SFC table entries, and the SFC table entry recording the target IP address is the target SFC table entry.
[0224] If the target SFC table entry is found, the SFF node obtains the recorded dedicated identifier from the target SFC table entry as the target dedicated identifier.
[0225] If the target SFC table entry is not found, the SFF node generates an SFC table entry, that is, obtains the original identifier, special identifier and SRH information corresponding to the target IP address as the target original identifier, target special identifier and target SRH information respectively, establishes the correspondence between the target IP address, target original identifier, target special identifier and target SRH information, and obtains the target SFC table entry.
[0226] The SFF node may directly use the dedicated identifier obtained during the generation of the target SFC table entry as the target dedicated identifier corresponding to the target IP address, or may obtain the recorded dedicated identifier from the target SFC table entry as the target dedicated identifier corresponding to the target IP address, without limitation.
[0227] In the technical solution provided by the embodiment of the present application, after receiving the SRv6 message sent by other nodes, the SFF node searches for the target SFC table entry according to the destination IP address to determine whether the SFC table entry of the corresponding SFC service instance has been stored, so as to determine whether the corresponding original identification and SRH information have been stored. If the target SFC table entry is found, the corresponding dedicated identification is directly obtained; if the target SFC table entry is not found, the target SFC table entry is generated and the corresponding dedicated identification is obtained.
[0228] In some embodiments, the SFF node can generate a target SFC table entry through the following steps: extract the target original identifier carried in the message header of the third IPv6 message, and obtain the target SRH information corresponding to the target IP address; determine the target dedicated identifier corresponding to the target original identifier; generate a target SFC table entry based on the target IP address, target original identifier, target dedicated identifier and target SRH information.
[0229] In the embodiment of the present application, the SFF node obtains the target original identifier, target SRH information and target dedicated identifier corresponding to the target IP address respectively.
[0230] The SFF node extracts the original identifier from the message header of the third IPv6 message as the target original identifier. When the SFF node uses a preset field (such as a flow label field) in the message header of the third IPv6 message to carry a dedicated identifier, the SFF node can extract the content in the flow label field of the message header of the third IPv6 message to obtain the target original identifier.
[0231] The SFF node can obtain the SID list, SL value, etc. corresponding to the target IP address, and obtain the SRH information as the target SRH information. Depending on the proxy mode, different methods are used to obtain the target SRH information. In the case of static proxy mode, the target IP address is End.ASSID, and the SFF node can obtain the manually configured SRH information as the target SRH information, or extract the SRH from the message header of the second SRv6 message as the target SRH information. In the case of dynamic proxy mode, the target IP address is End.AD SID, and the SFF node can extract the SRH from the message header of the second SRv6 message as the target SRH information. The method for the SFF node to obtain the target SRH information is not limited here.
[0232] The SFF node generates a dedicated identifier representing the SFC service instance and having the same length as the target original identifier, and obtains a target dedicated identifier. The SFF node can allocate a target service instance identifier to the target IP address, that is, select a service instance identifier from unoccupied service instance identifiers as the target service instance identifier. The SFF node can randomly select a service instance identifier as the target service instance identifier, or select a service instance identifier with the smallest value as the target service instance identifier to reduce the space occupied by the service instance identifier and the dedicated identifier, and there is no limitation on this.
[0233] After determining the target service instance identifier, the SFF node combines the first preset value, the second preset value, and the target service instance identifier to indicate that the first IPv6 message belongs to the SFC service flow, and obtains the target dedicated identifier. The first preset value is the SFC flag bit, and its position corresponds to the SFC flag bit subfield included in the flow label field; the second preset value is the reserved bit, and its position corresponds to the reserved bit subfield included in the flow label field; the position of the target service instance identifier corresponds to the service instance identifier subfield included in the service instance identifier, which can be found in the above Figure 3 The SFF node can fill the first preset value, the second preset value and the target service instance identifier into the SFC flag bit subfield, the reserved bit subfield and the service instance identifier subfield respectively to obtain the target dedicated identifier.
[0234] In the embodiment of the present application, the SFF node generates a target SFC table entry after the target original identifier, the target SRH information and the target dedicated identifier. The SFF node can generate the target SFC table entry in the following two ways.
[0235] In method 3, the SFF node records the correspondence between the target IP address, the target original identifier, the target dedicated identifier, and the target SRH information to obtain the target SFC table entry, that is, the target SFC table entry does not include the target service instance identifier. In this case, after receiving the first IPv6 message, the SFF node can use the above method 1 to determine the target original identifier and the target SRH information corresponding to the target dedicated identifier.
[0236] Mode 4, when the target dedicated identifier includes the target service instance identifier, the SFF node records the correspondence between the target IP address, the target original identifier, the target dedicated identifier, the target service instance identifier and the target SRH information to obtain the target SFC table entry, that is, the target SFC table entry includes the target service instance identifier, such as Figure 4 In this case, after receiving the first IPv6 message, the SFF node can use the above method 1 or method 2 to determine the target original identifier and the target SRH information corresponding to the target dedicated identifier.
[0237] See also Fig. 9 , Fig. 9 A sixth flow chart of the message forwarding method provided in the embodiment of the present application. The message forwarding method may include the following steps.
[0238] Step S91, receiving a second SRv6 message sent by another node, the payload of the second SRv6 message is the third IPv6 message, and the destination IP address of the second SRv6 message is the target IP address. This is the same as the above step S81.
[0239] Step S92, determine whether the target IP address is a SID of a preset type. If yes, execute step S93; if no, execute step S911. The same as the above step S82.
[0240] Step S93: Determine the target dedicated identifier corresponding to the target IP address according to the pre-stored SFC table entry, where the SFC table entry records the IP address, dedicated identifier, original identifier and SRH information.
[0241] Step S94, modifying the original target identifier carried in the message header of the third IPv6 message into a target-specific identifier to obtain a fourth IPv6 message. This is the same as the above step S84.
[0242] Step S95, sending a fourth IPv6 message to the SF node, so that the SF node feeds back the first IPv6 message to the SFF node. This is the same as the above step S85.
[0243] Step S96, receiving the first IPv6 message sent by the SF node through the target interface, wherein the message header of the first IPv6 message carries the target-specific identifier, which is the same as the above step S11.
[0244] Step S97: Determine the target original identifier and target SRH information corresponding to the target dedicated identifier according to the pre-stored service chain SFC table entry.
[0245] Step S98, modifying the target-specific identifier carried in the message header of the first IPv6 message to the target original identifier, to obtain a second IPv6 message. This is the same as the above step S13.
[0246] Step S99, encapsulating the second IPv6 message with an SRv6 header according to the target SRH information to obtain a first SRv6 message, which is the same as the above step S14.
[0247] Step S910: forwarding the first SRv6 message according to the SRH information carried in the first SRv6 message. This is the same as the above step S15.
[0248] Step S911, forwarding the second SRv6 message. This is the same as the above step S86.
[0249] In the above steps S91 to S95 and S911, the SFF node receives messages sent by other nodes and sends messages to the SF node. For details, see the above Figure 8 In the above steps S96 to S910, the SFF node receives the message sent by the SF node, and the details can be found in the above Figure 1 to Figure 7 Part of the description.
[0250] In the technical solution provided by the embodiment of the present application, after receiving the SRv6 message sent by other nodes, the SFF node determines the dedicated identifier according to the destination IP address of the SRv6 message, and sends the IPv6 message carrying the dedicated identifier to the SF node, so that the IPv6 message fed back by the SF node also carries the dedicated identifier, and then the SFF node can determine the corresponding original identifier and SRH information through the dedicated identifier, and modify the dedicated identifier carried in the IPv6 message fed back by the SF node back to the original identifier, re-encapsulate the SRv6 header according to the SRH information, and obtain the SRv6 message for forwarding. Applying the technical solution provided by the embodiment of the present application, the SFF node does not need to configure an independent interface for each SFC service instance, but determines the corresponding SRH and SRv6 path information by carrying a dedicated identifier, re-encapsulates and forwards, reduces the complexity of the message forwarding solution implementation and maintenance, and ensures the accuracy of message forwarding. At the same time, the number of SFC service instances that the SFF node can provide is not limited by the number of interfaces on the SFF node, which improves the service scale of the SFC.
[0251] Below through Fig.10 The message forwarding method provided in the embodiment of the present application is described in detail. Fig.10 A schematic diagram of message forwarding provided in an embodiment of the present application, in which a message is sent from an SC node to an end node, and the message forwarding path also includes an SFF node and an SF node, wherein the SF node cannot recognize SRv6 messages. The SRv6 message forwarding process is specifically as follows: the SC node sends a message to the SFF node, the SFF node sends a message to the SF node, the SF node sends a message to the SFF node, and the SFF node sends a message to the end node, such as Fig.10 Process 1 to process 4 in.
[0252] The SC node sends an SRv6 message (i.e., the second SRv6 message) to the SFF node. The SRv6 message includes the newly added IPv6 header, SRH, and payload. The payload is the original IPv6 message (i.e., the third IPv6 message), including the payload IPv6 header (i.e., the IPv6 standard header) and the payload of the original IPv6 message, such as Fig.10 The message sent by the SC node to the SFF node.
[0253] After receiving the SRv6 message, the SFF node decapsulates the SRv6 message and parses the DIP (i.e., the target IP address) in the newly added IPv6 header as the End.ASSID type or the End.AD SID type, and enters the SFC service processing flow. The SFF node generates an SFC table entry (i.e., the target SFC table entry) and records the SFC service instance identifier (i.e., the target service instance identifier) corresponding to the DIP, the SRH carried by the SRv6 message and the SL value in the SRH (i.e., the target SRH information), the original flow label in the flow label field of the payload IPv6 header (i.e., the target original identifier), and the SFC dedicated flow label (i.e., the target dedicated identifier) obtained according to the SFC service instance identifier in the SFC table entry. Before generating the SFC table entry, the SFF node can match the DIP with the IP address in the stored SFC table entry to find the SFC table entry corresponding to the DIP. When the corresponding SFC table entry is found, the SFF node does not need to generate the SFC table entry.
[0254] The SFF node strips off the newly added IPv6 header and SRH, and modifies the flow label field of the payload IPv6 header to the SFC dedicated flow label in the SFC table entry, to obtain the modified IPv6 message (ie, the fourth IPv6 message), as shown in FIG. Fig.10 The message sent by the SFF node to the SF node.
[0255] After receiving and processing the modified IPv6 message, the SF node feeds back the IPv6 message (i.e., the first IPv6 message) to the SFF node. The flow label field of the IPv6 header of the payload of the IPv6 message is still the SFC dedicated flow label, such as Fig.10 The message sent by the SF node to the SFF node.
[0256] The SFF node receives the IPv6 message fed back by the SF node, and determines whether the interface receiving the IPv6 message has the SFC function enabled. When the interface has the SFC function enabled, the SFF node extracts the SFC-specific flow label from the flow label field of the payload IPv6 header, and determines whether the value of the lower 2 bits (i.e., the SFC flag subfield) of the SFC-specific flow label is 11 (i.e., the first preset value). When it is determined that the value of the lower 2 bits is 11, the SFF node extracts the value of the 4th to 19th bits (i.e., the service instance identifier subfield) of the SFC-specific flow label (i.e., the target service instance identifier), and determines whether the value is the same as the locally configured SFC service instance identifier. When they are determined to be the same, the SFF node replaces the SFC dedicated flow label in the flow label field of the payload IPv6 header with the original flow label recorded in the corresponding SFC table entry, and constructs the SRv6 header according to the SRH recorded in the corresponding SFC table entry and the newly added IPv6 header. The SL value in the SRH is the recorded SL value minus 1, and the DIP in the newly added IPv6 header is the IP address of the end node (i.e., the end node SID). The SFF node re-encapsulates the message based on the SRv6 header to obtain the encapsulated SRv6 message (i.e., the first SRv6 message). For details, please refer to the above Figure 7 Part of the description.
[0257] The process of sending a message from an end node to an SC node is similar to the above process and will not be described in detail here.
[0258] By applying the technical solution provided in the embodiments of the present application, it is possible to achieve that when a message is forwarded from a SF node to a SFF node, the SFF node no longer needs to be configured with a physical interface or sub-interface for each SFC service instance. The SFF node determines the associated SFC service instance based on the flow label field in the IPv6 header of the original message, thereby simplifying the business implementation. The number of SFC service instances is not limited by the device interface specifications of the SFF node.
[0259] Corresponding to the above-mentioned message forwarding method, the embodiment of the present application also provides a message forwarding device, see Fig.11 , applied to the SFF node, the message forwarding device comprises:
[0260] The first receiving module 111 is used to receive a first IPv6 message sent by the SF node through a target interface, wherein the message header of the first IPv6 message carries a target-specific identifier;
[0261] A first obtaining module 112 is used to determine the target original identifier and the target SRH information corresponding to the target dedicated identifier according to the pre-stored SFC table entry, and the SFC table entry records the dedicated identifier, the original identifier and the SRH information;
[0262] A first modification module 113 is used to modify the target-specific identifier carried in the message header of the first IPv6 message to the target original identifier to obtain a second IPv6 message;
[0263] The encapsulation module 114 is used to encapsulate the SRv6 header for the second IPv6 message according to the target SRH information to obtain the first SRv6 message;
[0264] The forwarding module 115 is configured to forward the first SRv6 message according to the SRH information carried by the first SRv6 message.
[0265] In the technical solution provided by the embodiment of the present application, the SFF node pre-stores an SFC table entry recording the original identifier and SRH information. After receiving the IPv6 message sent by the SF node, the SFF node determines the original identifier and SRH information corresponding to the IPv6 message according to the dedicated identifier carried in the message header of the IPv6 message, modifies the dedicated identifier carried in the message header of the IPv6 message back to the original identifier, and re-encapsulates the SRv6 header according to the SRH information to obtain the SRv6 message. Furthermore, the SFF node can forward the obtained SRv6 message according to the SRH information. Applying the technical solution provided by the embodiment of the present application, the SFF node does not need to configure an independent interface for each SFC service instance, but determines the corresponding SRH and SRv6 path information by carrying a dedicated identifier, re-encapsulates and forwards, reduces the complexity of the message forwarding solution implementation and maintenance, and ensures the accuracy of message forwarding. At the same time, the number of SFC service instances that the SFF node can provide is not limited by the number of interfaces on the SFF node, which improves the service scale of the SFC.
[0266] In some embodiments, the first obtaining module 112 is specifically used to: search for a target SFC table entry recording a target dedicated identifier from a pre-stored SFC table entry; obtain an original identifier from the target SFC table entry as a target original identifier corresponding to the target dedicated identifier, and obtain SRH information from the target SFC table entry as target SRH information corresponding to the target dedicated identifier; or,
[0267] The target-specific identifier includes the target service instance identifier, and the SFC table entry also records the service instance identifier; the above-mentioned first obtaining module 112 is specifically used to: extract the target service instance identifier from the target-specific identifier; search for the target SFC table entry that records the target service instance identifier from the pre-stored SFC table entries; obtain the original identifier from the target SFC table entry as the target original identifier corresponding to the target-specific identifier, and obtain SRH information from the target SFC table entry as the target SRH information corresponding to the target-specific identifier.
[0268] In some embodiments, the target-specific identifier includes an SFC flag; the above-mentioned first obtaining module 112 is also used to: before determining the target original identifier and target SRH information corresponding to the target-specific identifier according to a pre-stored SFC table entry, determine whether the SFC flag included in the target-specific identifier is a first preset value, and the first preset value indicates that the first IPv6 message belongs to an SFC service flow; if so, execute the step of determining the target original identifier and target SRH information corresponding to the target-specific identifier according to the pre-stored SFC table entry; if not, forward the first IPv6 message.
[0269] In some embodiments, the above-mentioned first obtaining module 112 is also used to: before determining the target original identifier and target SRH information corresponding to the target dedicated identifier according to the pre-stored SFC table entry, determine whether the target interface enables the SFC function; if so, execute the step of determining the target original identifier and target SRH information corresponding to the target dedicated identifier according to the pre-stored SFC table entry; if not, forward the first IPv6 message.
[0270] In some embodiments, Fig.12 As shown, the message forwarding device further includes:
[0271] The second receiving module 121 is used to receive a second SRv6 message sent by other nodes, the payload of the second SRv6 message is a third IPv6 message, and the destination IP address of the second SRv6 message is a target IP address;
[0272] The second obtaining module 122 is used to determine the target dedicated identifier corresponding to the target IP address according to the pre-stored SFC table entry if the target IP address is a segment identifier SID of a preset type, and the SFC table entry also records the IP address;
[0273] The second modification module 123 is used to modify the target original identifier carried in the message header of the third IPv6 message into a target dedicated identifier to obtain a fourth IPv6 message;
[0274] The sending module 124 is configured to send the fourth IPv6 message to the SF node, so that the SF node feeds back the first IPv6 message to the SFF node.
[0275] In some embodiments, the second obtaining module 122 is specifically used to:
[0276] Searching for a target SFC table entry recording the target IP address from pre-stored SFC table entries;
[0277] If the target SFC table entry is found, the dedicated identifier is obtained from the target SFC table entry as the target dedicated identifier corresponding to the target IP address;
[0278] If the target SFC table entry is not found, a target SFC table entry is generated, and the dedicated identifier recorded in the target SFC table entry is used as the target dedicated identifier corresponding to the target IP address.
[0279] In some embodiments, the second obtaining module 122 is specifically used to:
[0280] Extract the target original identifier carried in the message header of the third IPv6 message, and obtain the target SRH information corresponding to the target IP address;
[0281] Determine the target-specific identifier corresponding to the target original identifier;
[0282] A target SFC entry is generated according to the target IP address, the target original identifier, the target dedicated identifier and the target SRH information.
[0283] In some embodiments, the second obtaining module 122 is specifically used to:
[0284] Assign a target service instance identifier to the target IP address;
[0285] The first preset value, the second preset value and the target service instance identifier are combined to obtain a target-specific identifier, wherein the first preset value indicates that the first IPv6 message belongs to an SFC service flow.
[0286] In some embodiments, the second obtaining module 122 is specifically used to: record the correspondence between the target IP address, the target original identifier, the target dedicated identifier and the target SRH information to obtain the target SFC table entry;
[0287] or,
[0288] The target-specific identifier includes a target service instance identifier; the second obtaining module 122 is specifically used to: record the correspondence between the target IP address, the target original identifier, the target-specific identifier, the target service instance identifier and the target SRH information, and obtain the target SFC table entry.
[0289] In some embodiments, in the message header of the first IPv6 message, the flow label field carries a target-specific identifier.
[0290] In some embodiments, the target dedicated identifier includes an SFC flag bit, a second preset value, and a target service instance identifier, and the flow label field includes an SFC flag bit subfield, a reserved bit subfield, and a service instance identifier subfield;
[0291] The SFC flag subfield is used to carry the SFC flag;
[0292] The reserved bit subfield is a second preset value;
[0293] The service instance identifier subfield is used to carry the target service instance identifier.
[0294] The present application embodiment also provides a SFF node, such as Fig.13 As shown, it includes a processor 131 and a machine-readable storage medium 132, and the machine-readable storage medium 132 stores machine-executable instructions that can be executed by the processor 131. The processor 131 is prompted by the machine-executable instructions to implement the steps of any of the above-mentioned message forwarding methods.
[0295] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0296] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned message forwarding methods are implemented.
[0297] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any message forwarding method in the above embodiments.
[0298] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.
[0299] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0300] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the method, device, SFF node, computer-readable storage medium, and computer program product embodiments, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0301] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims
1. A message forwarding method, characterized in that: Applied to a service chain forwarding SFF node, the method includes: Receiving, through the target interface, a first IPv6 message sent by the application service SF node, wherein a message header of the first IPv6 message carries a target-specific identifier; Determine the target original identifier and target segment routing header SRH information corresponding to the target dedicated identifier according to the pre-stored service chain SFC table entry, wherein the SFC table entry records the dedicated identifier, the original identifier and the SRH information; Modify the target-specific identifier carried in the message header of the first IPv6 message to the target original identifier to obtain a second IPv6 message; Encapsulating an SRv6 header for the second IPv6 message according to the target SRH information to obtain a first SRv6 message; The first SRv6 message is forwarded according to the SRH information carried by the first SRv6 message.
2. The method according to claim 1, characterized in that The step of determining the target original identifier and target SRH information corresponding to the target dedicated identifier according to the pre-stored SFC table entry comprises: searching the target SFC table entry recording the target dedicated identifier from the pre-stored SFC table entry; obtaining the original identifier from the target SFC table entry as the target original identifier corresponding to the target dedicated identifier, and obtaining SRH information from the target SFC table entry as the target SRH information corresponding to the target dedicated identifier; or, The target-specific identifier includes a target service instance identifier, and the SFC table entry also records a service instance identifier; the step of determining the target original identifier and target SRH information corresponding to the target-specific identifier based on a pre-stored service chain SFC table entry includes: extracting the target service instance identifier from the target-specific identifier; searching for a target SFC table entry recording the target service instance identifier from a pre-stored SFC table entry; obtaining an original identifier from the target SFC table entry as the target original identifier corresponding to the target-specific identifier, and obtaining SRH information from the target SFC table entry as the target SRH information corresponding to the target-specific identifier.
3. The method according to claim 1, characterized in that The target-specific identifier includes an SFC flag; Before determining the target original identifier and the target SRH information corresponding to the target dedicated identifier according to the pre-stored SFC table entry, the method further includes: Determine whether the SFC flag bit included in the target-specific identifier is a first preset value, where the first preset value indicates that the first IPv6 message belongs to an SFC service flow; If yes, the step of determining the target original identifier and the target SRH information corresponding to the target dedicated identifier according to the pre-stored SFC table entry is performed; If not, forward the first IPv6 message.
4. The method according to claim 1, characterized in that Before determining the target original identifier and the target SRH information corresponding to the target dedicated identifier according to the pre-stored SFC table entry, the method further includes: Determine whether the target interface enables the SFC function; If yes, the step of determining the target original identifier and the target SRH information corresponding to the target dedicated identifier according to the pre-stored SFC table entry is performed; If not, forward the first IPv6 message.
5. The method according to claim 1, characterized in that: The method further comprises: Receive a second SRv6 message sent by another node, where the payload of the second SRv6 message is a third IPv6 message, and the destination IP address of the second SRv6 message is a target IP address; If the target IP address is a segment identifier SID of a preset type, determining a target-specific identifier corresponding to the target IP address according to a pre-stored SFC table entry, wherein the SFC table entry also records the IP address; Modify the target original identifier carried in the message header of the third IPv6 message to the target dedicated identifier to obtain a fourth IPv6 message; The fourth IPv6 message is sent to the SF node, so that the SF node feeds back the first IPv6 message to the SFF node.
6. The method according to claim 5, characterized in that The step of determining the target dedicated identifier corresponding to the target IP address according to the pre-stored SFC table entry includes: Searching for a target SFC table entry recording the target IP address from pre-stored SFC table entries; If the target SFC table entry is found, obtaining a dedicated identifier from the target SFC table entry as the target dedicated identifier corresponding to the target IP address; If the target SFC table entry is not found, a target SFC table entry is generated, and the dedicated identifier recorded in the target SFC table entry is used as the target dedicated identifier corresponding to the target IP address.
7. The method according to claim 6, characterized in that The step of generating a target SFC table entry includes: Extracting the target original identifier carried in the message header of the third IPv6 message, and obtaining the target SRH information corresponding to the target IP address; Determine the target-specific identifier corresponding to the target original identifier; A target SFC table entry is generated according to the target IP address, the target original identifier, the target dedicated identifier and the target SRH information.
8. The method according to claim 7, characterized in that The step of determining the target-specific identifier corresponding to the target original identifier includes: Assigning a target service instance identifier to the target IP address; The first preset value, the second preset value and the target service instance identifier are combined to obtain a target-specific identifier, wherein the first preset value indicates that the first IPv6 message belongs to an SFC service flow.
9. The method according to claim 7, characterized in that: The step of generating a target SFC table entry according to the target IP address, the target original identifier, the target dedicated identifier and the target SRH information comprises: recording the corresponding relationship between the target IP address, the target original identifier, the target dedicated identifier and the target SRH information to obtain a target SFC table entry; or, The target-specific identifier includes a target service instance identifier; the step of generating a target SFC table entry based on the target IP address, the target original identifier, the target-specific identifier and the target SRH information includes: recording the correspondence between the target IP address, the target original identifier, the target-specific identifier, the target service instance identifier and the target SRH information to obtain the target SFC table entry.
10. The method according to any one of claims 1 to 9, characterized in that: In the message header of the first IPv6 message, the flow label field carries the target-specific identifier.
11. The method according to claim 10, characterized in that The target dedicated identifier includes an SFC flag bit, a second preset value and a target service instance identifier, and the flow label field includes an SFC flag bit subfield, a reserved bit subfield and a service instance identifier subfield; The SFC flag subfield is used to carry the SFC flag; The reserved bit subfield is the second preset value; The service instance identifier subfield is used to carry the target service instance identifier.
12. A message forwarding device, characterized in that: Applied to a service chain forwarding SFF node, the device comprises: A first receiving module, configured to receive, through a target interface, a first IPv6 message sent by an application service SF node, wherein a message header of the first IPv6 message carries a target-specific identifier; The first obtaining module is used to determine the target original identifier and the target segment routing header SRH information corresponding to the target dedicated identifier according to the pre-stored service chain SFC table entry, and the SFC table entry records the dedicated identifier, the original identifier and the SRH information; A first modification module, used to modify the target-specific identifier carried in the message header of the first IPv6 message to the target original identifier, so as to obtain a second IPv6 message; an encapsulation module, configured to encapsulate an SRv6 header for the second IPv6 message according to the target SRH information to obtain a first SRv6 message; A forwarding module is used to forward the first SRv6 message according to the SRH information carried by the first SRv6 message.
13. The device according to claim 12, characterized in that The device also includes: A second receiving module, used to receive a second SRv6 message sent by another node, where the payload of the second SRv6 message is a third IPv6 message, and the destination IP address of the second SRv6 message is a target IP address; A second obtaining module is used to determine the target dedicated identifier corresponding to the target IP address according to a pre-stored SFC table entry if the target IP address is a segment identifier SID of a preset type, and the SFC table entry also records the IP address; A second modification module, configured to modify the target original identifier carried in the message header of the third IPv6 message to the target dedicated identifier, to obtain a fourth IPv6 message; The sending module is used to send the fourth IPv6 message to the SF node, so that the SF node feeds back the first IPv6 message to the SFF node.
14. The device according to any one of claims 12 to 13, characterized in that: In the message header of the first IPv6 message, the flow label field carries the target dedicated identifier; the target dedicated identifier includes an SFC flag bit, a second preset value and a target service instance identifier, and the flow label field includes an SFC flag bit subfield, a reserved bit subfield and a service instance identifier subfield; The SFC flag subfield is used to carry the SFC flag; The reserved bit subfield is the second preset value; The service instance identifier subfield is used to carry the target service instance identifier.
15. A service chain forwarding SFF node, characterized in that: The method comprises a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor is prompted by the machine-executable instructions to implement the method described in any one of claims 1 to 11.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.
Citation Information
Patent Citations
Message forwarding method and device
CN112953831A
Method for forwarding message in SRv6 service chain, SFF and SF equipment
CN113691448A
SRv6-based message forwarding method, device and system, medium and electronic equipment
CN115297521A
Message processing method and device, and storage medium
CN116939060A
Message forwarding method and device applied to SRv6 SFC system
CN117938767A