WO2020199863A1 - 报文处理的方法和网络装置 - Google Patents

报文处理的方法和网络装置 Download PDF

Info

Publication number
WO2020199863A1
WO2020199863A1 PCT/CN2020/078610 CN2020078610W WO2020199863A1 WO 2020199863 A1 WO2020199863 A1 WO 2020199863A1 CN 2020078610 W CN2020078610 W CN 2020078610W WO 2020199863 A1 WO2020199863 A1 WO 2020199863A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
header
ioam
flow
flow identifier
Prior art date
Application number
PCT/CN2020/078610
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 EP20782786.6A priority Critical patent/EP3896932B1/en
Publication of WO2020199863A1 publication Critical patent/WO2020199863A1/zh
Priority to US17/386,657 priority patent/US20210359939A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/20Hop count for routing purposes, e.g. TTL
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/38Flow based routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2441Traffic characterised by specific attributes, e.g. priority or QoS relying on flow classification, e.g. using integrated services [IntServ]

Definitions

  • This application relates to the field of data communication, and in particular to a method and network device for message processing.
  • On-line operation management and maintenance (in-situ operations, administration and maintenance or inband operations, administration and maintenance, IOAM) nodes on the message transmission path can IOAM encapsulate business data messages, that is, insert an IOAM header in the message (IOAM header).
  • the network node needs to perform in-depth message analysis on the IOAM message, thereby classifying the message flow.
  • the network node has a large overhead and a low forwarding performance.
  • the embodiments of the present application provide a method and a network device for message processing, which can reduce the overhead of network nodes and improve forwarding performance.
  • a message processing method including: a current network node receives a first message, the first message including an Internet Protocol IP message payload and a specific header; The flow identifier corresponding to the first packet, the first packet does not include the flow identifier, the feature of the first packet corresponds to the flow identifier, and the feature of the first packet is located in the first packet.
  • the header of the message the current network node obtains a second message according to the first message and the flow identifier, the second message including the flow identifier and the IOAM header, the second The flow identifier in the message is located before the IOAM header; the current network node sends the second message to the next network node.
  • the above technical solution solves the problem that as the number of nodes passing through the IOAM increases, in order to perform flow classification on subsequent nodes, the detection depth of the message increases, resulting in increased consumption delay and increased impact on forwarding performance.
  • the flow identifier is located in the Hop-by-Hop Options header.
  • the flow identifier corresponds to a field of the header of the first packet, and the size of the flow identifier is smaller than that of the field of the header of the first packet. size.
  • a message processing method including: a network node receives an in-band operation, maintenance and management IOAM message, the IOAM message includes a flow identifier, and the flow identifier is located before the IOAM header of the IOAM message
  • the flow identifier corresponds to the feature of the IOAM message, the feature of the IOAM message is located in the header of the IOAM message, and the header of the IOAM message and the IOAM header are not the same header ;
  • the network node processes the IOAM message according to the flow identifier.
  • the above technical solution solves the problem that as the number of IOAM nodes increases, in order to perform flow classification, the detection depth of the message increases, resulting in increased consumption delay and increased impact on forwarding performance.
  • the flow identifier is located in the Hop-by-Hop Options header.
  • the flow identifier corresponds to a field of the header of the IOAM message, and the size of the flow identifier is smaller than the size of the field of the header of the IOAM message.
  • the processing the IOAM message according to the flow identifier includes: looking up a flow classification table according to the flow identifier to obtain a traffic behavior, the The linear table records the flow identifier and the traffic behavior; according to the traffic behavior, the IOAM message is processed.
  • the flow classification table is stored in a random access memory RAM.
  • Subsequent network nodes do not rely on the creation of complex flow templates, and do not rely on and repeat the same matching process based on message characteristics. Only through the flow classification table stored in the random access memory RAM, different flows can be processed differently. Reduces the demand for ACL tables and reduces costs.
  • a network device for packet processing including: a receiving unit for receiving a first packet; a determining unit for determining a flow identifier corresponding to the first packet, and the first packet
  • the message does not include the flow identifier, the feature of the first message corresponds to the flow identifier, and the feature of the first message is located at the head of the first message;
  • the obtaining unit is configured to A message and the flow identifier to obtain a second message, the second message including the flow identifier and an IOAM header, and the flow identifier in the second message is located before the IOAM header;
  • the sending unit is configured to send the second message to the next network node.
  • the flow identifier is located in the Hop-by-Hop Options header.
  • the flow identifier corresponds to a field of the header of the first packet, and the size of the flow identifier is smaller than that of the field of the header of the first packet. size.
  • a network device for message processing including: a receiving unit configured to receive an in-band operation, maintenance and management IOAM message, the IOAM message including a flow identifier, and the flow identifier is located in the IOAM message Before the IOAM header of the IOAM, the flow identifier corresponds to the characteristics of the IOAM message, the characteristics of the IOAM message are located in the header of the IOAM message, the header of the IOAM message and the IOAM header The header is not the same; the processing unit is configured to process the IOAM message according to the flow identifier.
  • the flow identifier is located in the Hop-by-Hop Options header.
  • the flow identifier corresponds to a field of the header of the IOAM message, and the size of the flow identifier is smaller than the size of the field of the header of the IOAM message.
  • the processing unit is further configured to, according to the flow identifier, look up a flow classification table to obtain traffic behavior, the flow classification table is a linear table, and the linear table records The flow identifier and the traffic behavior; according to the traffic behavior, the IOAM message is processed.
  • the flow classification table is stored in a random access memory RAM.
  • a communication device including: at least one processor and a communication interface, the communication interface is used for the communication device to exchange information with other communication devices, when the program instructions are executed in the at least one processor At this time, the communication device is caused to execute the above method.
  • a computer program storage medium characterized in that the computer program storage medium has program instructions, and when the program instructions are executed, the above method is executed.
  • a chip is provided.
  • the chip system includes at least one processor, and when a program instruction is executed in the at least one processor, the above method is executed.
  • Fig. 1 is an example diagram of an application scenario of an embodiment of the present application.
  • Figure 2 is a schematic diagram of the format of an IOAM message.
  • Fig. 3 is a schematic diagram of a flow classification process of a traditional network node.
  • FIG. 4 is a schematic flowchart of a message processing method provided by an embodiment of the present application.
  • Fig. 5 is a schematic diagram of a message format of the sixth version of the Internet Protocol provided by an embodiment of the present application.
  • Fig. 6 is a schematic diagram of a format of a hop-by-hop option header provided by an embodiment of the present application.
  • FIG. 7 is a schematic flowchart of creating a flow template provided by an embodiment of the present application.
  • FIG. 8 is a schematic flowchart of a message processing method provided by another embodiment of the present application.
  • Fig. 9 is an example diagram of a flow classification process of a network node in an embodiment of the present application.
  • Fig. 10 is an example diagram of a message processing process provided by an embodiment of the present application.
  • Fig. 11 is a schematic diagram of a message format in an embodiment of the present application.
  • FIG. 12 is an example diagram of a message processing process based on flow identification provided by an embodiment of the present application.
  • FIG. 13 is a schematic structural diagram of a packet processing network device provided by an embodiment of the present application.
  • FIG. 14 is a schematic structural diagram of another packet processing network device provided by an embodiment of the present application.
  • FIG. 15 is a schematic structural diagram of a communication device provided by an embodiment of the present application.
  • the process of message transmission on the network usually passes through many network nodes. Taking Figure 1 as an example, the message will pass through network node 1 to network node 4 in sequence.
  • the message can be an Internet Protocol (IP) message, for example, it can be an Internet Protocol Version 4 (IPv4) message, or it can be an Internet Protocol Version 6 (Internet Protocol Version 6, IPv6) message. Text, or other types of messages.
  • IP Internet Protocol
  • IPv4 Internet Protocol Version 4
  • IPv6 Internet Protocol Version 6
  • Text or other types of messages.
  • the network node can be a router or a switch.
  • the network node can be a router or a switch.
  • IOAM Online operations management and maintenance
  • OAM data communication network operations, administration and maintenance
  • IOAM data content is encapsulated into business data messages, and is transmitted over the network as part of the business data messages.
  • IOAM data content can also be called IOAM information.
  • the network node 1 to the network node 4 in FIG. 1 may be IOAM transmission nodes.
  • the IOAM transmission node is a node on the transmission path of the service data message that needs to process the IOAM data content. As the number of IOAM nodes that the message passes through increases, the forwarding delay increases and the forwarding performance decreases.
  • the IOAM node can add IOAM information to the message.
  • IOAM information can be carried in the IOAM header.
  • the IOAM node may insert an IOAM header in the message, or set the value of the IOAM header in the message.
  • the method of inserting an IOAM header in the message is called the incremental mode.
  • the method of setting the value of the IOAM header in the message is called the pre-allocation mode.
  • the IOAM ingress node may determine the IOAM encapsulation of the IOAM ingress node according to the configuration information of the IOAM intermediate node and the egress node.
  • the IOAM configuration information of the IOAM intermediate node may include the node tracking type, for example.
  • the tracking type can be used to indicate whether the node uses the pre-allocation mode or the incremental mode to insert node information.
  • the IOAM configuration information may also include the number of bytes that the node information needs to occupy.
  • the IOAM intermediate node inserts node information in an incremental mode, then the node performs IOAM encapsulation, and inserts the IOAM header of the corresponding node in the service data message. If the node information is inserted in the pre-allocation mode, the node inserts the node information in the pre-allocated position of the received message.
  • the IOAM ingress node may determine whether to pre-allocate the IOAM field according to the configuration information of the IOAM intermediate node and the egress node.
  • the IOAM ingress node can configure the IOAM intermediate node and the egress node, for example, configure the tracking type of the IOAM intermediate node and the egress node.
  • the IOAM node on the message transmission path can perform IOAM encapsulation on the message.
  • IOAM encapsulation is to insert an IOAM header (IOAM header) in the business data message.
  • IOAM header IOAM header
  • IOAM can realize some functions that out-of-band OAM cannot realize, such as detecting the network nodes that the business data message actually passes through, verifying whether the transmission path of the business data is consistent with expectations, and adding serial number information to the business data message To detect packet loss and disorder, etc.
  • the IOAM entry node (IOAMingress node) and the intermediate node (IOAM transit node) can insert the IOAM header (IOAM head) for the packets of the specified service flow.
  • the IOAM header contains the timestamp, node identification (ID), interface ID, Information such as sequence number (sequence number).
  • the IOAM entry node may also be called the IOAM head node.
  • the IOAM egress node can insert information such as time stamp, node identification (ID), interface ID, sequence number (sequence number), etc., into the message of the specified service flow, or not insert the above information into the message.
  • the IOAM exit node decapsulates the message, it can send the collected data to the analyzer. For example, it can send all the collected data to the analyzer, or it can send the collected data in a specified period to the analyzer.
  • the collected data can include the information in the IOAM header inserted in the message by the IOAM ingress node and the IOAM intermediate node, and can also include the timestamp, node identification (ID), and interface ID of the specified service flow message corresponding to the IOAM egress node. , Sequence number (sequence number) and other information.
  • the IOAM exit node may also be called the IOAM tail node.
  • the IOAM exit node decapsulates the message, that is, removes the IOAM header in the message.
  • the analyzer is also called the collection analyzer, which can analyze the packets in the statistical period, obtain the information of each node, and compare the serial number of the packet with the serial number of the receiving end. The difference is the lost packet.
  • the IOAM exit node The reported sequence number of each node can calculate the specific packet loss location.
  • the IOAM message includes an IOAM header.
  • the IOAM message can pass through the IOAM network node during transmission.
  • the IOAM message may specifically be an IP message.
  • the IP message includes the IP header and the IP message payload.
  • the IOAM header of the IOAM message can be located after the IP header of the message. Specifically, the IOAM header may be located in the IP packet payload of the packet.
  • the IOAM header may include IOAM information.
  • the IOAM message can include: destination address (DA), source address (source address, SA), virtual local area network (VLAN) protocol, Ethernet type (EthType), IPv6 header Part, IOAM header, transmission control protocol (transmission control protocol, TCP)/user datagram protocol (user datagram protocol, UDP), data (data).
  • the IPv6 header may be adjacent to the Hop-by-Hop Options header.
  • Hop-by-Hop Options header you can refer to RFC2460 issued by the Internet Engineering Task Force (IETF).
  • the Hop-by-Hop Options header may include option type, option type length, reserved fields, etc.
  • the Hop-by-Hop Options header may also include extended fields.
  • the extension header after the IPv6 header can be determined as the IOAM header according to the selection type value in the Hop-by-Hop Options header.
  • the IP packet payload in the packet may include data.
  • the payload of the IP message may also include an upper layer header, such as a TCP header or a UDP header.
  • the payload of the IP message in the message is after the IP header.
  • the IP header and the IP packet payload may be adjacent, and there may also be one or more extension headers between the IP header and the IP packet payload. For example, there may be a Hop-by-Hop Options header between the IP header and the IP packet payload.
  • the IOAM header may be located in the extension field of the Hop-by-Hop Options header of the message. The field before the data in the message can be called the header of the message.
  • the IOAM header may include node data.
  • Node data can also be called IOAM information.
  • the IOAM header can be inserted by the IOAM entry node, intermediate node, or exit node.
  • the IOAM header may include: IOAM trace type (IOAM trace type), field length (octets-left), flag (flag), and n node data.
  • the information specifically included in the IOAM header can be identified by the IOAM tracking type, that is, the content of the node data can be identified.
  • the IOAM header may be inserted by the IOAM entry node.
  • the trace-type can have 16 bits, and can include: hop limit (similar to time to live (TTL)) and passed node ID, inbound and outbound interface ID, node seconds Time stamp, nanosecond time stamp of the node, node forwarding delay, node application related data used for uplink statistics, currently used for uplink statistics, node queue depth, arbitrary data, hop limit (similar to TTL) and passing nodes ID (wide format), incoming interface and outgoing interface ID (wide format), node application related data for downlink statistics, etc.
  • hop limit similar to time to live (TTL) and passed node ID, inbound and outbound interface ID, node seconds Time stamp, nanosecond time stamp of the node, node forwarding delay, node application related data used for uplink statistics, currently used for uplink statistics, node queue depth, arbitrary data, hop limit (similar to TTL) and passing nodes ID (wide format), incoming interface and outgoing interface ID (wide format), node application related data for downlink statistics, etc.
  • ACL access control list, access control list
  • Network nodes usually use ACLs to identify service flows.
  • the network node can filter the packets passing through the network node.
  • Network nodes usually use access control lists (access control lists, ACLs) to implement the above functions.
  • the ACL can be an IPv4 ACL, IPv6 ACL, or user ACL.
  • ACL classifies packets through a series of matching conditions. These conditions can be one or more characteristics of packets.
  • the characteristics of the message may include, for example, the source media access control (SMAC) address of the message, the destination media access control (DMAC) address, and the service provider virtual local area network.
  • SMAC source media access control
  • DMAC destination media access control
  • SVLAN customer virtual local area network
  • CVLAN customer virtual local area network
  • priority priority
  • PRI priority, PRI
  • source IP address destination IP address, etc.
  • ACLs can be divided into basic ACLs, advanced ACLs, Layer 2 ACLs and user-defined ACLs.
  • Basic ACL can formulate rules based only on the three-layer information.
  • the three-layer information may include, for example, a source IP address, a destination IP address, and so on.
  • Advanced ACL can formulate rules based on the third and fourth layer information of the data packet.
  • the four-layer information may include, for example, the protocol type and protocol characteristics carried by the IP, such as UDP or TCP header information.
  • the Layer 2 ACL formulates rules based on the Layer 2 information.
  • Layer 2 information may include source MAC address, destination MAC address, VLAN priority, Layer 2 protocol type, etc.
  • User-defined ACL Based on the header of the data packet, specify the number of bytes to start the "AND" operation, and compare the character string extracted from the message with the user-defined character string to find the matching packet Text. Different ACLs can be distinguished based on ACL sequence numbers.
  • the layer-2 header of the message may include layer-2 information
  • the layer-3 header of the message may include layer-3 information
  • the layer-4 header of the message may include layer-4 information.
  • the data packet matching rules defined by ACL can be referenced by other functions that need to distinguish traffic, such as the definition of traffic classification rules in QoS.
  • Traffic classifier is based on ACL, and matches and classifies packets according to the characteristics of the packets (also referred to as flow characteristics).
  • Flow classification can include simple flow classification and complex flow classification. Different types of flow classifications use different characteristics for matching. Taking complex traffic classification as an example, different types of ACLs can be used to classify packets.
  • the features used for matching classification can be the two-tuple (source IP address, destination IP address), triple (source IP address, destination IP address, protocol number), and quadruple (source IP address, destination IP) of the message Address, source port and destination port) or five-tuple (source IP address, source port number, protocol number, destination IP address, destination port number), etc.
  • the network node can count the flow to obtain the message sequence number. For example, you can match ACLs to obtain statistical IDs and perform statistics on packets.
  • the current network node can write the message serial number into the IOAM header of the message.
  • Network nodes can also perform corresponding traffic behaviors (or flow actions) according to the classification results. For example, operations such as priority mapping, marking coloring, and committed access rate (CAR) statistics can be performed on the message.
  • the following takes complex flow classification as an example to briefly introduce the processing flow of IOAM node flow classification.
  • the process of complex flow classification roughly includes: template creation (S301), rule issuance (S302), and rule matching (S303).
  • the network node may create a flow template for a specific flow.
  • Flow templates can be used to record matching rules for flow classification and corresponding traffic behaviors.
  • the flow template may include a flow policy template (or called a traffic template) and a flow classification template.
  • the network node may deliver and store the created flow template in the ternary content addressable memory (TCAM) table of the network node.
  • TCAM ternary content addressable memory
  • step S303 after the stream of packets enters the interface of the network node, the network node can use the TCAM table to perform matching according to rules.
  • the network node can count the messages according to the matching results and process the messages. For example, the network node can count the flow and write the serial number into the IOAM header. The sequence number can be used to calculate packet loss and packet loss location. The network node can also process the message according to the corresponding flow action, for example, perform the corresponding traffic behavior.
  • the IOAM exit node can report the serial number information to the collector.
  • the collector can calculate the packet loss according to the serial number of each IOAM node, and can also calculate the location of the packet loss.
  • each network node that classifies packets needs to create a complex template and repeat the same matching process based on packet characteristics.
  • some network nodes obtain the information after the IOAM header to classify packets. If the forwarding path is long and there are many IOAM nodes that pass through, in-depth message analysis is required, which consumes long delay and reduces forwarding performance. At the same time, each network node needs to occupy ACL resources, which consumes a lot of hardware resources, resulting in a waste of system resources.
  • the network node may need to parse the UDP/TCP header of the packet to obtain the port number.
  • the UDP/TCP header is located in the IP packet payload.
  • this application proposes a message processing method.
  • the following describes the embodiments of the present application in detail with reference to FIG. 4.
  • Fig. 4 is a schematic flowchart of a message processing method proposed by this application.
  • the method in FIG. 4 includes steps S401 to S404.
  • step S401 the current network node receives the first message.
  • the first message may include an Internet Protocol IP message payload and a specific header, and the specific header in the first message is located before the IP message payload.
  • the specific header is the header before the IP packet payload in the first packet.
  • the specific header can be an IP header or a lower layer header.
  • the layer of the lower-level header is lower than the layer of the IP header.
  • the IP header is located on the third layer.
  • the low-level head can be located at the second or 2.5th level.
  • the specific header may include the Layer 2 header of the first message.
  • the specific header may also include the 2.5 layer header of the first message.
  • the layer 2.5 header may also be referred to as a multiprotocol label switching (Multiprotocol Label Switching, MPLS) header.
  • MPLS Multiprotocol Label Switching
  • the first message may have the format shown in FIG. 2, and the first message may not contain the IOAM header in the format shown in FIG. 2, or it may not contain the IOAM header and the Hop-by-Hop Options header.
  • the current network node may be the first node on the forwarding path of the flow corresponding to the first packet, or may be an intermediate node on the forwarding path of the flow corresponding to the first packet.
  • the current network node may be an IOAM entry node, and the first packet may not include the IOAM header.
  • the current network node may also be an IOAM intermediate node, and the first message may include an IOAM header.
  • step S402 the current network node determines a flow identifier corresponding to the first packet.
  • the first message does not include the flow identifier.
  • the flow identifier corresponds to the characteristics of the first message.
  • the feature of the first message is located at the head of the first message.
  • the current network node may match the characteristics of the first packet with the flow template to obtain the flow identifier of the flow corresponding to the first packet.
  • the flow identifier corresponding to the first packet may also be considered as the flow identifier corresponding to the feature of the first packet.
  • the flow template may record the correspondence between the characteristics of the first message and the flow identification (Flow ID).
  • the flow template can be used to perform simple flow classification on the packets received by the current network node, and can also be used to perform complex flow classification on the packets received by the current network node.
  • the feature of the first message may specifically be a field in the header of the first message.
  • the feature of the first packet may be the destination IP address in the IP header of the first packet, or the feature of the first packet may be the destination IP address and the source IP address in the IP header of the first packet .
  • the feature of the first message may be a 5-tuple of the first message.
  • the five-tuple may include a source IP address, a destination IP address, a source port, a destination port, and a protocol.
  • the source IP address, destination IP address, and protocol are fields in the IP header of the first packet.
  • the source port and the destination port may be fields in the TCP header or the UDP header of the first packet.
  • multiple packets with the same characteristics are called streams. Having the same characteristics means that multiple messages have fields of the same type, and the values of the fields of the same type in the multiple messages are equal. Fields of the same type can be one field or multiple fields. Take the source IP address of the message as an example.
  • classifying packets based on source and destination IP addresses is a coarse-grained flow classification method.
  • multiple packets belonging to the same flow have the same characteristics, and multiple packets belonging to different flows have different characteristics.
  • multiple packets belonging to the same flow correspond to the same flow identifier.
  • Multiple packets belonging to different flows correspond to different flow identifiers. For example, assuming that message 1 and message 2 belong to the same flow, message 1 corresponds to flow ID 1, and message 2 corresponds to flow ID 1. For another example, suppose that message 3 and message 4 belong to different flows, then message 3 corresponds to flow identifier 2, and message 4 corresponds to flow identifier 3.
  • the first message includes the header of the first message.
  • the header of the first message includes the characteristics of the first message, that is, the header of the first message includes the fields of the characteristics of the first message. For example, if the characteristics of the first message include the source IP address and/or the destination IP address, the header of the first message includes the IP header, and the source and destination IP addresses of the first message are located in the first message. IP header; the characteristics of the first packet include the source IP address and source port number, the source IP address of the first packet is located in the IP header of the first packet, and the source port number of the first packet is located in the first packet UDP/TCP header, the header of the first message includes IP header and UDP/TCP header.
  • the header of the first message may include one or more headers.
  • the first message may include an IOAM header, and the header of the first message does not include an IOAM header.
  • the size of the flow identifier may be greater than, equal to, or smaller than the size of the field of the header of the first message.
  • the size of the stream identifier refers to the number of bits contained in the stream identifier.
  • the field of the header of the first message refers to the number of bits contained in the field of the header of the first message. For example, when the feature of the first message is the destination IP address, the feature size of the first message is 32 bits or 128 bits.
  • the field of the header of the first packet corresponding to the flow identifier may be one or more fields where the characteristics of the first packet matched with the flow template are located.
  • the size of the flow identifier is smaller than the size of the field in the header of the first packet, which can reduce the length of the field for subsequent nodes to parse the packet for flow classification, and reduce the time delay consumed.
  • the flow identifier can be used to identify the flow to which the message belongs (or called a service flow or a data flow).
  • the flow identifier can be used by a network node to classify packets, and the network node can be an IOAM node or a non-IOAM network node.
  • the flow identifier may be added to the flow template during the process of creating the flow template, and will be described in detail below in conjunction with specific embodiments, and will not be described in detail here.
  • step S403 the current network node obtains a second packet according to the first packet and the flow identifier.
  • the current network node is an IOAM entry node.
  • the current network node may receive configuration information of the IOAM intermediate node and the IOAM exit node.
  • the second message includes the flow identifier and an IOAM header, and the flow identifier in the second message is located before the IOAM header.
  • the second message may include the first message.
  • the current network node can insert the field of the flow identifier in the first message.
  • the current network node can insert the Hop-by-Hop Options header in the first message, and the flow identifier is located in the Hop-by-Hop Options header.
  • the current network node may insert an extension field in the Hop-by-Hop Options header of the first message, and the flow identifier is located in the extension field.
  • the second message may include a part of the second message.
  • the current network node can change the value of some fields in the first message, that is, write the flow identifier in the field. For example, referring to the format of the message in Figure 2, the current network node can change the Hop-by-Hop Options header field reserved 1 to flow identifier.
  • the flow identifier in the second message may be located in the IP header or a specific header.
  • the specific header may include the layer 2 header of the first packet, and may also include the layer 2.5 header of the first packet and other fields before the IP header.
  • the current network node can write the flow identifier before the IOAM header of the first message to obtain the second message.
  • the IP header included in the second packet and the IP header included in the first packet are different.
  • the IP header of the second packet adds a field for carrying a flow label.
  • the second message may pass through an IOAM node, that is, an IOAM node exists on the forwarding path of the second message.
  • the current network node may be an IOAM node.
  • the current network node may write the serial number of the first message into the header of the current network node IOAM message of the message, and the serial number is determined according to the flow identifier.
  • the sequence number can be used to calculate the packet loss and/or packet loss location.
  • the current network node IOAM message header is inserted into the message by the current network node.
  • the current network node may be an IOAM ingress node.
  • the current network node can insert the IOAM header of the current network node in the first message, that is, the current network node can add IOAM information in an incremental mode. That is to say, the current network node may add a field to make the second message include the IOAM header of the current network node, and the added field includes the IOAM header of the current network node.
  • the current network node may be an IOAM intermediate node.
  • the current network node can insert the IOAM header of the current network node into the first message to obtain the second message.
  • the second message may include the first message, and the current network node may insert the flow identifier field and the IOAM header in the first message.
  • the current network node may also change part of the fields in the IOAM header of the first message, and the changed part of the fields in the second message includes the IOAM header of the current network node, that is, the current network node may use the pre-allocation mode to add IOAM information. That is, the current network node will set the value of some fields of the IOAM header as the IOAM information of the current network node.
  • the current network node can obtain the sequence number of the first packet according to the flow classification result.
  • the current network node may obtain the sequence number corresponding to the first packet according to the flow identifier.
  • the current network node can write the serial number into the current network node IOAM header of the first message or the second message.
  • the IOAM header of the current network node may be inserted into the first message by the current network node.
  • the IOAM header may further include one or more of the timestamp, current network node ID, interface ID and other information corresponding to the first message.
  • the IOAM header can be located after the IP header of the message.
  • the flow identifier can be located in a specific header of the second packet, for example, it can be located in the second packet's layer 2 header, 2.5 layer header, IP header or extension in the layer 3 header. head.
  • the Layer 3 header of the message may include the IP header.
  • the Layer 2 header of the message can be located before the Layer 3 header.
  • the 2.5-layer header of the message can be located before the third-layer header and behind the second-layer header of the message.
  • the flow identifier may be located in the MPLS header, and the MPLS header is located in the layer 2.5 header of the packet.
  • the flow identifier may be located in the IP header or the extended header of the IP header of the second packet.
  • the second packet is an IPv6 packet
  • the flow identifier may be located in the Hop-by-Hop Options header of the IP header of the second packet, and this method does not affect the prior art.
  • the second message includes an IOAM header, that is, the second message is an IOAM message, and the flow identifier may be located before the IOAM header of the second message.
  • step S404 the current network node sends a second message to the next network node.
  • the flow identifier of the flow corresponding to the first packet is written into the first packet to obtain the second packet.
  • Subsequent IOAM nodes on the message transmission path can process the message according to the flow identifier, which reduces the depth of message parsing, reduces transmission delay, and improves forwarding performance.
  • Subsequent nodes do not rely on generating complex flow templates based on message characteristics and performing complex packet matching classification based on the flow templates, thereby simplifying the implementation of flow classification in subsequent network nodes.
  • the second message is a flow identification message containing the flow identification.
  • the second message may include the first type information, and the first type information may be used to determine that the second message is a flow identification message carrying a flow identification.
  • Subsequent network nodes may determine that the second packet is a flow identification packet carrying a flow identification through the first type information.
  • the first type information may be located in the IP header or a field before the IP header of the second packet.
  • the first type of information may be located in the Layer 2 header or the Layer 2.5 header of the message.
  • the second packet is an IPv6 packet, and the first type information may be located in the option type (option type) field of the Hop-by-Hop Options header.
  • the first type of information can be written into the message by the current network node. For example, the selected type can be written into the first message before or at the same time when the current network node writes the flow identifier, or the current network node The first selection type is written into the second message.
  • the current network node can process the message.
  • the method for processing the message may include: obtaining configuration information corresponding to the flow.
  • the method of obtaining the configuration information corresponding to the flow may be by matching multiple characteristics of the first packet with the flow template, and at the same time obtaining the flow identification and configuration information of the flow corresponding to the first packet; or in step S402
  • the characteristics of a message are matched with the flow template, and after the flow identifier of the flow corresponding to the first message is obtained, the configuration information is obtained through the flow identifier.
  • the configuration information may include the traffic behavior corresponding to the stream.
  • the message processing method may further include: controlling the second message to execute the traffic behavior.
  • the message when the current network node forwards the message by means of equal-cost multipath routing (ECMP), or the port that sends the message is the trunk interface, the message can be obtained by hashing.
  • the configuration information may include export information for sending messages.
  • the message processing method may further include: sending the second message through the exit indicated by the exit information.
  • the message processing method may further include: performing statistics based on the flow identifier.
  • the current network node is an IOAM node. According to the flow identification, the current network node can perform statistics on different flows, and the statistical value corresponds to the sequence number corresponding to the packet of the flow in the current network node.
  • the current network node can obtain the sequence number of the message according to the flow identifier, and insert the IOAM header in the message.
  • the IOAM header may include the serial number. The sequence number is used to calculate the packet loss and/or packet loss location.
  • the second message may include multiple flow identifiers. According to multiple flow identifiers, the network node can process the message differently.
  • Fig. 5 is a format of a second message provided by an embodiment of the present application, and the message is an IPv6 message.
  • the message can include: IPv6 basic header, IPv6 extended header Hop-by-Hop Options header, user datagram protocol (user datagram protocol, UDP)/transmission control protocol (transmission control protocol, TCP) fields, data (data) field.
  • the Hop-by-Hop Options header can include the selection type and flow identifier.
  • the selection type may include first type information.
  • the first type information may be used to determine that the second packet is a flow identification packet carrying a flow identification.
  • Hop-by-Hop Options header can also include option data length (option data length, Opt Data Len).
  • the flow identifier can use the low 16-bit default field in the Hop-by-Hop Options header (the default field can also be called a reserved field), and the flow identifier can also use the extended fields in the Hop-by-Hop Options header, such as Hop-
  • the 32-bit extension of the by-Hop Options header is written into the stream identifier. That is, the flow identifier can be located in the reserved 1 field or the extended field of the Hop-by-Hop Options header in FIG. 2.
  • the position of the stream identifier in the above scheme has almost no impact on the current message transmission technology.
  • the definition of the flow identification field can be added to the Hop-by-Hop Options header.
  • the second message may include multiple flow identifiers. Multiple flow identifiers can be written by the same network node or by different network nodes. Multiple flow identifiers may be obtained by matching different message characteristics, that is, multiple flow identifiers may correspond to multiple flow classification methods. For example, the second message may include the flow identifier obtained according to the quintuple and the flow identifier obtained according to the two-tuple. According to multiple flow classification methods, multiple flow identifiers are written in the IOAM message, and a certain network node can reduce the packet detection depth of subsequent network nodes, and multiple network nodes can implement reasonable configuration of system resources.
  • the second message may include second type information, and the second type information is used to identify the flow classification mode corresponding to the flow identifier.
  • the second type information may be used to indicate that the stream identifier is determined based on the 5-tuple.
  • the second type information can be located in the same packet header as the flow identifier. Taking the flow identifier located in the extended header Hop-by-Hop Options header of the IP packet header of the second packet as an example, the second type of information may be located in the extended header Hop-by-Hop Options header.
  • the second message can include multiple flow identifiers.
  • the second type information may be used to indicate the corresponding flow classification manner of each of the multiple flow identifiers. For example, the second type information may be used to indicate that the first stream identifier is obtained based on the quintuple, and the second stream identifier is obtained based on the triplet.
  • the second type information may be located before the flow identifier.
  • FIG. 6 is a format of Hop-by-Hop Options header provided by an embodiment of the present application.
  • the Hop-by-Hop Options header field of the message may include: selection type (option type), selection data length (option data length), flow type bitmap (flowtype bitmap), multiple flow identifiers, etc.
  • the stream type bitmap may include the second type information.
  • the stream identification type bitmap may include 16 bits. Each bit of the stream type bitmap can use "1" or "0" to indicate whether the Hop-by-Hop Options header has a stream identifier corresponding to the stream classification method.
  • the flow classification method corresponding to each bit of the flow type bitmap can be: bit 1, SMAC and DMAC; bit 2, SMAC; bit 3, DMAC; bit 4, destination IP address (destinationIP, DIP) and source IP address (sourceIP, SIP); Bit 5, DIP, SIP and protocol (protocol); Bit 6, DIP, SIP, protocol, destination port (destinationport, Dport) and source port (sourceport, Sport); Bit 7, DIP.
  • the last 8 bits of the stream type bitmap can be reserved.
  • the flow template can be stored in a ternary content addressable memory (TCAM).
  • TCAM ternary content addressable memory
  • the flow identifier of the flow corresponding to the first packet is written into the first packet to obtain the second packet.
  • Subsequent IOAM nodes on the message transmission path can process the message according to the flow identifier without matching ACLs. Therefore, subsequent IOAM nodes can perform corresponding traffic behaviors for messages without relying on TCAM resources, reducing costs. Reduced power consumption.
  • the flow template may be created by the current network node before receiving the message.
  • Fig. 7 is a method for creating a flow template proposed in an embodiment of the present application. The method in FIG. 7 includes steps S701 to S703.
  • the current network node may assign a flow identifier to the flow.
  • the flow identifier can be used to identify the flow (or service flow) to which the message belongs.
  • the unique flow can be identified by the flow identification.
  • the current network node may assign flow identifiers to the different flows according to pre-appointed or preset rules.
  • the pre-agreed or preset rule may be one or more characteristics of the message, for example, it may be a quintuple, a triplet, or the second layer information of the message.
  • the current network node may generate a flow template according to the characteristics and flow identifiers of the packets in each flow.
  • the current network node generates a flow template, which can be used to indicate the correspondence between the characteristics of the message and the flow identifier.
  • the current network node may store the flow template.
  • the current network node can store the flow template in the TCAM.
  • FIG. 8 is a schematic flowchart of a message processing method provided by an embodiment of the present application. The method in FIG. 8 includes steps S801 to S802.
  • step S801 the current network node receives an IOAM message.
  • the IOAM message includes a flow identifier, which is located before the IOAM header of the IOAM message.
  • the flow identifier corresponds to the characteristics of the IOAM message, and the characteristics of the IOAM message are located at the head of the IOAM message.
  • the header of the IOAM message and the IOAM header are not the same header, that is, the IOAM header is not located in the header field of the IOAM message.
  • the IOAM message includes the header of the IOAM message.
  • the header of the IOAM message includes the characteristics of the IOAM message, that is, the header of the IOAM message includes the fields of the characteristics of the IOAM message. For example, if the characteristics of the IOAM message include the source IP address, the header of the IOAM message includes the IP header, and the source IP address of the IOAM message is located in the IP header of the first message; the characteristics of the IOAM message include the source IP address , Source port number, the source IP address of the IOAM message is located in the IP header of the IOAM message, and the source port number of the IOAM message is located in the UDP/TCP header of the first message, then the header of the IOAM message includes the IP header Section and UDP/TCP header.
  • the header of the first message may include one or more headers.
  • the header of the IOAM message does not include the IOAM header.
  • IOAM message refers to the second message mentioned in FIG. 4.
  • Figure 2 For the format of the IOAM message, refer to Figure 2.
  • the current network node can be an intermediate node on the IOAM message transmission path, or a tail node.
  • the current network node may be an IOAM intermediate node or an IOAM egress node.
  • the current network node can search for and obtain the flow identifier in the IOAM message.
  • the IOAM message may include first type information.
  • the first type information may be used to indicate that the IOAM packet includes a flow identifier.
  • the current network node may determine that the IOAM message is a flow identification message through the first type information in the IOAM message, and then search for and obtain the flow identification in the flow identification message.
  • the flow identifier can be used to identify the flow (or service flow) to which the message belongs.
  • the IOAM message includes an IOAM header, and the flow identifier can be located before the IOAM header.
  • the flow identifier can be located in the Layer 2 header, the Layer 2.5 header, or the IP header in the Layer 3 header of the IOAM message.
  • the Layer 3 header of the message may include the IP header.
  • the Layer 2 header of the message can be located before the Layer 3 header.
  • the 2.5-layer header of the message can be located before the third-layer header and behind the second-layer header of the message.
  • the flow identifier may be located in a multi-protocol label switch (MPLS) header, and the MPLS header is located in the layer 2.5 header of the packet.
  • MPLS multi-protocol label switch
  • the flow identification may be located in the IP header.
  • the flow identifier may be located in the extended header of the IP header of the IOAM message.
  • the IOAM message is an IPv6 message, and the flow identifier may be located in the extended header Hop-by-Hop Options header after the IP header of the IOAM message.
  • the flow identifier can be located in the extension field of the Hop-by-Hop Options header, or in the field reserved 1.
  • the flow identifier may be obtained by matching the characteristics of the IOAM message with the flow template.
  • the flow template may record the correspondence between the characteristics of the first packet and the flow identifier.
  • the field of the header of the IOAM message may contain the characteristics of the IOAM message.
  • the size of the flow identifier may be greater than, equal to, or smaller than the size of the field of the header of the IOAM message.
  • the size of the stream identifier refers to the number of bits contained in the stream identifier.
  • the size of the field of the header of the IOAM message may refer to the number of bits contained in the field of the header of the IOAM message.
  • the feature size of the IOAM message is 32 bits or 128 bits.
  • the field of the header of the IOAM message corresponding to the flow identifier may be one or more fields where the characteristics of the IOAM message matched with the flow template are located.
  • the size of the flow identifier is smaller than the size of the field in the header of the IOAM message, which can reduce the field length for subsequent nodes to parse the IOAM message in order to perform flow classification, and reduce the consumption delay.
  • the IOAM message may include multiple flow identifiers. Multiple flow identifiers can be written by the same network node or by different network nodes. Multiple flow identifiers may be obtained by matching different message characteristics, that is, multiple flow identifiers may correspond to multiple flow classification methods.
  • the IOAM message may include the flow identification obtained according to the quintuple and the flow identification obtained according to the seven-tuple.
  • the IOAM message may include second type information, and the second type information is used to identify the flow classification mode corresponding to the flow identifier.
  • the second type information may be used to indicate that the stream identifier is determined based on the 5-tuple.
  • the second type information can be located in the same packet header as the flow identifier. Taking the IOAM message as an IPv6 message, the flow identifier is located in the extended header Hop-by-Hop Options header of the IP header of the IOAM message as an example.
  • the second type of information can be located in the extended header Hop-by-Hop Options header. header. If the IOAM message can include multiple flow identifiers.
  • the second type information may be used to indicate the corresponding flow classification manner of each of the multiple flow identifiers.
  • the second type information may be used to indicate that the first stream identifier is obtained based on the quintuple, and the second stream identifier is obtained based on the triplet.
  • Hop-by-Hop Options header of the IOAM message please refer to the format of the Hop-by-Hop Options header in Figure 6.
  • step S802 the current network node processes the IOAM message according to the flow identifier.
  • step S802 may include: searching the flow classification table according to the flow identifier to obtain the traffic behavior; and processing the IOAM message according to the traffic behavior.
  • the flow classification table may be a linear table.
  • the flow classification table may record flow identification and flow behavior.
  • the flow classification table may record the correspondence between flow identifiers and traffic behaviors. The correspondence relationship may be that one flow identifier corresponds to one traffic behavior, or one flow identifier corresponds to multiple traffic behaviors.
  • the flow classification table can be stored in TCAM, CAM, RAM and other memories.
  • TCAM has the advantages of fast speed and simple implementation, but TCAM is more expensive, the capacity of the memory chip is small, and the parallel matching comparison method is used to make it consume more power.
  • the flow classification table can be stored in RAM, and the flow identification can be used as the address of the flow classification table. Through the flow identification, the address index can be used to quickly search and determine the traffic behavior, which saves network hardware TCAM resources, reduces power consumption, and reduces costs.
  • step S802 may include: a statistical flow identifier.
  • the current network node is an IOAM node. According to the flow identifier, the current network node can perform statistics on different flows, and the statistical value corresponds to the sequence number corresponding to the packet of the flow in the current network node.
  • the current network node can obtain the sequence number of the message according to the flow identifier, and insert the IOAM header in the message.
  • the IOAM header includes the serial number.
  • the sequence number is used to calculate the packet loss and/or packet loss location.
  • step S802 may include: determining an exit for sending the message according to the flow identifier; and sending the message according to the exit.
  • the IOAM message can include multiple flow identifiers. According to multiple flow identifiers, the network node can process the message differently.
  • the IOAM message includes the first flow identifier and the second flow identifier.
  • the first-class identifier may be obtained by classifying the message according to the quintuple.
  • the second flow identifier may be obtained by classifying the message according to the two-tuple.
  • the current network node can perform statistics based on the first flow identifier, obtain the sequence number corresponding to the message, and insert the IOAM header, which includes the sequence number.
  • the port for sending the message in the current network node is the TRUNK interface.
  • the current network node determines the exit for sending the message according to the second flow identifier, and sends the message through the exit.
  • FIG. 9 is a schematic flowchart of a method for processing a message by a network node on a message transmission path provided by an embodiment of the present application.
  • Node 1 is an IOAM ingress node. It matches the IP quintuple of the message with the flow template to obtain the flow identifier, which is carried with the message to subsequent network nodes.
  • Nodes 2 and 3 are the other two IOAM intermediate nodes on the transmission path.
  • Node 4 is the IOAM exit node. Taking an IPv6 message as an example, the processing methods of the four network nodes on the message are explained.
  • Node 1 classifies the packet flow.
  • Node 1 inserts a flow identifier in the Hop-by-Hop Options header in the message of the designated service flow according to the result of flow classification.
  • Node 1 can obtain the sequence number of the message according to the flow identifier. The sequence number can be used by the analyzer to calculate the packet loss, and can be used by the analyzer to calculate the location of the packet loss.
  • Node 1 performs statistics on the service flow based on the flow identifier, and the statistical value corresponds to the sequence number of the message in node 1.
  • Node 1 inserts the IOAM header 1 in the message, and inserts the flow identifier in the Hop-by-Hop Options header.
  • the IOAM header 1 may include information such as the timestamp, the node ID of the node 1, the interface ID, and the sequence number of the message.
  • the nodes 2 and 3 can determine that the received message is an IOAM message and carries a flow identifier according to the selection type of the Hop-by-Hop Options header. Nodes 2 and 3 can perform statistics according to the flow identifier of the message, that is, obtain the sequence number of the message according to the flow identifier. Nodes 2 and 3 can respectively insert IOAM headers 2 and 3 in the message.
  • the IOAM header includes information such as timestamp, node ID, interface ID, and serial number.
  • the node 4 may determine that the received message is an IOAM message and carries a flow identifier according to the selection type of the Hop-by-Hop Options header. Node 4 can perform statistics based on the flow identifier of the message, that is, obtain the sequence number of the message according to the flow identifier. Node 4 can decapsulate the message and report the collected data of nodes 1-3 to the analyzer. The collected data may include data in the IOAM header of nodes 1-3 in the message. The collected data can be within a preset period. The node 4 may also send information such as the timestamp, node ID, interface ID, serial number, etc. corresponding to the node 4 to the analyzer.
  • the analyzer analyzes the packets in the statistical period to determine the packet loss and packet loss location. Comparing the serial number of the packet with the serial number of the receiving end, the difference is the lost packet. According to the sequence number of each node, the specific packet loss location can be calculated.
  • the message processing flow of node 1 is shown in Figure 10.
  • the method in FIG. 10 includes the steps of creating a template (S1001), issuing a rule (S1002), matching a rule (S1003), and filling a flow identifier (S1004).
  • node 1 may assign a flow identifier to a specific flow, and the flow template may be used to record the correspondence between flow characteristics and flow identifiers.
  • Flow templates can be used to classify packets in complex flows based on their IP quintuples.
  • step S1002 node 1 may deliver and store the flow template in the TCAM.
  • step S1003 when a message enters the interface of node 1, node 1 can match the message according to a rule determined by the flow template in the TCAM, such as an IP quintuple.
  • step S1004 if the matching is successful, node 1 can fill the result of the matching, that is, the flow identifier, into the message, and write the first type information at the same time.
  • the first type information may be used to indicate that the message includes the flow identifier. . .
  • node 1 writes the flow identifier into the Hop-by-Hop Options header of the message. This field is read and processed by each node on the message transmission path. The format of the message when it enters each network node is shown in Figure 11.
  • the flowchart of the method for processing messages by nodes 2 and 3 is shown in Figure 12.
  • the method in FIG. 12 includes the steps of creating a flow table (S1201), identifying a flow identification message (S1202), and processing the message according to the flow identification (S1203).
  • a flow table is created according to the flow identifier, and the flow table is a linear table.
  • the flow table can be used to record the correspondence between flow identifiers and traffic behaviors.
  • the flow table can be a linear table.
  • a message is obtained, and the message is identified as a flow identification message, that is, the identification message is a message including a flow identification.
  • the message may include first type information, and the first type information may be used to indicate that the message includes a flow identifier.
  • the message may include second type information, and the second type information may be used to indicate the flow classification mode corresponding to the flow identifier. For example, the second type information may be used to indicate that the stream identifier is determined based on the 5-tuple.
  • the second type information can be located in the same packet header as the flow identifier.
  • the second type of information may be located in the extended header Hop-by-Hop Options header. If the message can include multiple flow identifiers.
  • the second type information may be used to indicate the corresponding flow classification manner of each of the multiple flow identifiers. For example, the second type information may be used to indicate that the first stream identifier is obtained based on the quintuple, and the second stream identifier is obtained based on the triplet.
  • step S1203 the message is processed according to the flow identifier.
  • the first node of the network fills the message with the flow identifier, and the subsequent network nodes process the message according to the flow identifier. It does not rely on the complex matching process, which reduces the waste of system resources and reduces the need for messages. Deep detection to improve forwarding performance.
  • FIG. 13 is a packet processing network device 1300 provided by an embodiment of the present application, including: a receiving unit 1301, a determining unit 1302, an obtaining unit 1303, and a sending unit 1304.
  • the receiving unit 1301 is configured to receive the first message by the current network node.
  • the determining unit 1302 is configured to determine a flow identifier corresponding to the first message, the first message does not include the flow identifier, the feature of the first message corresponds to the flow identifier, and the first message The feature of the message is located at the head of the first message;
  • the obtaining unit 1303 is configured to obtain a second message according to the first message and the flow identifier, the second message including the flow identifier and an IOAM header, and the second message
  • the stream identifier is located before the IOAM header;
  • the sending unit 1304 is configured to send the second packet to the next network node.
  • the flow identifier is located in the Hop-by-Hop Options header of the IPv6 header.
  • the flow identifier corresponds to a field of the header of the first packet, and the size of the flow identifier is smaller than the size of the field of the header of the first packet.
  • FIG. 14 is a packet processing network device 1400 provided by an embodiment of the present application, including: a receiving unit 1401 and a processing unit 1402.
  • the receiving unit 1401 is configured to receive an in-band operation, maintenance and management IOAM message, the IOAM message including a flow identifier, the flow identifier is located before the IOAM header, and the flow identifier corresponds to the characteristics of the IOAM message, The feature of the IOAM message is located in the header of the IOAM message, and the header of the IOAM message and the IOAM header are not the same header;
  • the processing unit 1402 is configured to process the IOAM message according to the flow identifier.
  • the flow identifier is located in the Hop-by-Hop Options header of the IPv6 header.
  • the flow identifier corresponds to a field of the header of the IOAM message, and the size of the flow identifier is smaller than the size of the field of the header of the IOAM message.
  • the processing unit 1402 is further configured to, according to the flow identifier, look up a flow classification table to obtain a flow behavior, the flow classification table is a linear table, and the linear table records the flow identification and the flow behavior
  • the processing unit 1402 is further configured to process the IOAM message according to the traffic behavior.
  • the flow classification table is stored in a random access memory RAM.
  • FIG. 15 is a schematic structural diagram of a communication device provided by an embodiment of the present application.
  • the communication device 1500 shown in FIG. 15 may correspond to the user equipment or network equipment described above.
  • the communication device 1500 may include: at least one processor 1501 and a communication interface 1502, the communication interface 1502 may be used for the communication device 1500 to exchange information with other communication devices, when the program instructions are executed in the at least one processor 1501 , So that the communication device 1500 implements the steps or methods or operations or functions performed by the network device in the foregoing.
  • An embodiment of the present application also provides a communication system, which includes one or more of the aforementioned network devices.
  • An embodiment of the present application further provides a computer program storage medium, which is characterized in that the computer program storage medium has program instructions, and when the program instructions are executed, the foregoing method is executed.
  • An embodiment of the present application further provides a chip system, characterized in that the chip system includes at least one processor, and when the program instructions are executed in the at least one processor, the method in the foregoing method is executed.
  • At least one refers to one or more
  • multiple refers to two or more.
  • And/or describes the association relationship of the associated objects, indicating that there can be three types of relationships, for example, A and/or B, which can mean that A exists alone, A and B exist at the same time, and B exists alone. Among them, A and B can be singular or plural.
  • the character “/” generally indicates that the associated objects are in an “or” relationship.
  • “The following at least one item” and similar expressions refer to any combination of these items, including any combination of single items or plural items.
  • At least one of a, b, and c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple.
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • each unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of this application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program code .

Landscapes

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

Abstract

本申请提供一种报文处理方法,包括:当前网络节点接收第一报文;所述当前网络节点确定与所述第一报文对应的流标识,所述第一报文不包括所述流标识;所述当前网络节点根据所述第一报文以及所述流标识,得到第二报文,所述第二报文包含所述流标识以及IOAM头部,所述第二报文中所述流标识位于所述IOAM头部之前;所述当前网络节点向下一网络节点发送所述第二报文。解决了随着经过IOAM节点数量的增加,后续节点为了进行流分类,消耗时延增大,对转发性能影响增加的问题。

Description

报文处理的方法和网络装置
本申请要求于2019年4月4日提交中国专利局、申请号为CN 201910272143.0、发明名称为“报文处理的方法和网络装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据通信领域,具体涉及一种报文处理的方法和网络装置。
背景技术
报文传输路径上的在线操作管理维护(in-situ operations,administration and maintenance或inband operations,administration and maintenance,IOAM)节点可以对业务数据报文进行IOAM封装,即在报文中插入一个IOAM头部(IOAM header)。网络节点需要对IOAM报文执行深度报文解析,从而对报文进行流分类。上述方案中,网络节点的开销较大,转发性能较低。
发明内容
本申请实施例提供一种报文处理的方法和网络装置,能够减小网络节点的开销,提高转发性能。
第一方面,提供一种报文处理方法,包括:当前网络节点接收第一报文,所述第一报文包含互联网协议IP报文净荷以及特定头部;所述当前网络节点确定与所述第一报文对应的流标识,所述第一报文不包括所述流标识,所述第一报文的特征对应所述流标识,所述第一报文的特征位于所述第一报文的头部;所述当前网络节点根据所述第一报文以及所述流标识,得到第二报文,所述第二报文包含所述流标识以及IOAM头部,所述第二报文中所述流标识位于所述IOAM头部之前;所述当前网络节点向下一网络节点发送所述第二报文。
上述技术方案解决了随着经过IOAM节点数量的增加,后续节点为了进行流分类,对报文的探测深度增加,导致消耗时延增大,对转发性能影响增加的问题。
结合第一方面,在一种可能的实现方式中,当所述IP头部为互联网协议第六版IPv6头部时,所述流标识位于逐跳选项头部Hop-by-Hop Options header。
通过在报文的Hop-by-Hop Options header中增加流标识,对当前报文传输的技术不产生影响。
结合第一方面,在一种可能的实现方式中,所述流标识对应所述第一报文的头部的字段,所述流标识的尺寸小于所述第一报文的头部的字段的尺寸。
通过采用尺寸较小的流标识,减小后续节点为了进行流分类对报文进行解析的字段长度,减小了消耗的时延。
第二方面,提供一种报文处理方法,包括:网络节点接收带内操作维护管理IOAM报文, 所述IOAM报文包含流标识,所述流标识位于所述IOAM报文的IOAM头部之前,所述流标识对应所述IOAM报文的特征,所述IOAM报文的特征位于所述IOAM报文的头部,所述IOAM报文的头部和所述IOAM头部不是同一个头部;所述网络节点根据所述流标识,对所述IOAM报文进行处理。
上述技术方案解决了随着经过IOAM节点数量的增加,为了进行流分类,对报文的探测深度增加,导致消耗时延增大,对转发性能影响增加的问题。
结合第二方面,在一种可能的实现方式中,当所述IP头部为互联网协议第六版IPv6头部时,所述流标识位于逐跳选项头部Hop-by-Hop Options header。
在报文的Hop-by-Hop Options header中增加流标识,对当前报文传输的技术不产生影响。
结合第二方面,在一种可能的实现方式中,所述流标识对应所述IOAM报文的头部的字段,所述流标识的尺寸小于所述IOAM报文的头部的字段的尺寸。
通过采用尺寸较小的流标识,减小后续节点为了进行流分类对报文进行解析的字段长度,减小了消耗的时延。
结合第二方面,在一种可能的实现方式中,所述根据所述流标识,对所述IOAM报文进行处理,包括:根据所述流标识,查找流分类表,获得流行为,所述线性表记录有所述流标识与所述流行为;根据所述流行为,对所述IOAM报文进行处理。
结合第二方面,在一种可能的实现方式中,所述流分类表存储于随机存取存储器RAM中。
后续网络节点不依赖于创建复杂的流模板,不依赖于并重复相同的基于报文特征的匹配过程。仅通过随机存取存储器RAM中存储的流分类表,就可以对不同的流对报文进行不同的处理。降低了对ACL表的需求,降低了成本。
第三方面,提供一种报文处理的网络设备,包括:接收单元,用于接收第一报文;确定单元,用于确定与所述第一报文对应的流标识,所述第一报文不包括所述流标识,所述第一报文的特征对应所述流标识,所述第一报文的特征位于所述第一报文的头部;得到单元,用于根据所述第一报文以及所述流标识,得到第二报文,所述第二报文包含所述流标识以及IOAM头部,所述第二报文中所述流标识位于所述IOAM头部之前;发送单元,用于向下一网络节点发送所述第二报文。
结合第三方面,在一种可能的实现方式中,当所述IP头部为互联网协议第六版IPv6头部时,所述流标识位于逐跳选项头部Hop-by-Hop Options header。
结合第三方面,在一种可能的实现方式中,所述流标识对应所述第一报文的头部的字段,所述流标识的尺寸小于所述第一报文的头部的字段的尺寸。
第四方面,提供一种报文处理的网络设备,包括:接收单元,用于接收带内操作维护管理IOAM报文,所述IOAM报文包含流标识,所述流标识位于所述IOAM报文的IOAM头部之前,所述流标识对应所述IOAM报文的特征,所述IOAM报文的特征位于所述IOAM报文的头部,所述IOAM报文的头部和所述IOAM头部不是同一个头部;处理单元,用于根据所述流标识,对所述IOAM报文进行处理。
结合第四方面,在一种可能的实现方式中,当所述IP头部为互联网协议第六版IPv6头部时,所述流标识位于逐跳选项头部Hop-by-Hop Options header。
结合第四方面,在一种可能的实现方式中,所述流标识对应所述IOAM报文的头部的字 段,所述流标识的尺寸小于所述IOAM报文的头部的字段的尺寸。
结合第四方面,在一种可能的实现方式中,处理单元还用于,根据所述流标识,查找流分类表,获得流行为,所述流分类表为线性表,所述线性表记录有所述流标识与所述流行为;根据所述流行为,对所述IOAM报文进行处理。
结合第四方面,在一种可能的实现方式中,所述流分类表存储于随机存取存储器RAM中。
第五方面,提供一种通信装置,包括:至少一个处理器和通信接口,所述通信接口用于所述通信装置与其他通信装置进行信息交互,当程序指令在所述至少一个处理器中执行时,使得所述通信装置执行上文中的方法。
第六方面,提供一种计算机程序存储介质,其特征在于,所述计算机程序存储介质具有程序指令,当所述程序指令被执行时,使得上文中的方法被执行。
第七方面,提供一种芯片,所述芯片系统包括至少一个处理器,当程序指令在所述至少一个处理器中执行时,使得上文中的方法被执行。
附图说明
图1是本申请实施例的应用场景示例图。
图2是一种IOAM报文的格式的示意图。
图3是传统网络节点的流分类过程的流程性示意图。
图4是本申请一个实施例提供的报文处理方法的示意性流程图。
图5是本申请实施例提供的互联网协议第六版报文格式的示意图。
图6是本申请实施例提供的一种逐跳选项头部的格式的示意图。
图7是本申请实施例提供的创建流模板的示意性流程图。
图8是本申请另一实施例提供的报文处理方法的示意性流程图。
图9是本申请实施例中的网络节点的流分类过程的示例图。
图10是本申请实施例提供的报文处理过程的示例图。
图11是本申请实施例中的报文的格式的示意图。
图12是本申请实施例提供的一种基于流标识的报文处理过程的示例图。
图13是本申请实施例提供的一种报文处理的网络设备的示意性结构图。
图14是本申请实施例提供的另一种报文处理的网络设备的示意性结构图。
图15是本申请一个实施例提供的通信装置的示意性结构图。
具体实施方式
报文在网络上传输的过程通常会经过许多网络节点。以图1为例,报文会依次经过网络节点1至网络节点4。该报文可以是互联网协议(internet protocol,IP)报文,例如可以是互联网协议第四版(internet protocolversion 4,IPv4)报文,也可以是互联网协议第六版(internet protocolversion 6,IPv6)报文,或者其他类型的报文。该网络 节点可以是路由器,也可以是交换机。该网络节点可以是路由器,也可以是交换机。
在线操作管理维护(in-situ operations、administration and maintenance,IOAM)是一种数据通信网络操作管理维护(operations、administration and maintenance,OAM)技术,也称为带内OAM。IOAM的特点是IOAM数据内容被封装进业务数据报文中,作为业务数据报文的一部分在网络中传递。IOAM数据内容也可以称为IOAM信息。
图1中的网络节点1至网络节点4可以是IOAM传输节点。IOAM传输节点就是业务数据报文传输路径上需要对IOAM数据内容进行处理的节点。随着报文经过的IOAM节点数量的增加,转发时延增加,转发性能降低。
IOAM节点可以在报文中添加IOAM信息。IOAM信息可以携带在IOAM头部。具体地,IOAM节点可以在报文中插入一个IOAM头部,也可以对报文中的IOAM头部的值进行设置。本申请中,将在报文中插入一个IOAM头部的方式称为递增模式。将对报文中的IOAM头部的值进行设置的方式称为预分配模式。示例性地,IOAM入口节点可以根据IOAM中间节点、出口节点的配置信息确定IOAM入口节点的IOAM封装。IOAM中间节点的IOAM配置信息例如可以包括该节点追踪类型。追踪类型可以用于表示该节点采用预分配模式还是递增模式插入节点信息。IOAM配置信息还可以包括节点信息需要占用的字节数等。IOAM中间节点采用递增模式插入节点信息,则该节点进行IOAM封装,在业务数据报文中插入对应该节点的IOAM头部。预分配模式插入节点信息,则该节点在接收的报文预分配的位置插入节点信息。IOAM入口节点可以根据IOAM中间节点、出口节点的配置信息确定是否预分配IOAM字段。
示例性地,IOAM入口节点可以对IOAM中间节点、出口节点可以进行配置,例如,配置IOAM中间节点、出口节点的追踪类型等。
报文传输路径上的IOAM节点可以对报文进行IOAM封装。IOAM封装是在业务数据报文中插入一个IOAM头部(IOAM header)。通过IOAM封装,IOAM可以实现一些带外OAM所不能实现的功能,比如探测业务数据报文实际经过的网络节点,验证业务数据的传输路径与预期是否一致,以及给业务数据报文添加序列号信息以检测丢包和乱序等。
IOAM入口节点(IOAMingress node)和中间节点(IOAM transit node)对指定业务流的报文可以插入IOAM头部(IOAM head),IOAM头部包含时间戳、节点标识(identification,ID)、接口ID、序列号(sequence number)等信息。IOAM入口节点也可以称为IOAM首节点。
IOAM出口节点(IOAM egress node)对指定业务流的报文可以插入时间戳、节点标识(identification,ID)、接口ID、序列号(sequence number)等信息,也可以不将上述信息插入报文。IOAM出口节点对报文解封装后,可以将采集数据发送至分析器,例如可以将全部的采集数据发送至分析器,也可以将指定周期内的采集数据发送至分析器。采集数据可以包括IOAM入口节点、IOAM中间节点在报文中插入的IOAM头部中的信息,还可以包括IOAM出口节点对应指定业务流报文的时间戳、节点标识(identification,ID)、接口ID、序列号(sequence number)等信息。IOAM出口节点也可以称为IOAM尾节点。IOAM出口节点对报文解封装,即去除报文中的IOAM头部。
分析器也称为采集分析器,可以对统计周期内的报文进行分析,获取各个节点的信息,对发包的序列号和接收端的序列号进行对比,差额就是丢失的报文,根据IOAM出口节点上报的每个节点的序列号,可以计算具体的丢包位置。
IOAM报文包括IOAM头部。IOAM报文传输过程中可以经过IOAM网络节点。IOAM报文具体 可以是IP报文。IP报文包括IP头部以及IP报文净荷。IOAM报文的IOAM头部可以位于报文的IP头部之后。具体地,IOAM头部可以位于报文的IP报文净荷中。IOAM头部可以包括IOAM信息。
以IPv6报文为例,图2对IOAM报文的格式进行说明。经过IOAM节点后,IOAM报文可以包括:目标地址(destination address,DA),源地址(source address,SA),虚拟局域网(virtual local area network,VLAN)协议,以太网类型(EthType),IPv6头部,IOAM头部,传输控制协议(transmission control protocol,TCP)/用户数据报协议(user datagram protocol,UDP),数据(data)。其中,IPv6头部可以与逐跳选项头部(Hop-by-Hop Options header)相邻。关于Hop-by-Hop Options header,可以参考互联网工程任务组(Internet Engineering Task Force,IETF)发布的RFC2460。Hop-by-Hop Options header可以包括选择类型(optiontype)、选择类型长度、和保留字段等。保留字段又可以称为缺省字段。Hop-by-Hop Options header还可以包括扩展字段。可以根据Hop-by-Hop Options header中的选择类型值,确定IPv6头部后的扩展头为IOAM头部。报文中IP报文净荷(payload)可以包括数据。IP报文净荷还可以包括高层头部(upper layer header),例如TCP头部或者UDP头部。报文中IP报文净荷位于IP头部之后。IP头部与IP报文净荷可以相邻,IP头部与IP报文净荷之间也可以具有一个或多个扩展头部(extension header)。例如,IP头部和IP报文净荷之间可以具有Hop-by-Hop Options header。IOAM头部可以位于报文的Hop-by-Hop Options header的扩展字段。报文中数据之前的字段可以称为报文的头部。
示例性地,IOAM头部可以包括节点数据。节点数据也可以称为IOAM信息。该IOAM头部可以是IOAM入口节点、中间节点或出口节点插入的。
示例性地,IOAM头部可以包括:IOAM跟踪类型(IOAM trace type),字段长度(octets-left),标志(flag),n个节点数据。可以通过IOAM跟踪类型对IOAM头部具体包括的信息进行标识,即对节点数据的内容进行标识。该IOAM头部可以是IOAM入口节点插入的。
跟踪类型(trace-type)可以有16位(bit),可以包括:跳数限制(类似于生存时间(time to live,TTL))和经过的节点ID,入接口和出接口ID,节点的秒时戳,节点的纳秒时戳,节点转发时延,用于上行统计的节点应用相关数据,当前用于上行统计,节点队列深度,任意数据,跳数限制(类似于TTL)和经过的节点ID(宽格式),入接口和出接口ID(宽格式),用于下行统计的节点应用相关数据等。目前跟踪类型(trace-type)有5位(bit)保留。
为了对报文进行统计,每个网络节点需要识别业务流。流识别也可以称为流分类。ACL(access control list,访问控制列表)主要用来实现流识别功能。网络节点通常利用ACL实现对业务流的识别。
网络节点可以对经过该网络节点的报文进行过滤。为了对报文进行过滤,通常需要为网络节点配置一系列的匹配规则,以识别需要过滤的报文。在识别出特定报文之后,可以根据预先设定的策略允许或禁止相应的报文通过。网络节点通常利用访问控制列表(access control list,ACL)实现上述功能。ACL可以为IPv4ACL、IPv6ACL或用户ACL等。
ACL通过一系列的匹配条件对报文进行分类,这些条件可以是报文的一个或多个特征。报文的特征例如可以包括报文的源媒体访问控制(source media access control,SMAC) 地址,目的媒体访问控制(destinationmedia access control,DMAC)地址,服务提供者虚拟局域网(service provider virtual local area network,SVLAN),客户虚拟局域网(customervirtual local area network,CVLAN),优先级(priority,PRI),源IP地址,目的IP地址等。
根据应用目的,可将ACL分为基本ACL,高级ACL,二层ACL和用户自定义ACL等。基本ACL可以只根据三层信息制定规则。三层信息例如可以包括源IP地址、目的IP地址等。高级ACL可以根据数据包的三、四层信息制定规则。四层信息例如可以包括IP承载的协议类型、协议特性,如UDP或TCP头部的信息等。二层ACL根据二层信息制定规则。二层信息可以包括源MAC地址、目的MAC地址、VLAN优先级、二层协议类型等。用户自定义ACL:以数据包的头部为基准,指定从第几个字节开始进行“与”操作,将从报文提取出来的字符串和用户定义的字符串进行比较,找到匹配的报文。可以根据ACL序号来区分不同的ACL。报文的二层头部可以包括二层信息,报文的三层头部可以包括三层信息,报文的四层头部可以包括四层信息。
由ACL定义的数据包匹配规则,可以被其他需要对流量进行区分的功能引用,如QoS中流分类规则的定义。流分类(traffic classifier)以ACL为基础,根据报文的特征(也可称为流特征)对报文进行匹配分类。
流分类可以包括简单流分类和复杂流分类。不同类型的流分类用于匹配的特征不同。以复杂流分类为例,可以利用不同种类的ACL,对报文进行分类。用于匹配分类的特征可以是报文的二元组(源IP地址、目的IP地址)、三元组(源IP地址、目的IP地址、协议号码)、四元组(源IP地址、目的IP地址、源端口和目的端口)或五元组(源IP地址、源端口号、协议号码、目的IP地址、目的端口号)等。
根据报文进行的流分类,网络节点可以将对流进行统计,获取报文序列号。例如可以匹配ACL获取统计ID,对报文进行统计。当前网络节点可以将报文序列号写入报文的IOAM头部。网络节点也可以根据分类结果执行相应的流行为(或称流动作)。例如,可以对报文进行优先级映射、标记着色、承诺访问速率(committed access rate,CAR)统计等操作。
下面以复杂流分类为例,对IOAM节点流分类的处理流程进行简单介绍。
如图3所示,复杂流分类的过程大致包括:创建模板(S301),规则下发(S302)以及规则匹配(S303)。
在步骤S301,网络节点可以为特定的流创建流模板。流模板可用于记录流分类的匹配规则和相应的流行为。流模板可以包括流策略模板(或称流行为模板)和流分类模板。
在步骤S302,网络节点可以将创建的流模板下发并存储到网络节点的三态内容寻址存储器(ternary content addressable memory,TCAM)表中。
在步骤S303,当该流的报文进入到网络节点的接口之后,网络节点可以利用TCAM表按规则进行匹配。
当匹配成功之后,网络节点可以根据匹配结果对报文进行统计,对报文进行处理。例如,网络节点可以对流进行统计,将序列号写入IOAM头部。序列号可以用于计算丢包和丢包位置。网络节点也可以按照相应的流动作对报文进行处理,例如进行对应的流行为。
IOAM出口节点可以将序列号信息上报采集器。采集器根据每个IOAM节点的序列号可以计算丢包,也可以计算丢包的位置。
传统的流分类过程中,对报文进行流分类的每个网络节点均需要创建复杂的模板,并重复相同的基于报文特征的匹配过程。
在一些情况下,一些网络节点获取IOAM头部之后的信息,才能对报文进行流分类。若转发路径较长,经过的IOAM节点较多,需要进行深度报文解析,消耗的延时长,转发性能降低。同时,每个网络节点需要占用ACL资源,硬件资源消耗较大,造成系统资源的浪费。
例如,对于IPv6报文,网络节点可能需要解析至报文的UDP/TCP头部,才能获取端口号。UDP/TCP头部位于IP报文净荷。随着经过IOAM节点数量的增加,通过匹配查找ACL进行流分类,消耗时延增大,对转发性能影响增加。
为了解决上述问题,本申请提出了一种报文处理的方法。下面结合图4,对本申请实施例进行详细介绍。
图4是本申请提出的一种报文处理方法的流程性示意图。图4的方法包括步骤S401至步骤S404。
在步骤S401,当前网络节点接收第一报文。
第一报文可以包含互联网协议IP报文净荷以及特定头部,第一报文中特定头部位于IP报文净荷之前。
本申请中,特定头部是第一报文中IP报文净荷之前的头部。特定头部可以是IP头,也可以是低层头(lower layer header)。低层头所在的层低于IP头所在的层。IP头位于第三层。举例来说,低层头可以位于第二层或者第2.5层。
举例来说,所述特定头部可以包括第一报文的二层头部。所述特定头部也可以包括第一报文的2.5层头部。2.5层头部也可以称为多协议标签交换(Multiprotocol Label Switching,MPLS)头。
关于第一报文,可以参考上文对IOAM报文的描述。例如,第一报文可以具有图2所示的格式,第一报文也可以不含有图2所示的格式中的IOAM头部,或者不含有IOAM头部以及Hop-by-Hop Options header。
当前网络节点可以是第一报文对应的流的转发路径上的首节点,也可以是第一报文对应的流的转发路径上的中间节点。例如,当前网络节点可以是IOAM入口节点,则第一报文可以不包含IOAM头部。当前网络节点也可以是IOAM中间节点,则第一报文可以包含IOAM头部。
在步骤S402,当前网络节点确定与所述第一报文对应的流标识。
所述第一报文不包含所述流标识。流标识对应于第一报文的特征。第一报文的特征位于所述第一报文的头部。
可选地,当前网络节点可以将第一报文的特征与流模板进行匹配,获得第一报文对应的流的流标识。第一报文对应的流标识也可以认为是第一报文的特征对应的流标识。
流模板可以记录第一报文的特征与流标识(flow identification,Flow ID)的对应关系。流模板可用于对当前网络节点接收到的报文进行简单流分类,也可用于对当前网络节点接收到的报文进行复杂流分类。第一报文的特征具体可以是第一报文的头部的字段。例如,第一报文的特征可以是第一报文的IP头部中的目的IP地址,或者第一报文的特征可以是第一报文的IP头部中的目的IP地址以及源IP地址。例如,第一报文的特征可以是第一报文的五元组。所述五元组可以包括源IP地址、目的IP地址、源端口、目的端口以及协议。其中,所述源IP地址、目的IP地址以及协议是第一报文的IP头部中的字段。 源端口和目的端口可以是第一报文的TCP头部或者UDP头部中的字段。本申请中,将多个具有相同特征的报文称为流。具有相同特征是指多个报文具有相同类型的字段,并且多个报文中相同类型的字段的值是相等的。相同类型的字段可以是一个字段,也可以是多个字段。以报文的特征是源IP地址为例进行说明,当报文1和报文2都具有源IP地址,并且报文1的源IP地址等于报文2的源IP地址,则报文1和报文2属于同一个流。以报文的特征是源IP地址以及目的IP地址为例进行说明,当报文3和报文4都具有源IP地址和目的IP地址,报文3的源IP地址等于报文4的源IP地址,并且报文3的目的IP地址等于报文4的目的IP地址,则报文3和报文4属于同一个流。可以理解,可以采用不同的粒度对报文进行流分类。例如,相对于根据源IP地址对报文进行流分类,根据源IP地址以及目的IP地址对报文进行流分类是一种细粒度的流分类方式。再例如,相对于根据五元组对报文进行流分类,根据源IP地址以及目的IP地址对报文进行流分类是一种粗粒度的流分类方式。另外,需要指出的是,属于相同的流的多个报文具有相同的特征,分别属于不同的流的多个报文具有不同的特征。进一步的,属于相同的流的多个报文对应同一个流标识。分别属于不同的流的多个报文对应不同的流标识。例如,假设报文1和报文2属于相同的流,则报文1对应流标识1,报文2对应流标识1。再例如,假设报文3和报文4分别属于不同的流,则报文3对应流标识2,报文4对应流标识3。
第一报文包括第一报文的头部。第一报文的头部包括第一报文的特征,即第一报文的头部包括第一报文的特征的字段。例如,第一报文的特征包括源IP地址和/或目的IP地址,则第一报文的头部包括IP头部,第一报文的源IP地址、目的IP地址位于第一报文的IP头部;第一报文的特征包括源IP地址、源端口号,第一报文的源IP地址位于第一报文的IP头部,第一报文的源端口号位于第一报文的UDP/TCP头部,则第一报文的头部包括IP头部和UDP/TCP头部。第一报文的头部可以包括一个或多个头部。第一报文可以包括IOAM头部,第一报文的头部不包括IOAM头部。
可选地,本申请对流标识的尺寸不作限定。流标识的尺寸可以大于、等于或小于第一报文的头部的字段的尺寸。流标识的尺寸是指流标识包含的比特的数量。第一报文的头部的字段是指第一报文的头部的字段包含的比特的数量。例如,当第一报文的特征是目的IP地址时,第一报文的特征的尺寸为32比特或者128比特。流标识对应第一报文的头部的字段可以是与流模板进行匹配的第一报文的特征所在的一个或多个字段。流标识的尺寸小于第一报文的头部的字段的尺寸,可以减小后续节点为了进行流分类对报文进行解析的字段长度,减小消耗的时延。
流标识可用于标识报文所属的流(或称业务流或数据流)。流标识可被网络节点用于对报文进行流分类,该网络节点可以是IOAM节点或非IOAM网络节点。该流标识可以在创建该流模板的过程中添加至该流模板,下文会结合具体的实施例进行详细描述,此处暂不详述。
在步骤S403,当前网络节点根据所述第一报文以及所述流标识,得到第二报文。
示例性地,当前网络节点为IOAM入口节点,在步骤S403之前,当前网络节点可以接收IOAM中间节点、IOAM出口节点的配置信息。
所述第二报文包含所述流标识以及IOAM头部,所述第二报文中所述流标识位于IOAM头部之前。
在一些实施例中,第二报文可以包括第一报文。当前网络节点可以在第一报文中插入 流标识的字段。例如,参考图2中报文的格式,当前网络节点可以在第一报文中插入Hop-by-Hop Options header,流标识位于Hop-by-Hop Options header。又例如,当前网络节点可以在第一报文的Hop-by-Hop Options header插入扩展字段,流标识位于该扩展字段。
在另一些实施例中,第二报文可以包括第二报文的一部分。当前网络节点可以改变第一报文中某些字段的值,即在该字段写入流标识。例如,参考图2中报文的格式,当前网络节点可以将Hop-by-Hop Options header的字段保留1更改为流标识。
第二报文中流标识可以位于IP头部或特定头部。特定头部可以包括第一报文的二层头部,还可以包括第一报文的2.5层头部等位于IP头部之前的字段。
当前网络节点可以将流标识写入第一报文的IOAM头部之前,得到第二报文。
可以理解,当流标识写入第一报文的IP头部时,第二报文包含的IP头部和第一报文包含的IP头部是不同的。例如,相对于第一报文的IP头部,第二报文的IP头部增加了用于携带流标签的字段。
第二报文可以经过IOAM节点,即第二报文的转发路径上存在IOAM节点。
当前网络节点可以是IOAM节点。当前网络节点可以将第一报文的序列号写入所述报文的当前网络节点IOAM报文头部,该序列号是根据所述流标识确定的。序列号可以用于计算丢包和/或丢包位置。当前网络节点IOAM报文头部是当前网络节点插入报文中的。
在一些实施例中,当前网络节点可以是IOAM入口节点。为当前网络节点可以在第一报文插入当前网络节点的IOAM头部,即当前网络节点可以采用递增模式添加IOAM信息。也就是说,当前网络节点可以通过增加字段使得第二报文包括当前网络节点的IOAM头部,增加的字段包括当前网络节点的IOAM头部。
在另一些实施例中,当前网络节点可以是IOAM中间节点。当前网络节点可以在第一报文中插入当前网络节点的IOAM头部以得到第二报文。例如,第二报文可以包括第一报文,当前网络节点可以在第一报文中插入流标识的字段和IOAM头部。当前网络节点也可以改变第一报文IOAM头部的部分字段,第二报文中经过改变后的部分字段包括当前网络节点的IOAM头部,即当前网络节点可以采用预分配模式添加IOAM信息。也就是说,当前网络节点将将IOAM头部的部分字段的值设置为当前网络节点的IOAM信息。
当前网络节点可以根据流分类结果,获取第一报文的序列号。示例性地,当前网络节点可以根据流标识获取第一报文对应的序列号。当前网络节点可以将序列号写入第一报文或第二报文的当前网络节点IOAM头部。当前网络节点IOAM头部可以是当前网络节点插入第一报文中的。IOAM头部可以还包括第一报文对应的时间戳、当前网络节点ID、接口ID等信息中的一种或多种。IOAM头部可以位于报文的IP头部之后。为了减小报文探测深度,流标识可以位于第二报文的特定头部,例如可以位于第二报文的二层头部,2.5层头部,三层头部中的IP头部或扩展头部。报文的三层头部可以包括IP头部。报文的二层头部可以位于三层头部之前。报文的2.5层头部可以位于报文的三层头部前,二层头部后。在一些实施例中,流标识可以位于MPLS头部,MPLS头部位于报文的2.5层头部。在一些实施例中,流标识可以位于第二报文的IP头部或IP头部的扩展头部。比如,第二报文为IPv6报文,流标识可以位于第二报文IP头部的扩展头部Hop-by-Hop Options header,通过该方式,对现有技术不产生影响。第二报文包括IOAM头部,也就是说第二报文是IOAM报文,流标识可以位于第二报文的IOAM头部之前。
在步骤S404,当前网络节点向下一网络节点发送第二报文。
当前网络节点对第一报文进行流分类之后,将对应于第一报文的流的流标识写入第一报文,得到第二报文。报文传输路径上的后续IOAM节点可以根据流标识对报文进行处理,减小了报文解析深度,降低了传输时延,提高了转发性能。后续节点不依赖于基于报文的特征生成复杂的流模板以及基于该流模板执行复杂的报文匹配分类,从而简化了后续网络节点中流分类的实现。
第二报文是包含流标识的流标识报文。第二报文可以包括第一类型信息,第一类型信息可以用于确定第二报文为携带流标识的流标识报文。后续网络节点可以通过第一类型信息,确定第二报文为携带流标识的流标识报文。第一类型信息可以位于第二报文IP头部或IP头部之前的字段。示例性地,第一类型信息可以位于报文的二层头部或2.5层头部。示例性地,第二报文为IPv6报文,第一类型信息可以位于Hop-by-Hop Options header的选择类型(option type)字段。第一类型信息可以是当前网络节点写入报文的,例如可以在当前网络节点将流标识写入第一报文之前或同时将选择类型写入第一报文,也可以是当前网络节点将第一选择类型写入第二报文。
当前网络节点可以对报文进行处理。
示例性地,对报文进行处理方法可以包括:获得流对应的配置信息。获得流对应的配置信息的方式,可以是通过将第一报文的多个特征与流模板进行匹配,同时获得第一报文对应的流的流标识和配置信息;也可以是在步骤S402第一报文的特征与流模板进行匹配,获得第一报文对应的流的流标识之后,通过流标识获得配置信息。
在一些实施例中,配置信息可以包括流对应的流行为。报文处理方法还可以包括:控制第二报文执行流行为。
在一些实施例中,当前网络节点通过等价多路径(equal-cost multipath routing,ECMP)的方式转发报文,或发送报文的的端口为TRUNK接口时,可以通过哈希方式获得所述报文的特征。配置信息可以包括用于发送报文的出口信息。报文处理方法还可以包括:通过出口信息指示的出口,发送第二报文。
示例性地,报文处理方法还可以包括:根据流标识进行统计。当前网络节点为IOAM节点。根据流标识,当前网络节点可以对不同的流进行统计,统计值对应当前网络节点中该流的报文对应的序列号。当前网络节点可以根据流标识获取该报文的序列号,在该报文中插入IOAM头部。IOAM头部可以包括序列号。序列号用于计算丢包和/或丢包位置。
第二报文中可以包括多个流标识。根据多个流标识,网络节点可以对报文进行不同的处理。
图5是本申请实施例提供的一种第二报文的格式,该报文是IPv6报文。该报文可以包括:IPv6的基本头部,IPv6的扩展头部Hop-by-Hop Options header,用户数据报协议(user datagram protocol,UDP)/传输控制协议(transmission control protocol,TCP)字段,数据(data)字段。Hop-by-Hop Options header可以包括选择类型和流标识。选择类型可以包括第一类型信息。第一类型信息可以用于确定第二报文为携带流标识的流标识报文。Hop-by-Hop Options header还可以包括选择数据长度(option data length,Opt Data Len)。
流标识可以使用Hop-by-Hop Options header中低16位缺省字段(缺省字段也可以称为保留字段),流标识也可以使用Hop-by-Hop Options header中扩展的字段,例如 Hop-by-Hop Options header扩展的32位,写入该流标识。即流标识可以位于图2中Hop-by-Hop Options header的保留1字段或扩展字段。上述方案中流标识的位置对当前报文传输的技术几乎不产生影响。可以在Hop-by-Hop Options header中增加流标识字段的定义。
第二报文中可以包括多个流标识。多个流标识可以是同一网络节点写入的,也可以是不同网络节点写入的。多个流标识可以是通过对不同的报文特征进行匹配获得的,也就是说,多个流标识可以对应于多种流分类方式。例如,第二报文可以包括根据五元组获得的流标识和根据二元组获得的流标识等。根据多种流分类方式在IOAM报文中写入多个流标识,由某一网络节点进行可以减小后续网络节点的报文探测深度,由多个网络节点进行可以实现系统资源的合理配置。
第二报文可以包括第二类型信息,第二类型信息用于标识所述流标识对应的流分类方式。例如,第二类型信息可以用于指示流标识是根据五元组确定的。第二类型信息可以与流标识位于同一报文头部中。以流标识位于第二报文的IP报文头部的扩展头部Hop-by-Hop Options header为例,第二类型信息可以位于扩展头部Hop-by-Hop Options header。如果第二报文中可以包括多个流标识。第二类型信息可以用于指示多个流标识中的每一个的对应的流分类方式。例如,第二类型信息可以用于指示第一流标识是根据五元组获得的,第二流标识是根据三元组获得的。所述第二类型信息可以位于流标识之前。
图6是本申请实施例提供的一种Hop-by-Hop Options header的格式。报文的Hop-by-Hop Options header字段可以包括:选择类型(option type),选择数据长度(option data length),流类型位图(flowtype bitmap),多个流标识等。其中流类型位图可以包括第二类型信息。流标识类型位图可以包括16位。流类型位图的每一位可以用“1”或“0”表示Hop-by-Hop Options header是否存在对应于该流分类方式的流标识。流类型位图每一位对应的流分类方式可以是:位1,SMAC与DMAC;位2,SMAC;位3,DMAC;位4,目的IP地址(destinationIP,DIP)与源IP地址(sourceIP,SIP);位5,DIP、SIP与协议(protocol);位6,DIP、SIP、协议、目的端口(destinationport,Dport)与源端口(sourceport,Sport);位7,DIP。流类型位图的后8位可以保留。
为了快速获得报文对应的流行为,流模板可以存储在三态内容寻址存储器(ternary content addressable memory,TCAM)中。当前网络节点对第一报文进行流分类之后,将对应于第一报文的流的流标识写入第一报文,得到第二报文。报文传输路径上后续的IOAM节点可以根据流标识对报文进行处理,不需要再通过ACL进行匹配,因此后续IOAM节点对于报文执行对应的流行为可以不依赖于TCAM资源,降低了成本,减小了功率的消耗。
流模板可以是当前网络节点在接收报文之前创建的。图7是本申请实施例提出的一种创建流模板的方法。图7的方法包括步骤S701至步骤S703。
在步骤S701,当前网络节点可以为流分配流标识。
流标识可用于标识报文所属的流(或称业务流)。通过流标识可以识别唯一的流。当前网络节点可以根据预先约定或预先设定的规则,为所述不同的流分配流标识。预先约定或预先设定的规则可以是报文的一个或多个特征,例如可以是五元组、三元组或报文的二层信息等。
在步骤S702,当前网络节点可以根据每个流中的报文的特征和流标识,生成流模板。
当前网络节点生成流模板,流模板可以用于指示报文的特征与流标识的对应关系。
在步骤S703,当前网络节点可以存储流模板。
为了提高查找速度,当前网络节点可以将流模板存储在TCAM中。
图8是本申请实施例提供的一种报文处理方法的示意性流程图。图8的方法包括步骤S801至步骤S802。
在步骤S801,当前网络节点接收IOAM报文,IOAM报文包含流标识,流标识位于IOAM报文的IOAM头部之前。
流标识对应IOAM报文的特征,IOAM报文的特征位于所述IOAM报文的头部。该IOAM报文的头部和IOAM头部不是同一个头部,即IOAM头部不是位于是该IOAM报文的头部字段。
IOAM报文包括IOAM报文的头部。IOAM报文的头部包括IOAM报文的特征,即IOAM报文的头部包括IOAM报文的特征的字段。例如,IOAM报文的特征包括源IP地址,则IOAM报文的头部包括IP头部,IOAM报文的源IP地址位于第一报文的IP头部;IOAM报文的特征包括源IP地址、源端口号,IOAM报文的源IP地址位于IOAM报文的IP头部,IOAM报文的源端口号位于第一报文的UDP/TCP头部,则IOAM报文的头部包括IP头部和UDP/TCP头部。第一报文的头部可以包括一个或多个头部。IOAM报文的头部不包括IOAM头部。
关于IOAM报文,可以参考图4提及的第二报文。关于IOAM报文的格式,可以参考图2。
当前网络节点可以是IOAM报文传输路径上的中间节点,也可以是尾节点。例如,当前网络节点可以是IOAM中间节点,或IOAM出口节点。
当前网络节点可以在IOAM报文中查找并获取流标识。可选地,该IOAM报文可以包括第一类型信息。第一类型信息可以用于指示该IOAM报文包括流标识。当前网络节点可以通过IOAM报文中的第一类型信息确定IOAM报文为流标识报文后,在流标识报文中查找并获取流标识。
流标识可用于标识报文所属的流(或称业务流)。IOAM报文包括IOAM头部,流标识可以位于IOAM头部之前。流标识可以位于IOAM报文的二层头部,2.5层头部,或三层头部中的IP头部。报文的三层头部可以包括IP头部。报文的二层头部可以位于三层头部之前。报文的2.5层头部可以位于报文的三层头部前,二层头部后。在一些实施例中,流标识可以位于多协议标签交换(multi-protocol label switch,MPLS)头部,MPLS头部位于报文的2.5层头部。在一些实施例中,流标识可以位于IP头部。流标识可以位于IOAM报文的IP头部的扩展头部。比如,IOAM报文为IPv6报文,流标识可以位于IOAM报文IP头部之后的扩展头部Hop-by-Hop Options header。参考图2中的报文格式,流标识可以位于Hop-by-Hop Options header的扩展字段,也可以位于字段保留1。
可选地,本申请对流标识的尺寸不作限定。流标识可以是IOAM报文的特征与流模板进行匹配获得的。流模板可以记录第一报文的特征与流标识的对应关系。IOAM报文的头部的字段可以包含IOAM报文的特征。流标识的尺寸可以大于、等于或小于IOAM报文的头部的字段的尺寸。流标识的尺寸是指流标识包含的比特的数量。IOAM报文的头部的字段的尺寸可以是指IOAM报文的头部的字段包含的比特的数量。例如,当IOAM报文的特征是目的IP地址时,IOAM报文的特征的尺寸为32比特或者128比特。流标识对应IOAM报文的头部的字段可以是与流模板进行匹配的IOAM报文的特征所在的一个或多个字段。流标识的尺寸小于IOAM报文的头部的字段的尺寸,可以减小后续节点为了进行流分类对IOAM报文进行 解析的字段长度,减小消耗的时延。
可选地,IOAM报文中可以包括多个流标识。多个流标识可以是同一网络节点写入的,也可以是不同网络节点写入的。多个流标识可以是通过对不同的报文特征进行匹配获得的,也就是说,多个流标识可以对应于多种流分类方式。例如,IOAM报文可以包括根据五元组获得的流标识和根据七元组获得的流标识等。
IOAM报文可以包括第二类型信息,第二类型信息用于标识所述流标识对应的流分类方式。例如,第二类型信息可以用于指示流标识是根据五元组确定的。第二类型信息可以与流标识位于同一报文头部中。以IOAM报文为IPv6报文,流标识位于IOAM报文的IP报文头部的扩展头部Hop-by-Hop Options header为例,第二类型信息可以位于扩展头部Hop-by-Hop Options header。如果IOAM报文中可以包括多个流标识。第二类型信息可以用于指示多个流标识中的每一个的对应的流分类方式。例如,第二类型信息可以用于指示第一流标识是根据五元组获得的,第二流标识是根据三元组获得的。关于IOAM报文的Hop-by-Hop Options header,可以参考图6中Hop-by-Hop Options header的格式。
在步骤S802,当前网络节点根据流标识,对IOAM报文进行处理。
示例性地,步骤S802可以包括:根据流标识,查找流分类表,获得流行为;根据流行为,对IOAM报文进行处理。
流分类表可以是线性表。流分类表可以记录有流标识与流行为。流分类表可以记录有流标识与流行为的对应关系。该对应关系可以是一个流标识对应一个流行为,也可以是一个流标识对应多个流行为。
流分类表可以存储在TCAM、CAM、RAM等存储器中。TCAM具有速度快、实现简单的优点,但是TCAM较为昂贵,存储芯片的容量较小,并且使用并行匹配比较方式使其功耗较大。例如流分类表可以存储在RAM中,流标识可以作为流分类表的地址,通过流标识可以地址索引进行快速查找,确定流行为,节省了网络硬件TCAM资源,减小功耗,降低成本。
示例性地,步骤S802可以包括:统计流标识。当前网络节点为IOAM节点,根据流标识,当前网络节点可以对不同的流进行统计,统计值对应当前网络节点中该流的报文对应的序列号。当前网络节点可以根据流标识获取该报文的序列号,在该报文中插入IOAM头部。IOAM头部包括序列号。序列号用于计算丢包和/或丢包位置。示例性地,当前网络节点中发送报文的端口为TRUNK接口时,步骤S802可以包括:根据流标识,确定发送报文的出口;根据该出口发送报文。
IOAM报文中可以包括多个流标识。根据多个流标识,网络节点可以对报文进行不同的处理。
例如,IOAM报文中包括第一流标识和第二流标识。第一流标识可以是根据五元组对报文进行分类得到的。第二流标识可以是根据二元组对报文进行分类得到的。当前网络节点可以根据第一流标识进行统计,获取该报文对应的序列号,插入IOAM头部,IOAM头部包括该序列号。当前网络节点中发送报文的端口为TRUNK接口,当前网络节点根据第二流标识,确定发送报文的出口,并通过该出口发送报文。
图9是本申请实施例提供的一种报文传输路径上的网络节点对报文处理方法的流程性示意图。
节点1是IOAM入口节点,通过报文的IP五元组与流模板进行匹配,获取流标识,流标识随报文携带到后续网络节点。节点2、3分别是传输路径上其他两个IOAM中间节点。 节点4是IOAM出口节点。以IPv6报文为例,对4个网络节点对报文的处理方法进行说明。
节点1对报文进行流分类。节点1根据流分类的结果,在指定业务流的报文中Hop-by-Hop Options header中插入流标识。节点1可以根据流标识,获取该报文的序列号。该序列号可以用于分析器计算丢包,可以用于分析器计算丢包的位置。节点1基于流标识对业务流进行统计,统计值对应在节点1中该报文的序列号。节点1在报文中插入IOAM头部1,在Hop-by-Hop Options header中插入流标识。IOAM头部1可以包括时间戳、节点1的节点ID、接口ID、该报文的序列号等信息。
节点2、3可以根据Hop-by-Hop Options header的选择类型确定接收的报文是IOAM报文并且携带有流标识。节点2、3可以根据该报文的流标识进行统计,即根据流标识获取该报文的序列号。节点2、3可以分别在报文中插入IOAM头部2、3。IOAM头部包括时间戳、节点ID、接口ID、序列号等信息。
节点4可以根据Hop-by-Hop Options header的选择类型确定接收的报文是IOAM报文并且携带有流标识。节点4可以根据该报文的流标识进行统计,即根据流标识获取该报文的序列号。节点4可以将报文解封装,向分析器上报统计的节点1-3的采集数据。采集数据可以包括所述报文中节点1-3的IOAM头部中的数据。该采集数据可以是预设周期内的。节点4还可以将节点4对应的时间戳、节点ID、接口ID、序列号等信息发送至分析器。
分析器对统计周期内的报文进行分析,确定丢包和丢包位置。将发包的序列号和接收端的序列号进行对比,差额就是丢失的报文。根据每个节点的序列号,可以计算具体的丢包位置。
节点1对报文的处理流程如图10所示。图10的方法包括步骤创建模板(S1001)、下发规则(S1002)、规则匹配(S1003)、填充流标识(S1004)。
在步骤S1001,节点1可以对于特定的流分配流标识,流模板可用于记录流特征与流标识的对应关系。流模板可用于根据报文的IP五元组对报文进行复杂流分类。
在步骤S1002,节点1可以将流模板下发并存储在TCAM中。
在步骤S1003,当报文进入节点1的接口,节点1可以根据TCAM中的流模板确定的规则,例如IP五元组,对报文进行匹配。
在步骤S1004,如果匹配成功,节点1可以将匹配返回的结果,即流标识,填入报文中,同时写入第一类型信息,第一类型信息可以用于指示所述报文包括流标识。。
以Ipv6报文为例,节点1将流标识写入报文的Hop-by-Hop Options header。该字段由报文传送路径上的每个节点读取并处理。报文在进入各个网络节点时的格式如图11所示。
节点2、3对报文处理方法的流程性示意图如图12所示。图12的方法包括步骤创建流表(S1201)、识别流标识报文(S1202)、根据流标识处理报文(S1203)。
在步骤S1201,根据流标识创建流表,流表为线性表。流表可用于记录流标识与流行为的对应关系。流表可以是线性表。
在步骤S1202,获取报文,识别报文为流标识报文,即识别报文为包括流标识的报文。报文可以包括第一类型信息,第一类型信息可以用于指示该报文包括流标识。报文可以包括第二类型信息,第二类型信息可以用于指示所述流标识对应的流分类方式。例如,第二类型信息可以用于指示流标识是根据五元组确定的。第二类型信息可以与流标识位于同一报文头部中。以流标识位于第二报文的IP报文头部的扩展头部Hop-by-Hop Options header 为例,第二类型信息可以位于扩展头部Hop-by-Hop Options header。如果报文中可以包括多个流标识。第二类型信息可以用于指示多个流标识中的每一个的对应的流分类方式。例如,第二类型信息可以用于指示第一流标识是根据五元组获得的,第二流标识是根据三元组获得的。
在步骤S1203,根据流标识处理报文。
报文传输路径上,网络首节点在报文中填入流标识,后续网络节点根据流标识对报文进行处理,不依赖于复杂的匹配过程,减小了系统的资源浪费,减少对报文的深度探测,提高转发性能。
上文结合图1至图12的描述了本申请实施例的方法实施例,下面结合图13至图15,描述本申请实施例的装置实施例。应理解,方法实施例的描述与装置实施例的描述相互对应,因此,未详细描述的部分可以参见前面方法实施例。
图13是本申请实施例提供的一种报文处理的网络设备1300,包括:接收单元1301,确定单元1302,得到单元1303,发送单元1304。
接收单元1301,用于当前网络节点接收第一报文。
确定单元1302,用于确定与所述第一报文对应的流标识,所述第一报文不包括所述流标识,所述第一报文的特征对应所述流标识,所述第一报文的特征位于所述第一报文的头部;
得到单元1303,用于根据所述第一报文以及所述流标识,得到第二报文,所述第二报文包含所述流标识以及IOAM头部,所述第二报文中所述流标识位于所述IOAM头部之前;
发送单元1304,用于向下一网络节点发送所述第二报文。
可选地,当所述IP头部为互联网协议第六版IPv6头部时,所述流标识位于所述IPv6头部的Hop-by-Hop Options header。
可选地,所述流标识对应所述第一报文的头部的字段,所述流标识的尺寸小于所述第一报文的头部的字段的尺寸。
图14是本申请实施例提供的一种报文处理的网络设备1400,包括:接收单元1401,处理单元1402。
接收单元1401,用于接收带内操作维护管理IOAM报文,所述IOAM报文包含流标识,所述流标识位于所述IOAM头部之前,所述流标识对应所述IOAM报文的特征,所述IOAM报文的特征位于所述IOAM报文的头部,所述IOAM报文的头部和所述IOAM头部不是同一个头部;
处理单元1402,用于根据所述流标识,对所述IOAM报文进行处理。
可选地,当所述IP头部为互联网协议第六版IPv6头部时,所述流标识位于所述IPv6头部的Hop-by-Hop Options header。
可选地,在一种可能的实现方式中,所述流标识对应所述IOAM报文的头部的字段,所述流标识的尺寸小于所述IOAM报文的头部的字段的尺寸。
可选地,处理单元1402还用于,根据所述流标识,查找流分类表,获得流行为,所述流分类表为线性表,所述线性表记录有所述流标识与所述流行为;处理单元1402还用于,根据所述流行为,对所述IOAM报文进行处理。
可选地,所述流分类表存储于随机存取存储器RAM中。
图15是本申请一个实施例提供的通信装置的示意性结构图。图15所示的通信装置1500 可对应于前文描述的用户设备或网络设备。通信装置1500可包括:至少一个处理器1501和通信接口1502,所述通信接口1502可用于所述通信装置1500与其他通信装置进行信息交互,当程序指令在所述至少一个处理器1501中执行时,使得所述通信装置1500实现前文中的网络设备执行的各个步骤或方法或操作或功能。
本申请实施例还提供一种通信系统,其包括一个或多个前述的网络设备。
本申请实施例还提供一种计算机程序存储介质,其特征在于,所述计算机程序存储介质具有程序指令,当所述程序指令被执行时,使得前文中的方法被执行。
本申请实施例还提供一种芯片系统,其特征在于,所述芯片系统包括至少一个处理器,当程序指令在所述至少一个处理器中执行时,使得前文中的方法的方法被执行。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本申请实施例中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示单独存在A、同时存在A和B、单独存在B的情况。其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项”及其类似表达,是指的这些项中的任意组合,包括单项或复数项的任意组合。例如,a,b和c中的至少一项可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (12)

  1. 一种报文处理方法,其特征在于,包括:
    当前网络节点接收第一报文;
    所述当前网络节点确定与所述第一报文对应的流标识,所述第一报文不包括所述流标识,所述第一报文的特征对应所述流标识,所述第一报文的特征位于所述第一报文的头部;
    所述当前网络节点根据所述第一报文以及所述流标识,得到第二报文,所述第二报文包含所述流标识以及IOAM头部,所述第二报文中所述流标识位于所述IOAM头部之前;
    所述当前网络节点向下一网络节点发送所述第二报文。
  2. 根据权利要求1所述的方法,其特征在于,当所述IP头部为互联网协议第六版IPv6头部时,所述流标识位于逐跳选项头部Hop-by-Hop Options header。
  3. 根据权利要求1或2所述的方法,其特征在于,
    所述流标识对应所述第一报文的头部的字段,所述流标识的尺寸小于所述第一报文的头部的字段的尺寸。
  4. 一种报文处理方法,其特征在于,包括:
    网络节点接收带内操作维护管理IOAM报文,所述IOAM报文包含流标识,所述流标识位于所述IOAM报文的IOAM头部之前,所述流标识对应所述IOAM报文的特征,所述IOAM报文的特征位于所述IOAM报文的头部,所述IOAM报文的头部和所述IOAM头部不是同一个头部;
    所述网络节点根据所述流标识,对所述IOAM报文进行处理。
  5. 根据权利要求4所述的方法,其特征在于,当所述IP头部为互联网协议第六版IPv6头部时,所述流标识位于逐跳选项头部Hop-by-Hop Options header。
  6. 根据权利要求4或5所述的方法,其特征在于,
    所述流标识对应所述IOAM报文的头部的字段,所述流标识的尺寸小于所述IOAM报文的头部的字段的尺寸。
  7. 根据权利要求4或5所述的方法,其特征在于,所述根据所述流标识,对所述IOAM报文进行处理,包括:
    根据所述流标识查找流分类表,获得流行为,所述线性表记录有所述流标识与所述流行为;根据所述流行为,对所述IOAM报文进行处理。
  8. 根据权利要求4或5所述的方法,其特征在于,所述流分类表存储于随机存取存储器RAM中。
  9. 一种网络设备,其特征在于,包括用于执行如权利要求1至8中任一项所述的方法的模块。
  10. 一种通信装置,其特征在于,所述通信装置包括:至少一个处理器和通信接口,所述通信接口用于所述通信装置与其他通信装置进行信息交互,当程序指令在所述至少一个处理器中执行时,使得所述通信装置执行如权利要求1至8中任一项所述的方法。
  11. 一种计算机程序存储介质,其特征在于,所述计算机程序存储介质具有程序指令,当所述程序指令被执行时,使得如权利要求1至8中任一项所述的方法被执行。
  12. 一种芯片,其特征在于,所述芯片包括至少一个处理器,当程序指令被所述至少一个处理器中执行时,使得如权利要求1至8中任一项所述的方法被执行。
PCT/CN2020/078610 2019-04-04 2020-03-10 报文处理的方法和网络装置 WO2020199863A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP20782786.6A EP3896932B1 (en) 2019-04-04 2020-03-10 Message processing method and network device
US17/386,657 US20210359939A1 (en) 2019-04-04 2021-07-28 Packet processing method and network apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910272143.0A CN109743340B (zh) 2019-04-04 2019-04-04 报文处理的方法和网络装置
CN201910272143.0 2019-04-04

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/386,657 Continuation US20210359939A1 (en) 2019-04-04 2021-07-28 Packet processing method and network apparatus

Publications (1)

Publication Number Publication Date
WO2020199863A1 true WO2020199863A1 (zh) 2020-10-08

Family

ID=66371399

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/078610 WO2020199863A1 (zh) 2019-04-04 2020-03-10 报文处理的方法和网络装置

Country Status (4)

Country Link
US (1) US20210359939A1 (zh)
EP (1) EP3896932B1 (zh)
CN (1) CN109743340B (zh)
WO (1) WO2020199863A1 (zh)

Families Citing this family (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109743340B (zh) * 2019-04-04 2019-07-30 华为技术有限公司 报文处理的方法和网络装置
CN114553746A (zh) * 2019-05-16 2022-05-27 华为技术有限公司 一种报文的检测方法、设备及系统
CN111953604B (zh) * 2019-05-17 2023-07-18 华为技术有限公司 一种为业务流提供业务服务的方法和装置
CN112019492B (zh) * 2019-05-31 2021-06-22 华为技术有限公司 访问控制方法、装置及存储介质
CN112291076A (zh) * 2019-07-25 2021-01-29 华为技术有限公司 丢包定位方法、装置及系统、计算机存储介质
CN112350844B (zh) * 2019-08-09 2024-03-29 华为技术有限公司 用于数据传输的方法和装置
CN112448926B (zh) * 2019-08-30 2022-07-08 烽火通信科技股份有限公司 一种带内操作管理维护ioam的处理方法及系统
CN110572415B (zh) * 2019-10-14 2022-01-21 迈普通信技术股份有限公司 一种安全防护的方法、设备及系统
CN112787873B (zh) * 2019-11-01 2022-08-02 烽火通信科技股份有限公司 一种ioam时延测量性能排序方法及系统
CN112866042B (zh) * 2019-11-12 2023-07-18 中兴通讯股份有限公司 网络质量检测方法、装置、计算机设备和计算机可读介质
CN110808924B (zh) * 2019-11-12 2021-05-18 迈普通信技术股份有限公司 芯片环回报文处理方法、装置及存储介质
CN113132226A (zh) * 2019-12-30 2021-07-16 华为技术有限公司 发送报文的方法、装置及系统
CN113132309B (zh) * 2019-12-31 2023-04-14 中移(成都)信息通信科技有限公司 数据包头部信息的获取方法、装置、设备和介质
CN113079091B (zh) * 2020-01-03 2022-07-22 华为技术有限公司 一种主动随流检测的方法、网络设备以及通信系统
CN113328901B (zh) * 2020-02-28 2023-04-28 华为技术有限公司 报文乱序检测方法、装置及系统
CN113382437A (zh) * 2020-03-10 2021-09-10 华为技术有限公司 一种随流检测方法及装置
CN113556259B (zh) * 2020-04-24 2024-04-12 华为技术有限公司 一种基于随流检测的报文处理方法及装置
US11711370B2 (en) * 2020-05-14 2023-07-25 Arista Networks, Inc. Automatic TCAM profiles
CN113824574A (zh) * 2020-06-18 2021-12-21 中兴通讯股份有限公司 检测配置、处理方法、系统及控制、通信设备、存储介质
CN112188525B (zh) * 2020-09-28 2022-04-15 烽火通信科技股份有限公司 一种基于策略模板定制的ioam部署方法及系统
CN115134273A (zh) * 2021-03-29 2022-09-30 北京华为数字技术有限公司 一种报文处理方法以及相关设备
CN115174449B (zh) * 2022-05-30 2024-03-26 杭州初灵信息技术股份有限公司 一种传递随流检测信息的方法、系统、装置和存储介质
CN117728927B (zh) * 2024-02-18 2024-05-10 南京风启科技有限公司 一种基于域标识的变长报文处理时延探测方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101771595A (zh) * 2008-12-29 2010-07-07 华为技术有限公司 一种报文保序的方法和装置
CN102271079A (zh) * 2010-06-04 2011-12-07 华为技术有限公司 报文转发的方法、节点和系统
CN103166866A (zh) * 2011-12-12 2013-06-19 华为技术有限公司 生成表项的方法、接收报文的方法及相应装置和系统
US20170041230A1 (en) * 2014-04-21 2017-02-09 Hangzhou H3C Technologies Co., Ltd. Forwarding data packets
CN109561021A (zh) * 2017-09-25 2019-04-02 华为技术有限公司 一种报文转发的方法及网络设备
CN109743340A (zh) * 2019-04-04 2019-05-10 华为技术有限公司 报文处理的方法和网络装置

Family Cites Families (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020181400A1 (en) * 2001-05-30 2002-12-05 Nokia Corporation Method of communicating a flow of data packets across a network
EP1324628B1 (en) * 2001-12-13 2009-11-11 Sony Deutschland GmbH Adaptive quality-of-service reservation and pre-allocation for mobile systems
US8787377B2 (en) * 2011-03-21 2014-07-22 Avaya, Inc. Usage of masked BMAC addresses in a provider backbone bridged (PBB) network
US9456378B2 (en) * 2013-09-25 2016-09-27 Intel Corporation End-to-end (E2E) tunneling for multi-radio access technology (multi-rat)
US9516144B2 (en) * 2014-06-19 2016-12-06 Palo Alto Research Center Incorporated Cut-through forwarding of CCNx message fragments with IP encapsulation
CN104378245B (zh) * 2014-12-09 2018-01-05 盛科网络(苏州)有限公司 在l2vpn架构的ac口上实现oam的方法及装置
US10187209B2 (en) * 2015-04-27 2019-01-22 Cisco Technology, Inc. Cumulative schemes for network path proof of transit
US10270690B2 (en) * 2016-02-29 2019-04-23 Cisco Technology, Inc. System and method for dataplane-signaled packet capture in IPV6 environment
US10425327B2 (en) * 2016-11-10 2019-09-24 Argela Yazilim Ve Bilisim Teknolojileri San Ve Tic. A.S. System and method for routing in software defined networks using a flow header
US10454828B2 (en) * 2016-12-21 2019-10-22 Cisco Technology, Inc. Machine learning-derived entropy path graph from in-situ OAM (iOAM) data
CN108737128B (zh) * 2017-04-13 2022-10-28 中兴通讯股份有限公司 一种实现带内操作管理维护ioam的方法及装置
CN108737127B (zh) * 2017-04-13 2022-07-22 中兴通讯股份有限公司 一种信息通告方法及装置
CN108737269B (zh) * 2017-04-13 2021-11-26 中兴通讯股份有限公司 一种封装方法、装置和节点
CN108737124B (zh) * 2017-04-13 2022-07-19 中兴通讯股份有限公司 一种信息通告方法及装置
CN108965204B (zh) * 2017-05-18 2022-01-25 中兴通讯股份有限公司 一种自动实现ioam封装的方法及装置
US10588012B2 (en) * 2017-07-28 2020-03-10 Cisco Technology, Inc. In-situ operations, administration and management proxy
US11343703B2 (en) * 2017-09-18 2022-05-24 Lg Electronics Inc. Method for performing reflective quality of service in wireless communication system and a device therefor
US10958506B2 (en) * 2017-12-07 2021-03-23 Cisco Technology, Inc. In-situ OAM (IOAM) network risk flow-based “topo-gram” for predictive flow positioning
US10498639B2 (en) * 2018-03-13 2019-12-03 Futurewei Technologies, Inc. Collecting network OAM flow data using out-of-band messages
US11032193B2 (en) * 2018-09-11 2021-06-08 Cisco Technology, Inc. In-situ operation, administration, and maintenance in segment routing with multiprotocol label switching networks
CN109347671B (zh) * 2018-10-24 2021-11-05 苏州盛科通信股份有限公司 一种在芯片中实现带内OAM Metadata编辑的系统及方法
US11909650B2 (en) * 2019-02-22 2024-02-20 Juniper Networks, Inc. Internet protocol operations and management option

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101771595A (zh) * 2008-12-29 2010-07-07 华为技术有限公司 一种报文保序的方法和装置
CN102271079A (zh) * 2010-06-04 2011-12-07 华为技术有限公司 报文转发的方法、节点和系统
CN103166866A (zh) * 2011-12-12 2013-06-19 华为技术有限公司 生成表项的方法、接收报文的方法及相应装置和系统
US20170041230A1 (en) * 2014-04-21 2017-02-09 Hangzhou H3C Technologies Co., Ltd. Forwarding data packets
CN109561021A (zh) * 2017-09-25 2019-04-02 华为技术有限公司 一种报文转发的方法及网络设备
CN109743340A (zh) * 2019-04-04 2019-05-10 华为技术有限公司 报文处理的方法和网络装置

Also Published As

Publication number Publication date
CN109743340A (zh) 2019-05-10
EP3896932B1 (en) 2023-10-04
US20210359939A1 (en) 2021-11-18
EP3896932A4 (en) 2022-02-16
EP3896932A1 (en) 2021-10-20
CN109743340B (zh) 2019-07-30

Similar Documents

Publication Publication Date Title
WO2020199863A1 (zh) 报文处理的方法和网络装置
US10735325B1 (en) Congestion avoidance in multipath routed flows
CN106464590B (zh) 一种获取路径信息的方法及装置
US7289498B2 (en) Classifying and distributing traffic at a network node
WO2021109610A1 (zh) 传输质量检测方法及装置、系统、存储介质
US7773600B2 (en) Device for flow classifying and packet forwarding device with flow classify function
US9065775B2 (en) Switching apparatus and method based on virtual interfaces
US7826486B2 (en) Selective header field dispatch in a network processing system
US10693790B1 (en) Load balancing for multipath group routed flows by re-routing the congested route
US10778588B1 (en) Load balancing for multipath groups routed flows by re-associating routes to multipath groups
KR100737525B1 (ko) 아이피 버전 6 (IPv6) 플로우레이블 생성방법
US20120023217A1 (en) Method and apparatus for policy enforcement using a tag
CN107181663A (zh) 一种报文处理方法、相关设备及计算机可读存储介质
WO2021017930A1 (zh) 报文转发
US10819640B1 (en) Congestion avoidance in multipath routed flows using virtual output queue statistics
US10601610B2 (en) Tunnel-level fragmentation and reassembly based on tunnel context
US8705365B1 (en) System and method for producing dynamic credit updates for time based packet sampling
CN112437009B (zh) SRv6端到端流策略的方法、路由器、路由系统和存储介质
US8295177B1 (en) Flow classes
CN112383450A (zh) 一种网络拥塞检测方法及装置
US8340090B1 (en) Interconnecting forwarding contexts using u-turn ports
US20060002393A1 (en) Primary control marker data structure
US20090003354A1 (en) Method and System for Packet Traffic Congestion Management
WO2006006005A2 (en) Chaining control marker data structure
KR100785776B1 (ko) Ip 버전 6 라우터에서 패킷 처리 장치 및 그 방법

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: 20782786

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020782786

Country of ref document: EP

Effective date: 20210714

NENP Non-entry into the national phase

Ref country code: DE