Communication method and device

By receiving and updating the encapsulation information in SRv6 messages on the control plane of the SFF node, the problem of unclear forwarding path caused by the complexity and configuration errors of data plane learning encapsulation information in the SRv6 service function chain is solved, and the data plane processing and Enhance fault tolerance.

CN115277529BActive Publication Date: 2024-12-06NEW H3C TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210739088.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-28
Publication Date
2024-12-06
Estimated Expiration
2042-06-28

AI Technical Summary

Technical Problem

In the existing SRv6 service function chain, the data plane learning encapsulation information is complex, and when the network configuration is incorrect, the forwarding path of the service packet processed by the SF node is unclear, which may be an error path.

Method used

After receiving the SRv6 message on the control plane of the SFF node, it determines whether there is an associated forwarding information, compares the packaging information changes, updates and issues the correct packaging information to simplify the complexity of the data plane and increase fault tolerance and security capabilities.

Benefits of technology

By sending SRv6 messages copied from the data plane to the control plane for encapsulation information learning, the complexity of the data plane is simplified, and fault tolerance and security mechanisms are provided when configuration errors are made to ensure the correct forwarding path of service messages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115277529B_ABST
    Figure CN115277529B_ABST
Patent Text Reader

Abstract

The present application provides a communication method and device, the method comprising: receiving a first SRv6 message sent by a data plane of an SFF node; when the value of a first flag is 0, determining whether first forwarding information associated with a first SID exists locally; if so, comparing the difference between a first head node address, a first SPI, and a first SI and 1 with a second head node address, a second SPI, and a second SI to see whether they are the same respectively; if they are the same and the encapsulation information is changed, updating the second encapsulation information using the first encapsulation information, and sending the second SPI, the second SI, and the updated second encapsulation information to the data plane.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a communication method and device. Background Art

[0002] Segment Routing IPv6 (SRv6) is a source routing technology. The head node guides each node on the path to forward service messages according to the specified path through the segment list in the SRH.

[0003] Service Function Chain (SFC) refers to the process of forwarding service messages. In the process of forwarding service messages, the service messages must be forwarded to the service function (SF) node of the value-added service in the planned order, and the SF node processes the service messages. Among them, the service function can be specifically a billing function, a firewall, etc.

[0004] At present, a mainstream implementation of SFC is to indicate the path of forwarding service messages to SF nodes through the Network Service Header (NSH). After combining with SRv6, the implementation of SFC is the SRv6 service function chain integrating NSH. In the above implementation, the Segment Routing Header (SRH) and NSH are used at the same time. The SRH indicates the transmission path of service messages between the Service Function Forwarder (SFF) nodes, and NSH provides the service plane data of SFC.

[0005] After the head node on the SRv6 path receives the original service message, the head node encapsulates NSH on the outer layer of the original service message, and encapsulates SRH on the outer layer of NSH to identify a service function path (English: Service Function Path, abbreviated as: SFP), and finally encapsulates the IPv6 header on the outer layer of SRH to obtain the first service message.

[0006] The existing RFC protocol newly defines an SRv6 segment identifier (English: Segment ID, abbreviated as: SID) and its corresponding function, namely End.NSH SID, to support the SRv6 service function chain integrated with NSH. After receiving the service message with the destination address of End.NSH SID, the SFF node strips off the SRH and forwards the remaining service message, namely the second service message, to the SF node bound to the End.NSH SID. At the same time, the SFF node uses the (SPI, SI-1) included in the NSH as an index to cache the IPv6 header and SRH information (also called encapsulation information).

[0007] When the SFF node receives the second service message processed by the SF node, it indexes the cached encapsulation information according to the service path identifier (SPI) and service index (SI) in the NSH (the value stored in the SI field is SI-1 in the first service message, that is, the SI field will be reduced by 1 after the service message is processed by an SF). The SFF node re-encapsulates the processed service message, that is, encapsulates the IPv6 header and SRH for the second service message, obtains the third service message, and continues to forward the third service message according to the SRH.

[0008] According to the above process, the SFF node needs to cache the encapsulation information in the forwarding plane and use the (SPI, SI-1) included in the NSH as the index. When receiving the service message processed by the SF node, the cached encapsulation information is indexed according to the (SPI, SI) included in the NSH, and the service message is forwarded to the next SFF node according to the SRH.

[0009] That is to say, in the existing message forwarding process, the SFF node needs to learn the encapsulation information in the data plane. The above learning process has high requirements for the data plane and does not have availability. In addition, if an incorrect configuration occurs in the network, for example, on two different head nodes, there are two segment lists consisting of different paths, but the same NSH is used (that is, SPI and SI are the same). The head node encapsulates the message according to the two segment lists respectively, and the destination address is the same End.NSH SID, that is, it arrives at the same SFF node. In this way, the encapsulation information cached by the SFF node will be overwritten by two different business flows, and the subsequent forwarding path of the business message processed by the SF node is unclear and may be an incorrect path. Summary of the invention

[0010] In view of this, the present application provides a communication method and device to solve the problem that in the existing message forwarding process, the complexity of data plane learning encapsulation information is high and when a configuration error occurs in the network, the subsequent forwarding path of the service message after being processed by the SF node is unclear and may be an incorrect path.

[0011] In a first aspect, the present application provides a communication method, which is applied to a control plane of an SFF node, and the method includes:

[0012] Receive a first SRv6 message sent by the data plane of the SFF node, where the first SRv6 message includes a first SID, a first SPI, a first SI, first encapsulation information, and first notification data, where the first notification data includes a first flag and a first head node address;

[0013] When the value of the first flag is 0, determine whether there is first forwarding information associated with the first SID locally, where the first forwarding information includes a second SPI, a second SI, second encapsulation information, and a second head node address;

[0014] If so, compare the difference between the first head node address, the first SPI, and the first SI and 1 with the second head node address, the second SPI, and the second SI to see whether they are the same respectively;

[0015] If they are the same and the package information is changed, the second package information is updated using the first package information, and the second SPI, the second SI and the updated second package information are sent to the data plane;

[0016] The first SRv6 message is sent after the data plane determines that the first SID is a locally allocated SID and the first SRv6 message includes the first notification data.

[0017] In a second aspect, the present application provides a communication method, which is applied to a head node, and the method includes:

[0018] Receiving a first configuration instruction and a second configuration instruction, the first configuration instruction comprising an SRv6 Policy, the SRv6 Policy comprising a segment list consisting of at least one SID, the segment list indicating a forwarding path;

[0019] According to the second configuration instruction, starting the SFC notification function;

[0020] Under the SFC notification function, a first SRv6 message is sent on the forwarding path, so that the data plane of the SFF node that receives the first SRv6 message determines that the destination address included in the first SRv6 message is the locally assigned first SID and the first SRv6 message includes the first notification data, and then copies the first SRv6 message and sends it to the control plane of the SFF node.

[0021] In a third aspect, the present application provides a communication device, which is applied to a control plane of an SFF node, and the device includes:

[0022] A receiving unit, configured to receive a first SRv6 message sent by the data plane of the SFF node, wherein the first SRv6 message includes a first SID, a first SPI, a first SI, first encapsulation information, and first notification data, wherein the first notification data includes a first flag and a first head node address;

[0023] a judging unit, configured to judge whether there is first forwarding information associated with the first SID locally when the value of the first flag is 0, the first forwarding information including a second SPI, a second SI, second encapsulation information, and a second head node address;

[0024] a comparing unit, for comparing, if any, whether the difference between the first head node address, the first SPI, and the first SI and 1 is the same as the second head node address, the second SPI, and the second SI;

[0025] an updating unit, configured to update the second encapsulation information by using the first encapsulation information if they are the same and the encapsulation information is changed;

[0026] A sending unit, configured to send the second SPI, the second SI and the updated second encapsulation information to the data plane;

[0027] The first SRv6 message is sent after the data plane determines that the first SID is a locally allocated SID and the first SRv6 message includes the first notification data.

[0028] In a fourth aspect, the present application provides a communication device, which is applied to a head node, and includes:

[0029] A receiving unit, configured to receive a first configuration instruction and a second configuration instruction, wherein the first configuration instruction includes an SRv6 Policy, the SRv6 Policy includes a segment list consisting of at least one SID, and the segment list indicates a forwarding path;

[0030] A starting unit, used for starting the SFC notification function according to the second configuration instruction;

[0031] A sending unit is used to send a first SRv6 message on the forwarding path under the SFC notification function, so that the data plane of the SFF node that receives the first SRv6 message determines that the destination address included in the first SRv6 message is a locally assigned first SID and the first SRv6 message includes first notification data, and then copies the first SRv6 message and sends it to the control plane of the SFF node.

[0032] In a fifth aspect, the present application provides a network device, including a processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor, and the processor is prompted by the machine-executable instructions to execute the method provided in the first aspect of the present application.

[0033] In a sixth aspect, the present application provides a network device, including a processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor, and the processor is prompted by the machine-executable instructions to execute the method provided in the second aspect of the present application.

[0034] Therefore, by applying the communication method and device provided in the present application, the control plane of the SFF node receives the first SRv6 message sent by the data plane of the SFF node, and the first SRv6 message includes a first SID, a first SPI, a first SI, a first encapsulation information and a first notification data, and the first notification data includes a first flag and a first head node address; when the value of the first flag is 0, the control plane determines whether there is first forwarding information associated with the first SID locally, and the first forwarding information includes a second SPI, a second SI, a second encapsulation information and a second head node address; if so, the control plane compares the difference between the first head node address, the first SPI, and the first SI with 1 and whether they are the same as the second head node address, the second SPI, and the second SI respectively; if they are all the same and the encapsulation information is changed, the control plane uses the first encapsulation information to update the second encapsulation information, and sends the second SPI, the second SI and the updated second encapsulation information to the data plane; wherein, the first SRv6 message is copied and sent after the data plane determines that the first SID is a locally assigned SID and the first SRv6 message includes the first notification data.

[0035] In this way, in the SRv6 service function chain scenario with NSH integrated, the data plane copies the SRv6 message sent by the head node and sends it to the control plane, which learns the encapsulation information, thus simplifying the complexity of the data plane and increasing the corresponding fault tolerance, control, and security capabilities. This solves the problem that in the existing message forwarding process, the complexity of the data plane learning encapsulation information is high, and when a configuration error occurs in the network, the subsequent forwarding path of the service message processed by the SF node is unclear and may be an incorrect path. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 A flow chart of a communication method provided in an embodiment of the present application;

[0037] Figure 2 A schematic diagram of a protocol message or BFD message format provided in an embodiment of the present application;

[0038] Figure 3 A schematic diagram of another protocol message or BFD message format provided in an embodiment of the present application;

[0039] Figure 4 A schematic diagram of the first notification data format provided in an embodiment of the present application;

[0040] Figure 5 A flowchart of another communication method provided in an embodiment of the present application;

[0041] Figure 6 A structural diagram of a communication device provided in an embodiment of the present application;

[0042] Figure 7 A structural diagram of another communication device provided in an embodiment of the present application;

[0043] Figure 8 The network device hardware structure provided in the embodiment of the present application. DETAILED DESCRIPTION

[0044] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0045] The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in this article refers to and includes any or all possible combinations of one or more corresponding listed items.

[0046] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0047] A communication method provided in an embodiment of the present application is described in detail below. Figure 1 , Figure 1 A flow chart of a communication method provided in an embodiment of the present application. The method is applied to the control plane of an SFF node. The communication method provided in an embodiment of the present application may include the following steps.

[0048] Step 110: Receive a first SRv6 message sent by the data plane of the SFF node, where the first SRv6 message includes a first SID, a first SPI, a first SI, first encapsulation information, and first notification data, where the first notification data includes a first flag and a first head node address;

[0049] Specifically, in the SRv6 service function chain scenario integrated with NSH, the head node on the SRv6 path generates and sends a first SRv6 message to the next-hop node in accordance with the existing SRv6-related protocol.

[0050] The first SRv6 message includes a first SID, a first SPI, a first SI, first encapsulation information and first notification data. The first notification data includes a first flag and a head node address (referred to as the first head node address here to distinguish the subsequent head node addresses).

[0051] In the embodiment of the present application, the next hop node is specifically an SFF node, and the first SRv6 message is received by the data plane of the SFF node (hereinafter referred to as the data plane).

[0052] It can be understood that the specific process of the head node triggering the generation of the first SRv6 message and generating the first SRv6 message will not be repeated here, and will be described in detail in subsequent embodiments.

[0053] Optionally, in the embodiment of the present application, the first SRv6 message may be specifically a protocol message; or, the first SRv6 message is a bidirectional forwarding detection (English: Bidirectional Forwarding Detection, referred to as: BFD) message. Figure 2 , Figure 3 As shown, Figure 2 A schematic diagram of a protocol message or BFD message format provided in an embodiment of the present application; Figure 3 A schematic diagram of another protocol message or BFD message format provided in an embodiment of the present application.

[0054] exist Figure 2 In one implementation, when the first SRv6 message is a protocol message, the protocol message includes a first IPv6 header, a first destination option header (English: Destination Option Header, abbreviated as: DOH), a first SRH and a first NSH; the first DOH carries the first notification data; the first NSH carries the first SPI and the first SI.

[0055] In another implementation, when the first SRv6 message is a BFD message, the BFD message includes a first IPv6 header, a first DOH, a first SRH, a first NSH and a BFD payload; the first DOH carries the first notification data; the first NSH carries the first SPI and the first SI; and the BFD payload carries BFD information.

[0056] The first IPv6 header and the first SRH are both set according to the existing SRv6 related protocols; the first NSH header is set according to the existing NSH related protocols, and each header includes a Next Header field for indicating the next adjacent header.

[0057] exist Figure 3 In one implementation, when the first SRv6 message is a protocol message, the protocol message includes a first IPv6 header, a first SRH and a first NSH; the first SRH includes a first TLV structure, and the first TLV structure carries the first notification data; the first NSH carries the first SPI and the first SI.

[0058] In another implementation, when the first SRv6 message is a BFD message, the BFD message includes a first IPv6 header, a first SRH, a first NSH and a BFD payload; the first SRH includes a first TLV structure, and the first TLV structure carries the first notification data; the first NSH carries the first SPI and the first SI; and the BFD payload carries BFD information.

[0059] The first IPv6 header and other fields of the first SRH are set according to the existing SRv6 related protocols; the first NSH header is set according to the existing NSH related protocols, and each header includes a Next Header field for indicating the next adjacent header.

[0060] In the embodiment of the present application, the first encapsulation information includes information indicated by the first IPv6 header and information indicated by the first SRH. The information indicated by the first IPv6 header includes but is not limited to the source, destination address, Hoplimit, FlowLabel and other fields; the information indicated by the first SRH includes but is not limited to the segment list, segmentleft, Last Entry, Flags and other fields.

[0061] Next, the first notification data will be described.

[0062] like Figure 4 As shown, Figure 4 A schematic diagram of the first notification data format provided in an embodiment of the present application. Figure 4 In the first notification data format, a flag (Flags) field, a sequence number (Sequence) field, a lifetime (LifeTime) field, and a head node IPv6 address (Classifier IPv6Addr) field.

[0063] Among them, the Flags field is used to carry the first flag (Bit0) and the second flag (Bit1), and other bits are to be defined.

[0064] Bit0: If set, it indicates a delete forwarding information operation; if not set, it indicates an update forwarding information operation.

[0065] Bit1: If set, it instructs the SFF node to respond to the head node with a response message.

[0066] Sequence field: When the head node sends an SRv6 message carrying notification data, if the path information of the SRv6 Policy changes, the value of the Sequence field increases.

[0067] LifeTime field: used to indicate the lifetime of the encapsulation information in seconds. After the control plane of the SFF node learns the encapsulation information for a SID of the End.NSH type, if no SRv6 message with Bit0 not set is received within the time indicated in the LifeTime field, the control plane of the SFF node deletes the encapsulation information associated with the SID.

[0068] Classifier IPv6Addr field: used to indicate the head node.

[0069] In the embodiment of the present application, after the data plane receives the first SRv6 message, it obtains the first SID from the destination address field in the IPv6 header, and the type of the first SID is End.NSH type.

[0070] The data plane identifies whether the first SID is a locally assigned SID, and if so, identifies whether the first SRv6 message includes the first notification data. If the first SRv6 message includes the first notification data, the first SRv6 message is copied and sent to the control plane of the SFF node (hereinafter referred to as the control plane).

[0071] At the same time, the data plane also forwards the first SRv6 message to the next hop node in accordance with the method of forwarding SRv6 messages specified in the existing SRv6 and NSH related protocols (for example, the data plane modifies the SL field included in the SRH, updates the destination address field included in the IPv6 header, and modifies the SI field included in the NSH), which will not be repeated here.

[0072] It can be understood that if the first SRv6 message does not include the first notification data, the data plane processes the first SRv6 message according to the action corresponding to the existing End.NSH type SID, which will not be repeated here.

[0073] After receiving the first SRv6 message, the control plane obtains the first SID, the first SPI, the first SI, the first encapsulation information and the first notification data from the first SRv6 message, where the first notification data includes the first flag and the first head node address. It is understandable that the first passing data also includes the first sequence number and the first survival time.

[0074] Step 120: When the value of the first flag is 0, determine whether there is first forwarding information associated with the first SID locally, where the first forwarding information includes a second SPI, a second SI, second encapsulation information, and a second head node address;

[0075] Specifically, the control plane identifies the value of the first flag according to the description of step 110. When the value of the first flag is 0, the control plane determines whether there is first forwarding information associated with the first SID locally.

[0076] If the first forwarding information associated with the first SID exists locally, the control plane executes step 130 .

[0077] In an embodiment of the present application, the first forwarding information includes a second SPI, a second SI, second encapsulation information, a second head node address, a second serial number, and a second lifetime.

[0078] The storage mode of the multiple information in the first forwarding information is a key-value storage mode, in which SPI and SI are used as keys and the remaining information is used as values.

[0079] Optionally, in the embodiment of the present application, the situation where the first forwarding information associated with the first SID does not exist locally on the control plane is also included.

[0080] If the first forwarding information associated with the first SID does not exist locally, the control plane establishes the second forwarding information associated with the first SID locally, and the second forwarding information includes the first SPI, the difference between the first SI and 1, the first head node address, the first serial number, the first lifetime and the first encapsulation information.

[0081] The control plane sends the first SID, the first SPI, the difference between the first SI and 1, and the first encapsulation information to the data plane, so that after the data plane subsequently receives the SRv6 message processed by the SF node, it matches and encapsulates the SRv6 according to the information obtained from the control plane and then forwards it. It can be understood that the process of forwarding the SRv6 message by the data plane is the same as the process of forwarding the SRv6 message by the existing data plane, which will not be repeated here.

[0082] It should be noted that each information in the second forwarding information is stored in a corresponding field. For example, the first SPI obtained from the first SRv6 message is stored in the SPI field; the first head node address obtained from the first SRv6 message is stored in the head node address field.

[0083] The second forwarding information includes a first SI field, but the field stores a difference between the first SI obtained from the first SRv6 message and 1.

[0084] It can be understood that the SI stored in the control plane and the data plane are the difference between the SI obtained in the message and 1. The reason is that during the forwarding process, each time it passes through an SF node, the SF node needs to modify the SI field included in the NSH, subtract 1 from the SI, and then forward it to the SFF node. In this way, after the SFF node receives the message processed by SF again, the value stored in the SI field included in the NSH in the message is 1 different from the value stored in the SI field of the first message received by the SFF node.

[0085] In this way, the second SI included in the first forwarding information has a value equal to the difference between the SI obtained by the previously sent SRv6 message and 1.

[0086] Step 130: If yes, compare the difference between the first head node address, the first SPI, and the first SI and 1 with the second head node address, the second SPI, and the second SI to see whether they are the same respectively;

[0087] Specifically, according to the description of step 120, if there is first forwarding information associated with the first SID locally, the control plane compares the difference between the first head node address, the first SPI, the first SI and 1 with the second head node address, the second SPI, and the second SI to see if they are the same.

[0088] If the first head node address is the same as the second head node address, the first SPI is the same as the second SPI, and the difference between the first SI and 1 is the same as the second SI, the control plane identifies whether the encapsulation information has changed.

[0089] If the packaging information is changed, that is, the first packaging information is different from the second packaging information, the control plane executes step 140 .

[0090] Optionally, in the embodiment of the present application, the situation where the packaging information is not changed is also included.

[0091] If the encapsulation information has not changed, that is, the first encapsulation information is the same as the second encapsulation information, the control plane updates the second lifetime using the first generation time.

[0092] Step 140: If they are the same and the package information is changed, the second package information is updated using the first package information, and the second SPI, the second SI and the updated second package information are sent to the data plane.

[0093] Specifically, according to the description of step 130, if they are the same and the encapsulation information is changed, the control plane updates the second encapsulation information with the first encapsulation information. At the same time, the control plane also sends the second SPI, the second SI and the updated second encapsulation information to the data plane, so that the data plane updates the encapsulation information recorded locally.

[0094] Therefore, by applying the communication method provided in the present application, the control plane of the SFF node receives the first SRv6 message sent by the data plane of the SFF node, and the first SRv6 message includes a first SID, a first SPI, a first SI, a first encapsulation information and a first notification data, and the first notification data includes a first flag and a first head node address; when the value of the first flag is 0, the control plane determines whether there is first forwarding information associated with the first SID locally, and the first forwarding information includes a second SPI, a second SI, a second encapsulation information and a second head node address; if so, the control plane compares the difference between the first head node address, the first SPI, and the first SI and 1 with the second head node address, the second SPI, and the second SI to see if they are the same respectively; if they are all the same and the encapsulation information has changed, the control plane uses the first encapsulation information to update the second encapsulation information, and sends the second SPI, the second SI and the updated second encapsulation information to the data plane; wherein, the first SRv6 message is copied and sent after the data plane determines that the first SID is a locally assigned SID and the first SRv6 message includes the first notification data.

[0095] In this way, in the SRv6 service function chain scenario with NSH integrated, the data plane copies the SRv6 message sent by the head node and sends it to the control plane, which learns the encapsulation information, thus simplifying the complexity of the data plane and increasing the corresponding fault tolerance, control, and security capabilities. This solves the problem that in the existing message forwarding process, the complexity of the data plane learning encapsulation information is high, and when a configuration error occurs in the network, the subsequent forwarding path of the service message processed by the SF node is unclear and may be an incorrect path.

[0096] Optionally, in an embodiment of the present application, step 130 compares the difference between the first head node address, the first SPI, the first SI and 1 to see whether they are the same as the second head node address, the second SPI, and the second SI, respectively, and also includes another situation.

[0097] Specifically, if the first head node address is different from the second head node address, the first SPI is the same as the second SPI, and the difference between the first SI and 1 is the same as the second SI, the control plane generates a syslog log. The control plane sends a syslog log to the management platform to prompt the current network configuration error. The management personnel check the current network configuration according to the syslog log.

[0098] Optionally, in the embodiment of the present application, the process of the control plane identifying and deleting the forwarding information when the value of the first flag is 1 is also included.

[0099] Specifically, according to the description of step 110, the control plane identifies the value of the first flag. When the value of the first flag is 1, the control plane determines whether there is third forwarding information associated with the first SID locally. It can be understood that the storage format of the third forwarding information is the same as the storage format of the first forwarding information. For example, the third forwarding information includes the following fields: a third SPI, a third SI, a third encapsulation information, a third head node address, a third sequence number, and a third lifetime. The value of the third SI is the difference between the SI obtained by the previously sent SRv6 message and 1.

[0100] If the third forwarding information associated with the first SID exists locally, the control plane compares whether the difference between the first head node address, the first SPI, the first SI and 1 is the same as the third head node address, the third SPI, and the third SI respectively.

[0101] If the first head node address is the same as the third head node address, the first SPI is the same as the third SPI, and the difference between the first SI and 1 is the same as the third SI, the control plane deletes the third forwarding information locally. The control plane sends the first SID, the first SPI, and the difference between the first SI and 1 to the data plane, so that the data plane deletes the forwarding information associated with the first SID, the first SPI, and the difference between the first SI and 1 locally.

[0102] It should be noted that each SID may be associated with multiple forwarding information. For example, the first SID is associated with three forwarding information, forwarding information 1, forwarding information 2, and forwarding information 3. After the control plane obtains the three forwarding information, it determines one forwarding information that fully matches from the three forwarding information based on the first SPI, the difference between the first SI and 1, and deletes the forwarding information that fully matches, while the other forwarding information is retained.

[0103] Optionally, in an embodiment of the present application, when the value of the second flag is 1 and the control plane has completed learning the encapsulation information, the control plane generates a second SRV6 message. The second SRv6 message includes the learning result of the control plane on the SID and the encapsulation information. The learning result is specifically that the control plane has learned or the control plane has not learned.

[0104] Control the first head node indicated by the first head node address to send a second SRv6 message, so that the first head node can timely understand the state of the SFF node learning encapsulation information.

[0105] It can be understood that the second SRv6 message also includes the first SID associated with the learned encapsulation information, the IPv6 source and destination addresses, and the SL included in the SRH.

[0106] Optionally, in the embodiment of the present application, the first SRv6 may specifically include a BFD message. In this case, the BFD payload included in the BFD message carries BFD information.

[0107] After the control plane sends the first SID, the first SPI, the difference between the first SI and 1, and the first encapsulation information to the data plane, the control plane forwards the BFD information carried by the BFD payload on the forwarding path indicated by the first segment list included in the SRH.

[0108] In this way, on the forwarding path, after each SFF node learns the encapsulation information, it releases the BFD information, so that the BFD state of the head node gradually changes to the up state and can be used to forward subsequent BFD packets.

[0109] Another communication method provided by the embodiment of the present application is described in detail below. Figure 5 , Figure 5 A flowchart of another communication method provided in an embodiment of the present application. The method is applied to a head node. The communication method provided in an embodiment of the present application may include the following steps.

[0110] Step 510: Receive a first configuration instruction and a second configuration instruction, wherein the first configuration instruction includes an SRv6 policy (SRv6 Policy), the SRv6 Policy includes a segment list consisting of at least one SID, and the segment list indicates a forwarding path;

[0111] Specifically, in a scenario of an SRv6 service function chain integrated with NSH, a head node receives a first configuration instruction and a second configuration instruction. The first configuration instruction includes an SRv6 Policy, the SRv6 Policy includes a segment list consisting of at least one SID, and the segment list indicates a forwarding path. The number of forwarding paths can be one or more.

[0112] It should be noted that, in the embodiment of the present application, at least one SID includes a SID of the End.NSH type.

[0113] It is understandable that according to the existing SRv6-related protocols, the SRv6 Policy also includes BSID, Color, and End-point identifiers.

[0114] Optionally, after the head node receives the first configuration instruction and the second configuration instruction, the head node first creates an SRv6 SFC notification instance locally, and binds the SRv6 SFC notification instance to the SRv6 Policy; according to the SRv6 SFC notification instance, the head node determines the type and sending interval of the first SRv6 message, and generates notification data; wherein the SRv6 SFC notification instance includes a source address, a lifetime, whether the SFF node responds to the SRv6 message, and the SRv6 message type.

[0115] The head node receives the third configuration instruction, which includes the SPI and the SI. According to the SPI and the SI, the NSH is generated, and the NSH includes the service path header (English: Service Path Header, referred to as: SPH), and the SPH includes the SPI field and the SI field. The SPI field stores the SPI, and the SI field stores the difference between the SI and 1.

[0116] The head node generates an SRH according to the SRv6 Policy and existing SRv6-related protocols.

[0117] The first configuration instruction, the second configuration instruction, and the third configuration instruction may be issued by a controller or by a management staff member to the head node in the form of a command line.

[0118] Step 520: according to the second configuration instruction, start the SFC notification function;

[0119] Specifically, according to the description of step 510, after receiving the second configuration instruction, the head node starts the SFC advertising function (SRv6-SFC-Advertising) locally according to the second configuration instruction.

[0120] Step 530: Under the SFC notification function, a first SRv6 message is sent on the forwarding path, so that the data plane of the SFF node that receives the first SRv6 message determines that the destination address included in the first SRv6 message is the locally assigned first SID and the first SRv6 message includes the first notification data, and then copies the first SRv6 message and sends it to the control plane of the SFF node.

[0121] Specifically, according to the description of step 520, after the head node starts the SFC notification function, it generates a first SRv6 message so that the control plane of each node on the forwarding path learns the encapsulation information.

[0122] Optionally, in the embodiment of the present application, the first SRv6 message may be a protocol message; or, the first SRv6 message is a BFD message. Figure 2 , Figure 3 As shown, the message format of the first SRv6 message has been described in detail in the above embodiment and will not be repeated here.

[0123] Optionally, in the embodiment of the present application, the notification data includes a flag field, a sequence number field, a lifetime field, and a head node address field. Figure 4 As shown, the format of the notification data has been described in detail in the aforementioned embodiment and will not be repeated here.

[0124] Optionally, in an embodiment of the present application, when the value of the second flag is 1 and the control plane of the SFF node has completed learning the encapsulation information, the control plane generates a second SRV6 message. The second SRv6 message includes the learning result of the control plane on the SID and the encapsulation information. The learning result is specifically that the control plane has learned or the control plane has not learned.

[0125] The control plane sends the second SRv6 message to the head node, so that the head node can timely understand the state of the SFF node learning the encapsulation information.

[0126] It can be understood that the second SRv6 message also includes the first SID associated with the learned encapsulation information, the IPv6 source and destination addresses, and the SL included in the SRH.

[0127] Therefore, by applying the communication method provided in the present application, according to the configuration instructions issued, the head node starts the SFC notification function; under the SFC notification function, the head node generates and sends a first SRv6 message on the forwarding path; after the control plane of the SFF node receives the first SRv6 message, it determines that the destination address included in the first SRv6 message is the locally assigned first SID and the first SRv6 message includes the first notification data, and then copies the first SRv6 message and sends it to the control plane of the SFF node.

[0128] In this way, in the SRv6 service function chain scenario with NSH integrated, the data plane copies the SRv6 message sent by the head node and sends it to the control plane, which learns the encapsulation information, thus simplifying the complexity of the data plane and increasing the corresponding fault tolerance, control, and security capabilities. This solves the problem that in the existing message forwarding process, the complexity of the data plane learning encapsulation information is high, and when a configuration error occurs in the network, the subsequent forwarding path of the service message processed by the SF node is unclear and may be an incorrect path.

[0129] Based on the same inventive concept, the embodiment of the present application also provides a communication device corresponding to the communication method. Figure 6 , Figure 6 A communication device provided in an embodiment of the present application is applied to a control plane applied to an SFF node, and the device includes:

[0130] The receiving unit 610 is configured to receive a first SRv6 message sent by the data plane of the SFF node, where the first SRv6 message includes a first SID, a first SPI, a first SI, first encapsulation information, and first notification data, where the first notification data includes a first flag and a first head node address;

[0131] A first judging unit 620, configured to judge whether there is first forwarding information associated with the first SID locally when the value of the first flag is 0, the first forwarding information including a second SPI, a second SI, second encapsulation information, and a second head node address;

[0132] A first comparison unit 630 is used to compare whether the difference between the first head node address, the first SPI, and the first SI and 1 is the same as the second head node address, the second SPI, and the second SI respectively, if any;

[0133] An updating unit 640 is configured to update the second encapsulation information by using the first encapsulation information if they are the same and the encapsulation information is changed;

[0134] A sending unit 650 is configured to send the second SPI, the second SI and the updated second encapsulation information to the data plane;

[0135] The first SRv6 message is sent after the data plane determines that the first SID is a locally allocated SID and the first SRv6 message includes the first notification data.

[0136] Optionally, the sending unit 650 is also used to send a syslog log to the management platform to prompt the current network configuration error if the first head node address is different from the second head node address and the difference between the first SPI and the first SI and 1 is the same as the second SPI and the second SI respectively.

[0137] Optionally, the first notification data further includes a first sequence number and a first lifetime, and the device further includes:

[0138] an establishing unit (not shown in the figure), configured to establish second forwarding information associated with the first SID if it does not exist, the second forwarding information including the first SPI, the difference between the first SI and 1, the first head node address, the first sequence number, the first lifetime, and the first encapsulation information;

[0139] The sending unit 650 is further configured to send the first SID, the first SPI, the difference between the first SI and 1, and the first encapsulation information to the data plane.

[0140] Optionally, the first notification data further includes a first survival time, the second forwarding information further includes a second survival time, and the device further includes:

[0141] An updating unit (not shown in the figure) is used to update the second survival time using the first generation time if they are the same and the encapsulation information has not changed.

[0142] Optionally, the device further includes: a second judgment unit (not shown in the figure), configured to judge whether there is third forwarding information associated with the first SID locally when the value of the first flag is 1, the third forwarding information including a third SPI, a third SI, third encapsulation information and a third head node address;

[0143] a second comparing unit (not shown in the figure), for comparing, if present, whether the first head node address, the first SPI, the difference between the first SI and 1 and the third head node address, the third SPI, the difference between the third SI and 1 are respectively the same;

[0144] a deleting unit (not shown in the figure), configured to delete the third forwarding information locally if they are the same;

[0145] The sending unit 650 is further configured to send the first SID, the first SPI, and the difference between the first SI and 1 to the data plane, so that the data plane deletes the encapsulation information locally associated with the first SID, the first SPI, and the difference between the first SI and 1.

[0146] Optionally, the first notification data further includes a second flag;

[0147] The sending unit 650 is also used to, when the value of the second flag is 1 and the learning of the encapsulation information has been completed, send a second SRv6 message to the first head node indicated by the first head node address, the second SRv6 message including the learning result of the control plane SID and the encapsulation information.

[0148] Optionally, the first SRv6 message is a protocol message; or, the first SRv6 message is a BFD message;

[0149] The first SRv6 message further includes a first DOH, and the first DOH carries the first notification data; or the first SRv6 message further includes a first SRH, and the first SRH includes a first TLV structure, and the first TLV structure carries the first notification data.

[0150] Optionally, the first SRv6 message further includes a first SRH and a BFD payload, and the first SRH includes a first segment list;

[0151] The sending unit 650 is further configured to forward the BFD information carried by the BFD payload on a forwarding path indicated by the first segment list according to the first segment list.

[0152] Optionally, the first SRv6 message further includes a first IPv6 header;

[0153] The encapsulation information includes information indicated by the first IPv6 header and information indicated by the first SRH.

[0154] Therefore, by applying the communication method provided in the present application, the control plane of the SFF node receives the first SRv6 message sent by the data plane of the SFF node, and the first SRv6 message includes a first SID, a first SPI, a first SI, a first encapsulation information and a first notification data, and the first notification data includes a first flag and a first head node address; when the value of the first flag is 0, the control plane determines whether there is first forwarding information associated with the first SID locally, and the first forwarding information includes a second SPI, a second SI, a second encapsulation information and a second head node address; if so, the control plane compares the difference between the first head node address, the first SPI, and the first SI and 1 with the second head node address, the second SPI, and the second SI to see if they are the same respectively; if they are all the same and the encapsulation information has changed, the control plane uses the first encapsulation information to update the second encapsulation information, and sends the second SPI, the second SI and the updated second encapsulation information to the data plane; wherein, the first SRv6 message is copied and sent after the data plane determines that the first SID is a locally assigned SID and the first SRv6 message includes the first notification data.

[0155] In this way, in the SRv6 service function chain scenario with NSH integrated, the data plane copies the SRv6 message sent by the head node and sends it to the control plane, which learns the encapsulation information, thus simplifying the complexity of the data plane and increasing the corresponding fault tolerance, control, and security capabilities. This solves the problem that in the existing message forwarding process, the complexity of the data plane learning encapsulation information is high, and when a configuration error occurs in the network, the subsequent forwarding path of the service message processed by the SF node is unclear and may be an incorrect path.

[0156] Based on the same inventive concept, the embodiment of the present application also provides another communication device corresponding to the communication method. Figure 7 , Figure 7 A communication device provided in an embodiment of the present application is applied to a head node, and the device includes:

[0157] A receiving unit 710 is configured to receive a first configuration instruction and a second configuration instruction, wherein the first configuration instruction includes an SRv6 Policy, the SRv6 Policy includes a segment list consisting of at least one SID, and the segment list indicates a forwarding path;

[0158] A starting unit 720, configured to start the SFC notification function according to the second configuration instruction;

[0159] The sending unit 730 is used to send a first SRv6 message on the forwarding path under the SFC notification function, so that the data plane of the SFF node that receives the first SRv6 message determines that the destination address included in the first SRv6 message is a locally assigned first SID and the first SRv6 message includes first notification data, and then copies the first SRv6 message and sends it to the control plane of the SFF node.

[0160] Optionally, the device further includes: a creation unit (not shown in the figure), configured to create an SRv6 SFC notification instance and bind the SRv6 SFC notification instance to the SRv6 Policy;

[0161] A determination unit (not shown in the figure), configured to determine the type and sending interval of the first SRv6 message according to the SRv6 SFC notification instance, and generate notification data; wherein the SRv6 SFC notification instance includes a source address, a lifetime, whether the SFF node responds to the SRv6 message, and a SRv6 message type;

[0162] The receiving unit 710 is further configured to receive a third configuration instruction, where the third configuration instruction includes SPI and SI;

[0163] A generating unit (not shown in the figure), configured to generate an NSH according to the SPI and the SI, wherein the NSH includes an SPH, the SPH includes an SPI field and an SI field, the SPI field stores the SPI, and the SI field stores a difference between the SI and 1;

[0164] The generating unit (not shown in the figure) is further configured to generate an SRH according to the SRv6 Policy.

[0165] Optionally, the first SRv6 message is a protocol message or a BFD message;

[0166] When the first SRv6 message is a protocol message, the protocol message includes an IPv6 header, a DOH, the SRH, and the NSH; when the first SRv6 message is a BFD message, the BFD message includes an IPv6 header, a DOH, the SRH, the NSH, and a BFD payload;

[0167] The DOH carries the notification data; the BFD payload carries BFD information;

[0168] or,

[0169] When the first SRv6 message is a protocol message, the protocol message includes an IPv6 header, an SRH, and an NSH; when the first SRv6 message is a BFD message, the BFD message includes an IPv6 header, an SRH, an NSH, and a BFD payload;

[0170] The SRH includes a TLV structure, and the TLV structure carries the notification data; the BFD payload carries BFD information.

[0171] Optionally, the notification data includes a flag field, a sequence number field, a lifetime field, and a head node address field;

[0172] The flag field includes a first flag and a second flag; when the value of the first flag is 0, it indicates an update forwarding information operation, and when the value of the first flag is 1, it indicates a delete forwarding information operation; when the value of the second flag is 1, it indicates that the SFF node sends a second SRv6 message to the head node;

[0173] The sequence number field is used to indicate whether the path information of the SRv6 Policy is changed;

[0174] The lifetime field is used to indicate the lifetime of the encapsulated information;

[0175] The head node address field is used to indicate the head node.

[0176] Optionally, the receiving unit 710 is further configured to receive a second SRv6 message sent by the SFF node, where the second SRv6 message includes a learning result of a control plane SID and encapsulation information of the SFF node.

[0177] Therefore, by applying the communication method provided in the present application, according to the configuration instructions issued, the head node starts the SFC notification function; under the SFC notification function, the head node generates and sends a first SRv6 message on the forwarding path; after the control plane of the SFF node receives the first SRv6 message, it determines that the destination address included in the first SRv6 message is the locally assigned first SID and the first SRv6 message includes the first notification data, and then copies the first SRv6 message and sends it to the control plane of the SFF node.

[0178] In this way, in the SRv6 service function chain scenario with NSH integrated, the data plane copies the SRv6 message sent by the head node and sends it to the control plane, which learns the encapsulation information, thus simplifying the complexity of the data plane and increasing the corresponding fault tolerance, control, and security capabilities. This solves the problem that in the existing message forwarding process, the complexity of the data plane learning encapsulation information is high, and when a configuration error occurs in the network, the subsequent forwarding path of the service message processed by the SF node is unclear and may be an incorrect path.

[0179] Based on the same inventive concept, the embodiment of the present application also provides a network device, such as Figure 8 As shown, it includes a processor 810, a transceiver 820 and a machine-readable storage medium 830, the machine-readable storage medium 830 stores machine-executable instructions that can be executed by the processor 810, and the processor 810 is prompted by the machine-executable instructions to execute the communication method provided in the embodiment of the present application. Figure 6 , Figure 7 The communication device shown can be used as Figure 8 The network device hardware structure shown is implemented.

[0180] The computer-readable storage medium 830 may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk storage. Optionally, the computer-readable storage medium 830 may also be at least one storage device located away from the processor 810.

[0181] The processor 810 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may 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, or discrete hardware components.

[0182] In the embodiment of the present application, the processor 810 reads the machine executable instructions stored in the machine readable storage medium 830, and the machine executable instructions enable the processor 810 itself and the transceiver 820 to execute the communication method described in the aforementioned embodiment of the present application.

[0183] In addition, an embodiment of the present application provides a machine-readable storage medium 830, which stores machine-executable instructions. When called and executed by the processor 810, the machine-executable instructions prompt the processor 810 itself and the calling transceiver 820 to execute the communication method described in the aforementioned embodiment of the present application.

[0184] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0185] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.

[0186] As for the communication device and machine-readable storage medium embodiments, since the method contents involved are basically similar to the aforementioned method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0187] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A communication method, characterized in that: The method is applied to the control plane of a service function forwarding SFF node, and the method comprises: Receive a first IPv6 segment routing SRv6 message sent by the data plane of the SFF node, where the first SRv6 message includes a first segment identifier SID, a first service path identifier SPI, a first service index SI, first encapsulation information, and first notification data, where the first notification data includes a first flag and a first head node address; When the value of the first flag is 0, determine whether there is first forwarding information associated with the first SID locally, where the first forwarding information includes a second SPI, a second SI, second encapsulation information, and a second head node address; If so, compare whether the first head node address is the same as the second head node address, whether the first SPI is the same as the second SPI, and whether the difference between the first SI and 1 is the same as the second SI; If they are the same and the package information is changed, the second package information is updated using the first package information, and the second SPI, the second SI and the updated second package information are sent to the data plane; The first SRv6 message is sent after the data plane determines that the first SID is a locally allocated SID and the first SRv6 message includes the first notification data.

2. The method according to claim 1, characterized in that The method further comprises: If the first head node address is different from the second head node address and the first SPI is the same as the second SPI, and the difference between the first SI and 1 is the same as the second SI, a syslog log is sent to the management platform to prompt that the current network configuration is wrong.

3. The method according to claim 1, characterized in that The first notification data further includes a first sequence number and a first lifetime, and the method further includes: If not, establish second forwarding information associated with the first SID, the second forwarding information including the first SPI, the difference between the first SI and 1, the first head node address, the first sequence number, the first lifetime, and the first encapsulation information; The first SID, the first SPI, the difference between the first SI and 1, and the first encapsulation information are sent to the data plane.

4. The method according to claim 3, characterized in that The first notification data further includes a first survival time, the second forwarding information further includes a second survival time, and the method further includes: If they are the same and the encapsulation information has not changed, the second lifetime is updated using the first lifetime.

5. The method according to claim 1, characterized in that The method further comprises: When the value of the first flag is 1, determine whether there is third forwarding information associated with the first SID locally, where the third forwarding information includes a third SPI, a third SI, third encapsulation information, and a third head node address; If so, compare whether the first head node address is the same as the third head node address, whether the first SPI is the same as the third SPI, and whether the difference between the first SI and 1 is the same as the third SI; If they are the same, deleting the third forwarding information locally; The first SID, the first SPI, and the difference between the first SI and 1 are sent to the data plane, so that the data plane deletes the encapsulation information associated with the first SID, the first SPI, and the difference between the first SI and 1 locally.

6. The method according to any one of claims 1 to 5, characterized in that: The first notification data also includes a second flag; When the value of the second flag is 1 and the learning of the encapsulation information has been completed, a second SRv6 message is sent to the first head node indicated by the first head node address, where the second SRv6 message includes the learning result of the control plane SID and the encapsulation information.

7. The method according to claim 6, characterized in that The first SRv6 message is a protocol message; or, the first SRv6 message is a BFD message; The first SRv6 message further includes a first DOH, and the first DOH carries the first notification data; or the first SRv6 message further includes a first SRH, and the first SRH includes a first TLV structure, and the first TLV structure carries the first notification data.

8. The method according to claim 3, characterized in that The first SRv6 message further includes a first SRH and a BFD payload, and the first SRH includes a first segment list; After sending the first SID, the first SPI, the difference between the first SI and 1, and the first encapsulation information to the data plane, the method further includes: According to the first segment list, the BFD information carried by the BFD payload is forwarded on a forwarding path indicated by the first segment list.

9. The method according to any one of claims 7 or 8, characterized in that: The first SRv6 message also includes a first IPv6 header; The encapsulation information includes information indicated by the first IPv6 header and information indicated by the first SRH.

10. A communication method, characterized in that: The method is applied to a head node, and the method comprises: Receiving a first configuration instruction and a second configuration instruction, wherein the first configuration instruction includes an IPv6 segment routing policy SRv6Policy, the SRv6 Policy includes a segment list consisting of at least one segment identifier SID, and the segment list indicates a forwarding path; According to the second configuration instruction, start the service function chain SFC notification function; Under the SFC notification function, a first SRv6 message is sent on the forwarding path, so that the data plane of the service function forwarding SFF node that receives the first SRv6 message determines that the destination address included in the first SRv6 message is the locally allocated first SID and the first SRv6 message includes the first notification data, and then copies the first SRv6 message and sends it to the control plane of the SFF node; The control plane of the SFF node receives a first SRv6 message sent by the data plane of the SFF node, where the first SRv6 message includes a first SID, a first service path identifier SPI, a first service index SI, first encapsulation information and first notification data, where the first notification data includes a first flag and a first head node address; when the value of the first flag is 0, it is determined whether there is first forwarding information associated with the first SID locally, where the first forwarding information includes a second SPI, a second SI, second encapsulation information and a second head node address; if so, it is compared whether the first head node address is the same as the second head node address, whether the first SPI is the same as the second SPI, and whether the difference between the first SI and 1 is the same as the second SI; if they are the same and the encapsulation information is changed, the second encapsulation information is updated using the first encapsulation information, and the second SPI, the second SI and the updated second encapsulation information are sent to the data plane; wherein, after the data plane determines that the first SID is a locally assigned SID and the first SRv6 message includes the first notification data, the first SRv6 message is copied and sent.

11. The method according to claim 10, characterized in that After receiving the first configuration instruction and the second configuration instruction, the method further includes: Create an SRv6 SFC notification instance, and bind the SRv6 SFC notification instance to the SRv6 Policy; According to the SRv6 SFC notification instance, determine the type and sending interval of the first SRv6 message, and generate first notification data; wherein the SRv6 SFC notification instance includes a source address, a lifetime, whether the SFF node responds to the SRv6 message, and the SRv6 message type; Receive a third configuration instruction, wherein the third configuration instruction includes SPI and SI; Generate a network service header NSH according to the SPI and the SI, wherein the NSH includes a service routing header SPH, and the SPH includes an SPI field and an SI field, wherein the SPI field stores the SPI, and the SI field stores a difference between the SI and 1; A segment routing header (SRH) is generated according to the SRv6 Policy.

12. The method according to claim 11, characterized in that The first SRv6 message is a protocol message or a bidirectional forwarding detection BFD message; When the first SRv6 message is a protocol message, the protocol message includes an IPv6 header, a destination option header DOH, the SRH, and the NSH; when the first SRv6 message is a BFD message, the BFD message includes an IPv6 header, DOH, the SRH, the NSH, and a BFD payload; The DOH carries the first notification data; the BFD payload carries BFD information; or, When the first SRv6 message is a protocol message, the protocol message includes an IPv6 header, an SRH, and an NSH; when the first SRv6 message is a BFD message, the BFD message includes an IPv6 header, an SRH, an NSH, and a BFD payload; The SRH includes a type, length, and value TLV structure, and the TLV structure carries the first notification data; and the BFD payload carries BFD information.

13. The method according to claim 12, characterized in that The first notification data includes a flag field, a sequence number field, a lifetime field, and a head node address field; The flag field includes a first flag and a second flag; when the value of the first flag is 0, it indicates an update forwarding information operation, and when the value of the first flag is 1, it indicates a delete forwarding information operation; when the value of the second flag is 1, it indicates that the SFF node sends a second SRv6 message to the head node; The sequence number field is used to indicate whether the path information of the SRv6 Policy is changed; The lifetime field is used to indicate the lifetime of the encapsulated information; The head node address field is used to indicate the head node.

14. The method according to claim 11, characterized in that The method further comprises: A second SRv6 message sent by the SFF node is received, where the second SRv6 message includes a learning result of a control plane SID and encapsulation information of the SFF node.

15. A communication device, characterized in that: The device is applied to the control plane of a service function forwarding SFF node, and the device includes: A receiving unit, configured to receive a first IPv6 segment routing SRv6 message sent by the data plane of the SFF node, wherein the first SRv6 message includes a first segment identifier SID, a first service path identifier SPI, a first service index SI, first encapsulation information, and first notification data, wherein the first notification data includes a first flag and a first head node address; a judging unit, configured to judge whether there is first forwarding information associated with the first SID locally when the value of the first flag is 0, the first forwarding information including a second SPI, a second SI, second encapsulation information, and a second head node address; a comparing unit, for comparing, if present, whether the first head node address is the same as the second head node address, whether the first SPI is the same as the second SPI, and whether the difference between the first SI and 1 is the same as the second SI; an updating unit, configured to update the second encapsulation information by using the first encapsulation information if they are the same and the encapsulation information is changed; A sending unit, configured to send the second SPI, the second SI and the updated second encapsulation information to the data plane; The first SRv6 message is sent after the data plane determines that the first SID is a locally allocated SID and the first SRv6 message includes the first notification data.

16. A communication device, characterized in that: The device is applied to a head node, and comprises: A receiving unit, configured to receive a first configuration instruction and a second configuration instruction, wherein the first configuration instruction includes an IPv6 segment routing policy SRv6 Policy, the SRv6 Policy includes a segment list consisting of at least one segment identifier SID, and the segment list indicates a forwarding path; A starting unit, used to start a service function chain SFC notification function according to the second configuration instruction; A sending unit, configured to send a first SRv6 message on the forwarding path under the SFC notification function, so that the data plane of the service function forwarding SFF node that receives the first SRv6 message determines that the destination address included in the first SRv6 message is a locally allocated first SID and the first SRv6 message includes first notification data, and then copies the first SRv6 message and sends it to the control plane of the SFF node; The control plane of the SFF node receives a first SRv6 message sent by the data plane of the SFF node, where the first SRv6 message includes a first SID, a first service path identifier SPI, a first service index SI, first encapsulation information and first notification data, where the first notification data includes a first flag and a first head node address; when the value of the first flag is 0, it is determined whether there is first forwarding information associated with the first SID locally, where the first forwarding information includes a second SPI, a second SI, second encapsulation information and a second head node address; if so, it is compared whether the first head node address is the same as the second head node address, whether the first SPI is the same as the second SPI, and whether the difference between the first SI and 1 is the same as the second SI; if they are the same and the encapsulation information is changed, the second encapsulation information is updated using the first encapsulation information, and the second SPI, the second SI and the updated second encapsulation information are sent to the data plane; wherein, after the data plane determines that the first SID is a locally assigned SID and the first SRv6 message includes the first notification data, the first SRv6 message is copied and sent.