WO2020182085A1 - 报文的传输方法和设备 - Google Patents

报文的传输方法和设备 Download PDF

Info

Publication number
WO2020182085A1
WO2020182085A1 PCT/CN2020/078323 CN2020078323W WO2020182085A1 WO 2020182085 A1 WO2020182085 A1 WO 2020182085A1 CN 2020078323 W CN2020078323 W CN 2020078323W WO 2020182085 A1 WO2020182085 A1 WO 2020182085A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
network device
index information
cache index
header
Prior art date
Application number
PCT/CN2020/078323
Other languages
English (en)
French (fr)
Inventor
张永康
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP20770590.6A priority Critical patent/EP3920512A4/en
Publication of WO2020182085A1 publication Critical patent/WO2020182085A1/zh
Priority to US17/469,222 priority patent/US11956148B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • 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/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/42Centralised routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/56Routing software
    • H04L45/566Routing instructions carried by the data packet, e.g. active networks
    • 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
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context

Definitions

  • the embodiments of the present application relate to the field of communication technologies, and in particular, to a method and device for transmitting a message.
  • the Internet Engineering Task Force (IETF) Service Function Chain (SFC) Working Group (WG) defines the implementation framework of SFC.
  • the network element types of the SFC data plane may include: classifier (Classifier), service function forwarder (SFF), SFC proxy (SFC proxy), and service function equipment (Service Function, SF).
  • SFF When implementing segment routing (SR) SFC, if SF does not support SR, SFF must implement the SR proxy function.
  • the message processing flow is as follows: When the SFF receives an SR message from the upstream device of the SFF and needs to implement the SR dynamic proxy function, the SFF needs to strip and cache the SR header encapsulation before forwarding the service message to the SF, and use the service The five-tuple of the message serves as the index of the SR header cache entry. After receiving the service message, the SF implements the relevant processing of the service function according to the local configuration strategy, and returns the service message to the SFF.
  • SR segment routing
  • the SFF When the SFF receives the service message returned by the SF, it obtains the SR header cache entry according to the 5-tuple query, restores the SR header encapsulation, and forwards the re-encapsulated message to the downstream device of the SFF.
  • the embodiments of the present application provide a method and device for transmitting a message, which can successfully restore the SR header of the message and ensure the normal forwarding of the service message.
  • an embodiment of the present application provides a message transmission method, which is applied to a first network device.
  • the message transmission method may include: receiving a first message sent by a previous hop device of the first network device, and A message includes an SR header; generates cache index information of the SR header, and stores the cache index information and the SR header; generates a second message according to the first message, the second message includes the cache index information and does not include the SR header; The second network device sends the second message.
  • the first network device after the first network device receives the first message sent by the previous hop device of the first network device, it generates cache index information when buffering the SR header included in the first message , And use the cache index information as the index value of the cache SR header.
  • the first network device carries the cache index information in the second message sent to the second network device, so that the second network device does not modify the value of the cache index information, and returns the cache index information as it is in the response message.
  • the cache index information sent by the first network device to the second network device through the second message is the same as the cache index information carried in the response message received by the first network device from the second network device.
  • the first network device can accurately obtain the SR header included in the first message from the locally cached SR header according to the cache index information carried in the response message, and successfully restore the SR header, thereby ensuring the normal forwarding of the service message.
  • the cache index information is used to indicate that the first network device is enabled to carry the cache index information in the second packet.
  • the cache index information when the cache index information is a valid value, the cache index information itself indicates the first network
  • the device enables the ability to carry cache index information.
  • the cache index information can not only express the enabling capability, but also carry cache index information, which improves efficiency and saves message overhead.
  • the cache index information is an invalid value, it is used to indicate that the first network device has not enabled the ability to carry cache index information. It can be seen that by providing a flexible implementation method, it is helpful to deploy and manage services on demand.
  • the second message further includes identification information, and the identification information is used to indicate that the first network device is enabled to carry cache index information in the second message.
  • the second message carries identification information
  • the identification information when the identification information is a valid value, it is used to indicate that the first network device is enabled to carry the cache index Information capacity.
  • the identification information when the identification information is an invalid value, it is used to indicate that the first network device has not enabled the ability to carry cache index information.
  • generating the cache index information of the SR header may include: obtaining N-tuple information in the first packet, where the N-tuple information is used to indicate the first packet The data stream to which the text belongs, N is an integer greater than 0; the cache index information is generated according to the N-tuple information.
  • the first network device generates cache index information according to the N-tuple information, different SR headers and data streams can be distinguished through the cache index information, and the SR header can be restored through the cache index information
  • the encapsulation ensures the normal forwarding of business packets.
  • the message transmission method may further include: receiving a response message of the second message sent by the second network device, the response message of the second message Including cache index information; obtaining the SR header corresponding to the cache index information stored in the first network device according to the cache index information; generating a third message according to the response message of the second message, the third message including the SR header; The next hop device of the first network device sends the third message.
  • the buffer index information sent by the first network device to the second network device through the second message is different from the response message received by the first network device from the second network device.
  • the cache index information carried in the response message is the same. Therefore, the first network device can successfully find the matching SR header according to the cache index information carried in the response message, perform successful recovery of the SR header, generate a third message, and replace the third The message is sent to the next hop device of the SFF. Thus, the normal forwarding of service messages is guaranteed.
  • the method may further include: determining whether the first network device is enabled at the current moment. A network device carries the cache index information in the second message; if the first network device is enabled to carry the cache index information in the second message at the current moment, execute the acquisition of the cache index stored in the first network device according to the cache index information The steps of the SR header corresponding to the message.
  • the method before receiving the first packet sent by the previous hop device of the first network device, the method may further include: obtaining configuration information, where the configuration information is used to enable the A network device carries cache index information in the second message.
  • the message transmission method provided by this possible implementation manner can be flexibly configured and enabled, which improves the flexibility of message forwarding.
  • the second message includes a message header, and the message header includes a content field, and the content field is used to carry cache index information.
  • the second message includes a message header, and the message header includes an identification field, and the identification field is used to carry identification information.
  • an embodiment of the present application provides a message transmission method, which is applied to a second network device.
  • the message transmission method may include: receiving a second message sent by the first network device, the second message including a buffer Index information; generate a response message according to the second message, the response message includes cache index information; send the response message to the first network device.
  • the cache index information is used to indicate that the second network device is enabled to carry the cache index information in the response message.
  • the response message further includes identification information, and the identification information is used to indicate that the second network device is enabled to carry cache index information in the response message.
  • the response message includes a message header, and the message header includes a content field, and the content field is used to carry cache index information.
  • the response message includes a message header, and the message header includes an identification field, and the identification field is used to carry identification information.
  • it may further include: determining whether the second network device is enabled to carry a cache index in the response message at the current moment Information; if the second network device is enabled to carry cache index information in the response message at the current moment, the step of generating the response message according to the second message is performed.
  • the message transmission method may further include: receiving configuration information, where the configuration information is used to enable the second network device to carry cache index information in the response message.
  • an embodiment of the present application provides a network device used as a first network device.
  • the first network device may include: a receiving module configured to receive a first packet sent by a previous hop device of the first network device, The first message includes the SR header; the processing module is used to generate the cache index information of the SR header and store the cache index information and the SR header; it is also used to generate the second message according to the first message, and the second message includes the cache The index information does not include the SR header; the sending module is used to send the second message to the second network device.
  • the cache index information is used to indicate that the first network device is enabled to carry the cache index information in the second packet.
  • the second message further includes identification information, and the identification information is used to indicate that the first network device is enabled to carry cache index information in the second message.
  • the processing module is specifically configured to: the first network device obtains N-tuple information in the first packet, and the N-tuple information is used to indicate the first packet For the data stream to which it belongs, N is an integer greater than 0; the first network device generates cache index information according to the N-tuple information.
  • the receiving module is further configured to receive a response message of the second message sent by the second network device, and the response message of the second message includes a cache index Information; processing module, also used to obtain the SR header corresponding to the cache index information stored in the first network device according to the cache index information; generate a third message according to the response message of the second message, the third message includes SR Head; sending module, also used to send a third message to the next hop device of the first network device.
  • the processing module is further configured to: determine whether the first network device is enabled to carry cache index information in the second packet at the current time; if the first network device is enabled at the current time A network device carries the cache index information in the second message, and then executes the step of obtaining the SR header corresponding to the cache index information stored in the first network device according to the cache index information.
  • the receiving module is further configured to obtain configuration information, where the configuration information is used to enable the first network device to carry cache index information in the second packet.
  • the second message includes a message header, and the message header includes a content field, and the content field is used to carry cache index information.
  • the second message includes a message header, and the message header includes an identification field, and the identification field is used to carry identification information.
  • an embodiment of the present application provides a network device used as a second network device.
  • the second network device includes a receiving module for receiving a second packet sent by the first network device, and the second packet includes a buffer Index information; a processing module for generating a response message according to the second message, the response message including cache index information; a sending module for sending a response message to the first network device.
  • the cache index information is used to instruct to enable the second network device to carry the cache index information in the response message.
  • the response message further includes identification information, and the identification information is used to indicate that the second network device is enabled to carry cache index information in the response message.
  • the response message includes a message header, and the message header includes a content field, and the content field is used to carry cache index information.
  • the response message includes a message header, and the message header includes an identification field, and the identification field is used to carry identification information.
  • the processing module is further configured to: determine whether the second network device is enabled to carry cache index information in the response message at the current moment; if the second network device is enabled at the current moment The network device carries the cache index information in the response message, and then executes the step of generating the response message according to the second message.
  • the receiving module is further configured to receive configuration information, where the configuration information is used to enable the second network device to carry cache index information in the response message.
  • an embodiment of the present application provides a network device used as a first network device.
  • the first network device includes a processor, a memory, and a transceiver.
  • the transceiver is used to receive data or send data
  • the memory is used to store instructions.
  • the processor is configured to execute instructions stored in the memory to implement the message transmission method provided by the first aspect and any one of the implementation manners of the first aspect.
  • inventions of the present application provide a network device used as a second network device.
  • the second network device includes a processor, a memory, and a transceiver.
  • the transceiver is used to receive data or send data
  • the memory is used to store instructions.
  • the processor is configured to execute instructions stored in the memory to implement the message transmission method provided by the second aspect and any one of the second aspect.
  • an embodiment of the present application provides a computer-readable storage medium on which computer-executable instructions are stored.
  • the computer-executable instructions are executed by at least one processor, the first aspect and any implementation of the first aspect is implemented.
  • an embodiment of the present application provides a message transmission system, including: the first network device provided in the foregoing third aspect and any implementation of the third aspect and any implementation of the foregoing fourth aspect and the fourth aspect Or; the first network device provided by any one of the fifth aspect and the fifth aspect, and the second network device provided by any one of the sixth and sixth aspects.
  • an embodiment of the present application provides a program product.
  • the program product includes a computer program (that is, an execution instruction), and the computer program is stored in a readable storage medium.
  • the computer program is read and executed by at least one processor, at least one processor can execute the message transmission method provided by any one of the first aspect and the first aspect, or the second aspect and the second aspect.
  • the message transmission method provided by any embodiment.
  • the embodiments of the present application provide a message transmission method and device, wherein the message transmission method includes: a first network device receives a first message sent by a previous hop device of the first network device, the first message including SR header; the first network device generates the cache index information of the SR header, and stores the cache index information and the SR header; the first network device generates a second message according to the first message, the second message includes the cache index information and does not include SR header; the first network device sends a second message to the second network device.
  • the first network device generates cache index information when caching the SR header included in the first message, and uses the cache index information as the index value of the cache SR header.
  • the first network device carries the cache index information in the second message sent to the second network device, so that the second network device carries the cache index information in the response message and returns it to the first network device as it is.
  • the cache index information sent by the first network device to the second network device through the second message is the same as the cache index information carried in the response message received by the first network device from the second network device.
  • the first network device can successfully restore the SR header according to the cache index information, which ensures the normal forwarding of the message.
  • Figure 1 is a system architecture diagram of the SR SFC data plane applicable to the embodiments of this application;
  • Figure 2 is a general architecture diagram of SR agent
  • FIG. 3 is a message interaction diagram of the message transmission method provided in Embodiment 1 of the application.
  • FIG. 4 is a schematic diagram of a message structure during a message transmission process according to Embodiment 1 of the application;
  • FIG. 5 is another schematic diagram of the message structure in the message transmission process provided by Embodiment 1 of the application;
  • Fig. 6 is a message interaction diagram of the message transmission method provided in the second embodiment of the application.
  • FIG. 7 is a schematic structural diagram of a VXLAN tunnel head provided by an embodiment of the application.
  • FIG. 8 is a schematic structural diagram of a tunnel header of VXLAN-GPE provided by an embodiment of the application.
  • FIG. 9 is a schematic structural diagram of a tunnel head of Geneve provided by an embodiment of the application.
  • FIG. 10 is a schematic structural diagram of a GRE tunnel header provided by an embodiment of this application.
  • FIG. 11 is a schematic structural diagram of an IPv6 tunnel header provided by an embodiment of this application.
  • FIG. 12 is a schematic structural diagram of an SFF provided in Embodiment 1 of the application.
  • FIG. 13 is a schematic diagram of the structure of the SFF provided in the second embodiment of the application.
  • 16 is a schematic diagram of the structure of the SF provided in the second embodiment of the application.
  • FIG. 17 is a schematic diagram of the structure of the SF provided in the third embodiment of the application.
  • the embodiment of the present application provides a method and device for transmitting a message.
  • the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings. It should be noted that the network architecture and business scenarios described in the embodiments of this application are intended to more clearly illustrate the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those of ordinary skill in the art It can be seen that with the evolution of the network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are equally applicable to similar technical problems.
  • the message transmission method provided in the embodiment of the present application can be applied to a network using SR as a transmission tunnel.
  • the network includes a network device, and the network device may be a device that performs a message forwarding function.
  • the embodiment of the present application does not limit the name and implementation of the network device, which may be different according to the location and role of the network device deployed in the network.
  • the network device may be a router, switch, repeater, SFF, SF, etc.
  • the network device may be a physical device or a virtual device implemented based on virtualization technology.
  • FIG. 1 is a system architecture diagram of the SR SFC data plane applicable to the embodiments of the application.
  • Figure 1 shows the typical data plane network architecture of SFC defined by IETF.
  • the types of SR SFC data plane network elements may include: classifier (Classifier), SFF, SFC proxy (SFC proxy), and SF.
  • SFF can implement the SFC proxy function at the same time.
  • SFF can also be referred to as "SFF (SFC proxy)" or "SFF (SFC proxy)".
  • SFP Service Function Path
  • the data plane may include the network device 11-16.
  • the network device 11 may be called an ingress router/classifier (Ingress Router/Classifier).
  • the network device 12 may be referred to as a router 1.
  • the network device 13 may be called SFF1, and SFF1 may communicate with at least one SF (may be called SF1, SF2, etc.).
  • the network device 14 may be referred to as a router 2.
  • the network device 15 can be called SFF2 (SFC proxy), SFF2 (SFC proxy) can implement the SFC proxy function, and SFF2 (SFC proxy) can communicate with at least one SF (which can be called SF11, SF12, etc.).
  • the network device 16 may be referred to as an egress router (Egress Router). It should be noted that the embodiment of the present application does not limit the name of each network device in the SFP.
  • router 1 and router 2 may be similar in structure to SFF1 or SFF2, but the names of the network devices may be different.
  • the next network device adjacent to the network device on the forwarding path can be called the network device's Next hop device, next hop node, downstream device, or downstream node
  • the previous network device adjacent to the network device on the forwarding path may be called the previous hop device, previous hop node, Upstream equipment or upstream node.
  • SFF2 SFC proxy
  • router 2 is the previous hop device of SFF2 (SFC proxy)
  • the egress router is the next hop device of SFF2 (SFC proxy).
  • Router 1 is the previous hop device of SFF1
  • Router 2 is the next hop device of SFF1.
  • the SR defined by the IETF SPRING WG is a tunnel technology based on the source routing forwarding mode, including two data planes: Multi-Protocol Label Switching (MPLS) and Internet Protocol Version 6 (IPv6) , Respectively referred to as SR-MPLS and segment routing (Segment Routing based IPv6 data plane, SRv6) using IPv6 as the data plane.
  • MPLS Multi-Protocol Label Switching
  • IPv6 Internet Protocol Version 6
  • SR proxy can include four types: static proxy, dynamic proxy, shared-memory proxy, and masquerading proxy.
  • dynamic agent is the most commonly used SR agent type. For details, please refer to the description in draft-xuclad-spring-sr-service-programming-00.
  • Figure 2 is a general architecture diagram of the SR agent.
  • the two network devices involved can be SFF and SF.
  • SFF implements the SR agent function.
  • SFF receives a message from the upstream device and needs to forward it to SF. If the SF does not support SR (also called SR-unaware), the SFF will strip off the SR header (SR header) in the message received from the upstream device, and cache the SR header.
  • the SFF sends the first message to the SF through the output interface (also called the IFACE OUT interface). The first message does not include the SR header.
  • the SFF receives the second message returned by the SF through an input interface (also called an IFACE IN interface). The second message does not include no SR header.
  • the SFF restores the encapsulation of the SR header to the second message, and forwards the encapsulated message to the downstream node.
  • this embodiment does not limit the names, numbers, and communication protocols of output interfaces and input interfaces.
  • the output interface and the input interface may be the same or different interfaces.
  • the communication protocol followed by the output interface and the input interface may be different.
  • the SFF when the SF does not support SR, when the SFF caches the SR header, it can use the five-tuple in the message received from the upstream device as the index of the SR header cache entry.
  • the SFF receives the message returned by the SF, it can obtain the locally stored SR header cache entry according to the 5-tuple query in the returned message, thereby restoring the SR header encapsulation.
  • the SF may modify the quintuple in the message when processing the message, causing the quintuple in the message received by the SFF from the upstream device to be different from the quintuple in the message returned by the SF.
  • the quintuple used when SFF caches the SR header is different from the quintuple used when recovering the SR header.
  • SFF cannot query the cached SR header based on the quintuple modified by the SF, resulting in failure to restore the SR header, which in turn causes the report Text forwarding failed.
  • the message transmission method provided in the embodiments of the present application can be applied to a scenario where the first network device and the second network device forward messages.
  • the second network device does not support SR.
  • the second network device may modify the 5-tuple in the message.
  • the first network device strips the SR header in the message and caches the SR header.
  • cache index information is generated, and the cache index information is used as the index value of the SR header.
  • the second network device can return the cache index information to the first network device as it is. In this way, it is ensured that the cache index information used when the first network device caches the SR header is the same as the cache index information received by the first network device from the second network device, and the first network device can use the cache index information that has not changed.
  • the query to obtain the locally cached SR header, and then restore the SR header, to ensure the normal forwarding of the message.
  • SRv6 SFC is taken as an example
  • the first network device is an SFF
  • the second network device is an SF as an example.
  • the transmission method is explained.
  • the SFF can realize the function of SR dynamic agent.
  • the message transmission methods provided in the embodiments of the present application are also applicable to SR-MPLS SFC. In order to simplify the description, the following description will not be repeated.
  • any of the following, but not limited to, can be used as a transmission tunnel between SFF and SF: virtual extensible local area network (Virtual eXtensible Local Area Network, VXLAN), generic protocol extension VXLAN (Generic Protocol Extension VXLAN, VXLAN-GPE), Generic Network Virtualization Encapsulation (Generic), Generic Routing Encapsulation (GRE) and IPv6.
  • VXLAN Virtual eXtensible Local Area Network
  • VXLAN-GPE Generic Protocol Extension VXLAN, VXLAN-GPE
  • Generic Network Virtualization Encapsulation Generic
  • GRE Generic Routing Encapsulation
  • IPv6 IPv6
  • Enabling SFF to carry cache index information in the second message means that SFF enables the function of "carrying cache index information in the second message", or, in SFF, "carrying cache index information in the second message” "The function is effective.
  • Enabling SF to carry cache index information in the response message of the second message means that SF enables the function of "carrying cache index information in the response message of the second message", or, in SF, "in the first The function of carrying buffer index information in the response message of the second message takes effect.
  • the embodiments of the present application do not limit the specific value of the cache index information.
  • the value of the cache index information may be a valid value or an invalid value.
  • the embodiment of the present application does not limit the specific values of the effective value and the invalid value of the cache index information. It should be noted that in each embodiment of the present application, if it is not clearly stated that the value of the cache index information is an invalid value, or that the value of the cache index information is a valid value, the value of the cache index information is all Valid value. For some scenarios where the value of the cache index information is an invalid value, the embodiment of the present application will clearly state that the value of the cache index information is an invalid value.
  • the embodiments of the present application do not limit the specific value of the identification information.
  • the value of the identification information may be a valid value or an invalid value.
  • the embodiment of the present application does not limit the specific values of the valid value and the invalid value of the identification information. It should be noted that, in each embodiment of the present application, if the value of the identification information is not clearly stated as an invalid value, or when the value of the identification information has been clearly stated as a valid value, the value of the identification information is all a valid value. . For some scenarios where the value of the identification information is an invalid value, the embodiment of the present application will clearly state that the value of the identification information is an invalid value.
  • FIG. 3 is a message interaction diagram of the message transmission method provided in Embodiment 1 of the application.
  • the execution subject involves SFF and SF.
  • SF does not support SR.
  • the message transmission method provided in this embodiment may include:
  • the SFF receives the first message sent by the last hop device of the SFF. Among them, the first message includes an SR header.
  • the last hop device of the SFF also referred to as the last hop node of the SFF, the upstream device of the SFF, or the upstream node of the SFF, refers to the previous device adjacent to the SFF on the packet forwarding path. You can refer to the related description in FIG. 1, the principle is similar, and will not be repeated here.
  • This embodiment does not limit the type and name of the last hop device of the SFF.
  • the last hop device of an SFF can be another SFF.
  • the SFF generates cache index information of the SR header, and stores the cache index information and the SR header.
  • the SFF since the SF does not support SR, after receiving the first message, the SFF needs to strip the SR header in the first message and buffer the SR header.
  • the SFF generates the cache index information of the SR header.
  • There is a one-to-one correspondence between the SR header and the cache index information that is, different SR headers can be distinguished through the cache index information.
  • the SFF may use the cache index information one-to-one corresponding to the SR header as an index value when the SR header is cached, and store the cache index information and the SR header.
  • the cache index information can be a binary sequence, an octal sequence, a hexadecimal sequence, etc.
  • the present embodiment does not limit the bit length and specific values of the cache index information, and can be changed according to the communication protocol between SFF and SF. Different.
  • the index value of the SR header may also include other information, which is not limited in this embodiment, and can be implemented according to the different communication protocols between SFF and SF. It varies with the type of business.
  • a VPN identifier may also be used as the index value of the SR header. That is, (VPN ID, cache index information) can be used to uniquely distinguish different SR headers.
  • the cache index information of the SR header generated by SFF may include:
  • the SFF obtains the N-tuple information in the first message.
  • the N-tuple information is used to indicate the data stream to which the first packet belongs, and N is an integer greater than zero.
  • SFF generates cache index information according to the N-tuple information.
  • the N-tuple information includes a combination of at least one protocol field used to uniquely identify the service flow.
  • the number and combination of protocol fields included in the N-tuple information may be different, which is not limited in this embodiment.
  • the N-tuple information may include 4 fields, and specifically (SMAC, DMAC, Ether-Type, VLAN tag) may be used to identify the service flow.
  • SMAC Serial MAC Address
  • DMAC Destination MAC Address
  • Ether-Type represents the Ethernet type
  • VLAN tag represents the VLAN tag. For details, see Ethernet Related communication protocol.
  • the N-tuple information may include 5 fields, which may be specifically identified by (SA, DA, source port, destination port, protocol). Among them, the meaning of each symbol is as follows: source IP address (Source Address, SA), destination IP address (Destination Address, DA), protocol represents the protocol.
  • the cache index information is related to the N-tuple information, and different SR headers and data streams can be distinguished through the cache index information.
  • Cached index information can restore the encapsulation of the SR header, which further improves the effectiveness of cached index information.
  • the SFF generates a second message according to the first message.
  • the second message includes cache index information and does not include the SR header.
  • the first message with the SR header removed is processed to generate the second message.
  • the header of the second message can be encapsulated.
  • the second message does not include the SR header, but includes the cache index information of the SR header.
  • the SF determines that the second message includes the buffer index information, and the SF may carry the buffer as it is in the response message of the second message sent to the SFF Index information. In this way, the buffer index information sent by the SFF to the SF through the second message is the same as the buffer index information carried in the response message received by the SFF from the SF.
  • the SFF can accurately obtain the SR header included in the first message from the locally cached SR header according to the cache index information carried in the response message, and then successfully restore the SR header. Solve the existing problem that the SR header cannot be restored due to the SF modifies the quintuple information.
  • the cache index information included in the second message may be used to indicate that SFF is enabled to carry the cache index information in the second message.
  • SFF may be configured to be enabled or disabled to carry cache index information in the second message.
  • the cache index information itself indicates that the SFF configuration enables the second message to carry the cache index information at the current moment.
  • the SF determines, according to the cache index information carried in the second message, that the SFF has been configured and enabled to carry the cache index information in the second message.
  • the cache index information is returned as it is in the text, so that the SFF can successfully restore the SR header.
  • this embodiment does not limit the position of the cache index information in the second message.
  • the second message includes a message header, and the message header includes a content field, and the content field is used to carry the cache index information. It should be noted that this embodiment does not limit the name of the content field and the position of the content field in the second message.
  • the second message may also include identification information, and the identification information is used to indicate that SFF is enabled to carry cache index information in the second message.
  • the second message may include cache index information and identification information.
  • the identification information clearly indicates that the SFF configuration enablement at the current moment carries cache index information in the second packet.
  • the SF determines, according to the identification information carried in the second message, that the SFF has been configured to enable the second message to carry cache index information.
  • the SF may return the identification information and the cache index information carried in the second message as they are in the response message of the second message, so that the SFF can successfully restore the SR header.
  • the second message includes a message header, and the message header includes an identification field, and the identification field is used to carry identification information. It should be noted that this embodiment does not limit the name of the identification field and the position of the identification field in the second message.
  • the content field and the identification field in the second message may be the same field. At this time, the identification field may occupy some bits of the same field, and the content field may occupy the remaining bits of the same field.
  • the second message includes a field with a length of 10 bits. The identification field occupies the first bit of the field, and the content field occupies the remaining 9 bits of the field.
  • the content field and the identification field in the second message may be different fields.
  • the SFF sends a second message to the SF.
  • the SF receives the second message sent by the SFF.
  • the second message includes cache index information.
  • the SF generates a response message according to the second message.
  • the response message includes cache index information.
  • the SF determines that the second message includes cache index information, and then the response message of the second message also carries the cache index information to ensure that the SFF passes the second message.
  • the buffer index information sent by the message to the SF is the same as the buffer index information carried in the response message received by the SFF from the SF, so that the SFF can successfully restore the SR header.
  • the cache index information included in the response message may be used to instruct the enabling SF to carry the cache index information in the response message.
  • the SF may be configured to enable or disable the configuration to carry cache index information in the response message of the second message.
  • the cache index information itself indicates that the SF configuration enable at the current moment is included in the response message of the second message. Carry cache index information.
  • the SFF determines, according to the cache index information carried in the response message, that the SF has been configured to enable the response message of the second message to carry the cache index information. The SFF can successfully restore the SR header according to the cache index information carried in the response message.
  • this embodiment does not limit the position of the cache index information in the response message of the second message.
  • the response message of the second message includes a message header, and the message header includes a content field, and the content field is used to carry the cache index information. It should be noted that this embodiment does not limit the name of the content field and the position of the content field in the response message of the second message.
  • the response message may also include identification information, and the identification information is used to instruct the enabling SF to carry cache index information in the response message.
  • the response message of the second message may include cache index information and identification information.
  • the identification information clearly indicates that the SF configuration enable at the current moment carries the cache index information in the response message of the second message.
  • the SFF determines, according to the identification information carried in the response message, that the SF has been configured to enable the response message of the second message to carry cache index information.
  • the SFF can successfully restore the SR header according to the cache index information carried in the response message.
  • the response message of the second message includes a message header, and the message header includes an identification field, and the identification field is used to carry identification information.
  • the content field and the identification field included in the response message of the second message are similar to the content field and the identification field included in the second message, respectively, please refer to the above about the content field and identification field included in the second message I won’t repeat it here.
  • the SF sends a response message to the SFF.
  • SFF receives the response message sent by SF.
  • the SFF after the SFF receives the first message sent by the previous hop device of the SFF, it generates cache index information when buffering the SR header included in the first message, and uses the The cache index information is used as the index value of the cache SR header.
  • the SFF carries the cache index information in the second message sent to the SF, so that the SF does not modify the value of the cache index information, and returns the cache index information to the SFF as it is in the response message.
  • the buffer index information sent by the SFF to the SF through the second message is the same as the buffer index information carried in the response message received by the SFF from the SF.
  • the SFF can accurately obtain the SR header included in the first message from the SR header of the local cache according to the cache index information carried in the response message, and successfully restore the SR header.
  • the first message and the third message include the SR header.
  • the second message and the response message of the second message do not include the SR header, and include the cache index information.
  • the message transmission method provided in this embodiment ensures the normal forwarding of messages.
  • the message transmission method provided in this embodiment, S306, after the SF sends a response message to the SFF may further include:
  • the SFF obtains the SR header corresponding to the cache index information stored in the SFF according to the cache index information in the response message of the second message.
  • the SFF generates a third message according to the response message of the second message.
  • the third message includes the SR header.
  • the SFF sends the third message to the next hop device of the SFF.
  • the SFF receives the response message of the second message returned by the SF. If the response message carries cache index information, the SFF searches for an SR header that matches the cache index information carried in the response message in the locally stored SR header according to the cache index information carried in the response message. Since the cache index information sent by the SFF to the SF through the second message is the same as the cache index information carried in the response message received by the SFF from the SF, the SFF can successfully find a match based on the cache index information carried in the response message In addition, the matched SR header is the SR header in the first packet received by the SFF from the previous hop device of the SFF. The SFF can successfully recover the SR header of the response message according to the matched SR header, generate a third message, and send the third message to the next hop device of the SFF. Thus, the normal forwarding of the message is ensured.
  • FIG. 4 is a schematic diagram of a message structure in a message transmission process provided in Embodiment 1 of the application.
  • VXLAN is used as the transmission tunnel between SFF and SF.
  • the SR header may be an SRv6 header (SRv6 header).
  • the SFF receives the first message from the previous hop device of the SFF.
  • the first message includes the SR header and N-tuple information.
  • the SFF may generate cache index information according to the N-tuple information in the first message, which is represented by index1, and uses (vni1, index1) as the index value of the SR header to cache the SR header.
  • vni1 is the VPN ID (VPN ID).
  • the SR header may also carry key information such as VPN ID and SFC metadata (metadata). Therefore, in order to ensure the continuity of end-to-end services, when the SFF strips off the SR header of the first message, it needs to re-encapsulate a new tunnel header to deliver this information to the SF.
  • VXLAN is used as the transmission tunnel between SFF and SF.
  • the VXLAN tunnel header of the second message may include cache index information index1, and does not include the SR header.
  • the SF determines that the second message includes cache index information index1, and processes the load of the second message to generate a response message for the second message.
  • the SFF determines that the response message includes cache index information index1. The SFF queries the locally stored cache entry according to the cache index information index1 included in the response message, and successfully obtains the SR header in the first message.
  • the SFF restores the SR header of the response message to generate a third message, and sends the third message to the next hop device of the SFF.
  • the SF can return the same cache index information index1.
  • the SFF can successfully restore the SR header of the message through the cache index information index1 that will not be modified, ensuring the normal forwarding of the message.
  • FIG. 5 is another schematic diagram of a message structure in a message transmission process provided in Embodiment 1 of the present application.
  • FIG. 5 please refer to the example shown in Figure 4, which will not be repeated here.
  • the second message and the response message of the second message only include the cache index information index1.
  • This embodiment provides a message transmission method, including: SFF receives a first message sent by a previous hop device of SFF, the first message includes an SR header; SFF generates cache index information of the SR header, and stores the cache index Information and SR header; SFF generates a second message according to the first message, the second message includes cache index information and does not include the SR header; SFF sends a second message to SF; SF generates a response message according to the second message , The response message includes cache index information; SF sends the response message to SFF.
  • the SFF generates cache index information when caching the SR header included in the first message, and uses the cache index information as the index value of the cache SR header.
  • the SFF carries the cache index information in the second message sent to the SF, so that the SF does not modify the value of the cache index information, and returns the cache index information to the SFF as it is in the response message.
  • the SFF can accurately obtain the SR header included in the first message from the locally cached SR header according to the cache index information carried in the response message, successfully restore the SR header, and ensure the normal forwarding of the message.
  • Fig. 6 is a message interaction diagram of the message transmission method provided in the second embodiment of the application.
  • this embodiment provides another implementation of the message transmission method.
  • the execution subject involves SFF and SF.
  • SF does not support SR.
  • the message transmission method provided in this embodiment may include:
  • the SFF obtains configuration information, where the configuration information is used to enable the SFF to carry cache index information in the second packet.
  • SFF may be configured to be enabled or disabled to carry cache index information in the second message. Only after SFF configuration is enabled, SFF can realize the function of "carrying cache index information in the second message".
  • SFF obtains configuration information, which may include:
  • the SFF receives a message from the control and management device, and the message includes the configuration information.
  • the control and management device can generate and send a message to the SFF according to the needs of the user.
  • SFF receives the message and obtains configuration information from the message.
  • the configuration information indicates that SFF is enabled to carry cache index information in the second message.
  • users refer to network operators, managers, or users.
  • the user's needs can be the needs of using the network or managing the network.
  • the user's needs can be manually configured and input on the control and management device, or automatically obtained by the control and management device after receiving demand messages from other application servers (such as third-party application servers), or in other ways.
  • This embodiment Not limited. It should be noted that this embodiment does not limit the implementation of the control management device.
  • SFF obtains configuration information, which may include:
  • SFF obtains the configuration information according to the command line configuration.
  • the administrator can log in to SFF and perform configuration operations through the command line.
  • SFF obtains configuration information, which may include:
  • the SFF runs its own algorithm software to automatically generate the configuration information.
  • the SF receives configuration information, where the configuration information is used to enable the SF to carry cache index information in the response message.
  • the SF receiving configuration information may include:
  • the SF receives a message from the control and management device, where the message includes the configuration information; or,
  • the SF runs its own algorithm software to automatically generate the configuration information.
  • the SFF receives the first packet sent by the last hop device of the SFF.
  • the first message includes an SR header.
  • the SFF generates cache index information of the SR header, and stores the cache index information and the SR header.
  • the SFF generates a second message according to the first message.
  • the second message includes cache index information and does not include the SR header.
  • the SFF sends a second message to the SF.
  • S603-S606 can refer to the description of S301-S304 respectively, and the principles are similar, and will not be repeated here.
  • the SF judges whether the SF is enabled to carry cache index information in the response message at the current moment.
  • SFF can be configured to enable or disable to carry cache index information in the second message
  • SF can be configured to enable or disable the response in the second message.
  • the message carries cache index information.
  • SFF and SF are configured to be enabled, can SFF carry the cache index information in the second message, and the SF returns the cache index information as it is in the response message of the second message. Therefore, the SFF can successfully restore the SR header according to the cache index information.
  • the SF determines that SFF is enabled to carry the cache index information in the second message according to the cache index information or identification information included in the second message, and the SF can determine whether the SF is enabled to respond to the message at the current moment. Carry cache index information. If the SF is enabled to carry the cache index information in the response message at the current moment, the SF can return the cache index information as it is in the response message of the second message, which improves the effectiveness and flexibility of message processing.
  • the SF is not enabled to carry cache index information in the response message at the current moment, it means that the SF does not enable the function of "carrying cache index information in the response message of the second message" at the current moment, or in SF , The function of "carrying cache index information in the response message of the second message" does not take effect.
  • the second message can be processed according to the existing message processing procedure. For example, the SF discards the second message.
  • the SF generates a response message according to the second message.
  • the response message includes cache index information.
  • the SF sends a response message to the SFF.
  • S608 to S609 can be referred to the description of S305 to S306 respectively, and the principles are similar, and will not be repeated here.
  • the SFF judges whether the SFF is enabled to carry the cache index information in the second packet at the current moment.
  • SFF can be configured to enable or disable to carry cache index information in the second message
  • SF can be configured to enable or disable the response in the second message.
  • the message carries cache index information.
  • SFF and SF are configured to be enabled, can SFF carry cache index information in the second message, and SF returns the cache index information as it is in the response message of the second message, thus, The SFF can successfully restore the SR header according to the cache index information.
  • SFF determines whether SF is enabled according to the cache index information or identification information included in the response message.
  • the response message of the second message carries the cache index information. SFF can first determine whether it is enabled at the current moment.
  • the SFF carries cache index information in the second message. If the SFF is enabled to carry the cache index information in the second message at the current moment, the SFF can restore the SR header according to the cache index information carried in the response message, which improves the effectiveness and flexibility of message processing.
  • SFF is not enabled to carry cache index information in the second message at the current moment, it means that SFF does not enable the function of "SFF carries cache index information in the second message" at the current moment, or, in SFF, The function of "SFF carrying cache index information in the second message" does not take effect.
  • the response message can be processed according to the existing message processing procedure. For example, SFF discards the response message.
  • the SFF obtains the SR header corresponding to the cache index information stored in the SFF according to the cache index information in the response message of the second message.
  • the SFF generates a third message according to the response message of the second message.
  • the third message includes the SR header.
  • the SFF sends a third packet to the next hop device of the SFF.
  • S611 to S613 can refer to the description in the first embodiment shown in FIG. 3, and the principle is similar, and will not be repeated here.
  • the SFF can enable the SFF to carry cache index information in the second message by acquiring configuration information. By obtaining the configuration information, the SF can enable the SF to carry cache index information in the response message.
  • SFF can carry cache index information in the second message sent to SF, so that SF will not modify the value of cache index information, and carry the cache index information in the response message as it is Return to SFF.
  • the SFF can accurately obtain the SR header included in the first message from the locally cached SR header according to the cache index information carried in the response message, successfully restore the SR header, and ensure the normal forwarding of the message.
  • Embodiment 3 of the present application also provides a message transmission method.
  • the execution subject involves SFF and SF.
  • SF does not support SR.
  • the message transmission method provided in this embodiment may include S301 to S304 in the first embodiment shown in FIG. 3, or may include S306 in the first embodiment shown in FIG. 3, or may include the implementation shown in FIG. S601 to S607 in the second example may alternatively include S609 to S610 in the second embodiment shown in FIG. 6.
  • the cache index information included in the second message or the response message of the second message is an invalid value, or when the second message When the message or the response message of the second message further includes identification information, the identification information is an invalid value.
  • the cache index information included in the second message or the response message of the second message is a valid value, or when the second message or the response message of the second message When the identification information is also included in the identification information, the identification information is a valid value.
  • the second message includes cache index information, and the cache index information is an invalid value.
  • the cache index information included in the second message is an invalid value, which is used to indicate that SFF is not enabled to carry cache index information in the second message, or is used to indicate a message transmission error.
  • This embodiment does not limit the value of the cause of the message transmission error. For example, it may be a message header encapsulation error, a change in the message header during transmission, and so on.
  • the SF determines that the second message carries cache index information, but when the cache index information is an invalid value, it means that SFF does not enable carrying the cache index in the second message Information, or, message transmission error.
  • the SF can process the second message according to the existing message processing procedure. For example, the SF discards the second message.
  • the response message of the second message includes cache index information, and the cache index information is an invalid value.
  • the cache index information included in the response message of the second message is an invalid value, which is used to indicate that SF is not enabled to carry cache index information in the response message of the second message, or is used to indicate message transmission error.
  • This embodiment does not limit the value of the cause of the message transmission error. For example, it may be a message header encapsulation error, a change in the message header during transmission, and so on.
  • SFF receives the response message of the second message sent by SF, it determines that the response message of the second message carries cache index information, but when the cache index information is an invalid value, it means that SF is not enabled in The response message of the second message carries cache index information, or the message transmission error.
  • the SFF can process the response message according to the existing message processing procedure. For example, SFF discards the response message.
  • the second message includes cache index information and identification information, and the identification information is an invalid value.
  • the cache index information may be a valid value or an invalid value.
  • the identification information included in the second message is an invalid value, and regardless of whether the cache index information included in the second message is a valid value, it is used to indicate that SFF does not enable carrying cache index information in the second message.
  • the SF determines that the second message carries identification information, but when the identification information is an invalid value, it means that the SFF does not enable the carrying of cache index information in the second message.
  • the SF can process the second message according to the existing message processing procedure. For example, the SF discards the second message.
  • the response message of the second message includes cache index information and identification information, and the identification information is an invalid value.
  • the cache index information may be a valid value or an invalid value.
  • the identification information included in the response message of the second message is an invalid value. Regardless of whether the cache index information included in the response message of the second message is a valid value, it is used to indicate that SF is not enabled in the second message.
  • the response message of the message carries cache index information.
  • the SFF determines that the response message of the second message carries identification information, but when the identification information is an invalid value, it means that SF is not enabled in the second message.
  • the response message of the message carries cache index information.
  • the SFF can process the response message according to the existing message processing procedure. For example, SFF discards the response message.
  • the SFF or SF can process the message according to the existing message processing flow.
  • the content field and identification field included in the header of the second message and the header included in the header of the response message of the second message are compared by example.
  • the content field and the identification field are exemplified. It should be noted that in the following examples, the position and length of the content field and the identification field in the message header are just examples. In implementation, the content field and the identification field can be located in any reserved position in the message header and have any length . It should be noted that the cache index information carried by the content field can be a valid value or an invalid value, and the identification information carried by the identification field can be a valid value or an invalid value, which may be different according to different application scenarios.
  • the transport tunnel between SFF and SF is VXLAN.
  • VXLAN Virtual eXtensible Local Area Network (VXLAN): A Framework for Overlaying Virtualized Layer 2 Networks over Layer 3 Networks].
  • VXLAN is a MAC-in-UDP encapsulation format, and its UDP destination port number must be set to 4789.
  • FIG. 7 is a schematic structural diagram of a VXLAN tunnel header provided by an embodiment of the application. As shown in Figure 7, the VXLAN header (VXLAN header) currently includes several reserved flag bits (represented by R) and two reserved fields. In this example, one of the reserved flag bits R can be defined as an identification field. For details, refer to the solid-line box in FIG. 7. One of the Reserved fields can be defined as a content field. For details, see the dashed box in FIG. 7.
  • the transmission tunnel between SFF and SF is VXLAN-GPE.
  • VXLAN-GPE please refer to the description in the draft [draft-ietf-nvo3-vxlan-gpe-06].
  • the UDP destination port number of VXLAN-GPE must be set to 4790.
  • FIG. 8 is a schematic structural diagram of a tunnel header of a VXLAN-GPE provided in an embodiment of the application. As shown in Figure 8, VXLAN-GPE is an extension of VXLAN.
  • the VXLAN-GPE header can add the Next Protocol (next protocol) field, which can carry various protocol encapsulation, such as Ethernet, IPv4, IPv6 , MPLS, NSH, etc.
  • VXLAN can only carry Ethernet frames.
  • the VXLAN-GPE header currently includes two reserved flag bits (represented by R) and two Reserved (reserved) fields.
  • R reserved flag bits
  • R Reserved
  • one of the reserved flag bits R can be defined as an identification field.
  • One of the Reserved fields can be defined as a content field, see the dashed box in Figure 8 for details.
  • FIG. 9 is a schematic structural diagram of a tunnel head of Geneve provided in an embodiment of the application.
  • the Geneve header can add a Next Protocol (next protocol) field, and can also carry optional TLV information in the extended header. Since Geneve supports carrying optional TLVs, a new TLV type can be defined as the content field. For details, see the dashed box in Figure 9.
  • the identification field can be defined in the fixed header, see the solid-line box in FIG. 9 for details.
  • the transport tunnel between SFF and SF is GRE.
  • GRE GRE
  • the specification to support IPv6 is defined, and the GRE header (GRE header) encapsulation format of the two is the same.
  • FIG. 10 is a schematic structural diagram of a GRE tunnel header provided in an embodiment of this application. As shown in Figure 10, there are also reserved flag bits and reserved fields in the GRE header. In this example, one of the reserved flag bits can be defined as an identification field. For details, see the solid-line box in FIG. 10. One of the reserved fields can be defined as a content field, see the dashed box in FIG. 10 for details.
  • the transport tunnel between SFF and SF is IPv6.
  • IPv6 can be referred to the description in [RFC2473 Generic Packet Tunneling in IPv6 Specification], which defines general specifications for IPv6 tunnels, for example, IPv4-in-IPv6, IPv6-in-IPv6.
  • IPv4-in-IPv6 means encapsulating IPv6 headers based on IPv4 packets.
  • IPv6-in-IPv6 means encapsulating IPv6 headers based on IPv6 packets.
  • FIG. 11 is a schematic structural diagram of an IPv6 tunnel header provided by an embodiment of this application. As shown in FIG.
  • the bits in the Flow Label field in the IPv6 header can be defined as the identification field and the content field, respectively.
  • the identification field refer to the solid-line box in FIG. 11, and for the content field, refer to the dashed-line box in FIG. 11.
  • FIG. 12 is a schematic diagram of the structure of the SFF provided in Embodiment 1 of the application.
  • the SFF shown in FIG. 12 can be applied to an SRv6 network, and includes: a main control board 510, an interface board 530, a switching network board 520, and an interface board 540.
  • the main control board 510 is used to complete functions such as system management, equipment maintenance, and protocol processing.
  • the switching network board 520 is used to complete data exchange between various interface boards (interface boards are also called line cards or service boards).
  • the interface boards 530 and 540 are used to provide various service interfaces (for example, an Ethernet interface, a POS interface, etc.) and implement message forwarding.
  • the main control board 510, the interface boards 530 and 540, and the switching network board 520 are connected to the system backplane through the system bus to achieve intercommunication.
  • the central processor 531 on the interface board 530 is used to control and manage the interface board and communicate with the central processor 511 on the main control board 510.
  • the SFF receives the first message sent by the last hop device of the SFF from the physical interface card 533, and the first message includes the SR header.
  • the physical interface card 533 sends the first message to the network processor 532, and the network processor 532 searches the forwarding entry memory 534 according to the first message, and the matching result indicates that it is a local message.
  • the network processor 532 sends the first message to the central processor 511 of the control plane.
  • the central processing unit 511 on the main control board 510 can execute S302 to S303 in the first embodiment shown in FIG. 3.
  • the physical interface card 533 and the network processor 532 can execute S304 and S306 in the first embodiment shown in FIG. 3, and reference may be made to the relevant description above, which will not be repeated here.
  • the operations on the interface board 540 in the embodiment of the present application are consistent with the operations on the interface board 530, and will not be repeated for the sake of brevity.
  • there may be one or more main control boards and when there are more than one, it may include a main main control board and a standby main control board.
  • the specific architecture used depends on the specific networking deployment scenario, and there is no restriction here.
  • FIG. 13 is a schematic diagram of the structure of the SFF provided in the second embodiment of the application.
  • the SFF provided in this embodiment can perform the operations performed by the SFF in the embodiments shown in FIG. 3 to FIG. 11. As shown in Figure 13, the SFF provided by this embodiment may include:
  • the receiving module 11 is configured to receive a first message sent by a previous hop device of the SFF, where the first message includes an SR header;
  • the processing module 12 is configured to generate cache index information of the SR header, and store the cache index information and the SR header; and is also configured to generate a second message according to the first message, and the second message
  • the text includes the cache index information and does not include the SR header;
  • the sending module 13 is configured to send the second message to the SF.
  • the cache index information is used to indicate that the SFF is enabled to carry cache index information in the second packet.
  • the second message further includes identification information, and the identification information is used to indicate that the SFF is enabled to carry cache index information in the second message.
  • processing module 12 is specifically configured to:
  • N-tuple information in the first packet Acquiring, by the SFF, N-tuple information in the first packet, where the N-tuple information is used to indicate the data stream to which the first packet belongs, and N is an integer greater than 0;
  • the SFF generates the cache index information according to the N-tuple information.
  • the receiving module 11 is further configured to receive a response message of the second message sent by the SF, where the response message of the second message includes the buffer index information;
  • the processing module 12 is further configured to obtain the SR header corresponding to the cache index information stored in the SFF according to the cache index information; generate a third message according to the response message of the second message, The third message includes the SR header;
  • the sending module 13 is further configured to send the third message to the next hop device of the SFF.
  • processing module 12 is further configured to:
  • the step of obtaining the SR header stored in the SFF corresponding to the cache index information according to the cache index information is performed.
  • the receiving module 11 is further configured to:
  • the second message includes a message header
  • the message header includes a content field
  • the content field is used to carry the cache index information.
  • the second message includes a message header, and the message header includes an identification field, and the identification field is used to carry the identification information.
  • the SFF provided in this embodiment is used to perform operations performed by the SFF in the embodiments shown in FIG. 3 to FIG. 11.
  • the technical principles and technical effects are similar, so I won’t repeat them here.
  • FIG. 14 is a schematic diagram of the structure of the SFF provided in the third embodiment of the application.
  • the SFF provided in this embodiment may include a processor 21, a memory 22, and a transceiver 23.
  • the transceiver 23 is used to receive data or send data, and the memory 22 is used to store instructions.
  • the processor 21 is configured to execute instructions stored in the memory 22, and is configured to execute operations performed by the SFF in the embodiments shown in FIGS. 3 to 11.
  • the SFF provided in this embodiment is used to perform operations performed by the SFF in the embodiments shown in FIG. 3 to FIG. 11.
  • the technical principles and technical effects are similar, so I won’t repeat them here.
  • FIG. 15 is a schematic structural diagram of an SF provided in Embodiment 1 of the application.
  • the SF shown in FIG. 15 can be applied to an SRv6 network, and includes: a main control board 610, an interface board 630, a switching network board 620, and an interface board 640.
  • the main control board 610 is used to complete functions such as system management, equipment maintenance, and protocol processing.
  • the switching network board 620 is used to complete data exchange between various interface boards (interface boards are also called line cards or service boards).
  • the interface boards 630 and 640 are used to provide various service interfaces (e.g., Ethernet interface, POS interface, etc.) and implement message forwarding.
  • the main control board 610, the interface boards 630 and 640, and the switching network board 620 are connected to the system backplane through the system bus to achieve intercommunication.
  • the central processing unit 631 on the interface board 630 is used to control and manage the interface board and communicate with the central processing unit 611 on the main control board 610.
  • the SF receives the second message sent by the SFF from the physical interface card 633.
  • the second message includes the buffer index information and does not include the SR header.
  • the physical interface card 633 sends the second message to the network processor 632, and the network processor 632 searches the forwarding entry memory 634 according to the second message, and the matching result indicates that it is a local message. Then the network processor 632 sends the second message to the central processor 611 of the control plane.
  • the central processing unit 611 on the main control board 610 can execute S305 in the first embodiment shown in FIG. 3.
  • the physical interface card 633 and the network processor 632 can execute S306 in the first embodiment shown in FIG. 3, and reference may be made to the relevant description above, which will not be repeated here.
  • the operations on the interface board 640 in the embodiment of the present application are consistent with the operations on the interface board 630, and will not be repeated for brevity. It should be understood that there may be one or more main control boards, and when there are more than one, it may include a main main control board and a standby main control board. There may be one or more interface boards, and there may also be one or more physical interface cards on the interface board. There may not be a switching network board, or there may be one or more. The specific architecture used depends on the specific networking deployment scenario, and there is no restriction here.
  • FIG. 16 is a schematic diagram of the structure of the SF provided in the second embodiment of the application.
  • the SF provided in this embodiment can perform the operations performed by the SF in the embodiments shown in FIG. 3 to FIG. 11.
  • the SF provided in this embodiment may include:
  • the receiving module 31 is configured to receive a first message sent by the SFF, where the first message includes buffer index information;
  • the processing module 32 is configured to generate a response message according to the first message, the response message including the cache index information;
  • the sending module 33 is configured to send the response message to the SFF.
  • the cache index information is used to indicate that the SF is enabled to carry cache index information in the response message.
  • the response message further includes identification information, and the identification information is used to indicate that the SF is enabled to carry cache index information in the response message.
  • the response message includes a message header, and the message header includes a content field, and the content field is used to carry the cache index information.
  • the response message includes a message header, and the message header includes an identification field, and the identification field is used to carry the identification information.
  • processing module 32 is further configured to:
  • the step of generating a response message according to the first message is executed.
  • the receiving module 31 is further configured to:
  • the SF provided in this embodiment is used to perform operations performed by the SF in the embodiments shown in FIG. 3 to FIG. 11.
  • the technical principles and technical effects are similar, so I won’t repeat them here.
  • FIG. 17 is a schematic diagram of the structure of the SF provided in the third embodiment of the application.
  • the SF provided in this embodiment may include a processor 41, a memory 42, and a transceiver 43.
  • the transceiver 43 is used to receive data or send data, and the memory 42 is used to store instructions.
  • the processor 41 is configured to execute instructions stored in the memory 42, and is configured to execute operations performed by the SF in the embodiments shown in FIGS. 3-11.
  • the SF provided in this embodiment is used to perform operations performed by the SF in the embodiments shown in FIG. 3 to FIG. 11.
  • the technical principles and technical effects are similar, so I won’t repeat them here.
  • the embodiment of the present application also provides a message transmission system, including the SFF provided by the embodiment shown in FIG. 12 and the SF provided by the embodiment shown in FIG. 15; or, including the SFF provided by the embodiment shown in FIG. 13 and the SFF provided by the embodiment shown in FIG. Shows the SF provided by the embodiment; or, it includes the SFF provided by the embodiment shown in FIG. 14 and the SF provided by the embodiment shown in FIG. 17.
  • the division of the various modules of the above device is only a division of logical functions, and may be fully or partially integrated into one physical entity during actual implementation, or may be physically separated.
  • these modules can all be implemented in the form of software called by processing elements; they can also be implemented in the form of hardware; some modules can be implemented in the form of calling software by processing elements, and some of the modules can be implemented in the form of hardware.
  • the channel evaluation module can be a separate processing element, or it can be integrated in a certain chip of the above-mentioned device.
  • it can also be stored in the memory of the above-mentioned device in the form of program code. Call and execute the functions of the above channel evaluation module.
  • the implementation of other modules is similar.
  • each step of the above method or each of the above modules can be completed by hardware integrated logic circuits in the processor element or instructions in the form of software.
  • the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), or one or more digital signal processors (digital signal processor, DSP), or, one or more field-programmable gate arrays (FPGA), etc.
  • ASICs application-specific integrated circuits
  • DSP digital signal processor
  • FPGA field-programmable gate arrays
  • the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call program codes.
  • CPU central processing unit
  • these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC).
  • SOC system-on-a-chip
  • the processor may be a general-purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and may implement or Perform the methods, steps, and logic block diagrams disclosed in the embodiments of the present application.
  • the general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed and completed by a hardware processor, or executed and completed by a combination of hardware and software modules in the processor.
  • the memory may be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SSD), etc., or a volatile memory (volatile memory), for example Random access memory (random access memory, RAM).
  • the memory is any medium that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto.
  • the memory in the embodiments of the present application may also be a circuit or any other device capable of realizing a storage function, for storing program instructions and/or data.
  • the size of the sequence numbers of the foregoing processes does not mean the order of execution.
  • the execution order of each process should be determined by its function and internal logic, and should not be implemented in this application.
  • the implementation process of the example constitutes any limitation.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请实施例提供一种报文的传输方法和设备,其中,报文的传输方法包括:第一网络设备接收第一网络设备的上一跳设备发送的第一报文,第一报文包括SR头;第一网络设备生成SR头的缓存索引信息,并存储缓存索引信息和SR头;第一网络设备根据第一报文生成第二报文,第二报文包括缓存索引信息且不包括SR头;第一网络设备向第二网络设备发送第二报文。第一网络设备在缓存第一报文的SR头时,生成缓存索引信息,通过在第二报文中携带缓存索引信息,第一网络设备发送给第二网络设备的缓存索引信息与第一网络设备从第二网络设备接收到的缓存索引信息相同,通过没有发生变化的缓存索引信息可以成功恢复SR头,保证了报文的正常转发。

Description

报文的传输方法和设备
本申请要求于2019年3月8日提交中国专利局、申请号为201910176371.8、发明名称为“报文的传输方法和设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及通信技术领域,尤其涉及一种报文的传输方法和设备。
背景技术
国际互联网工程任务组(Internet Engineering Task Force,IETF)业务功能链(Service Function Chain,SFC)工作组(Working Group,WG)定义了SFC的实现框架。SFC数据面的网元类型可以包括:分类器(Classifier)、业务功能转发设备(Service Function Forwarder,SFF)、SFC代理(SFC proxy)和业务功能设备(Service Function,SF)。
在实现段路由(Segment Routing,SR)SFC时,如果SF不支持SR,SFF就必须实现SR代理功能。报文处理流程如下:当SFF从该SFF的上游设备接收到SR报文且需要实现SR动态代理功能时,SFF将业务报文转发给SF之前,需要剥掉并缓存SR头封装,并使用业务报文的五元组作为SR头缓存表项的索引。SF在接收到业务报文后,根据本地的配置策略实现业务功能的相关处理,将业务报文返回给SFF。SFF接收到SF返回的业务报文时,根据五元组查询得到SR头缓存表项,恢复SR头封装,并将重新封装的报文转发给该SFF的下游设备。
但是,在SFF实现上述SR动态代理功能时,如果SF会修改业务报文的五元组,那么,当SFF接收到SF返回的业务报文时,将无法使用五元组成功查询并恢复SR头封装,从而导致报文转发失败。
发明内容
本申请实施例提供一种报文的传输方法和设备,可以成功恢复报文的SR头,保证了业务报文的正常转发。
第一方面,本申请实施例提供一种报文的传输方法,应用于第一网络设备,报文的传输方法可以包括:接收第一网络设备的上一跳设备发送的第一报文,第一报文包括SR头;生成SR头的缓存索引信息,并存储缓存索引信息和SR头;根据第一报文生成第二报文,第二报文包括缓存索引信息且不包括SR头;向第二网络设备发送第二报文。
通过第一方面提供的报文的传输方法,第一网络设备接收第一网络设备的上一跳设备发送的第一报文后,在缓存第一报文包括的SR头时,生成缓存索引信息,并采用缓存索引信息作为缓存SR头的索引值。第一网络设备通过在发送给第二网络设备的第二报文中携带缓存索引信息,使得第二网络设备不会修改缓存索引信息的值,并且将缓存索引 信息携带在响应报文中原样返回给第一网络设备。这样,第一网络设备通过第二报文发送给第二网络设备的缓存索引信息与第一网络设备从第二网络设备接收到的响应报文中携带的缓存索引信息相同。第一网络设备根据响应报文中携带的缓存索引信息可以在本地缓存的SR头中准确的获取第一报文中包括的SR头,成功恢复SR头,从而保证了业务报文的正常转发。
可选的,在第一方面的一种可能的实施方式中,缓存索引信息用于指示使能第一网络设备在第二报文中携带缓存索引信息。
通过该可能的实施方式提供的报文的传输方法,如果第二报文中携带了缓存索引信息,当该缓存索引信息是一个有效值时,该缓存索引信息本身就指示了所述第一网络设备使能了携带缓存索引信息的能力,缓存索引信息既可以表达使能能力,又可以携带缓存索引信息,提高了效率,节省了报文开销。当该缓存索引信息是一个无效值时,用于指示所述第一网络设备未使能携带缓存索引信息的能力。可见,通过提供一种灵活的实施方式,有助于按需部署和管理业务。
可选的,在第一方面的一种可能的实施方式中,第二报文还包括标识信息,标识信息用于指示使能第一网络设备在第二报文中携带缓存索引信息。
通过该可能的实施方式提供的报文的传输方法,如果第二报文中携带了标识信息,当该标识信息是一个有效值时,用于指示所述第一网络设备使能了携带缓存索引信息的能力。当该标识信息是一个无效值时,用于指示所述第一网络设备未使能携带缓存索引信息的能力。从而,提供了一种灵活的实施方式,有助于按需部署和管理业务。
可选的,在第一方面的一种可能的实施方式中,生成SR头的缓存索引信息,可以包括:获取第一报文中的N元组信息,N元组信息用于指示第一报文所属的数据流,N为大于0的整数;根据N元组信息生成缓存索引信息。
通过该可能的实施方式提供的报文的传输方法,第一网络设备根据N元组信息生成缓存索引信息,通过缓存索引信息可以区分不同的SR头和数据流,通过缓存索引信息可以恢复SR头的封装,保证了业务报文的正常转发。
可选的,在第一方面的一种可能的实施方式中,报文的传输方法还可以包括:接收第二网络设备发送的第二报文的响应报文,第二报文的响应报文包括缓存索引信息;根据缓存索引信息获取第一网络设备中存储的与缓存索引信息对应的SR头;根据第二报文的响应报文生成第三报文,第三报文包括SR头;向第一网络设备的下一跳设备发送第三报文。
通过该可能的实施方式提供的报文的传输方法,由于第一网络设备通过第二报文发送给第二网络设备的缓存索引信息与第一网络设备从第二网络设备接收到的响应报文中携带的缓存索引信息相同,因此,第一网络设备根据响应报文中携带的缓存索引信息可以成功查找到匹配的SR头,进行SR头的成功恢复,生成第三报文,并将第三报文发送给SFF的下一跳设备。从而,保证了业务报文的正常转发。
可选的,在第一方面的一种可能的实施方式中,根据缓存索引信息获取第一网络设备中存储的与缓存索引信息对应的SR头之前,还可以包括:判断当前时刻是否使能第一网络设备在第二报文中携带缓存索引信息;若当前时刻使能第一网络设备在第二报文中 携带缓存索引信息,执行根据缓存索引信息获取第一网络设备中存储的与缓存索引信息对应的SR头的步骤。
通过该可能的实施方式提供的报文的传输方法,通过判断当前时刻是否使能第一网络设备在第二报文中携带缓存索引信息,可以区分不同的应用场景,提升了报文转发过程中执行的有效性。
可选的,在第一方面的一种可能的实施方式中,接收第一网络设备的上一跳设备发送的第一报文之前,还可以包括:获取配置信息,配置信息用于使能第一网络设备在第二报文中携带缓存索引信息。
通过该可能的实施方式提供的报文的传输方法,可以灵活的配置使能,提升了报文转发的灵活性。
可选的,在第一方面的一种可能的实施方式中,第二报文包括报文头,报文头包括内容字段,内容字段用于携带缓存索引信息。
可选的,在第一方面的一种可能的实施方式中,第二报文包括报文头,报文头包括标识字段,标识字段用于携带标识信息。
第二方面,本申请实施例提供一种报文的传输方法,应用于第二网络设备,报文的传输方法可以包括:接收第一网络设备发送的第二报文,第二报文包括缓存索引信息;根据第二报文生成响应报文,响应报文包括缓存索引信息;向第一网络设备发送响应报文。
可选的,在第二方面的一种可能的实施方式中,缓存索引信息用于指示使能第二网络设备在响应报文中携带缓存索引信息。
可选的,在第二方面的一种可能的实施方式中,响应报文还包括标识信息,标识信息用于指示使能第二网络设备在响应报文中携带缓存索引信息。
可选的,在第二方面的一种可能的实施方式中,响应报文包括报文头,报文头包括内容字段,内容字段用于携带缓存索引信息。
可选的,在第二方面的一种可能的实施方式中,响应报文包括报文头,报文头包括标识字段,标识字段用于携带标识信息。
可选的,在第二方面的一种可能的实施方式中,根据第二报文生成响应报文之前,还可以包括:判断当前时刻是否使能第二网络设备在响应报文中携带缓存索引信息;若当前时刻使能第二网络设备在响应报文中携带缓存索引信息,执行根据第二报文生成响应报文的步骤。
可选的,在第二方面的一种可能的实施方式中,报文的传输方法还可以包括:接收配置信息,配置信息用于使能第二网络设备在响应报文中携带缓存索引信息。
第三方面,本申请实施例提供一种网络设备,用作第一网络设备,第一网络设备可以包括:接收模块,用于接收第一网络设备的上一跳设备发送的第一报文,第一报文包括SR头;处理模块,用于生成SR头的缓存索引信息,并存储缓存索引信息和SR头;还用于根据第一报文生成第二报文,第二报文包括缓存索引信息且不包括SR头;发送模块,用于向第二网络设备发送第二报文。
可选的,在第三方面的一种可能的实施方式中,缓存索引信息用于指示使能第一网络设备在第二报文中携带缓存索引信息。
可选的,在第三方面的一种可能的实施方式中,第二报文还包括标识信息,标识信息用于指示使能第一网络设备在第二报文中携带缓存索引信息。
可选的,在第三方面的一种可能的实施方式中,处理模块具体用于:第一网络设备获取第一报文中的N元组信息,N元组信息用于指示第一报文所属的数据流,N为大于0的整数;第一网络设备根据N元组信息生成缓存索引信息。
可选的,在第三方面的一种可能的实施方式中,接收模块,还用于接收第二网络设备发送的第二报文的响应报文,第二报文的响应报文包括缓存索引信息;处理模块,还用于根据缓存索引信息获取第一网络设备中存储的与缓存索引信息对应的SR头;根据第二报文的响应报文生成第三报文,第三报文包括SR头;发送模块,还用于向第一网络设备的下一跳设备发送第三报文。
可选的,在第三方面的一种可能的实施方式中,处理模块还用于:判断当前时刻是否使能第一网络设备在第二报文中携带缓存索引信息;若当前时刻使能第一网络设备在第二报文中携带缓存索引信息,则执行根据缓存索引信息获取第一网络设备中存储的与缓存索引信息对应的SR头的步骤。
可选的,在第三方面的一种可能的实施方式中,接收模块还用于:获取配置信息,配置信息用于使能第一网络设备在第二报文中携带缓存索引信息。
可选的,在第三方面的一种可能的实施方式中,第二报文包括报文头,报文头包括内容字段,内容字段用于携带缓存索引信息。
可选的,在第三方面的一种可能的实施方式中,第二报文包括报文头,报文头包括标识字段,标识字段用于携带标识信息。
第四方面,本申请实施例提供一种网络设备,用作第二网络设备,第二网络设备包括:接收模块,用于接收第一网络设备发送的第二报文,第二报文包括缓存索引信息;处理模块,用于根据第二报文生成响应报文,响应报文包括缓存索引信息;发送模块,用于向第一网络设备发送响应报文。
可选的,在第四方面的一种可能的实施方式中,缓存索引信息用于指示使能第二网络设备在响应报文中携带缓存索引信息。
可选的,在第四方面的一种可能的实施方式中,响应报文还包括标识信息,标识信息用于指示使能第二网络设备在响应报文中携带缓存索引信息。
可选的,在第四方面的一种可能的实施方式中,响应报文包括报文头,报文头包括内容字段,内容字段用于携带缓存索引信息。
可选的,在第四方面的一种可能的实施方式中,响应报文包括报文头,报文头包括标识字段,标识字段用于携带标识信息。
可选的,在第四方面的一种可能的实施方式中,处理模块还用于:判断当前时刻是否使能第二网络设备在响应报文中携带缓存索引信息;若当前时刻使能第二网络设备在响应报文中携带缓存索引信息,则执行根据第二报文生成响应报文的步骤。
可选的,在第四方面的一种可能的实施方式中,接收模块还用于:接收配置信息,配置信息用于使能第二网络设备在响应报文中携带缓存索引信息。
第五方面,本申请实施例提供一种网络设备,用作第一网络设备,第一网络设备包括:处理器、存储器和收发器,收发器用于接收数据或者发送数据,存储器用于存储指 令,处理器用于执行存储器中存储的指令,实现上述第一方面及第一方面的任一实施方式提供的报文的传输方法。
第六方面,本申请实施例提供一种网络设备,用作第二网络设备,第二网络设备包括:处理器、存储器和收发器,收发器用于接收数据或者发送数据,存储器用于存储指令,处理器用于执行存储器中存储的指令,实现上述第二方面及第二方面的任一实施方式提供的报文的传输方法。
第七方面,本申请实施例提供一种计算机可读存储介质,其上存储有计算机执行指令,当计算机执行指令被至少一个处理器执行时,实现上述第一方面及第一方面的任一实施方式提供的报文的传输方法,或者上述第二方面及第二方面的任一实施方式提供的报文的传输方法。
第八方面,本申请实施例提供一种报文传输系统,包括:上述第三方面及第三方面的任一实施方式提供的第一网络设备和上述第四方面及第四方面的任一实施方式提供的第二网络设备;或者;上述第五方面及第五方面的任一实施方式提供的第一网络设备和上述第六方面及第六方面的任一实施方式提供的第二网络设备。
第九方面,本申请实施例提供一种程序产品,该程序产品包括计算机程序(即执行指令),该计算机程序存储在可读存储介质中。计算机程序被至少一个处理器读取并执行时,至少一个处理器可以执行上述第一方面及第一方面的任一实施方式提供的报文的传输方法,或者上述第二方面及第二方面的任一实施方式提供的报文的传输方法。
本申请实施例提供一种报文的传输方法和设备,其中,报文的传输方法包括:第一网络设备接收第一网络设备的上一跳设备发送的第一报文,第一报文包括SR头;第一网络设备生成SR头的缓存索引信息,并存储缓存索引信息和SR头;第一网络设备根据第一报文生成第二报文,第二报文包括缓存索引信息且不包括SR头;第一网络设备向第二网络设备发送第二报文。第一网络设备在缓存第一报文包括的SR头时,生成缓存索引信息,并采用缓存索引信息作为缓存SR头的索引值。第一网络设备通过在发送给第二网络设备的第二报文中携带缓存索引信息,使得第二网络设备将该缓存索引信息携带在响应报文中原样返回给第一网络设备。这样,第一网络设备通过第二报文发送给第二网络设备的缓存索引信息与第一网络设备从第二网络设备接收到的响应报文中携带的缓存索引信息相同。第一网络设备根据缓存索引信息可以成功恢复SR头,保证了报文的正常转发。
附图说明
图1为本申请实施例适用的SR SFC数据面的系统架构图;
图2为SR代理的通用架构图;
图3为本申请实施例一提供的报文的传输方法的消息交互图;
图4为本申请实施例一提供的报文传输过程中报文结构的一种示意图;
图5为本申请实施例一提供的报文传输过程中报文结构的另一种示意图;
图6为本申请实施例二提供的报文的传输方法的消息交互图;
图7为本申请实施例提供的VXLAN的隧道头的结构示意图;
图8为本申请实施例提供的VXLAN-GPE的隧道头的结构示意图;
图9为本申请实施例提供的Geneve的隧道头的结构示意图;
图10为本申请实施例提供的GRE的隧道头的结构示意图;
图11为本申请实施例提供的IPv6的隧道头的结构示意图;
图12为本申请实施例一提供的SFF的结构示意图;
图13为本申请实施例二提供的SFF的结构示意图;
图14为本申请实施例三提供的SFF的结构示意图;
图15为本申请实施例一提供的SF的结构示意图;
图16为本申请实施例二提供的SF的结构示意图;
图17为本申请实施例三提供的SF的结构示意图。
具体实施方式
本申请实施例提供一种报文的传输方法和设备。下面将结合附图,对本申请实施例中的技术方案进行清楚、完整地描述。需要说明的是,本申请实施例描述的网络架构以及业务场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着网络架构的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
本申请实施例提供的报文的传输方法,可以应用于使用SR作为传输隧道的网络中。所述网络中包括网络设备,所述网络设备可以是执行报文转发功能的设备。本申请实施例对于网络设备的名称和实现方式不做限定,根据网络设备在网络中部署的位置和角色的不同可以有所不同。例如,网络设备可以是路由器、交换机、转发器、SFF、SF等。所述网络设备可以是物理设备,也可以是基于虚拟化技术实现的虚拟设备。
下面结合图1,对本申请实施例适用的网络和应用场景进行示例性说明。
示例性的,图1为本申请实施例适用的SR SFC数据面的系统架构图。图1示出了IETF定义的SFC典型的数据面网络架构。其中,SR SFC数据面网元的类型可以包括:分类器(Classifier)、SFF、SFC代理(SFC proxy)和SF。可选的,SFF可以同时实现SFC代理功能,此时,SFF也可以称为“SFF(SFC proxy)”或者“SFF(SFC代理)”。在图1中,按照业务功能路径(Service Function Path,SFP)中报文的转发方向和转发路径,数据面可以包括网络设备11~网络设备16。其中,网络设备11可以称为入口路由器/分类器(Ingress Router/Classifier)。网络设备12可以称为路由器1。网络设备13可以称为SFF1,SFF1可以与至少一个SF(可以称为SF1,SF2,等)进行通信。网络设备14可以称为路由器2。网络设备15可以称为SFF2(SFC代理),SFF2(SFC代理)可以实现SFC代理功能,SFF2(SFC代理)可以与至少一个SF(可以称为SF11,SF12,等)进行通信。网络设备16可以称为出口路由器(Egress Router)。需要说明的是,本申请实施例对于SFP中每个网络设备的名称不做限定。例如,路由器1和路由器2可以与SFF1或SFF2的结构相似,但是网络设备的名称可以不同。
在图1中,按照SFP中报文的转发方向和转发路径,对于SFP中的某个网络设备,在转发路径上与所述网络设备相邻的下一个网络设备可以称为所述网络设备的下一跳设备、下一跳节点、下游设备或者下游节点,在转发路径上与所述网络设备相邻的上一个网络设备可以称为所述网络设备的上一跳设备、上一跳节点、上游设备或者上游节点。例如,对于SFF2(SFC代理),路由器2是SFF2(SFC代理)的上一跳设备,出口路由器是SFF2(SFC代理)的下一跳设备。对于SFF1,路由器1是SFF1的上一跳设备,路由器2是SFF1的下一跳设备。
下面,对本申请实施例涉及的概念进行说明。
(1)SR
IETF SPRING WG定义的SR是一种基于源路由转发模式的隧道技术,包括多协议标签交换(Multi-Protocol Label Switching,MPLS)和互联网协议第6版(Internet Protocol Version 6,IPv6)两个数据面,分别称为SR-MPLS和使用IPv6作为数据面的段路由(Segment Routing based IPv6data plane,SRv6),具体可以参见IETF SPRING WG中的说明。
(2)SR代理
在实现SR SFC时,如果SF不支持SR(SR-MPLS或SRv6),SFF需要实现SR代理功能。SR代理可以包括四种类型:静态代理(static proxy)、动态代理(dynamic proxy)、共享存储代理(shared-memory proxy)和伪装代理(masquerading proxy)。其中,动态代理是最常用的SR代理类型。具体可以参见草案draft-xuclad-spring-sr-service-programming-00中的描述。
示例性的,图2为SR代理的通用架构图。如图2所示,涉及的两个网络设备可以为SFF和SF。SFF实现了SR代理功能。SFF从上游设备接收到报文,需要转发给SF。如果SF不支持SR(也称为SR-unaware),SFF将剥掉从上游设备接收到的报文中的SR头(SR header),并缓存所述SR头。SFF通过输出接口(也称为IFACE OUT接口)将第一报文发送给SF。第一报文不包括SR头。SF对第一报文进行处理后,SFF通过输入接口(也称为IFACE IN接口)接收SF返回的第二报文。第二报文不包括没有SR头。SFF对第二报文恢复SR头的封装,并将封装后的报文转发给下游节点。
需要说明的是,本实施例对于输出接口和输入接口的名称、数量和遵循的通信协议不做限定。例如,根据SF的实现规格,输出接口和输入接口可以是同一个或不同的接口。例如,根据SF与SFF之间的传输隧道类型的不同,输出接口和输入接口遵循的通信协议可以不同。
在现有技术中,当SF不支持SR时,SFF在缓存SR头时,可以使用从上游设备接收到的报文中的五元组作为SR头缓存表项的索引。SFF接收到SF返回的报文时,可以根据所述返回的报文中的五元组查询得到本地存储的SR头缓存表项,从而恢复SR头封装。但是,SF在处理报文时可能会修改报文中的五元组,导致SFF从上游设备接收到的报文中的五元组与SF返回的报文中的五元组不同。这样,SFF缓存SR头时使用的五元组与恢复SR头 时使用的五元组不同,SFF根据SF修改后的五元组无法查询得到缓存的SR头,导致SR头恢复失败,进而导致报文转发失败。
针对上述技术问题,本申请实施例提供的报文的传输方法,可以应用于第一网络设备与第二网络设备转发报文的场景中。其中,第二网络设备不支持SR。可选的,第二网络设备会修改报文中的五元组。本申请实施例提供的报文的传输方法,第一网络设备接收到上游设备发送的报文后,第一网络设备剥掉报文中的SR头,并缓存所述SR头。在缓存所述SR头时,生成缓存索引信息,并采用所述缓存索引信息作为所述SR头的索引值。通过在第一网络设备给第二网络设备发送的报文中携带所述缓存索引信息,第二网络设备可以将所述缓存索引信息原样返回给第一网络设备。这样,确保了第一网络设备缓存所述SR头时采用的缓存索引信息与第一网络设备从第二网络设备接收到的缓存索引信息相同,第一网络设备根据没有发生变化的缓存索引信息可以查询得到本地缓存的SR头,进而恢复SR头,保证了报文的正常转发。
下面以具体地实施例对本申请的技术方案以及本申请的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。
需要说明的是,示例性的,在本申请各实施例中,以SRv6 SFC为例,以第一网络设备为SFF、第二网络设备为SF为例,对本申请各实施例提供的报文的传输方法进行说明。所述SFF可以实现SR动态代理的功能。本申请各实施例提供的报文的传输方法,同样适用于SR-MPLS SFC。为简化叙述,后文不再重复说明。
需要说明的是,本申请实施例对于SFF与SF之间的传输隧道类型不做限定。可选的,SFF与SF之间可以使用但不限于下列中的任意一种作为传输隧道:虚拟可扩展的局域网(Virtual eXtensible Local Area Network,VXLAN)、通用协议扩展的VXLAN(Generic Protocol Extension VXLAN,VXLAN-GPE)、通用网络虚拟化封装(Generic Network Virtualization Encapsulation,Geneve)、通用路由封装(Generic Routing Encapsulation,GRE)和IPv6。
需要说明的是,在本申请各实施例中,“使能”的含义是指开启某一项功能或者某一项功能生效。使能SFF在第二报文中携带缓存索引信息,是指SFF开启“在第二报文中携带缓存索引信息”的功能,或者,在SFF中,“在第二报文中携带缓存索引信息”的功能生效。使能SF在第二报文的响应报文中携带缓存索引信息,是指SF开启“在第二报文的响应报文中携带缓存索引信息”的功能,或者,在SF中,“在第二报文的响应报文中携带缓存索引信息”的功能生效。
需要说明的是,本申请各实施例对缓存索引信息的具体取值不做限定。缓存索引信息的取值,可能是有效值,也可能是无效值。本申请实施例对于缓存索引信息的有效值和无效值的具体取值不做限定。需要说明的是,在本申请各实施例中,如果没有明确说明缓存索引信息的取值为无效值时,或者明确说明缓存索引信息的取值为有效值时,缓 存索引信息的取值均为有效值。对于缓存索引信息的取值为无效值的一些场景,本申请实施例会明确说明缓存索引信息的取值为无效值。
需要说明的是,本申请各实施例对标识信息的具体取值不做限定。标识信息的取值,可能是有效值,也可能是无效值。本申请实施例对于标识信息的有效值和无效值的具体取值不做限定。需要说明的是,在本申请各实施例中,如果没有明确说明标识信息的取值为无效值时,或者已经明确说明标识信息的取值为有效值时,标识信息的取值均为有效值。对于标识信息的取值为无效值的一些场景,本申请实施例会明确说明标识信息的取值为无效值。
图3为本申请实施例一提供的报文的传输方法的消息交互图。本实施例提供的报文的传输方法,执行主体涉及SFF和SF。其中,SF不支持SR。如图3所示,本实施例提供的报文的传输方法,可以包括:
S301、SFF接收SFF的上一跳设备发送的第一报文。其中,第一报文包括SR头。
其中,SFF的上一跳设备,也称为SFF的上一跳节点、SFF的上游设备或者SFF的上游节点,是指在报文转发的路径上与所述SFF相邻的上一个设备。可以参见图1中的相关描述,原理相似,此处不再赘述。本实施例对于SFF的上一跳设备的类型和名称不做限定。例如,SFF的上一跳设备可以为另一个SFF。
S302、SFF生成SR头的缓存索引信息,并存储缓存索引信息和SR头。
具体的,由于SF不支持SR,因此,SFF接收到第一报文后,需要剥离第一报文中的SR头,并缓存所述SR头。SFF生成所述SR头的缓存索引信息。SR头与缓存索引信息是一一对应的,即,通过缓存索引信息可以区分不同的SR头。SFF可以采用与所述SR头一一对应的所述缓存索引信息作为缓存所述SR头时的索引值,存储所述缓存索引信息和所述SR头。
需要说明的是,本实施例对于缓存索引信息的实现方式不做限定。例如,缓存索引信息可以为二进制序列、八进制序列、十六进制序列,等,本实施例对于缓存索引信息的比特长度和具体数值不做限定,可以根据SFF与SF之间通信协议的不同而有所不同。
需要说明的是,SR头的索引值,除了包括所述缓存索引信息之外,还可以包括其他信息,本实施例对此不做限定,可以根据SFF与SF之间通信协议的不同、实现的业务类型的不同而有所不同。例如,对于SR虚拟专用网络(Virtual Private Network,VPN)业务,除了缓存索引信息之外,还可以使用VPN标识(VPN ID)作为所述SR头的索引值。即,可以使用(VPN ID,缓存索引信息)来唯一区分不同的SR头。
可选的,S302中,SFF生成SR头的缓存索引信息,可以包括:
SFF获取第一报文中的N元组信息。其中,N元组信息用于指示第一报文所属的数据流,N为大于0的整数。
SFF根据N元组信息生成缓存索引信息。
其中,N元组信息包括用于对业务流进行唯一标识的至少一个协议字段的组合。根据不同的通信协议,N元组信息包括的协议字段的数量和组合可以不同,本实施例对此不做限定。例如,对于以太网(Ethernet)业务帧,N元组信息可以包括4个字段,具体可以使用(SMAC,DMAC,Ether-Type,VLAN tag)对业务流进行标识。其中,各个符号的含义如下:源MAC地址(Source MAC Address,SMAC)、目的MAC地址(Destination MAC Address,DMAC)、Ether-Type表示以太网类型、VLAN tag表示VLAN标签,具体可以参见以太网的相关通信协议。又例如,对于网络之间互连的协议(Internet Protocol,IP)报文,N元组信息可以包括5个字段,具体可以使用(SA,DA,源端口,目的端口,protocol)进行标识。其中,各个符号的含义如下:源IP地址(Source Address,SA)、目的IP地址(Destination Address,DA)、protocol表示协议。
由于SFF根据第一报文中的N元组信息生成与SR头一一对应的缓存索引信息,缓存索引信息与N元组信息相关,通过缓存索引信息可以区分不同的SR头和数据流,通过缓存索引信息可以恢复SR头的封装,进一步提升了缓存索引信息的有效性。
S303、SFF根据第一报文生成第二报文。其中,第二报文包括缓存索引信息且不包括SR头。
具体的,SFF剥离第一报文中的SR头后,根据SFF与SF之间的通信协议,对去除SR头的第一报文进行处理生成第二报文。例如,可以封装第二报文的报文头。第二报文中不包括SR头,但是包括所述SR头的缓存索引信息。后续,SF接收到SFF发送的第二报文后,确定第二报文中包括所述缓存索引信息,SF可以在发给SFF的所述第二报文的响应报文中原样携带所述缓存索引信息。这样,SFF通过第二报文发送给SF的缓存索引信息与SFF从SF接收到的响应报文中携带的缓存索引信息相同。SFF可以根据响应报文中携带的缓存索引信息在本地缓存的SR头中准确的获取所述第一报文中包括的SR头,进而成功恢复SR头。解决了现有的由于SF修改五元组信息导致无法恢复SR头的问题。
可选的,第二报文中包括的缓存索引信息,可以用于指示使能SFF在第二报文中携带缓存索引信息。
具体的,为了实现报文处理的灵活性,SFF可以配置使能或者配置不使能在第二报文中携带缓存索引信息。在本实现方式中,只要SFF发送的第二报文中携带了缓存索引信息,所述缓存索引信息本身就说明了当前时刻SFF配置使能在第二报文中携带缓存索引信息。后续,SF接收到第二报文后,根据第二报文携带的所述缓存索引信息确定SFF已经配置使能在第二报文中携带缓存索引信息,SF可以在第二报文的响应报文中原样返回所述缓存索引信息,以使SFF成功恢复SR头。从而,提供了一种灵活的实施方式,有助于按需部署和管理业务。
需要说明的是,本实施例对于缓存索引信息在第二报文中的位置不做限定。可选的,第二报文包括报文头,报文头包括内容字段,内容字段用于携带所述缓存索引信息。需要说明的是,本实施例对于内容字段的名称以及内容字段在第二报文中的位置不做限定。
可选的,第二报文还可以包括标识信息,标识信息用于指示使能SFF在第二报文中携带缓存索引信息。
具体的,在本实现方式中,第二报文可以包括缓存索引信息和标识信息。通过标识信息明确指示当前时刻SFF配置使能在第二报文中携带缓存索引信息。后续,SF接收到第二报文后,根据第二报文携带的所述标识信息确定SFF已经配置使能在第二报文中携带缓存索引信息。SF可以在第二报文的响应报文中原样返回所述第二报文中携带的所述标识信息和所述缓存索引信息,以使SFF成功恢复SR头。从而,提供了一种灵活的实施方式,有助于按需部署和管理业务。
需要说明的是,本实施例对于标识信息在第二报文中的位置不做限定。可选的,第二报文包括报文头,报文头包括标识字段,标识字段用于携带标识信息。需要说明的是,本实施例对于标识字段的名称以及标识字段在第二报文中的位置不做限定。可选的,第二报文中的内容字段和标识字段可以为同一个字段。此时,标识字段可以占用所述同一个字段的部分比特位,内容字段可以占用所述同一个字段的剩余的比特位。例如,第二报文包括一个长度为10比特的字段。标识字段占用所述字段的第1个比特位,内容字段占用所述字段的剩余的9个比特位。可选的,第二报文中的内容字段和标识字段可以为不同的字段。
S304、SFF向SF发送第二报文。
相应的,SF接收SFF发送的第二报文。其中,第二报文包括缓存索引信息。
S305、SF根据第二报文生成响应报文。其中,响应报文包括缓存索引信息。
具体的,SF接收到SFF发送的第二报文后,确定第二报文中包括缓存索引信息,则在第二报文的响应报文中也携带所述缓存索引信息,确保SFF通过第二报文发送给SF的缓存索引信息与SFF从SF接收到的响应报文中携带的缓存索引信息相同,以使SFF可以成功恢复SR头。
可选的,响应报文包括的缓存索引信息,可以用于指示使能SF在响应报文中携带缓存索引信息。
具体的,为了实现报文处理的灵活性,SF可以配置使能或者配置不使能在第二报文的响应报文中携带缓存索引信息。在本实现方式中,只要SF发送的第二报文的响应报文中携带了缓存索引信息,所述缓存索引信息本身就说明了当前时刻SF配置使能在第二报文的响应报文中携带缓存索引信息。后续,SFF接收到第二报文的响应报文后,根据所述响应报文中携带的缓存索引信息确定SF已经配置使能在第二报文的响应报文中携带缓存索引信息。SFF可以根据所述响应报文中携带的缓存索引信息成功恢复SR头。从而,提供了一种灵活的实施方式,有助于按需部署和管理业务。
需要说明的是,本实施例对于缓存索引信息在第二报文的响应报文中的位置不做限定。可选的,第二报文的响应报文包括报文头,报文头包括内容字段,内容字段用于携带所述缓存索引信息。需要说明的是,本实施例对于内容字段的名称以及内容字段在第二报文的响应报文中的位置不做限定。
可选的,响应报文还可以包括标识信息,标识信息用于指示使能SF在响应报文中携带缓存索引信息。
具体的,在本实现方式中,第二报文的响应报文可以包括缓存索引信息和标识信息。通过标识信息明确指示当前时刻SF配置使能在第二报文的响应报文中携带缓存索引信息。后续,SFF接收到第二报文的响应报文后,根据所述响应报文携带的所述标识信息确定SF已经配置使能在第二报文的响应报文中携带缓存索引信息。SFF可以根据所述响应报文中携带的缓存索引信息成功恢复SR头。从而,提供了一种灵活的实施方式,有助于按需部署和管理业务。
需要说明的是,本实施例对于标识信息在第二报文的响应报文中的位置不做限定。可选的,第二报文的响应报文包括报文头,报文头包括标识字段,标识字段用于携带标识信息。其中,第二报文的响应报文中包括的内容字段和标识字段分别与第二报文中包括的内容字段和标识字段相似,可以参见上述关于第二报文中包括的内容字段和标识字段的说明,此处不再赘述。
S306、SF向SFF发送响应报文。
相应的,SFF接收SF发送的响应报文。
可见,本实施例提供的报文的传输方法,SFF接收SFF的上一跳设备发送的第一报文后,在缓存第一报文包括的SR头时,生成缓存索引信息,并采用所述缓存索引信息作为缓存SR头的索引值。SFF通过在发送给SF的第二报文中携带缓存索引信息,使得SF不会修改缓存索引信息的值,并且将缓存索引信息携带在响应报文中原样返回给SFF。这样,SFF通过第二报文发送给SF的缓存索引信息与SFF从SF接收到的响应报文中携带的缓存索引信息相同。SFF根据响应报文中携带的缓存索引信息可以在本地缓存的SR头中准确的获取第一报文中包括的SR头,成功恢复SR头。其中,第一报文和第三报文中包括所述SR头。第二报文和第二报文的响应报文中不包括所述SR头,且包括所述缓存索引信息。本实施例提供的报文的传输方法,保证了报文的正常转发。
可选的,本实施例提供的报文的传输方法,S306,SF向SFF发送响应报文之后,还可以包括:
SFF根据第二报文的响应报文中的缓存索引信息,获取SFF中存储的与所述缓存索引信息对应的SR头。
SFF根据第二报文的响应报文生成第三报文。其中,第三报文包括所述SR头。
SFF向SFF的下一跳设备发送第三报文。
具体的,SFF接收到SF返回的第二报文的响应报文。如果所述响应报文中携带有缓存索引信息,SFF根据响应报文中携带的缓存索引信息在本地存储的SR头中,查找与响应报文中携带的缓存索引信息匹配的SR头。由于SFF通过第二报文发送给SF的缓存索引信息与SFF从SF接收到的响应报文中携带的缓存索引信息相同,因此,SFF根据响应报文中携带的缓存索引信息可以成功查找到匹配的SR头,并且,该匹配的SR头就是SFF从SFF的上一跳设备接收到的第一报文中的SR头。SFF可以根据该匹配的SR头对响应报文进行 SR头的成功恢复,生成第三报文,并将第三报文发送给SFF的下一跳设备。从而,保证了报文的正常转发。
下面通过示例,对本申请实施例提供的报文的传输方法,以及报文传输过程中的第一报文、第二报文、第二报文的响应报文和第三报文的内容进行示例性说明。
可选的,在一个示例中,图4为本申请实施例一提供的报文传输过程中报文结构的一种示意图。在图4中,SFF与SF之间采用VXLAN作为传输隧道。SR头可以为SRv6头(SRv6header)。
如图4所示,SFF从SFF的上一跳设备接收第一报文。第一报文中包括SR头和N元组信息。N元组信息为SA=sa1,DA=da1。由于SF不支持SR,因此,SFF需要剥离第一报文中的SR头。SFF可以根据第一报文中的N元组信息生成缓存索引信息,用index1表示,并采用(vni1,index1)作为SR头的索引值,缓存所述SR头。其中,vni1为VPN标识(VPN ID)。由于SR头中除了用来指示SRv6隧道路径的信息(例如,SID list)之外,还可能携带了VPN ID、SFC元数据(metadata)等关键信息。因此,为了保证端到端业务的连续性,SFF剥掉第一报文的SR头时,需要重新封装一个新的隧道头将这些信息传递给SF。具体实现可以参见VXLAN协议中的相关描述。在本示例中,SFF与SF之间采用VXLAN作为传输隧道。第二报文的VXLAN隧道头中可以包括缓存索引信息index1,且不包括SR头。第二报文中包括N元组信息SA=sa1,DA=da1。SF接收到第二报文后,确定第二报文包括缓存索引信息index1,并对第二报文的负载进行处理生成第二报文的响应报文。在处理过程中,将原始的N元组信息SA=sa1,DA=da1修改为新的N元组信息SA=sa2,DA=da1。所述响应报文的VXLAN隧道头中包括缓存索引信息index1,所述响应报文中包括N元组信息SA=sa2,DA=da1。SFF接收到第二报文的响应报文后,确定响应报文包括缓存索引信息index1。SFF根据响应报文包括的缓存索引信息index1查询本地存储的缓存表项,成功获得第一报文中的SR头。SFF对所述响应报文进行SR头的恢复生成第三报文,并将第三报文发送给SFF的下一跳设备。其中,第三报文包括SR头,包括已经改变的N元组信息SA=sa2,DA=da1。
可见,通过在第二报文中携带缓存索引信息index1,SF可以返回相同的缓存索引信息index1。在SF修改N元组信息的场景中,SFF可以通过不会被修改的缓存索引信息index1成功恢复报文的SR头,保证了报文的正常转发。
可选的,在另一个示例中,图5为本申请实施例一提供的报文传输过程中报文结构的另一种示意图。相关描述可以参见图4所示示例,此处不再赘述。
本示例与图4所示示例的区别在于,在本示例中,第二报文和第二报文的响应报文均包括缓存索引信息index1和标识信息E=1。而在图4所示示例中,第二报文和第二报文的响应报文仅包括缓存索引信息index1。
本实施例提供一种报文的传输方法,包括:SFF接收SFF的上一跳设备发送的第一报文,第一报文包括SR头;SFF生成SR头的缓存索引信息,并存储缓存索引信息和SR头;SFF根据第一报文生成第二报文,第二报文包括缓存索引信息且不包括SR头;SFF向SF发送第二报文;SF根据第二报文生成响应报文,响应报文包括缓存索引信息;SF向SFF发 送响应报文。本实施例提供的报文的传输方法,SFF在缓存第一报文包括的SR头时,生成缓存索引信息,并采用缓存索引信息作为缓存SR头的索引值。SFF通过在发送给SF的第二报文中携带缓存索引信息,使得SF不会修改缓存索引信息的值,并且将缓存索引信息携带在响应报文中原样返回给SFF。SFF根据响应报文中携带的缓存索引信息可以在本地缓存的SR头中准确的获取第一报文中包括的SR头,成功恢复SR头,保证了报文的正常转发。
图6为本申请实施例二提供的报文的传输方法的消息交互图。本实施例在图3所示实施例一的基础上,提供了报文的传输方法的另一种实现方式。本实施例提供的报文的传输方法,执行主体涉及SFF和SF。其中,SF不支持SR。如图6所示,本实施例提供的报文的传输方法,可以包括:
S601、SFF获取配置信息,配置信息用于使能SFF在第二报文中携带缓存索引信息。
具体的,为了实现报文处理的灵活性,SFF可以配置使能或者配置不使能在第二报文中携带缓存索引信息。只有SFF配置使能后,SFF才可以实现“在第二报文中携带缓存索引信息”的功能。
可选的,SFF获取配置信息,可以包括:
SFF接收来自控制管理设备的消息,所述消息包括所述配置信息。
在该种实现方式中,控制管理设备根据用户的需求,可以生成并向SFF发送消息。相应的,SFF接收该消息,从该消息中获取配置信息。该配置信息指示使能SFF在第二报文中携带缓存索引信息。需要说明的是,用户是指网络的运营者、管理者或者使用者。用户的需求可以是使用网络或者管理网络等的需求。用户的需求可以是人工在控制管理设备上配置输入的,也可以是控制管理设备通过接收其它应用服务器(如第三方应用服务器)的需求消息后自动获得的,还可以是其它方式,本实施例不做限定。需要说明的是,本实施例对于控制管理设备的实现方式不做限定。
可选的,SFF获取配置信息,可以包括:
SFF根据命令行配置获得所述配置信息。
例如,管理员可以登陆到SFF上,通过命令行进行配置操作。
可选的,SFF获取配置信息,可以包括:
SFF自身运行算法软件自动生成所述配置信息。
通过多种获取配置信息的途径,丰富了技术实施的手段,提高了易用性。
S602、SF接收配置信息,配置信息用于使能SF在响应报文中携带缓存索引信息。
可选的,SF接收配置信息,可以包括:
SF接收来自控制管理设备的消息,所述消息包括所述配置信息;或者,
SF根据命令行配置获得所述配置信息;或者,
SF自身运行算法软件自动生成所述配置信息。
可以参见S601中的相关描述,原理相似,此处不再赘述。
需要说明的是,本实施例对于S602的执行顺序不做限定,只要在S607之前即可。
S603、SFF接收SFF的上一跳设备发送的第一报文。其中,第一报文包括SR头。
S604、SFF生成SR头的缓存索引信息,并存储缓存索引信息和SR头。
S605、SFF根据第一报文生成第二报文。其中,第二报文包括缓存索引信息且不包括SR头。
S606、SFF向SF发送第二报文。
其中,S603~S606可以分别参见S301~S304的描述,原理相似,此处不再赘述。
S607、SF判断当前时刻是否使能SF在响应报文中携带缓存索引信息。
如果当前时刻使能SF在响应报文中携带缓存索引信息,则执行S608。
具体的,为了实现报文处理的灵活性,SFF可以配置使能或者配置不使能在第二报文中携带缓存索引信息,SF可以配置使能或者配置不使能在第二报文的响应报文中携带缓存索引信息。而且,只有当SFF和SF均配置使能时,SFF才可以在第二报文中携带缓存索引信息,并且,SF在第二报文的响应报文中原样返回所述缓存索引信息。从而,SFF可以根据所述缓存索引信息成功恢复SR头。SF接收到第二报文后,根据第二报文包括的缓存索引信息或者标识信息确定SFF使能在第二报文中携带缓存索引信息,SF可以判断当前时刻是否使能SF在响应报文中携带缓存索引信息。如果当前时刻使能SF在响应报文中携带缓存索引信息,SF可以在第二报文的响应报文中原样返回所述缓存索引信息,提升了报文处理的有效性和灵活性。
可选的,如果当前时刻没有使能SF在响应报文中携带缓存索引信息,说明当前时刻SF没有开启“在第二报文的响应消息中携带缓存索引信息”的功能,或者,在SF中,“在第二报文的响应报文中携带缓存索引信息”的功能没有生效。此时,可以按照现有的报文处理流程处理所述第二报文。例如,SF丢弃所述第二报文。
S608、SF根据第二报文生成响应报文。其中,响应报文包括缓存索引信息。
S609、SF向SFF发送响应报文。
其中,S608~S609可以分别参见S305~S306的描述,原理相似,此处不再赘述。
S610、SFF判断当前时刻是否使能SFF在第二报文中携带缓存索引信息。
如果当前时刻使能SFF在第二报文中携带缓存索引信息,则执行S611。
具体的,为了实现报文处理的灵活性,SFF可以配置使能或者配置不使能在第二报文中携带缓存索引信息,SF可以配置使能或者配置不使能在第二报文的响应报文中携带缓存索引信息。而且,只有当SFF和SF均配置使能时,SFF才可以在第二报文中携带缓存索引信息,并且,SF在第二报文的响应报文中原样返回所述缓存索引信息,从而,SFF可以根据所述缓存索引信息成功恢复SR头。SFF接收到SF发送的响应报文后,根据响应 报文包括的缓存索引信息或者标识信息确定SF使能在第二报文的响应消息中携带缓存索引信息,SFF可以首先判断当前时刻是否使能SFF在第二报文中携带缓存索引信息。如果当前时刻使能SFF在第二报文中携带缓存索引信息,SFF可以根据响应消息中携带的缓存索引信息恢复SR头,提升了报文处理的有效性和灵活性。
可选的,若当前时刻没有使能SFF在第二报文中携带缓存索引信息,说明当前时刻SFF没有开启“SFF在第二报文中携带缓存索引信息”的功能,或者,在SFF中,“SFF在第二报文中携带缓存索引信息”的功能没有生效。此时,可以按照现有的报文处理流程处理所述响应报文。例如,SFF丢弃所述响应报文。
S611、SFF根据第二报文的响应报文中的缓存索引信息,获取SFF中存储的与所述缓存索引信息对应的SR头。
S612、SFF根据第二报文的响应报文生成第三报文。其中,第三报文包括所述SR头。
S613、SFF向SFF的下一跳设备发送第三报文。
其中,S611~S613可以参见图3所示实施例一中的描述,原理相似,此处不再赘述。
本实施例提供一种报文的传输方法,SFF通过获取配置信息,可以使能SFF在第二报文中携带缓存索引信息。SF通过获取配置信息,可以使能SF在响应报文中携带缓存索引信息。当SFF和SF均配置使能时,SFF在发送给SF的第二报文中可以携带缓存索引信息,使得SF不会修改缓存索引信息的值,并且将缓存索引信息携带在响应报文中原样返回给SFF。SFF根据响应报文中携带的缓存索引信息可以在本地缓存的SR头中准确的获取第一报文中包括的SR头,成功恢复SR头,保证了报文的正常转发。
可选的,本申请实施例三还提供一种报文的传输方法。本实施例提供的报文的传输方法,执行主体涉及SFF和SF。其中,SF不支持SR。本实施例提供的报文的传输方法,可以包括图3所示实施例一中的S301~S304,或者,可以包括图3所示实施例一中的S306,或者,可以包括图6所示实施例二中的S601~S607,或者,可以包括图6所示实施例二中的S609~S610。本实施例与实施例一或者实施例二的区别在于,在本实施例中,第二报文或者第二报文的响应报文中包括的缓存索引信息为无效值,或者,当第二报文或者第二报文的响应报文中还包括标识信息时,所述标识信息为无效值。而在实施例一或者实施例二中,第二报文或者第二报文的响应报文中包括的缓存索引信息为有效值,或者,当第二报文或者第二报文的响应报文中还包括标识信息时,所述标识信息为有效值。
可选的,在本实施例中,在一种可选的实施方式中,第二报文包括缓存索引信息,且所述缓存索引信息为无效值。此时,第二报文包括的缓存索引信息为无效值,用于指示SFF没有使能在第二报文中携带缓存索引信息,或者,用于指示报文传输错误。本实施例对于报文传输错误的原因值不做限定,例如,可以为报文头封装错误、报文头传输过程中发生更改,等。相应的,SF接收到SFF发送的第二报文后,确定第二报文携带缓存索引信息,但是所述缓存索引信息为无效值时,说明SFF没有使能在第二报文中携带 缓存索引信息,或者,报文传输错误。此时,SF可以按照现有的报文处理流程处理所述第二报文。例如,SF丢弃所述第二报文。
可选的,在本实施例中,在另一种可选的实施方式中,第二报文的响应报文包括缓存索引信息,且所述缓存索引信息为无效值。此时,第二报文的响应报文包括的缓存索引信息为无效值,用于指示SF没有使能在第二报文的响应报文中携带缓存索引信息,或者,用于指示报文传输错误。本实施例对于报文传输错误的原因值不做限定,例如,可以为报文头封装错误、报文头传输过程中发生更改,等。相应的,SFF接收到SF发送的第二报文的响应报文后,确定第二报文的响应报文携带缓存索引信息,但是所述缓存索引信息为无效值时,说明SF没有使能在第二报文的响应报文中携带缓存索引信息,或者,报文传输错误。此时,SFF可以按照现有的报文处理流程处理所述响应报文。例如,SFF丢弃所述响应报文。
可选的,在本实施例中,在又一种可选的实施方式中,第二报文包括缓存索引信息和标识信息,且所述标识信息为无效值。可选的,所述缓存索引信息可以为有效值,也可以为无效值。此时,第二报文包括的标识信息为无效值,无论第二报文包括的缓存索引信息是否为有效值,均用于指示SFF没有使能在第二报文中携带缓存索引信息。相应的,SF接收到SFF发送的第二报文后,确定第二报文携带标识信息,但是所述标识信息为无效值时,说明SFF没有使能在第二报文中携带缓存索引信息。此时,SF可以按照现有的报文处理流程处理所述第二报文。例如,SF丢弃所述第二报文。
可选的,在本实施例中,在又一种可选的实施方式中,第二报文的响应报文包括缓存索引信息和标识信息,且所述标识信息为无效值。可选的,所述缓存索引信息可以为有效值,也可以为无效值。此时,第二报文的响应报文包括的标识信息为无效值,无论第二报文的响应报文包括的缓存索引信息是否为有效值,均用于指示SF没有使能在第二报文的响应报文中携带缓存索引信息。相应的,SFF接收到SF发送的第二报文的响应报文后,确定第二报文的响应报文携带标识信息,但是所述标识信息为无效值时,说明SF没有使能在第二报文的响应报文中携带缓存索引信息。此时,SFF可以按照现有的报文处理流程处理所述响应报文。例如,SFF丢弃所述响应报文。
可见,本实施例提供的报文的传输方法,如果第二报文或者第二报文的响应报文携带的缓存索引信息为无效值,或者第二报文或者第二报文的响应报文携带的标识信息为无效值时,指示了SFF或者SF没有配置使能的场景。此时,SFF或者SF可以按照现有的报文处理流程进行报文的处理。
下面,根据SFF与SF之间传输隧道类型的不同,通过示例对第二报文的报文头中包括的内容字段和标识字段,以及第二报文的响应报文的报文头中包括的内容字段和标识字段进行示例性说明。需要说明的是,下面各个示例中,内容字段和标识字段在报文头中的位置以及长度只是示例,在实现时,内容字段和标识字段可以位于报文头中的任意保留位置以及具有任意长度。需要说明的是,内容字段携带的缓存索引信息可以为有效 值,也可以为无效值,标识字段携带的标识信息可以为有效值,也可以为无效值,根据不同的应用场景可以有所不同。
可选的,在第一个示例中,SFF与SF之间的传输隧道为VXLAN。VXLAN可以参见[RFC7348 Virtual eXtensible Local Area Network(VXLAN):A Framework for Overlaying Virtualized Layer 2 Networks over Layer 3 Networks]中的描述。VXLAN是一种MAC-in-UDP的封装格式,它的UDP目的端口号必须设置为4789。示例性的,图7为本申请实施例提供的VXLAN的隧道头的结构示意图。如图7所示,在VXLAN头(VXLAN header)中,目前包括若干个保留的标志位(用R表示)和两个Reserved(保留)字段。在本示例中,可以将其中的一个保留的标志位R定义为标识字段,具体参见图7中的实线框。可以将其中一个Reserved字段定义为内容字段,具体参见图7中的虚线框。
可选的,在第二个示例中,SFF与SF之间的传输隧道为VXLAN-GPE。VXLAN-GPE可以参见草案[draft-ietf-nvo3-vxlan-gpe-06]中的描述。为了与VXLAN进行区分,VXLAN-GPE的UDP目的端口号必须设置为4790。示例性的,图8为本申请实施例提供的VXLAN-GPE的隧道头的结构示意图。如图8所示,VXLAN-GPE是VXLAN的扩展,相比于VXLAN头,VXLAN-GPE头可以增加Next Protocol(下个协议)字段,从而可以携带各种协议封装,例如,Ethernet、IPv4、IPv6、MPLS、NSH等。而VXLAN只能携带Ethernet帧。在VXLAN-GPE头中,目前包括两个保留的标志位(用R表示)和两个Reserved(保留)字段。在本示例中,可以将其中的一个保留的标志位R定义为标识字段,具体参见图8中的实线框。可以将其中一个Reserved字段定义为内容字段,具体参见图8中的虚线框。
可选的,在第三个示例中,SFF与SF之间的传输隧道为Geneve。Geneve可以参见草案[draft-ietf-nvo3-geneve-08]中的描述。为了进行区分,Geneve的UDP目的端口号必须设置为6081。示例性的,图9为本申请实施例提供的Geneve的隧道头的结构示意图。如图9所示,相比于VXLAN头,Geneve头可以增加Next Protocol(下个协议)字段,还可以在扩展头部中携带可选的TLV信息。由于Geneve支持携带可选的TLV,因此,可以定义新的TLV类型作为内容字段,具体参见图9中的虚线框。可以在固定头部中定义标识字段,具体参见图9中的实线框。
可选的,在第四个示例中,SFF与SF之间的传输隧道为GRE。GRE可以参见[RFC2784 Generic Routing Encapsulation(GRE)]中的描述。在[RFC7676 IPv6 Support for Generic Routing Encapsulation(GRE)]中又定义了支持IPv6的规范,二者的GRE头(GRE header)封装格式是相同的。示例性的,图10为本申请实施例提供的GRE的隧道头的结构示意图。如图10所示,在GRE头(GRE header)中也存在保留标志位和保留字段。在本示例中,可以将其中的一个保留标志位定义为标识字段,具体参见图10中的实线框。可以将其中一个保留字段定义为内容字段,具体参见图10中的虚线框。
可选的,在第五个示例中,SFF与SF之间的传输隧道为IPv6。IPv6可以参见[RFC2473Generic Packet Tunneling in IPv6 Specification]中的描述,其中定义了IPv6隧道的通用规范,例如,IPv4-in-IPv6、IPv6-in-IPv6。IPv4-in-IPv6表示基于IPv4报文封装IPv6头。IPv6-in-IPv6表示基于IPv6报文封装IPv6头。示例性的,图11为本申请实施例提供的IPv6的隧道头的结构示意图。如图11所示,在本示例中,可以将IPv6头(IPv6  header)中的Flow Label(流标签)字段中的比特位分别定义为标识字段和内容字段。标识字段具体参见图11中的实线框,内容字段具体参见图11中的虚线框。
图12为本申请实施例一提供的SFF的结构示意图。图12所示的SFF可以应用于SRv6网络中,包括:主控板510、接口板530、交换网板520和接口板540。主控板510用于完成系统管理、设备维护、协议处理等功能。交换网板520用于完成各接口板(接口板也称为线卡或业务板)之间的数据交换。接口板530和540用于提供各种业务接口(例如,以太网接口、POS接口等),并实现报文的转发。主控板510、接口板530和540,以及交换网板520之间通过系统总线与系统背板相连实现互通。接口板530上的中央处理器531用于对接口板进行控制管理并与主控板510上的中央处理器511进行通信。
SFF从物理接口卡533收到SFF的上一跳设备发送的第一报文,第一报文包括SR头。物理接口卡533将所述第一报文送到网络处理器532,网络处理器532根据所述第一报文查找转发表项存储器534,匹配结果指示是本机报文。于是网络处理器532将所述第一报文上送至控制面的中央处理器511。主控板510上的中央处理器511可以执行图3所示实施例一中S302~S303。物理接口卡533和网络处理器532可以执行图3所示实施例一中S304和S306,可参考上面相关描述,此处不再赘述。
应理解,本申请实施例中接口板540上的操作与所述接口板530的操作一致,为了简洁,不再赘述。应理解,主控板可能有一块或多块,有多块的时候可以包括主用主控板和备用主控板。接口板可能有一块或多块,接口板上的物理接口卡也可以有一块或多块。交换网板可能没有,也可能有一块或多块。具体采用哪种架构,取决于具体的组网部署场景,此处不做任何限定。
图13为本申请实施例二提供的SFF的结构示意图。本实施例提供的SFF,可以执行图3~图11所示实施例中SFF执行的操作。如图13所示,本实施例提供的SFF,可以包括:
接收模块11,用于接收所述SFF的上一跳设备发送的第一报文,所述第一报文包括SR头;
处理模块12,用于生成所述SR头的缓存索引信息,并存储所述缓存索引信息和所述SR头;还用于根据所述第一报文生成第二报文,所述第二报文包括所述缓存索引信息且不包括所述SR头;
发送模块13,用于向SF发送所述第二报文。
可选的,所述缓存索引信息用于指示使能所述SFF在所述第二报文中携带缓存索引信息。
可选的,所述第二报文还包括标识信息,所述标识信息用于指示使能所述SFF在所述第二报文中携带缓存索引信息。
可选的,所述处理模块12具体用于:
所述SFF获取所述第一报文中的N元组信息,所述N元组信息用于指示所述第一报文所属的数据流,N为大于0的整数;
所述SFF根据所述N元组信息生成所述缓存索引信息。
可选的,所述接收模块11,还用于接收所述SF发送的所述第二报文的响应报文,所述第二报文的响应报文包括所述缓存索引信息;
所述处理模块12,还用于根据所述缓存索引信息获取所述SFF中存储的与所述缓存索引信息对应的SR头;根据所述第二报文的响应报文生成第三报文,所述第三报文包括所述SR头;
所述发送模块13,还用于向所述SFF的下一跳设备发送所述第三报文。
可选的,所述处理模块12还用于:
判断当前时刻是否使能所述SFF在所述第二报文中携带缓存索引信息;
若当前时刻使能所述SFF在所述第二报文中携带缓存索引信息,则执行根据所述缓存索引信息获取所述SFF中存储的与所述缓存索引信息对应的SR头的步骤。
可选的,所述接收模块11还用于:
获取配置信息,所述配置信息用于使能所述SFF在所述第二报文中携带缓存索引信息。
可选的,所述第二报文包括报文头,所述报文头包括内容字段,所述内容字段用于携带所述缓存索引信息。
可选的,所述第二报文包括报文头,所述报文头包括标识字段,所述标识字段用于携带所述标识信息。
本实施例提供的SFF,用于执行图3~图11所示实施例中SFF执行的操作。技术原理和技术效果相似,此处不再赘述。
图14为本申请实施例三提供的SFF的结构示意图。如图14所示,本实施例提供的SFF,可以包括:处理器21、存储器22和收发器23,所述收发器23用于接收数据或者发送数据,所述存储器22用于存储指令,所述处理器21用于执行所述存储器22中存储的指令,用于执行图3~图11所示实施例中SFF执行的操作。
本实施例提供的SFF,用于执行图3~图11所示实施例中SFF执行的操作。技术原理和技术效果相似,此处不再赘述。
图15为本申请实施例一提供的SF的结构示意图。图15所示的SF可以应用于SRv6网络中,包括:主控板610、接口板630、交换网板620和接口板640。主控板610用于完成系统管理、设备维护、协议处理等功能。交换网板620用于完成各接口板(接口板也称为线卡或业务板)之间的数据交换。接口板630和640用于提供各种业务接口(例如,以太 网接口、POS接口等),并实现报文的转发。主控板610、接口板630和640,以及交换网板620之间通过系统总线与系统背板相连实现互通。接口板630上的中央处理器631用于对接口板进行控制管理并与主控板610上的中央处理器611进行通信。
SF从物理接口卡633收到SFF发送的第二报文,第二报文包括缓存索引信息且不包括SR头。物理接口卡633将所述第二报文送到网络处理器632,网络处理器632根据所述第二报文查找转发表项存储器634,匹配结果指示是本机报文。于是网络处理器632将所述第二报文上送至控制面的中央处理器611。主控板610上的中央处理器611可以执行图3所示实施例一中S305。物理接口卡633和网络处理器632可以执行图3所示实施例一中S306,可参考上面相关描述,此处不再赘述。
应理解,本申请实施例中接口板640上的操作与所述接口板630的操作一致,为了简洁,不再赘述。应理解,主控板可能有一块或多块,有多块的时候可以包括主用主控板和备用主控板。接口板可能有一块或多块,接口板上的物理接口卡也可以有一块或多块。交换网板可能没有,也可能有一块或多块。具体采用哪种架构,取决于具体的组网部署场景,此处不做任何限定。
图16为本申请实施例二提供的SF的结构示意图。本实施例提供的SF,可以执行图3~图11所示实施例中SF执行的操作。如图16所示,本实施例提供的SF,可以包括:
接收模块31,用于接收SFF发送的第一报文,所述第一报文包括缓存索引信息;
处理模块32,用于根据所述第一报文生成响应报文,所述响应报文包括所述缓存索引信息;
发送模块33,用于向所述SFF发送所述响应报文。
可选的,所述缓存索引信息用于指示使能所述SF在所述响应报文中携带缓存索引信息。
可选的,所述响应报文还包括标识信息,所述标识信息用于指示使能所述SF在所述响应报文中携带缓存索引信息。
可选的,所述响应报文包括报文头,所述报文头包括内容字段,所述内容字段用于携带所述缓存索引信息。
可选的,所述响应报文包括报文头,所述报文头包括标识字段,所述标识字段用于携带所述标识信息。
可选的,所述处理模块32还用于:
判断当前时刻是否使能所述SF在所述响应报文中携带缓存索引信息;
若当前时刻使能所述SF在所述响应报文中携带缓存索引信息,则执行根据所述第一报文生成响应报文的步骤。
可选的,所述接收模块31还用于:
接收配置信息,所述配置信息用于使能所述SF在响应报文中携带缓存索引信息。
本实施例提供的SF,用于执行图3~图11所示实施例中SF执行的操作。技术原理和技术效果相似,此处不再赘述。
图17为本申请实施例三提供的SF的结构示意图。如图17所示,本实施例提供的SF,可以包括:处理器41、存储器42和收发器43,所述收发器43用于接收数据或者发送数据,所述存储器42用于存储指令,所述处理器41用于执行所述存储器42中存储的指令,用于执行图3~图11所示实施例中SF执行的操作。
本实施例提供的SF,用于执行图3~图11所示实施例中SF执行的操作。技术原理和技术效果相似,此处不再赘述。
本申请实施例还提供一种报文传输系统,包括图12所示实施例提供的SFF和图15所示实施例提供的SF;或者,包括图13所示实施例提供的SFF和图16所示实施例提供的SF;或者,包括图14所示实施例提供的SFF和图17所示实施例提供的SF。
应理解以上装置的各个模块的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且这些模块可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分模块通过处理元件调用软件的形式实现,部分模块通过硬件的形式实现。例如,信道评估模块可以为单独设立的处理元件,也可以集成在上述装置的某一个芯片中,此外,也可以以程序代码的形式存储于上述装置的存储器中,由上述装置的某一个处理元件调用并执行以上信道评估模块的功能。其它模块的实现与之类似。此外这些模块可以全部或部分集成在一起,也可以独立实现。这里所述的处理元件可以是一种集成电路,具有信号的处理能力。在实现过程中,上述方法的各步骤或以上各个模块可以通过处理器元件中的硬件的集成逻辑电路或者软件形式的指令完成。
例如,以上这些模块可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(application-specific integrated circuit,ASIC),或,一个或多个数字信号处理器(digital signal processor,DSP),或,一个或者多个现场可编程门阵列(field-programmable gate array,FPGA)等。再如,当以上某个模块通过处理元件调度程序代码的形式实现时,该处理元件可以是通用处理器,例如中央处理器(central processing unit,CPU)或其它可以调用程序代码的处理器。再如,这些模块可以集成在一起,以片上系统(system-on-a-chip,SOC)的形式实现。
在本申请实施例中,处理器可以是通用处理器、数字信号处理器、专用集成电路、现场可编程门阵列或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件,可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器 可以是微处理器或者任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。
在本申请实施例中,存储器可以是非易失性存储器,比如硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)等,还可以是易失性存储器(volatile memory),例如随机存取存储器(random access memory,RAM)。存储器是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何介质,但不限于此。本申请实施例中的存储器还可以是电路或者其它任意能够实现存储功能的装置,用于存储程序指令和/或数据。
可以理解的是,在本申请的实施例中涉及的各种数字编号仅为描述方便进行的区分,并不用来限制本申请的实施例的范围。
可以理解的是,在本申请的实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请的实施例的实施过程构成任何限定。

Claims (32)

  1. 一种报文的传输方法,其特征在于,包括:
    第一网络设备接收所述第一网络设备的上一跳设备发送的第一报文,所述第一报文包括段路由SR头;
    所述第一网络设备生成所述SR头的缓存索引信息,并存储所述缓存索引信息和所述SR头;
    所述第一网络设备根据所述第一报文生成第二报文,所述第二报文包括所述缓存索引信息且不包括所述SR头;
    所述第一网络设备向第二网络设备发送所述第二报文。
  2. 根据权利要求1所述的方法,其特征在于,所述缓存索引信息用于指示使能所述第一网络设备在所述第二报文中携带缓存索引信息。
  3. 根据权利要求1所述的方法,其特征在于,所述第二报文还包括标识信息,所述标识信息用于指示使能所述第一网络设备在所述第二报文中携带缓存索引信息。
  4. 根据权利要求1至3任一项所述的方法,其特征在于,所述第一网络设备生成所述SR头的缓存索引信息,包括:
    所述第一网络设备获取所述第一报文中的N元组信息,所述N元组信息用于指示所述第一报文所属的数据流,N为大于0的整数;
    所述第一网络设备根据所述N元组信息生成所述缓存索引信息。
  5. 根据权利要求1至3任一项所述的方法,其特征在于,还包括:
    所述第一网络设备接收所述第二网络设备发送的所述第二报文的响应报文,所述第二报文的响应报文包括所述缓存索引信息;
    所述第一网络设备根据所述缓存索引信息获取所述第一网络设备中存储的与所述缓存索引信息对应的SR头;
    所述第一网络设备根据所述第二报文的响应报文生成第三报文,所述第三报文包括所述SR头;
    所述第一网络设备向所述第一网络设备的下一跳设备发送所述第三报文。
  6. 根据权利要求1至3任一项所述的方法,其特征在于,所述第一网络设备接收所述第一网络设备的上一跳设备发送的第一报文之前,还包括:
    所述第一网络设备获取配置信息,所述配置信息用于使能所述第一网络设备在所述第二报文中携带缓存索引信息。
  7. 根据权利要求1至3任一项所述的方法,其特征在于,所述第二报文包括报文头,所述报文头包括内容字段,所述内容字段用于携带所述缓存索引信息。
  8. 根据权利要求3所述的方法,其特征在于,所述第二报文包括报文头,所述报文头包括标识字段,所述标识字段用于携带所述标识信息。
  9. 一种报文的传输方法,其特征在于,包括:
    第二网络设备接收第一网络设备发送的第二报文,所述第二报文包括缓存索引信息;
    所述第二网络设备根据所述第二报文生成响应报文,所述响应报文包括所述缓存索引信息;
    所述第二网络设备向所述第一网络设备发送所述响应报文。
  10. 根据权利要求9所述的方法,其特征在于,所述缓存索引信息用于指示使能所述第二网络设备在所述响应报文中携带缓存索引信息。
  11. 根据权利要求9所述的方法,其特征在于,所述响应报文还包括标识信息,所述标识信息用于指示使能所述第二网络设备在所述响应报文中携带缓存索引信息。
  12. 根据权利要求9至11任一项所述的方法,其特征在于,所述响应报文包括报文头,所述报文头包括内容字段,所述内容字段用于携带所述缓存索引信息。
  13. 根据权利要求11所述的方法,其特征在于,所述响应报文包括报文头,所述报文头包括标识字段,所述标识字段用于携带所述标识信息。
  14. 根据权利要求9至11任一项所述的方法,其特征在于,还包括:
    所述第二网络设备接收配置信息,所述配置信息用于使能所述第二网络设备在响应报文中携带缓存索引信息。
  15. 一种网络设备,用作第一网络设备,其特征在于,包括:
    接收模块,用于接收所述第一网络设备的上一跳设备发送的第一报文,所述第一报文包括段路由SR头;
    处理模块,用于生成所述SR头的缓存索引信息,并存储所述缓存索引信息和所述SR头;还用于根据所述第一报文生成第二报文,所述第二报文包括所述缓存索引信息且不包括所述SR头;
    发送模块,用于向第二网络设备发送所述第二报文。
  16. 根据权利要求15所述的网络设备,其特征在于,所述缓存索引信息用于指示使能所述第一网络设备在所述第二报文中携带缓存索引信息。
  17. 根据权利要求15所述的网络设备,其特征在于,所述第二报文还包括标识信息,所述标识信息用于指示使能所述第一网络设备在所述第二报文中携带缓存索引信息。
  18. 根据权利要求15至17任一项所述的网络设备,其特征在于,所述处理模块具体用于:
    所述第一网络设备获取所述第一报文中的N元组信息,所述N元组信息用于指示所述第一报文所属的数据流,N为大于0的整数;
    所述第一网络设备根据所述N元组信息生成所述缓存索引信息。
  19. 根据权利要求15至17任一项所述的网络设备,其特征在于,
    所述接收模块,还用于接收所述第二网络设备发送的所述第二报文的响应报文,所述第二报文的响应报文包括所述缓存索引信息;
    所述处理模块,还用于根据所述缓存索引信息获取所述第一网络设备中存储的与所述缓存索引信息对应的SR头;根据所述第二报文的响应报文生成第三报文,所述第三报文包括所述SR头;
    所述发送模块,还用于向所述第一网络设备的下一跳设备发送所述第三报文。
  20. 根据权利要求15至17任一项所述的网络设备,其特征在于,所述接收模块还用于:
    获取配置信息,所述配置信息用于使能所述第一网络设备在所述第二报文中携带缓 存索引信息。
  21. 根据权利要求15至17任一项所述的网络设备,其特征在于,所述第二报文包括报文头,所述报文头包括内容字段,所述内容字段用于携带所述缓存索引信息。
  22. 根据权利要求17所述的网络设备,其特征在于,所述第二报文包括报文头,所述报文头包括标识字段,所述标识字段用于携带所述标识信息。
  23. 一种网络设备,用作第二网络设备,其特征在于,包括:
    接收模块,用于接收第一网络设备发送的第二报文,所述第二报文包括缓存索引信息;
    处理模块,用于根据所述第二报文生成响应报文,所述响应报文包括所述缓存索引信息;
    发送模块,用于向所述第一网络设备发送所述响应报文。
  24. 根据权利要求23所述的网络设备,其特征在于,所述缓存索引信息用于指示使能所述第二网络设备在所述响应报文中携带缓存索引信息。
  25. 根据权利要求23所述的网络设备,其特征在于,所述响应报文还包括标识信息,所述标识信息用于指示使能所述第二网络设备在所述响应报文中携带缓存索引信息。
  26. 根据权利要求23至25任一项所述的网络设备,其特征在于,所述响应报文包括报文头,所述报文头包括内容字段,所述内容字段用于携带所述缓存索引信息。
  27. 根据权利要求25所述的网络设备,其特征在于,所述响应报文包括报文头,所述报文头包括标识字段,所述标识字段用于携带所述标识信息。
  28. 根据权利要求23至25任一项所述的网络设备,其特征在于,所述接收模块还用于:
    接收配置信息,所述配置信息用于使能所述第二网络设备在响应报文中携带缓存索引信息。
  29. 一种网络设备,用作第一网络设备,其特征在于,包括:处理器、存储器和收发器,所述收发器用于接收数据或者发送数据,所述存储器用于存储指令,所述处理器用于执行所述存储器中存储的指令,实现如权利要求1至8任一项所述的报文的传输方法。
  30. 一种网络设备,用作第二网络设备,其特征在于,包括:处理器、存储器和收发器,所述收发器用于接收数据或者发送数据,所述存储器用于存储指令,所述处理器用于执行所述存储器中存储的指令,实现如权利要求9至14任一项所述的报文的传输方法。
  31. 一种计算机可读存储介质,其特征在于,其上存储有计算机执行指令,当所述计算机执行指令被至少一个处理器执行时,实现如权利要求1至14任一项所述的报文的传输方法。
  32. 一种报文传输系统,其特征在于,包括如权利要求15至22任一项所述的第一网络设备和如权利要求23至28任一项所述的第二网络设备;或者;包括如权利要求29所述的第一网络设备和如权利要求30所述的第二网络设备。
PCT/CN2020/078323 2019-03-08 2020-03-07 报文的传输方法和设备 WO2020182085A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP20770590.6A EP3920512A4 (en) 2019-03-08 2020-03-07 TRANSMISSION METHOD AND DEVICE FOR A MESSAGE
US17/469,222 US11956148B2 (en) 2019-03-08 2021-09-08 Packet transmission method and device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910176371.8A CN111669422B (zh) 2019-03-08 2019-03-08 报文的传输方法和设备
CN201910176371.8 2019-03-08

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/469,222 Continuation US11956148B2 (en) 2019-03-08 2021-09-08 Packet transmission method and device

Publications (1)

Publication Number Publication Date
WO2020182085A1 true WO2020182085A1 (zh) 2020-09-17

Family

ID=72381899

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/078323 WO2020182085A1 (zh) 2019-03-08 2020-03-07 报文的传输方法和设备

Country Status (4)

Country Link
US (1) US11956148B2 (zh)
EP (1) EP3920512A4 (zh)
CN (2) CN111669422B (zh)
WO (1) WO2020182085A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020104021A1 (en) * 2018-11-20 2020-05-28 Huawei Technologies Co., Ltd. Devices and methods for time sensitive communication in a communication network
CN114221898B (zh) * 2021-12-29 2023-11-10 优刻得科技股份有限公司 报文处理方法及网络系统
US20230246957A1 (en) * 2022-02-03 2023-08-03 3nets.io, Inc. Tunneling extension header for segment routing

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1516400A (zh) * 2003-01-06 2004-07-28 华为技术有限公司 在网络链路上实现快速传输桥接数据的方法
US6831898B1 (en) * 2000-08-16 2004-12-14 Cisco Systems, Inc. Multiple packet paths to improve reliability in an IP network
CN102984068A (zh) * 2012-11-23 2013-03-20 汉柏科技有限公司 实现报文穿越网络地址转换设备的方法
CN106411738A (zh) * 2015-07-30 2017-02-15 中兴通讯股份有限公司 Ipv6报文封装的处理方法和装置
CN108023815A (zh) * 2016-11-03 2018-05-11 中兴通讯股份有限公司 信息传输方法、装置及系统
CN108809759A (zh) * 2018-05-29 2018-11-13 新华三技术有限公司 检测链路状态的方法、装置和路由器

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100512128C (zh) * 2007-01-19 2009-07-08 华为技术有限公司 保护组播转发路径的方法和系统和业务路由器
CA2691355C (en) * 2007-06-19 2023-10-17 Telefonaktiebolaget L M Ericsson (Publ) Methods and systems for scheduling resources in a telecommunication system
US9992251B2 (en) * 2014-07-18 2018-06-05 Cisco Technology, Inc. Segment routing support in MPEG dash
CN104618447B (zh) * 2014-12-31 2018-06-08 北京邮电大学 一种文件协同下载方法及系统
US10164875B2 (en) * 2016-02-22 2018-12-25 Cisco Technology, Inc. SR app-segment integration with service function chaining (SFC) header metadata
US10506083B2 (en) * 2017-06-27 2019-12-10 Cisco Technology, Inc. Segment routing gateway storing segment routing encapsulating header used in encapsulating and forwarding of returned native packet
CN109392147B (zh) 2017-08-11 2021-07-16 华为技术有限公司 通信方法和装置
US10805181B2 (en) * 2017-10-29 2020-10-13 Nicira, Inc. Service operation chaining
CN113489641A (zh) 2017-12-22 2021-10-08 华为技术有限公司 一种网络中传输报文的方法和节点
EP3793245A4 (en) 2018-05-18 2021-12-15 Beijing Xiaomi Mobile Software Co., Ltd. PROCEDURE AND DEVICE FOR PREAMBLE TRANSMISSION AND PLANNING REQUEST
CN108901049B (zh) * 2018-06-28 2021-02-02 武汉虹信科技发展有限责任公司 一种用于sr过程恢复专有承载的方法
CN109067657B (zh) * 2018-08-24 2021-03-26 新华三技术有限公司 一种报文处理方法和装置
CN109067652A (zh) * 2018-09-25 2018-12-21 盛科网络(苏州)有限公司 一种IPv6分段路由中节约段标识开销的方法及装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6831898B1 (en) * 2000-08-16 2004-12-14 Cisco Systems, Inc. Multiple packet paths to improve reliability in an IP network
CN1516400A (zh) * 2003-01-06 2004-07-28 华为技术有限公司 在网络链路上实现快速传输桥接数据的方法
CN102984068A (zh) * 2012-11-23 2013-03-20 汉柏科技有限公司 实现报文穿越网络地址转换设备的方法
CN106411738A (zh) * 2015-07-30 2017-02-15 中兴通讯股份有限公司 Ipv6报文封装的处理方法和装置
CN108023815A (zh) * 2016-11-03 2018-05-11 中兴通讯股份有限公司 信息传输方法、装置及系统
CN108809759A (zh) * 2018-05-29 2018-11-13 新华三技术有限公司 检测链路状态的方法、装置和路由器

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3920512A4

Also Published As

Publication number Publication date
CN114827269A (zh) 2022-07-29
CN111669422A (zh) 2020-09-15
EP3920512A1 (en) 2021-12-08
US20210409318A1 (en) 2021-12-30
EP3920512A4 (en) 2022-03-16
CN111669422B (zh) 2022-03-11
US11956148B2 (en) 2024-04-09

Similar Documents

Publication Publication Date Title
US11411770B2 (en) Virtual port channel bounce in overlay network
US10320664B2 (en) Cloud overlay for operations administration and management
CN109218178B (zh) 一种报文处理方法及网络设备
US10116559B2 (en) Operations, administration and management (OAM) in overlay data center environments
US11374862B2 (en) Packet sending and processing method and apparatus, PE node, and node
US10333836B2 (en) Convergence for EVPN multi-homed networks
US11979322B2 (en) Method and apparatus for providing service for traffic flow
US20200220745A1 (en) Packet Communications Providing Packet Processing Efficiencies in a Network including Using a Segment Routing and Tunnel Exchange
WO2020182085A1 (zh) 报文的传输方法和设备
US11057317B2 (en) Synchronizing multicast router capability towards ethernet virtual private network (EVPN) multi-homed protocol independent multicast (PIM) device
US11765077B1 (en) Ping and traceroute in inter-autonomous system (AS) segment routing (SR) networks without requiring headend router or path monitoring system (PMS) controller knowledge of topology outside of origin AS
WO2021093463A1 (zh) 报文转发的方法、第一网络设备以及第一设备组
US11356372B2 (en) Data traffic processing method, device, and system
US20230308386A1 (en) Packet Transmission Method and Apparatus
US11057295B1 (en) Loop avoidance and egress link protection with ethernet virtual private network (EVPN) fast reroute (FRR)
CN113765809A (zh) Bier组播流量的统计方法、设备以及系统
JPWO2004066562A1 (ja) データ転送装置
CN114301839B (zh) 一种组播报文传输方法及装置
US20230327972A1 (en) Network node-to-node connectivity verification including data path processing of packets within a packet switching device
WO2024001701A1 (zh) 数据处理方法、装置及系统
EP3701686B1 (en) Optimized datapath troubleshooting
WO2022140031A1 (en) Bit index explicit replication traffic engineering fast reroute

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20770590

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020770590

Country of ref document: EP

Effective date: 20210831

NENP Non-entry into the national phase

Ref country code: DE