[go: up one dir, main page]

CN115277529B - Communication method and device - Google Patents

Communication method and device Download PDF

Info

Publication number
CN115277529B
CN115277529B CN202210739088.3A CN202210739088A CN115277529B CN 115277529 B CN115277529 B CN 115277529B CN 202210739088 A CN202210739088 A CN 202210739088A CN 115277529 B CN115277529 B CN 115277529B
Authority
CN
China
Prior art keywords
message
spi
information
sid
srv6
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210739088.3A
Other languages
Chinese (zh)
Other versions
CN115277529A (en
Inventor
李�昊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd
Original Assignee
New H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN202210739088.3A priority Critical patent/CN115277529B/en
Publication of CN115277529A publication Critical patent/CN115277529A/en
Application granted granted Critical
Publication of CN115277529B publication Critical patent/CN115277529B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/34Source routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/20Traffic policing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2212/00Encapsulation of packets

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请提供一种通信方法及装置,该方法包括:接收SFF节点的数据面发送的第一SRv6报文;当第一标志的值为0时,判断本地是否存在与第一SID关联的第一转发信息;若存在,则比较第一头节点地址、第一SPI、第一SI与1的差值与第二头节点地址、第二SPI、第二SI是否分别相同;若均相同且封装信息变更,则利用第一封装信息更新所述第二封装信息,并向数据面下发第二SPI、第二SI以及更新后的第二封装信息。

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.

Description

Communication method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a communications method and apparatus.
Background
IPv6 segment routing (Segment Routing IPv: segment Routing IPv, abbreviated: SRv) is a source routing technique, where a head node directs each node on a path through a segment list (SEGMENT LIST) in an SRH to forward a service packet according to a specified path.
The Service Function chain (English: service Function Chain, abbreviated as SFC) refers to a Service Function (English: service Function, abbreviated as SF) node which needs to forward the Service message to the value added Service according to the planning sequence in the process of forwarding the Service message, and the SF node processes the Service message. The service function may be specifically a charging function, a firewall, etc.
Currently, one mainstream implementation of SFC is to indicate a path for forwarding a service packet to an SF node through a Network service header (english: network SERVICE HEADER, abbreviated as NSH). After combining with SRv6, the implementation of SFC serves the functional chain for SRv integrated NSH. In the above implementation manner, the segment routing header (english: segment Routing Header, abbreviated as SRH) is used together with the NSH, and the SRH indicates a transmission path between service function forwarding (english: service Function Forwarder, abbreviated as SFF) nodes for a service packet, and the NSH provides service plane data of the SFC.
After receiving the original service message, the head node on the SRv path encapsulates NSH at the outer layer of the original service message, encapsulates SRH at the outer layer of NSH at the same time to identify a service function path (English: service Function Path, SFP for short), and encapsulates IPv6 header at the outer layer of SRH to obtain the first service message.
A SRv segment identifier (english: SEGMENT ID, abbreviated: SID) and its corresponding function, i.e. end.nsh SID, are newly defined in the existing RFC protocol to support the NSH-integrated SRv service function chain. After receiving the service message with the destination address of end.NSH SID, the SFF node strips off the SRH and forwards the rest of the service message, namely the second service message, to the SF node bound with the end.NSH SID, and meanwhile, the SFF node uses (SPI, SI-1) included by NSH as an index to cache the IPv6 header and the SRH information (also called as encapsulation information).
When receiving the second Service message processed by the SF node, the SFF node indexes the cached encapsulation information according to a Service path identifier (English: SERVICE PATH IDENTIFIER, SPI for short) and a Service Index (English: service Index, SI for short) in NSH (the value stored in the SI field is SI-1 in the first Service message, that is, the SI field performs 1 subtracting treatment after the Service message is processed by one SF). And the SFF node re-encapsulates the processed service message, namely, encapsulates the IPv6 header and the SRH of the second service message to obtain a third service message, and forwards the third service message according to the SRH.
From the above procedure, the SFF node needs to buffer the encapsulation information in the forwarding plane and uses (SPI, SI-1) included in NSH as an index. When receiving the service message processed by the SF node, indexing the cached encapsulation information according to (SPI, SI) included by NSH, and continuing to forward the service message to the next SFF node according to SRH.
That is, in the existing packet forwarding process, the SFF node is required to learn the encapsulation information in the data plane. The learning process has high requirements on the data surface and has no usability. In addition, if a misconfiguration occurs within the network, for example, on two different head nodes, there are segment lists of two different paths, but the same NSH is used (i.e., SPI, SI are the same). The header node encapsulates the message according to the two segment lists, respectively, and the destination addresses are the same end. Therefore, the encapsulation information cached by the SFF node is mutually covered due to two different service flows, and the subsequent forwarding path of the service message processed by the SF node is not clear and may be an error path.
Disclosure of Invention
In view of this, the present application provides a communication method and apparatus, which are used to solve the problems that in the existing message forwarding process, the complexity of learning and packaging information of a data plane is high, and when a configuration error occurs in a network, the subsequent forwarding path of a service message processed by an SF node is ambiguous and may be an error path.
In a first aspect, the present application provides a communication method, the method being applied to a control plane of an SFF node, the method comprising:
Receiving a first SRv message sent by a data plane of the SFF node, wherein the first SRv message comprises a first SID, a first SPI, a first SI, first encapsulation information and first notification data, and the first notification data comprises a first mark and a first head node address;
when the value of the first flag is 0, judging whether first forwarding information associated with the first SID exists locally or not, wherein the first forwarding information comprises a second SPI, a second SI, second encapsulation information and a second head node address;
If so, comparing whether the first head node address, the first SPI, the difference value between the first SI and 1 is the same as the second head node address, the second SPI and the second SI respectively;
if the first SPI and the second SI are the same and the package information is changed, updating the second package information by using the first package information, and issuing the second SPI, the second SI and the updated second package information to the data surface;
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.
In a second aspect, the present application provides a communication method, the method being applied to a head node, the method comprising:
Receiving a first configuration instruction and a second configuration instruction, wherein the first configuration instruction comprises SRv 6:6 Policy, the SRv 6:6 Policy comprises a segment list consisting of at least one SID, and the segment list indicates a forwarding path;
according to the second configuration instruction, starting an SFC notification function;
and under the SFC notification function, sending a first SRv message on the forwarding path, so that a data plane of an SFF node receiving the first SRv message determines that a destination address included in the first SRv message is a first SID distributed locally and the first SRv message includes first notification data, copying the first SRv message, and sending the copied first SRv message to a control plane of the SFF node.
In a third aspect, the present application provides a communication apparatus, the apparatus being applied to a control plane of an SFF node, the apparatus comprising:
a receiving unit, 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 judging unit, configured to judge whether first forwarding information associated with the first SID exists 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 comparing unit, 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;
the updating unit is used for updating the second package information by using the first package information if the first package information is the same and the package information is changed;
a sending unit, 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.
In a fourth aspect, the present application provides a communications apparatus for use in a head node, the apparatus comprising:
A receiving unit, configured to receive a first configuration instruction and a second configuration instruction, where the first configuration instruction includes SRv Policy, and the SRv Policy includes a segment list composed of at least one SID, and the segment list indicates a forwarding path;
The starting unit is used for starting the SFC notification function according to the second configuration instruction;
And the sending unit is 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.
In a fifth aspect, the application provides a network device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor to cause the processor to perform the method provided by the first aspect of the application.
In a sixth aspect, the application provides a network device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor to cause the processor to perform the method provided by the second aspect of the application.
The communication method and the communication device provided by the application are applied, the control surface of the SFF node receives a first SRv6 message sent by the 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 header 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 header node address, if so, the control surface compares the first header node address, the first SPI, the difference value of the first SI and 1 with the second header 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 to be the first SID after the first SID 326 is copied and the first SID is distributed to the first SID SRv.
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.
Drawings
Fig. 1 is a flowchart of a communication method according to an embodiment of the present application;
Fig. 2 is a schematic diagram of a protocol message or BFD message format according to an embodiment of the present application;
FIG. 3 is a schematic diagram of another protocol message or BFD message format according to an embodiment of the present application;
fig. 4 is a schematic diagram of a first notification data format according to an embodiment of the present application;
FIG. 5 is a flow chart of another communication method according to an embodiment of the present application;
fig. 6 is a block diagram of a communication device according to an embodiment of the present application;
fig. 7 is a block diagram of another communication device according to an embodiment of the present application;
fig. 8 is a hardware structure of a network device according to an embodiment of the present application.
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.

Claims (16)

1.一种通信方法,其特征在于,所述方法应用于服务功能转发SFF节点的控制面,所述方法包括:1. A communication method, characterized in that the method is applied to the control plane of a service function forwarding SFF node, the method comprising: 接收所述SFF节点的数据面发送的第一IPv6段路由SRv6报文,所述第一SRv6报文包括第一段标识SID、第一服务路径标识SPI、第一服务索引SI、第一封装信息以及第一通告数据,所述第一通告数据包括第一标志以及第一头节点地址;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; 当所述第一标志的值为0时,判断本地是否存在与所述第一SID关联的第一转发信息,所述第一转发信息包括第二SPI、第二SI、第二封装信息以及第二头节点地址;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; 若存在,则比较所述第一头节点地址是否与所述第二头节点地址相同、所述第一SPI是否与所述第二SPI相同、所述第一SI与1的差值是否与所述第二SI相同;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; 若均相同且封装信息变更,则利用所述第一封装信息更新所述第二封装信息,并向所述数据面下发所述第二SPI、所述第二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; 其中,所述第一SRv6报文为所述数据面确定所述第一SID为本地分配的SID且所述第一SRv6报文包括所述第一通告数据后,对所述第一SRv6报文进行复制后发送。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.根据权利要求1所述的方法,其特征在于,所述方法还包括:2. The method according to claim 1, characterized in that the method further comprises: 若所述第一头节点地址与所述第二头节点地址不同且所述第一SPI与所述第二SPI相同、所述第一SI与1的差值与所述第二SI相同,则向管理平台发送syslog日志,以提示当前网络配置错误。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.根据权利要求1所述的方法,其特征在于,所述第一通告数据还包括第一序列号以及第一生存时间,所述方法还包括:3. The method according to claim 1, wherein the first notification data further comprises a first sequence number and a first lifetime, and the method further comprises: 若未存在,则建立与所述第一SID关联的第二转发信息,所述第二转发信息包括所述第一SPI、所述第一SI与1的差值、所述第一头节点地址、所述第一序列号、所述第一生存时间以及所述第一封装信息;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; 向所述数据面下发所述第一SID、所述第一SPI、所述第一SI与1的差值以及所述第一封装信息。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.根据权利要求3所述的方法,其特征在于,所述第一通告数据还包括第一生存时间,所述第二转发信息还包括第二生存时间,所述方法还包括:4. The method according to claim 3, wherein 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.根据权利要求1所述的方法,其特征在于,所述方法还包括:5. The method according to claim 1, characterized in that the method further comprises: 当所述第一标志的值为1时,判断本地是否存在与所述第一SID关联的第三转发信息,所述第三转发信息包括第三SPI、第三SI、第三封装信息以及第三头节点地址;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; 若存在,则比较所述第一头节点地址是否与所述第三头节点地址相同、所述第一SPI是否与所述第三SPI相同、所述第一SI与1的差值是否与所述第三SI相同;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; 向所述数据面下发所述第一SID、所述第一SPI、所述第一SI与1的差值,以使得所述数据面将本地内与所述第一SID、所述第一SPI、所述第一SI与1的差值关联的封装信息删除。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.根据权利要求1-5任一项所述的方法,其特征在于,所述第一通告数据还包括第二标志;6. The method according to any one of claims 1 to 5, characterized in that the first notification data further includes a second flag; 当所述第二标志的值为1且已完成对封装信息的学习时,向所述第一头节点地址指示的第一头节点发送第二SRv6报文,所述第二SRv6报文包括所述控制面对SID、封装信息的学习结果。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.根据权利要求6所述的方法,其特征在于,所述第一SRv6报文为协议报文;或者,所述第一SRv6报文为BFD报文;7. The method according to claim 6, wherein the first SRv6 message is a protocol message; or the first SRv6 message is a BFD message; 所述第一SRv6报文还包括第一DOH,所述第一DOH承载所述第一通告数据;或者,所述第一SRv6报文还包括第一SRH,所述第一SRH包括第一TLV结构,所述第一TLV结构承载所述第一通告数据。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.根据权利要求3所述的方法,其特征在于,所述第一SRv6报文还包括第一SRH以及BFD载荷,所述第一SRH包括第一段列表;8. The method according to claim 3, wherein the first SRv6 message further includes a first SRH and a BFD payload, and the first SRH includes a first segment list; 所述向所述数据面下发所述第一SID、所述第一SPI、所述第一SI与1的差值以及所述第一封装信息之后,所述方法还包括: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: 根据所述第一段列表,在所述第一段列表指示的转发路径上,转发所述BFD载荷承载的BFD信息。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.根据权利要求7或8任一项所述的方法,其特征在于,所述第一SRv6报文还包括第一IPv6头部;9. The method according to any one of claims 7 or 8, characterized in that the first SRv6 message further includes a first IPv6 header; 所述封装信息包括所述第一IPv6头部指示的信息以及所述第一SRH指示的信息。The encapsulation information includes information indicated by the first IPv6 header and information indicated by the first SRH. 10.一种通信方法,其特征在于,所述方法应用于头节点,所述方法包括:10. A communication method, characterized in that the method is applied to a head node, and the method comprises: 接收第一配置指令以及第二配置指令,所述第一配置指令包括IPv6段路由策略SRv6Policy,所述SRv6 Policy包括由至少一个段标识SID组成的段列表,所述段列表指示转发路径;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; 根据所述第二配置指令,启动服务功能链SFC通告功能;According to the second configuration instruction, start the service function chain SFC notification function; 在所述SFC通告功能下,在所述转发路径上发送第一SRv6报文,以使得接收到所述第一SRv6报文的服务功能转发SFF节点的数据面确定所述第一SRv6报文包括的目的地址为本地分配的第一SID且所述第一SRv6报文包括第一通告数据后,对所述第一SRv6报文进行复制后,向所述SFF节点的控制面发送;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; 所述SFF节点的控制面接收所述SFF节点的数据面发送的第一SRv6报文,所述第一SRv6报文包括第一SID、第一服务路径标识SPI、第一服务索引SI、第一封装信息以及第一通告数据,所述第一通告数据包括第一标志以及第一头节点地址;当所述第一标志的值为0时,判断本地是否存在与所述第一SID关联的第一转发信息,所述第一转发信息包括第二SPI、第二SI、第二封装信息以及第二头节点地址;若存在,则比较所述第一头节点地址是否与所述第二头节点地址相同、所述第一SPI是否与所述第二SPI相同、所述第一SI与1的差值是否与所述第二SI相同;若均相同且封装信息变更,则利用所述第一封装信息更新所述第二封装信息,并向所述数据面下发所述第二SPI、所述第二SI以及更新后的第二封装信息;其中,所述第一SRv6报文为所述数据面确定所述第一SID为本地分配的SID且所述第一SRv6报文包括所述第一通告数据后,对所述第一SRv6报文进行复制后发送。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.根据权利要求10所述的方法,其特征在于,所述接收第一配置指令以及第二配置指令之后,所述方法还包括:11. The method according to claim 10, characterized in that after receiving the first configuration instruction and the second configuration instruction, the method further comprises: 创建SRv6 SFC通告实例,并将所述SRv6 SFC通告实例与所述SRv6 Policy绑定;Create an SRv6 SFC notification instance, and bind the SRv6 SFC notification instance to the SRv6 Policy; 根据所述SRv6 SFC通告实例,确定所述第一SRv6报文的类型、发送间隔,并生成第一通告数据;其中,所述SRv6 SFC通告实例包括源地址、生存时间、SFF节点是否响应SRv6报文以及SRv6报文类型;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; 接收第三配置指令,所述第三配置指令包括SPI以及SI;Receive a third configuration instruction, wherein the third configuration instruction includes SPI and SI; 根据所述SPI以及所述SI,生成网络服务头NSH,所述NSH包括服务路由头SPH,所述SPH包括SPI字段以及SI字段,所述SPI字段存储所述SPI,所述SI字段存储所述SI与1的差值;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; 根据所述SRv6 Policy,生成段路由头SRH。A segment routing header (SRH) is generated according to the SRv6 Policy. 12.根据权利要求11所述的方法,其特征在于,所述第一SRv6报文为协议报文或者为双向转发检测BFD报文;12. The method according to claim 11, wherein the first SRv6 message is a protocol message or a bidirectional forwarding detection BFD message; 当所述第一SRv6报文为协议报文时,所述协议报文包括IPv6头部、目的选项头DOH、所述SRH以及所述NSH;当所述第一SRv6报文为BFD报文时,所述BFD报文包括IPv6头部、DOH、所述SRH、所述NSH以及BFD载荷;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; 其中,所述DOH承载所述第一通告数据;所述BFD载荷承载BFD信息;The DOH carries the first notification data; the BFD payload carries BFD information; 或者,or, 当所述第一SRv6报文为协议报文时,所述协议报文包括IPv6头部、SRH以及NSH;当所述第一SRv6报文为BFD报文时,所述BFD报文包括IPv6头部、SRH、NSH以及BFD载荷;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; 其中,所述SRH包括类型、长度、值TLV结构,所述TLV结构承载所述第一通告数据;所述BFD载荷承载BFD信息。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.根据权利要求12所述的方法,其特征在于,所述第一通告数据包括标志字段、序列号字段、生存时间字段以及头节点地址字段;13. The method according to claim 12, characterized in that the first notification data comprises a flag field, a sequence number field, a lifetime field and a head node address field; 所述标志字段包括第一标志以及第二标志;所述第一标志的值为0时,指示为更新转发信息操作,所述第一标志的值为1时,指示为删除转发信息操作;所述第二标志的值为1时,指示所述SFF节点向所述头节点发送第二SRv6报文;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; 所述序列号字段用于指示所述SRv6 Policy的路径信息是否更改;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.根据权利要求11所述的方法,其特征在于,所述方法还包括:14. The method according to claim 11, characterized in that the method further comprises: 接收SFF节点发送的第二SRv6报文,所述第二SRv6报文包括所述SFF节点的控制面对SID、封装信息的学习结果。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.一种通信装置,其特征在于,所述装置应用于服务功能转发SFF节点的控制面,所述装置包括: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 comprises: 接收单元,用于接收所述SFF节点的数据面发送的第一IPv6段路由SRv6报文,所述第一SRv6报文包括第一段标识SID、第一服务路径标识SPI、第一服务索引SI、第一封装信息以及第一通告数据,所述第一通告数据包括第一标志以及第一头节点地址;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; 判断单元,用于当所述第一标志的值为0时,判断本地是否存在与所述第一SID关联的第一转发信息,所述第一转发信息包括第二SPI、第二SI、第二封装信息以及第二头节点地址;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; 比较单元,用于若存在,则比较所述第一头节点地址是否与所述第二头节点地址相同、所述第一SPI是否与所述第二SPI相同、所述第一SI与1的差值是否与所述第二SI相同;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; 发送单元,用于向所述数据面下发所述第二SPI、所述第二SI以及更新后的第二封装信息;A sending unit, configured to send the second SPI, the second SI and the updated second encapsulation information to the data plane; 其中,所述第一SRv6报文为所述数据面确定所述第一SID为本地分配的SID且所述第一SRv6报文包括所述第一通告数据后,对所述第一SRv6报文进行复制后发送。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.一种通信装置,其特征在于,所述装置应用于头节点,所述装置包括:16. A communication device, characterized in that the device is applied to a head node, and the device comprises: 接收单元,用于接收第一配置指令以及第二配置指令,所述第一配置指令包括IPv6段路由策略SRv6 Policy,所述SRv6 Policy包括由至少一个段标识SID组成的段列表,所述段列表指示转发路径;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; 启动单元,用于根据所述第二配置指令,启动服务功能链SFC通告功能;A starting unit, used to start a service function chain SFC notification function according to the second configuration instruction; 发送单元,用于在所述SFC通告功能下,在所述转发路径上发送第一SRv6报文,以使得接收到所述第一SRv6报文的服务功能转发SFF节点的数据面确定所述第一SRv6报文包括的目的地址为本地分配的第一SID且所述第一SRv6报文包括第一通告数据后,对所述第一SRv6报文进行复制后,向所述SFF节点的控制面发送;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; 所述SFF节点的控制面接收所述SFF节点的数据面发送的第一SRv6报文,所述第一SRv6报文包括第一SID、第一服务路径标识SPI、第一服务索引SI、第一封装信息以及第一通告数据,所述第一通告数据包括第一标志以及第一头节点地址;当所述第一标志的值为0时,判断本地是否存在与所述第一SID关联的第一转发信息,所述第一转发信息包括第二SPI、第二SI、第二封装信息以及第二头节点地址;若存在,则比较所述第一头节点地址是否与所述第二头节点地址相同、所述第一SPI是否与所述第二SPI相同、所述第一SI与1的差值是否与所述第二SI相同;若均相同且封装信息变更,则利用所述第一封装信息更新所述第二封装信息,并向所述数据面下发所述第二SPI、所述第二SI以及更新后的第二封装信息;其中,所述第一SRv6报文为所述数据面确定所述第一SID为本地分配的SID且所述第一SRv6报文包括所述第一通告数据后,对所述第一SRv6报文进行复制后发送。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.
CN202210739088.3A 2022-06-28 2022-06-28 Communication method and device Active CN115277529B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210739088.3A CN115277529B (en) 2022-06-28 2022-06-28 Communication method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210739088.3A CN115277529B (en) 2022-06-28 2022-06-28 Communication method and device

Publications (2)

Publication Number Publication Date
CN115277529A CN115277529A (en) 2022-11-01
CN115277529B true CN115277529B (en) 2024-12-06

Family

ID=83764727

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210739088.3A Active CN115277529B (en) 2022-06-28 2022-06-28 Communication method and device

Country Status (1)

Country Link
CN (1) CN115277529B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118101555B (en) * 2024-04-22 2024-07-23 新华三技术有限公司 Message forwarding method and device, electronic equipment and computer readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111510387A (en) * 2019-01-30 2020-08-07 华为技术有限公司 Data forwarding method and related device
CN111857945A (en) * 2019-04-30 2020-10-30 中兴通讯股份有限公司 Data packet transmission, management method, device, data forwarding device, and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112787921B (en) * 2019-11-08 2023-05-19 华为技术有限公司 Message transmission method, agent node and storage medium
CN114374634B (en) * 2020-10-15 2025-06-06 华为技术有限公司 Message forwarding method and network device
CN112953831A (en) * 2021-01-22 2021-06-11 新华三大数据技术有限公司 Message forwarding method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111510387A (en) * 2019-01-30 2020-08-07 华为技术有限公司 Data forwarding method and related device
CN111857945A (en) * 2019-04-30 2020-10-30 中兴通讯股份有限公司 Data packet transmission, management method, device, data forwarding device, and storage medium

Also Published As

Publication number Publication date
CN115277529A (en) 2022-11-01

Similar Documents

Publication Publication Date Title
CN107171977B (en) Message forwarding method and device
CN102959910B (en) Informing the controller of changes in the packet forwarding configuration of the network elements via a communication channel
US7751416B2 (en) Virtual network device
US12425330B2 (en) Information advertisement method, packet forwarding method, packet transmission method, device, and medium
WO2019057199A1 (en) Method for forwarding messages and network device
CN105191215A (en) Data plane learning of bi-directional service chains
WO2021088433A1 (en) Message processing method, device and system
KR102237299B1 (en) Traffic Engineering Service Mapping
US10050859B2 (en) Apparatus for processing network packet using service function chaining and method for controlling the same
CN108632147B (en) Message multicast processing method and device
CN111669422B (en) Message transmission method and device
US9832121B1 (en) Next hop instruction associations for forwarding unit programming within a network device
CN115277529B (en) Communication method and device
CN112702263A (en) Method, device and storage medium for forwarding message
CN107135151A (en) File transmitting method and device
CN108718275B (en) Message forwarding method and device
CN116132555A (en) A message processing method and system
CN112350936A (en) Method and device for optimizing interior gateway protocol flooding and storage medium
CN108540343B (en) Path detection method and device
US20250055794A1 (en) Packet processing
CN106656786B (en) Flow protection method and device
CN105721313B (en) Data transmission method and relevant device
CN113300931B (en) Virtual machine migration discovery method and VTEP
JP2002077266A (en) Logical router and routing information setting method thereof
WO2023078031A1 (en) Message sending method and apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant