Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the corresponding listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the application. The term "if" as used herein may be interpreted as "at..once" or "when..once" or "in response to a determination", depending on the context.
A communication method provided by the embodiment of the present application is described in detail below. Referring to fig. 1, fig. 1 is a flowchart of a communication method according to an embodiment of the present application. The method is applied to the control plane of the SFF node. The communication method provided by the embodiment of the application can comprise the following steps.
Step 110, receiving a first SRv message sent by a data plane of the SFF node, where the first SRv message includes a first SID, a first SPI, a first SI, first encapsulation information, and first advertisement data, and the first advertisement data includes a first flag and a first header node address;
specifically, in the SRv service function chain scenario of NSH integration, the head node on the SRv path generates and sends the first SRv6 packet to the next hop node according to the existing SRv related protocol.
The first SRv message includes a first SID, a first SPI, a first SI, first encapsulation information, and first advertisement data. The first advertisement data includes a first flag and a head node address (referred to herein as a first head node address for distinguishing between subsequent head node addresses).
In the embodiment of the present application, the next hop node is specifically an SFF node, and the data plane of the SFF node (hereinafter referred to as the data plane for short) receives the first SRv6 _6 packet.
It will be appreciated that the specific process of the head node triggering the generation of the first SRv th message and the generation of the first SRv th message will not be repeated here, and will be described in detail in the following embodiments.
Optionally, in the embodiment of the present application, the first SRv message may be a protocol message, or the first SRv message is a bidirectional forwarding detection (english: bidirectional Forwarding Detection, abbreviated: BFD) message. Fig. 2 is a schematic diagram of a protocol message or a BFD message format provided by an embodiment of the present application, and fig. 3 is a schematic diagram of another protocol message or a BFD message format provided by an embodiment of the present application, as shown in fig. 2 and 3.
In fig. 2, in one implementation, when the first SRv message is a protocol message, the protocol message includes a first IPv6 header, a first destination option header (english: destination Option Header, abbreviated: DOH), a first SRH, and a first NSH, where the first DOH carries first notification data, and the first NSH carries a first SPI and a first SI.
In another implementation manner, when the first SRv 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 load, the first DOH carries first advertisement data, the first NSH carries a first SPI, a first SI, and the BFD load carries BFD information.
The first IPv6 Header and the first SRH are both arranged according to the existing SRv related protocol, the first NSH Header is arranged according to the existing NSH related protocol, and each Header comprises a Next Header field for indicating the Next Header adjacent to the first Header.
In fig. 3, in one implementation, when the first SRv message is a protocol message, the protocol message includes a first IPv6 header, a first SRH, and a first NSH, where the first SRH includes a first TLV structure, the first TLV structure carries first notification data, and the first NSH carries a first SPI and a first SI.
In another implementation manner, when the first SRv message is a BFD message, the BFD message includes a first IPv6 header, a first SRH, a first NSH, and a BFD load, the first SRH includes a first TLV structure, the first TLV structure carries first advertisement data, the first NSH carries a first SPI, a first SI, and the BFD load carries BFD information.
The first IPv6 Header and other fields of the first SRH are all set according to the existing SRv relevant protocol, the first NSH Header is set according to the existing NSH relevant protocol, and each Header comprises a Next Header field used for indicating the Next adjacent Header.
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 comprises field contents including but not limited to source, destination address, hoplimit, flowLabel and the like, and the information indicated by the first SRH comprises field contents including but not limited to segment list (SEGMNET LIST), SEGMENT LEFT, LAST ENTRY, flags and the like.
The first notice data will be described below.
Fig. 4 is a schematic diagram of a first notification data format according to an embodiment of the present application, as shown in fig. 4. In fig. four, the first advertisement data format includes a flag (Flags) field, a Sequence number (Sequence) field, a time-to-live (LifeTime) field, and a head node IPv6 address (CLASSIFIER IPV Addr) field.
The Flags field is used for carrying a first flag (Bit 0) and a second flag (Bit 1), and other bits are to be defined.
Bit0, if set, indicating to delete the forwarding information operation, and if not set, indicating to update the forwarding information operation.
And Bit1, if the Bit is set, indicating the SFF node to respond to the response message to the head node.
And the Sequence field is used for increasing the value of the Sequence field if SRv Policy path information is changed when the head node sends SRv message carrying the notification data.
LifeTime field, which is used to indicate the survival time of the package information, and the unit is seconds. After the control plane of the SFF node learns the encapsulation information for a SID of a certain end.nsh type, if no SRv message with Bit0 unset 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.
CLASSIFIER IPV6 an Addr field for indicating the head node.
In the embodiment of the present application, after the data plane receives the first SRv packet, the first SID is obtained from the destination address field in the IPv6 header, and the type of the first SID is an end.
The data plane identifies whether the first SID is a locally assigned SID, and if so, identifies whether the first SRv message includes first advertisement data. If the first SRv message includes the first notification data, the first SRv message is duplicated, and the duplicated first SRv message is sent to a control plane (hereinafter simply referred to as a control plane) of the SFF node.
Meanwhile, the data plane forwards the first SRv message (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) to the next hop node in a manner specified by the existing SRv and NSH related protocols for forwarding the SRv message, which will not be repeated herein.
It can be appreciated that if the first SRv message does not include the first notification data, the data plane processes the first SRv message according to the action corresponding to the SID of the existing end.
After receiving the first SRv message, the control plane obtains the first SID, the first SPI, the first SI, the first encapsulation information, and the first advertisement data from the first SRv message, where the first advertisement data includes a first flag and a first head node address. It is understood that the first pass data further includes a first serial number, a first lifetime.
Step 120, when the value of the first flag is 0, determining 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 header node address;
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.
If there is first forwarding information locally associated with the first SID, the control plane performs step 130.
In the embodiment of the present application, the first forwarding information includes a second SPI, a second SI, second encapsulation information, a second header node address, a second sequence number, and a second lifetime.
The storage mode of the plurality of information in the first forwarding information is a key-value storage mode, wherein SPI and SI are used as keys, and the rest information is used as a value.
Optionally, in the embodiment of the present application, a case where the control plane does not locally have the first forwarding information associated with the first SID is further included.
If the first forwarding information associated with the first SID does not exist locally, the control plane establishes second forwarding information associated with the first SID locally, wherein the second forwarding information comprises a first SPI, a difference value between the first SI and 1, a first head node address, a first serial number, a first lifetime and first encapsulation information.
The control plane issues the first SID, the first SPI, the difference value between the first SI and 1 and the first encapsulation information to the data plane, so that after the data plane subsequently receives SRv messages processed from the SF node, SRv is matched and encapsulated according to the information acquired from the control plane and then forwarded. It will be appreciated that the procedure for forwarding SRv a message on the data plane is the same as the procedure for forwarding SRv a message on the existing data plane, and will not be repeated here.
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 SRv message is stored in the SPI field, and the first head node address obtained from the first SRv message is stored in the head node address field.
The second forwarding information includes a first SI field, but the difference between the first SI and 1 obtained from the first SRv message is stored in the first SI field.
It can be understood that the SI stored in the control plane and the data plane are both differences between the SI acquired in the message and 1. The reason is that in the forwarding process, the SF node needs to modify the SI field included in the NSH every time an SF node passes, and forward the SI minus 1 to the SFF node. Thus, after the SFF node receives the SF processed message again, the value stored in the SI field included in the message NSH differs by 1 with respect to the value stored in the SI field of the first message received by the SFF node.
Thus, the second SI included in the first forwarding information has a value of the difference between the SI obtained from the previously sent SRv message and 1.
Step 130, if yes, comparing whether the first head node address, the first SPI, the difference between the first SI and 1, and the second head node address, the second SPI, the second SI are the same;
specifically, according to the description of step 120, if there is first forwarding information associated with the first SID locally, the control plane compares whether the first head node address, the first SPI, the difference between the first SI and 1, and the second head node address, the second SPI, and the second SI are the same, respectively.
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 value between the first SI and the 1 is the same as the second SI, the control surface identifies whether the encapsulation information is changed.
If the package information is changed, that is, the first package information is different from the second package information, the control plane performs step 140.
Optionally, in the embodiment of the present application, a case where the package information is unchanged is further included.
If the package information is unchanged, that is, the first package information is the same as the second package information, the control plane updates the second lifetime by using the first generation time.
And 140, if the first package information is the same and the package information is changed, updating the second package information by using the first package information, and transmitting the second SPI, the second SI and the updated second package information to the data plane.
Specifically, according to the description of step 130, if the package information is the same and changed, the control plane updates the second package information with the first package information. Meanwhile, the control plane also transmits a second SPI, a second SI and updated second encapsulation information to the data plane, so that the data plane updates the locally recorded encapsulation information.
The communication method provided by the application is applied, a control surface of an SFF node receives a first SRv6 message sent by a data surface of the SFF node, the first SRv message comprises a first SID, a first SPI, a first SI, first encapsulation information and first notification data, the first notification data comprises a first mark and a first head node address, when the value of the first mark is 0, the control surface judges whether first forwarding information related to the first SID exists locally, the first forwarding information comprises a second SPI, a second SI, second encapsulation information and a second head node address, if so, the control surface compares the first head node address, the first SPI, the difference value of the first SI and 1 with the second head node address, the second SPI and the second SI respectively, if so, the control surface updates the second encapsulation information by using the first encapsulation information and sends the second SPI, the second SI and the updated second encapsulation information to the data surface, wherein the first SID SRv is determined that the first SID is the first SID 6 and the first SID is distributed to the first SID SRv after the first SID is copied and the first SID 6 message is determined to be the first SID is distributed.
In this way, in SRv service function chain scene of integrated NSH, the data plane copies SRv message sent by the head node and sends it to the control plane, and the control plane learns the encapsulation information, simplifying the complexity of the data plane and increasing the corresponding fault tolerance, control and security capability. The method solves the problems that in the existing message forwarding process, the complexity of data plane learning and packaging information is high, and when configuration errors occur in a network, the subsequent forwarding paths of the service messages processed by SF nodes are ambiguous and may be error paths.
Optionally, in the embodiment of the present application, step 130 compares whether the first head node address, the first SPI, the difference between the first SI and 1, and the second head node address, the second SPI, and the second SI are respectively the same, and includes another case.
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 administrator checks the current network configuration according to the syslog log.
Optionally, in the embodiment of the present application, when the value of the first flag is 1, the control plane identifies and deletes the forwarding information.
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 1, the control plane determines whether third forwarding information associated with the first SID exists locally. It is 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 fields of a third SPI, a third SI, third encapsulation information, a third header node address, a third sequence number, and a third lifetime. The third SI value is the difference between SI and 1 obtained from the previously sent SRv message.
If there is third forwarding information associated with the first SID 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, the third SI, respectively.
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 value between the first SI and the 1 is the same as the third SI, the control surface deletes the third forwarding information from the local. The control plane issues the difference value of the first SID, the first SPI and the first SI and 1 to the data plane, so that the data plane deletes forwarding information which is locally related to the difference value of the first SID, the first SPI and the first SI and 1.
It should be noted that each SID may be associated with multiple forwarding information. For example, the first SID associates 3 pieces of forwarding information, forwarding information 1, forwarding information 2, and forwarding information 3. After the control plane obtains 3 pieces of forwarding information, according to the difference value between the first SPI, the first SI and 1, determining 1 piece of completely matched forwarding information from the 3 pieces of forwarding information, deleting the completely matched forwarding information, and remaining other forwarding information.
Optionally, in the embodiment of the present application, when the value of the second flag is 1 and the control plane has completed learning the package information, the control plane generates the second SRV6 packet. The second SRv message includes the learning result of the control plane SID and the encapsulation information. The learning result is that the control plane is learned and the control plane is not learned.
The control unit sends a second SRv message to the first head node indicated by the first head node address, so that the first head node knows the state of the SFF node learning encapsulation information in time.
It is understood that the second SRv message also includes the first SID, IPv6 source, destination address, SL included in the SRH associated with the learned encapsulation information.
Optionally, in an embodiment of the present application, the first SRv includes a BFD packet, which may be specifically a BFD packet, where a BFD load included in the BFD packet carries BFD information.
After the control plane issues the first SID, the first SPI, the difference value between the first SI and 1 and the first encapsulation information to the data plane, the control plane forwards BFD information borne by the BFD load on a forwarding path indicated by the first segment list according to the first segment list included by the SRH.
Thus, on the forwarding path, after each SFF node learns the encapsulation information, the BFD information is released, so that the BFD state of the head node is gradually changed into the up state, and the head node can be used for forwarding subsequent BFD messages.
Another communication method provided by the embodiment of the present application is described in detail below. Referring to fig. 5, fig. 5 is a flowchart of another communication method according to an embodiment of the present application. The method is applied to the head node. The communication method provided by the embodiment of the application can comprise the following steps.
Step 510, receiving a first configuration instruction and a second configuration instruction, wherein the first configuration instruction comprises SRv6 policies (SRv 6 Policy), the SRv Policy comprises a segment list composed of at least one SID, and the segment list indicates a forwarding path;
Specifically, in SRv service function chain scenario of integrated NSH, the head node receives the first configuration instruction and the second configuration instruction. The first configuration instruction includes SRv6 Policy, SRv6 Policy includes a segment list consisting of at least one SID, the segment list indicating a forwarding path. The number of forwarding paths may be one or more.
It should be noted that, in the embodiment of the present application, at least one SID includes a SID having an end.
It will be appreciated that SRv6 Policy also includes BSID, color, end-point identity components in accordance with the existing SRv related protocol.
Optionally, after receiving the first configuration instruction and the second configuration instruction, the head node first creates SRv an SFC advertisement instance locally and binds the SRv SFC advertisement instance with SRv6 Policy, and according to the SRv SFC advertisement instance, the head node determines a type, a transmission interval, and generates advertisement data of the first SRv message, where the SRv SFC advertisement instance includes a source address, a lifetime, whether the SFF node responds to the SRv message, and a SRv message type.
The head node receives a third configuration instruction, which includes the SPI and the SI. From SPI and SI, NSH is generated, which includes a service path header (English: SERVICE PATH HEADER, simply: SPH), which includes SPI field and SI field. The SPI field stores SPI, and the SI field stores the difference between SI and 1.
The head node generates SRH according to SRv Policy and the existing SRv related protocol.
The first configuration instruction, the second configuration instruction and the third configuration instruction can be issued by the controller or issued to the head node by a manager in a command line mode.
Step 520, starting an SFC notification function according to the second configuration instruction;
specifically, after receiving the second configuration instruction, the head node locally starts the SFC advertisement function (SRv-SFC-advertisement) according to the second configuration instruction, as described in step 510.
Step 530, under the SFC notification function, sending a first SRv packet on the forwarding path, so that the data plane of the SFF node that receives the first SRv packet determines that the destination address included in the first SRv packet is a first SID locally allocated and the first SRv packet includes first notification data, copying the first SRv packet, and then sending the copied first SRv packet to the control plane of the SFF node.
Specifically, according to the description of step 520, after the head node starts the SFC advertisement function, a first SRv message is generated, so that the control plane of each node on the forwarding path learns the encapsulation information.
Optionally, in the embodiment of the present application, the first SRv message may be a protocol message, or the first SRv message is a BFD message. As shown in fig. 2 and 3, the message format of the first SRv message has been described in detail in the foregoing embodiments, and will not be described again here.
Optionally, in an embodiment of the present application, the advertisement data includes a flag field, a sequence number field, a time-to-live field, and a head node address field. As shown in fig. 4, the format of the announcement data has been described in detail in the foregoing embodiment, and will not be repeated here.
Optionally, in the 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 the second SRV6 packet. The second SRv message includes the learning result of the control plane SID and the encapsulation information. The learning result is that the control plane is learned and the control plane is not learned.
The control plane sends a second SRv message to the head node so that the head node can know the state of the SFF node learning packaging information in time.
It is understood that the second SRv message also includes the first SID, IPv6 source, destination address, SL included in the SRH associated with the learned encapsulation information.
The method for communication provided by the application is used for enabling the head node to start the SFC notification function according to the issued configuration instruction, generating and sending the first SRv message on the forwarding path by the head node under the SFC notification function, and after the control surface of the SFF node receives the first SRv message, determining that the destination address included in the first SRv message is the locally distributed first SID and the first SRv message includes the first notification data, copying the first SRv message and then sending the first 3524 message to the control surface of the SFF node.
In this way, in SRv service function chain scene of integrated NSH, the data plane copies SRv message sent by the head node and sends it to the control plane, and the control plane learns the encapsulation information, simplifying the complexity of the data plane and increasing the corresponding fault tolerance, control and security capability. The method solves the problems that in the existing message forwarding process, the complexity of data plane learning and packaging information is high, and when configuration errors occur in a network, the subsequent forwarding paths of the service messages processed by SF nodes are ambiguous and may be error paths.
Based on the same inventive concept, the embodiment of the application also provides a communication device corresponding to the communication method. Referring to fig. 6, fig. 6 is a communication apparatus provided in an embodiment of the present application, where the apparatus is applied to a control plane applied to an SFF node, and the apparatus includes:
a receiving unit 610, configured to receive a first SRv packet sent by a data plane of the SFF node, where the first SRv packet includes a first SID, a first SPI, a first SI, first encapsulation information, and first advertisement data, where the first advertisement data includes a first flag and a first header node address;
A first determining unit 620, configured to determine whether there is first forwarding information associated with the first SID locally when the value of the first flag is 0, where the first forwarding information includes a second SPI, a second SI, second encapsulation information, and a second header node address;
A first comparing unit 630, configured to compare whether the first head node address, the first SPI, the difference between the first SI and 1, and the second head node address, the second SPI, and the second SI are the same, if any;
an updating unit 640, configured to update the second package information with the first package information if the package information is the same and the package information is changed;
a sending unit 650, configured to send the second SPI, the second SI, and updated second package information to the data plane;
And after the first SRv message determines that the first SID is the locally allocated SID for the data plane and the first SRv message includes the first notification data, copying the first SRv message and then sending the first SRv message.
Optionally, the sending unit 650 is further configured to send a syslog log to a management platform to prompt a 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, the first SI, and 1 is the same as the second SPI, the second SI, respectively.
Optionally, the first notification data further includes a first serial number and a first lifetime, and the apparatus further includes:
A setting unit (not shown in the figure) configured to set up second forwarding information associated with the first SID, if not present, where the second forwarding information includes the first SPI, a 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 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.
Optionally, the first notification data further includes a first lifetime, the second forwarding information further includes a second lifetime, and the apparatus further includes:
And an updating unit (not shown in the figure) for updating the second lifetime by using the first generation time if the package information is unchanged and the package information is the same.
Optionally, the device further comprises a second judging unit (not shown in the figure) for judging whether third forwarding information associated with the first SID exists locally or not when the value of the first flag is 1, wherein the third forwarding information comprises a third SPI, a third SI, third encapsulation information and a third header node address;
A second comparing unit (not shown in the figure) configured to compare 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, if any;
A deleting unit (not shown in the figure) configured to delete the third forwarding information locally if they are the same;
The sending unit 650 is further configured to send the difference between the first SID, the first SPI, the first SI, and 1 to the data plane, so that the data plane deletes the encapsulation information associated with the difference between the first SID, the first SPI, the first SI, and 1 locally.
Optionally, the first notification data further includes a second flag;
The sending unit 650 is further configured to send a second SRv message to the first head node indicated by the first head node address when the value of the second flag is 1 and learning of the encapsulation information is completed, where the second SRv message includes the result of learning the SID and the encapsulation information by the control plane.
Optionally, the first SRv message is a protocol message, or the first SRv message is a BFD message;
The first SRv message further includes a first DOH, where the first DOH carries the first advertisement data, or the first SRv message further includes a first SRH, where the first SRH includes a first TLV structure, and the first TLV structure carries the first advertisement data.
Optionally, the first SRv message further includes a first SRH and a BFD load, where the first SRH includes a first segment list;
the sending unit 650 is further configured to forward, according to the first segment list, BFD information carried by the BFD load on a forwarding path indicated by the first segment list.
Optionally, the first SRv6 _6 packet further includes a first IPv6 header;
The encapsulation information includes information indicated by the first IPv6 header and information indicated by the first SRH.
The communication method provided by the application is applied, a control surface of an SFF node receives a first SRv6 message sent by a data surface of the SFF node, the first SRv message comprises a first SID, a first SPI, a first SI, first encapsulation information and first notification data, the first notification data comprises a first mark and a first head node address, when the value of the first mark is 0, the control surface judges whether first forwarding information related to the first SID exists locally, the first forwarding information comprises a second SPI, a second SI, second encapsulation information and a second head node address, if so, the control surface compares the first head node address, the first SPI, the difference value of the first SI and 1 with the second head node address, the second SPI and the second SI respectively, if so, the control surface updates the second encapsulation information by using the first encapsulation information and sends the second SPI, the second SI and the updated second encapsulation information to the data surface, wherein the first SID SRv is determined that the first SID is the first SID 6 and the first SID is distributed to the first SID SRv after the first SID is copied and the first SID 6 message is determined to be the first SID is distributed.
In this way, in SRv service function chain scene of integrated NSH, the data plane copies SRv message sent by the head node and sends it to the control plane, and the control plane learns the encapsulation information, simplifying the complexity of the data plane and increasing the corresponding fault tolerance, control and security capability. The method solves the problems that in the existing message forwarding process, the complexity of data plane learning and packaging information is high, and when configuration errors occur in a network, the subsequent forwarding paths of the service messages processed by SF nodes are ambiguous and may be error paths.
Based on the same inventive concept, the embodiment of the application also provides another communication device corresponding to the communication method. Referring to fig. 7, fig. 7 is a communication apparatus provided in an embodiment of the present application, where the apparatus is applied to a head node, and the apparatus includes:
A receiving unit 710, configured to receive a first configuration instruction and a second configuration instruction, where the first configuration instruction includes SRv6 _6 Policy, and the SRv6 _6 Policy includes a segment list composed of at least one SID, and the segment list indicates a forwarding path;
a starting unit 720, configured to start an SFC notification function according to the second configuration instruction;
And a sending unit 730, configured to send a first SRv message on the forwarding path under the SFC notification function, so that the data plane of the SFF node that receives the first SRv message determines that the destination address included in the first SRv message is a first SID locally allocated and the first SRv message includes first notification data, copy the first SRv message, and send the first SRv message to the control plane of the SFF node.
Optionally, the device further comprises a creating unit (not shown in the figure) for creating SRv SFC notification instances and binding the SRv SFC notification instances with the SRv6 Policy;
a determining unit (not shown in the figure) configured to determine, according to the SRv SFC notification instance, a type and a transmission interval of the first SRv packet, and generate notification data, where the SRv SFC notification instance includes a source address, a lifetime, whether an SFF node responds to the SRv6 packet, and a SRv6 packet type;
the receiving unit 710 is further configured to receive a third configuration instruction, where the third configuration instruction includes an SPI and an SI;
A generating unit (not shown in the figure) configured to generate an NSH according to the SPI and the SI, where the NSH includes an SPH, and the SPH includes an SPI field storing the SPI and an SI field storing a difference between the SI and 1;
The generating unit (not shown in the figure) is further configured to generate SRH according to the SRv Policy.
Optionally, the first SRv message is a protocol message or a BFD message;
when the first SRv message is a protocol message, the protocol message comprises an IPv6 header, DOH, SRH and NSH, and when the first SRv message is a BFD message, the BFD message comprises an IPv6 header, DOH, SRH, NSH and BFD load;
The DOH carries the notification data, and the BFD load carries BFD information;
Or alternatively
When the first SRv message is a protocol message, the protocol message comprises an IPv6 header, an SRH and an NSH, and when the first SRv message is a BFD message, the BFD message comprises an IPv6 header, an SRH, an NSH and a BFD load;
the SRH comprises a TLV structure, wherein the TLV structure carries the notification data, and the BFD load carries BFD information.
Optionally, the advertisement data includes a flag field, a sequence number field, a time-to-live field, and a header node address field;
The flag field comprises a first flag and a second flag, wherein when the value of the first flag is 0, the operation is indicated to update forwarding information, and when the value of the first flag is 1, the operation is indicated to delete forwarding information;
The serial number field is used for indicating whether the SRv Policy path information is changed or not;
The survival time field is used for indicating the survival time of the package information;
the head node address field is used to indicate the head node.
Optionally, the receiving unit 710 is further configured to receive a second SRv packet sent by an SFF node, where the second SRv packet includes a learning result of SID and encapsulation information of a control plane of the SFF node.
The method for communication provided by the application is used for enabling the head node to start the SFC notification function according to the issued configuration instruction, generating and sending the first SRv message on the forwarding path by the head node under the SFC notification function, and after the control surface of the SFF node receives the first SRv message, determining that the destination address included in the first SRv message is the locally distributed first SID and the first SRv message includes the first notification data, copying the first SRv message and then sending the first 3524 message to the control surface of the SFF node.
In this way, in SRv service function chain scene of integrated NSH, the data plane copies SRv message sent by the head node and sends it to the control plane, and the control plane learns the encapsulation information, simplifying the complexity of the data plane and increasing the corresponding fault tolerance, control and security capability. The method solves the problems that in the existing message forwarding process, the complexity of data plane learning and packaging information is high, and when configuration errors occur in a network, the subsequent forwarding paths of the service messages processed by SF nodes are ambiguous and may be error paths.
Based on the same inventive concept, the embodiment of the present application also provides a network device, as shown in fig. 8, including a processor 810, a transceiver 820, and a machine-readable storage medium 830, where the machine-readable storage medium 830 stores machine executable instructions capable of being executed by the processor 810, the processor 810 being caused by the machine executable instructions to perform the communication method provided by the embodiment of the present application. The communication devices shown in fig. 6 and 7 may be implemented by using a hardware configuration of a network device as shown in fig. 8.
The computer readable storage medium 830 may include a random access Memory (english: random Access Memory, abbreviated as RAM) or a nonvolatile Memory (english: non-volatile Memory, abbreviated as NVM), such as at least one magnetic disk Memory. Optionally, the computer readable storage medium 830 may also be at least one storage device located remotely from the aforementioned processor 810.
The Processor 810 may be a general purpose Processor including a central processing unit (Central Processing Unit, CPU), a network Processor (Network Processor, NP), a digital signal Processor (DIGITAL SIGNAL), an Application SPECIFIC INTEGRATED Circuit (ASIC), a Field Programmable gate array (Field Programmable GATE ARRAY, FPGA), a discrete gate or transistor logic device, or a discrete hardware component.
In an embodiment of the present application, processor 810, by reading machine-executable instructions stored in machine-readable storage medium 830, is caused by the machine-executable instructions to implement processor 810 itself and invoke transceiver 820 to perform the communication methods described in the embodiments of the present application previously.
Additionally, embodiments of the present application provide a machine-readable storage medium 830, the machine-readable storage medium 830 storing machine-executable instructions that, when invoked and executed by the processor 810, cause the processor 810 itself, as well as the invoking transceiver 820, to perform the communication methods described in the foregoing embodiments of the present application.
The implementation process of the functions and roles of each unit in the above device is specifically shown in the implementation process of the corresponding steps in the above method, and will not be described herein again.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purposes of the present application. Those of ordinary skill in the art will understand and implement the present application without undue burden.
For the communication device and the machine-readable storage medium embodiments, since the method content involved is substantially similar to the method embodiments described above, the description is relatively simple, and reference will only be made to part of the description of the method embodiments.
The foregoing description of the preferred embodiments of the application is not intended to be limiting, but rather to enable any modification, equivalent replacement, improvement or the like to be made within the spirit and principles of the application.