WO2023241520A1 - 随流检测方法、装置、设备、系统及存储介质 - Google Patents

随流检测方法、装置、设备、系统及存储介质 Download PDF

Info

Publication number
WO2023241520A1
WO2023241520A1 PCT/CN2023/099728 CN2023099728W WO2023241520A1 WO 2023241520 A1 WO2023241520 A1 WO 2023241520A1 CN 2023099728 W CN2023099728 W CN 2023099728W WO 2023241520 A1 WO2023241520 A1 WO 2023241520A1
Authority
WO
WIPO (PCT)
Prior art keywords
flow
service
identifier
network device
message
Prior art date
Application number
PCT/CN2023/099728
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
Priority claimed from CN202210938620.4A external-priority patent/CN117278451A/zh
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023241520A1 publication Critical patent/WO2023241520A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Definitions

  • This application relates to the field of communication technology, and in particular to flow detection methods, devices, equipment, systems and storage media.
  • the control device will generate different flow identifiers based on the service characteristic information of different service flows, and then deliver the corresponding relationship between the service characteristic information and the flow identifier to the network device, so that when the network device transmits service packets on the data plane, It can be determined that the service message is a message that needs to be detected along the flow according to the service characteristic information included in the service message, and the service message can be detected along the flow according to the flow identifier corresponding to the service characteristic information.
  • the present application provides a flow-following detection method, device, equipment, system and storage medium, which are used to generate corresponding flow identifiers for the service flows undergoing flow-following detection through network equipment on the data plane.
  • a flow-following detection method includes: after receiving the first service message, the first network device based on the The first service characteristic information generates a first flow identifier corresponding to the service flow to which the first service message belongs, where the first service characteristic information is used to identify the service message belonging to the service flow; after generating the first flow identifier, The first flow identifier is added to the first service message to obtain the second service message, and the second service message is sent. The first flow identifier is used to instruct the second network device that receives the second service message to perform flow detection based on the first flow identifier.
  • This method generates a flow identifier on the data plane and adds the flow identifier to the service packets that need to be detected to achieve flow-following detection, making the detected business packets more comprehensive and achieving rapid and lossless flow-following detection. detection.
  • it Compared with the method of obtaining flow identification through the control plane, it not only improves the efficiency of flow identification generation, but also reduces the information interaction between the data plane and the control plane, avoiding damage to flow detection caused by packet loss and other phenomena of information interaction. , further ensuring non-destructive flow detection and improving the detection capability of flow detection.
  • the first service message is the first message of the service flow or the first message after the service characteristic information of the service flow changes.
  • the first service message is the first message after the service characteristic information of the service flow changes
  • rapid and lossless in-flow detection of the service flow whose service characteristic information changes dynamically can be achieved. That is, the transmitted business flow can be dynamically and accurately monitored.
  • the first service packet is the first packet of the service flow
  • flow-following detection of the service flow can be automatically implemented on the data plane, improving the efficiency of flow-following detection.
  • the first network device may generate the first flow identifier based on the identifier of the first network device, the identifier of the first chip, and the first service identifier.
  • the first chip is a chip on the first network device that receives the first service message, and the first service identifier is allocated by the first chip to the first service feature information.
  • the identity of the first network device is unique within the flow detection domain
  • the identity of the first chip is unique within the first network device
  • the first service identity is unique within the first chip. Therefore, the generated first flow identifier is unique within the flow-following detection domain, ensuring that in an application scenario where the first network device includes multiple chips, the first-flow identification will not conflict on each network device within the flow-following detection domain. Improved accuracy of flow detection.
  • the first network device may generate the first flow identifier based on the identifier of the first network device, the identifier of the first chip, the identifier of the first storage medium, and the first service identifier.
  • the first storage medium on the first chip is a storage medium on the first network device that receives the first service message, and the first service identifier is allocated by the first storage medium for the first service feature information.
  • the identity of the first network device is unique within the flow detection domain
  • the identity of the first chip is unique within the first network device
  • the first storage medium is unique within the first chip
  • the first A service identifier is unique within the first storage medium. Therefore, the generated first flow identifier is unique within the flow-following detection domain, ensuring that in an application scenario where the first network device includes multiple chips and each chip includes multiple storage media, the first flow identifier is unique within the flow-following detection domain. There will be no conflicts on various network devices, which improves the accuracy of flow detection.
  • the first network device may generate the first flow identification based on the identification of the first flow-following detection instance and the first service identification.
  • the first service identifier is allocated by the first network device for the first service characteristic information; the identifier of the first flow-following detection instance is issued by the control device, that is, generated based on the first service characteristic information included in the first service message.
  • the first network device receives the identifier of the first flow-following detection instance sent by the control device, and the first flow-following detection instance is used to follow the flow of the service flow. detection.
  • the control device is a device that configures multiple flow-following detection instances in the flow-following detection domain
  • the identity of the first flow-following detection instance is uniformly distributed and issued by the control device, which can ensure the first flow-following detection instance.
  • the identity of the instance is unique within the flow detection domain
  • the first service identity is unique within the first network device. Therefore, the generated first flow identifier is unique in the flow-following detection domain, which ensures that the first-flow identification will not conflict on each network device in the flow-following detection domain, and improves the accuracy of the flow-following detection.
  • the first network device after receiving the first service message, when the first service feature information belongs to the service feature range, the first network device generates the first service feature information based on the first service feature information included in the first service message.
  • the service characteristic range is issued by the control device, that is, before generating the first flow identifier corresponding to the service flow to which the first service message belongs based on the first service characteristic information included in the first service message
  • the first network device receives the control The service characteristic range of the first in-flow detection instance sent by the device.
  • the first in-flow detection instance is used to perform in-flow detection on the service flow.
  • the business feature range includes multiple business feature information, it is possible to implement accurate in-flow inspection of business flows that belong to the business feature range and whose business feature information changes dynamically. Measurement.
  • the first service characteristic information and the first flow identifier may also be saved.
  • the mapping flow table includes multiple service characteristic information and a flow identifier corresponding to each service characteristic information.
  • the mapping flow table after the mapping flow table is constructed, the mapping flow table can also be maintained.
  • the method of maintaining the mapping flow table may be to delete the corresponding relationship between the first service characteristic information and the first flow identifier in the mapping flow table based on the fact that no service message including the first service characteristic information is received within the reference period; When the time period after deleting the corresponding relationship between the first service characteristic information and the first flow identifier reaches the reference period, the first flow identifier is recycled, and the recycled first flow identifier can be allocated to other service characteristic information.
  • the first network device can also report the mapping flow table to the control device, so that the control device can map multiple network devices on the forwarding path of the received service flow according to the mapping flow table.
  • the multiple flow detection data sent separately are analyzed, and the service quality corresponding to the service flow is obtained based on the analysis results.
  • a flow-following detection method includes: the control device sends the service characteristic range of the first flow-following detection instance to the first network device, and the first flow-following detection instance is The service characteristic range of the detection instance is used for the first network device.
  • the first service characteristic information of the first service message belongs to the service characteristic range, generate a first flow corresponding to the service flow to which the first service message belongs based on the first service characteristic information. logo.
  • the method By sending the service characteristic range to the first network device, the method enables the first network device to accurately perform on-flow detection on the specified service flow, making the target of on-flow detection more accurate. And because the business feature range includes multiple business feature information, it is possible to accurately detect business flows that belong to the business feature range and whose business feature information changes dynamically.
  • the first service message is the first message of the service flow or the first message after the service characteristic information of the service flow changes.
  • control device also sends an identifier of the first accompanying detection instance to the first network device, and the identifier of the first accompanying detection instance is used by the first network device based on the first accompanying detection instance.
  • the first flow identification is generated by detecting the identification of the instance and the first service identification.
  • the first service identifier is allocated by the first network device for the first service feature information.
  • the first network device is configured to The first flow identifier generated by the identifier and the first service identifier is unique within the flow-following detection domain, which ensures that the first-flow identification will not conflict on each network device within the flow-following detection domain, and improves the accuracy of the flow-following detection.
  • the control device also receives a mapping flow table sent by the first network device.
  • the mapping flow table includes a plurality of service characteristic information and a flow identifier corresponding to each service characteristic information.
  • the control device is able to analyze multiple flow-following detection data received by multiple network devices on the forwarding path of the service flow according to the mapping flow table, and then obtain the service quality corresponding to the service flow based on the analysis results. .
  • a following flow detection device is provided, the device is applied to the first network device, and the device includes:
  • the first receiving module is used to receive the first service message
  • Generating module configured to generate a first flow identifier corresponding to the service flow to which the first service message belongs based on the first service characteristic information included in the first service message, where the first service characteristic information is used to identify the first flow identifier belonging to the service flow.
  • Obtaining module configured to add the first flow identifier to the first service message to obtain a second service message, where the first flow identifier is used to indicate the second network device that received the second service message. Perform flow detection based on the first flow identifier;
  • the first sending module is used to send the second service message.
  • the generating module is configured to generate the first flow identifier based on an identifier of the first network device, an identifier of a first chip, and a first service identifier, and the first chip is the first flow identifier of the first network device.
  • a chip on a network device receives the first service message, and the first service identifier is allocated by the first chip to the first service feature information.
  • the device further includes:
  • Generating module configured to generate, based on the first service characteristic information included in the first service message, corresponding to the service flow to which the first service message belongs when the first service characteristic information belongs to the service characteristic range.
  • First class logo configured to generate, based on the first service characteristic information included in the first service message, corresponding to the service flow to which the first service message belongs when the first service characteristic information belongs to the service characteristic range.
  • the device further includes:
  • a recycling module configured to recycle the first flow identification when the time period after deletion of the corresponding relationship between the first service characteristic information and the first flow identification reaches a reference time length.
  • the device further includes:
  • the second sending module is used to send the mapping flow table to the control device.
  • a flow-following detection device which device is used in control equipment.
  • the device includes:
  • a sending module configured to send the service characteristic range of the first flow-following detection instance to the first network device.
  • the service characteristic range of the first flow-following detection instance is used by the first network device when the first service message is received.
  • First class logo configured to send the service characteristic range of the first flow-following detection instance to the first network device.
  • the first service message is the first message of the service flow or the first message after the service characteristic information of the service flow changes.
  • the sending module is further configured to send an identifier of the first along-flow detection instance to the first network device, where the identifier of the first along-flow detection instance is used for the first
  • the network device generates the first flow identifier based on the identifier of the first flow-following detection instance and a first service identifier.
  • the first service identifier is allocated by the first network device for the first service feature information.
  • the device further includes:
  • a network device in a fifth aspect, includes: a processor, the processor is coupled to a memory, and at least one program instruction or code is stored in the memory. The at least one program instruction or code is generated by the The processor loads and executes, so that the network device implements the following flow detection method as described in either the first aspect or the second aspect.
  • processors there are one or more processors and one or more memories.
  • the memory may be integrated with the processor, or the memory may be provided separately from the processor.
  • the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated on the same chip as the processor, or can be set in different On the chip, this application does not limit the type of memory and the arrangement of the memory and the processor.
  • ROM read-only memory
  • a communication device which includes a transceiver, a memory, and a processor.
  • the transceiver, the memory and the processor communicate with each other through an internal connection path
  • the memory is used to store instructions
  • the processor is used to execute the instructions stored in the memory to control the transceiver to receive signals and control the transceiver to send signals.
  • the communication device is caused to execute the method in the first aspect or any possible implementation of the first aspect, or to execute the second aspect or any one of the second aspects. possible implementation methods.
  • a flow-following detection system which includes a first network device and a control device;
  • the first network device is configured to perform the method described in the first aspect or any possible implementation of the first aspect
  • the control device is configured to perform the second aspect or any one of the second aspects. possible implementation methods.
  • a computer-readable storage medium is provided. At least one instruction is stored in the storage medium, and the instruction is loaded and executed by a processor, so that the computer implements the above-mentioned first aspect or any one of the first aspects.
  • a computer program includes: computer program code.
  • the computer program code When the computer program code is run by a computer, it causes the computer to perform the methods in the above aspects.
  • a chip including a processor for calling and running instructions stored in the memory, so that the communication device installed with the chip executes the methods in the above aspects.
  • the chip and the first chip on the first network device that receives the first service message may be the same chip, or they may be different chips.
  • another chip including: an input interface, an output interface, a processor, and a memory, and the input interface, the output interface, the processor, and the memory are connected through an internal connection path, and the The processor is used to execute the code in the memory.
  • the processor is used to execute the methods in the above aspects.
  • the chip and the first chip on the first network device that receives the first service message may be the same chip, or they may be different chips.
  • Figure 1 is a schematic diagram of the implementation environment of a flow-following detection method provided by an embodiment of the present application
  • Figure 2 is a schematic diagram of a flow-following detection process provided by an embodiment of the present application.
  • Figure 3 is a flow chart of a flow-following detection method provided by an embodiment of the present application.
  • Figure 4 is a schematic diagram of a control device delivering configuration information according to an embodiment of the present application.
  • Figure 5 is a flow chart for maintaining a mapping flow table provided by an embodiment of the present application.
  • Figure 6 is a schematic structural diagram of a flow detection head provided by an embodiment of the present application.
  • Figure 7 is a flow chart for obtaining a flow identifier provided by an embodiment of the present application.
  • Figure 8 is a schematic diagram of another flow-following detection process provided by an embodiment of the present application.
  • Figure 9 is a schematic structural diagram of a flow-following detection device provided by an embodiment of the present application.
  • Figure 10 is a schematic structural diagram of another flow-following detection device provided by an embodiment of the present application.
  • Figure 11 is a schematic structural diagram of a switch provided by an embodiment of the present application.
  • Figure 12 is a schematic structural diagram of a network device provided by an embodiment of the present application.
  • Figure 13 is a schematic structural diagram of another network device provided by an embodiment of the present application.
  • the scale of the network is gradually increasing.
  • flow-based detection on the business flows transmitted in the network on each network device in the forwarding path the real transmission status of the business flows can be obtained and real-time monitoring of network performance can be achieved.
  • the purpose of quickly sensing network faults is to ensure that high-quality, stable and reliable network services can be provided.
  • the detection object is usually a business flow
  • the business flow can be flexibly defined based on business characteristic information.
  • the service characteristic information may include five-tuple information of the service packet.
  • the five-tuple information includes the destination Internet Protocol (IP) address, source IP address, protocol (Protocol) number, Layer 4 destination port number, Layer 4 Source port number.
  • IP Internet Protocol
  • Protocol protocol
  • Layer 4 destination port number Layer 4 Source port number
  • Mapping business characteristic information into a flow identity (Flow ID) can simplify the business characteristic information used to identify different business flows.
  • Flow IDs of different business flows are uniformly assigned through the management and control plane (such as control equipment) to ensure that the Flow ID is globally unique within the detection domain, so that any network device can uniquely identify a business flow through the Flow ID.
  • the network device as the head (Initial) node completes the identification of the business characteristic information at the entrance of receiving the service flow, and then assigns the Flow ID to the service characteristic information according to the management and control plane.
  • Add flow detection information (including the Flow ID) to the service packets to implement in-band flow detection.
  • the business characteristic information of the business flow may change, even if it is the same type of business for the same user.
  • the stream also cannot guarantee that the quintuple will not change.
  • the Layer 4 source port number of Transmission Control Protocol (TCP)/User Datagram Protocol (UDP) messages initiated by a terminal or server at different times will dynamically change; for another example, when When a network failure occurs, the service characteristic information of the same service flow will also change after it is re-initiated or the link is re-established; for another example, in the communication network of a virtual extensible local area network (VXLAN), the same service flow
  • VXLAN virtual extensible local area network
  • the implementation environment includes a head node device, an intermediate node device, a tail node device and a control device.
  • the node device and the tail node device are both connected to the control device.
  • the head node device, the intermediate node device, and the tail node device are network devices on the forwarding path for service flow transmission. It can be understood that the head node device that receives the service flow is the entrance of the service flow in the network, and the tail node device that sends the service flow is the exit of the service flow in the network.
  • the implementation environment shown in Figure 1 may also include two or more intermediate node devices. The embodiment of the present application does not limit the number of intermediate node devices.
  • the head node device, the intermediate node device, and the tail node device are used to actually deploy the flow detection to obtain the detection data for the flow detection of the service flow and report the detection data to the control device.
  • the head node device, the intermediate node device, and the tail node device may be network devices with Layer 3 forwarding capabilities, such as routers or switches.
  • the control device is used to receive and manage detection data of network devices on the forwarding path of the service flow reported by each network device.
  • the control device can be a server, and a controller is deployed in the server.
  • the controller can be positioned as the brain of the future cloud network. It integrates functions such as network management, business control, and network analysis to realize network resource pooling, network connection automation, and self-optimization. , the core enabling system for operation and maintenance automation.
  • a server also called a server, is a device that provides computing services and has the ability to undertake services and ensure services.
  • the server is an x86 server, also known as a complex instruction set computer (CISC) architecture server or a personal computer (personal computer, PC) server.
  • CISC complex instruction set computer
  • PC personal computer
  • FIG 2 is a schematic diagram of a flow-following detection process provided by an embodiment of the present application.
  • the head node device senses the first service packet (referred to as the first packet) of a new service flow, it sends the first packet of the service flow to the control device; the control device determines the first packet according to the service characteristics of the first packet.
  • the first packet the first service packet
  • the control device determines the first packet according to the service characteristics of the first packet.
  • the head node device allocates the corresponding Flow ID to the service flow, and delivers the Flow ID to the head node device; the head node device carries the Flow ID in the transmitted service packet, so that the forwarding path
  • the head node device, intermediate node device and tail node device can all identify and detect the service packets of the service flow based on the Flow ID, and send the Flow ID and the detection data of the flow detection to the control device ;
  • the control device completes path restoration, packet loss rate, delay and other service quality measurements based on the received detection data of the flow detection.
  • short flows refer to business flows with a survival time of milliseconds, that is, the transmission duration of short flows is less than 1 centisecond; long flows refer to business flows with a survival time of centiseconds or more, that is, the transmission duration of long flows is greater than 1 centisecond.
  • the information interaction between the control device and the node device may cause packet loss or link abnormality. If the first packet sent or the flow identifier sent is lost, there is a high probability that the flow detection will be damaged. . In addition, if there are a large number of first packets sent to the control device at the same time, it will cause problems in the control Impact on equipment performance and the risk of control equipment being attacked.
  • the embodiments of this application provide a flow-following detection method, which realizes the generation of Flow ID on the data plane and can perform lossless flow-following on business flows (including long flows and short flows) whose business characteristic information changes dynamically. Detection will not lose the detection data in the first detection cycle, which improves the detection capability of flow detection. Moreover, the frequency of information interaction between the control plane and the data plane is reduced, and performance impact on the control equipment of the control plane is avoided.
  • the first network device corresponds to the head node device in Figure 1
  • the control device corresponds to the control device in Figure 1.
  • the method includes but is not limited to the following steps 301 to 303.
  • Step 301 The first network device receives the first service message and generates a first flow identifier corresponding to the service flow to which the first service message belongs based on the first service feature information included in the first service message.
  • the first service feature information Used to identify the service packets belonging to this service flow.
  • the first network device can generate a first flow identifier corresponding to the service flow to which the first service message belongs.
  • the first flow identifier can be fully The network uniquely identifies the service flow to which the first service message belongs. As a result, there is no need to interact with the control device, and flow identification can be generated on the data plane.
  • the first service characteristic information is used to identify the service packets belonging to the service flow. That is, when the first network device receives a service packet, it will identify the service characteristic information included in the service packet. According to the service characteristic information, Determine the service flow to which the service packet belongs. It can be understood that the content of the first service feature information included in the first service message in different communication scenarios is different, and the different content of the first service feature information causes the granularity of the service flow corresponding to the first service feature information to be different.
  • the embodiments of the present application do not limit the content of the first service characteristic information, that is, the granularity of the service flow for flow detection is not limited, and the granularity can be flexibly adjusted according to the application scenario.
  • the granularity can be flexibly adjusted according to the application scenario.
  • the first service characteristic information may include at least one of five-tuple information, and the five-tuple information includes source IP, destination IP, source port, destination port, and protocol number.
  • the first service message is a service message under remote direct memory access (RDMA)
  • the first service characteristic information may include at least one of the five-tuple information and may also include a queue pair ( queue pair, QP), when the first service packet is a service packet under a virtual private network (virtual private network, VPN), the first service characteristic information includes at least one of the five-tuple information, and It may include the identification of the VPN; when the first service packet is a service packet encapsulated through a tunnel, the first service characteristic information may include at least one of the five-tuple information of the outer layer packet of the tunnel.
  • RDMA remote direct memory access
  • the first service characteristic information may include at least one of the five-tuple information and may also include a queue pair ( queue pair, QP), when the first service packet is a service packet under a
  • the service flow's The granularity is five-tuple; when the first service characteristic information used to identify the service packet belonging to the service flow includes five-tuple information and VPN ID, the service packet including the five-tuple information and VPN ID is determined as For the same service flow, the granularity of the service flow is five-tuple + VPN. It can be understood that the more content the first service characteristic information includes, the finer the granularity of the service flow for flow detection; conversely, the less content the first service characteristic information includes, the coarser the granularity of the service flow for flow detection. .
  • the embodiments of the present application do not limit the triggering conditions for the first network device to generate the first flow identifier corresponding to the service flow to which the first service message belongs based on the first service feature information included in the first service message.
  • the first service message is the first message of the service flow or the first message after the service characteristic information of the service flow changes, based on the first service message
  • the first service characteristic information included in the message is used to generate a first flow identifier corresponding to the service flow to which the first service message belongs.
  • the transmission can be dynamically and accurately detected. Monitor the business flow.
  • the first service packet is the first packet of the service flow, since there is no need to obtain the flow identifier through the control plane, flow-following detection of the service flow can be automatically implemented on the data plane, improving the efficiency of flow-following detection.
  • the embodiment of the present application introduces the service characteristic range, so that the first network device can accurately detect the service flows whose service characteristic information belongs to the service characteristic range, and can also realize different services through flexible adjustment of the service characteristic range. Requirements for flow detection.
  • the first flow identifier corresponding to the service flow to which the first service message belongs is generated based on the first service characteristic information included in the first service message.
  • the first service characteristic information belongs to the service characteristic range and the first service message is the first message of the service flow or the first message after the service characteristic information of the service flow changes, based on the first service
  • the first service characteristic information included in the message generates a first flow identifier corresponding to the service flow to which the first service message belongs.
  • the business feature range includes multiple business feature information, it is possible to accurately detect business flows that belong to the business feature range and whose business feature information changes dynamically.
  • the service feature range can be obtained by configuring the first network device, or can be delivered to the first network device by the control device.
  • the first network device will also receive the control before generating the first flow identifier corresponding to the service flow to which the first service message belongs based on the first service characteristic information included in the first service message.
  • the service characteristic range of the first flow detection instance sent by the device can be obtained by configuring the first network device, or can be delivered to the first network device by the control device.
  • the embodiments of this application do not limit the content of the service feature range, and can be flexibly adjusted according to the application scenarios where flow detection is required.
  • the service feature range includes fewer features than the first service feature information.
  • the service characteristic range may include four-tuple information (source IP, destination IP, destination port and protocol number), and the first service characteristic information obtained by identifying the first service packet includes five-tuple information (source IP, destination IP , source port, destination port and protocol number), therefore, the first flow detection instance is used to indicate that at least one service flow with the same source IP, destination IP, destination port and protocol number is the same, but the source port may be different.
  • Flow detection realizes dynamic flow detection.
  • the business feature range can include the business identifier of the re-insurance service; or, when it is necessary to obtain the service quality of a designated user or designated terminal, the business feature range can include the source IP; or, when a fault occurs between two terminals, the fault point needs to be detected
  • the service characteristic range can include source IP and destination IP.
  • the control device specifies the head node device and the tail node device corresponding to the service flow in the network according to the network architecture and the forwarding path of the service flow, and sends the following flow to the head node device.
  • the configuration information of the detection instance such as the service characteristic range or identification of the flow detection instance, can indicate the head node device’s response to the service characteristics.
  • the service packets whose information belongs to the service characteristic range are subject to flow detection, thereby triggering the flow detection.
  • FIG 4 is a schematic diagram of a control device delivering configuration information according to an embodiment of the present application.
  • the flow detection method from terminal A to terminal B can be used to detect the packet loss from terminal A to terminal B.
  • the business flows between them are subject to flow detection, and then the corresponding packet loss location is determined based on the detection data analysis of the flow detection.
  • the spine2 switch is the fault point that causes packet loss.
  • the control device After the control device is configured with the flow-following detection instance corresponding to the flow-following detection task, the control device delivers the configuration information of the flow-following detection instance to the leaf1 switch, leaf2 switch, leaf3 switch, and leaf4 switch to specify the leaf1 switch and leaf2 switch.
  • leaf3 switch and leaf4 switch are the tail nodes, and specify the service characteristic range of the head node for flow detection.
  • the leaf1 switch and the leaf2 switch receive the service message sent by terminal A
  • the service feature information included in the service message belongs to the service feature range, and the service message is the first message of the service flow or the first message of the service flow.
  • the corresponding flow identifier is generated based on the service characteristic information included in the service message, and then flow detection is performed based on the flow identifier.
  • the first network device can generate a first flow identifier corresponding to the service flow to which the first service message belongs based on the first service feature information included in the first service message.
  • the flow identifier generated by the first network device on the data plane needs to be unique within the flow-following detection domain to avoid that different service flows will not sound on each network device in the flow-following detection domain. conflict. Therefore, the flow identifier in the embodiment of the present application can be adaptively generated according to the required bit width of the flow identifier field and the chip architecture of the first network device.
  • the flow-following detection domain refers to the node equipment involved in the flow-following detection.
  • Methods for generating the first flow identifier corresponding to the service flow to which the first service message belongs based on the first service feature information included in the first service message include but are not limited to the following three methods.
  • Method 1 Generate the first flow identifier based on the identifier of the first network device, the identifier of the first chip, and the first service identifier.
  • the first network device includes a plurality of chips, and the first network device receives the first service message through a first chip of the plurality of chips, wherein the first service identifier is provided by the first chip for the first service message.
  • a business characteristic information is allocated. Therefore, the first service identifier is unique within the first chip.
  • the chip may be a forwarding chip.
  • the chip on the first network device that generates the first flow identifier is a second chip, the first chip on the first network device that receives the first service message and the second chip on the first network device that generates the first flow identifier. , it can be the same chip or different chips.
  • the identity of the first network device is a unique identity uniformly assigned by the control device to the network devices in the flow detection domain. That is, the identity of the first network device is unique in the flow detection domain, and the identity of the first chip is the first network device.
  • the device is a unique identifier uniformly assigned to all chips on the first network device, that is, the identifier of the first chip is unique within the first network device.
  • the first flow identifier generated based on the identifier of the first network device, the identifier of the first chip and the first service identifier is unique within the flow-following detection domain, ensuring that in an application scenario where the first network device includes multiple chips, The first-flow identifier will not conflict on each network device within the flow detection domain, which improves the accuracy of the flow detection.
  • the first chip allocates the corresponding first service identifier to the first service characteristic information by directly using the first service characteristic information as the first service identifier; or by masking the first service characteristic information. Processing, using the masked result as the first service identifier; or, the first chip includes multiple service identifiers, and the multiple service identifiers Each is different.
  • a currently unused service identifier may be selected from the plurality of service identifiers as the first service identifier.
  • flow ID NodeID+ChipID+ChipFlowID
  • NodeID represents the identity of the first network device
  • ChipID represents the identity of the first chip
  • ChipFlowID represents the number allocated by the first chip for the first service feature information.
  • the first network device includes multiple chips, each chip includes multiple storage media, and the first service message received by the first network device through the first storage medium in the multiple storage media, the first The service identifier is assigned to the first service characteristic information by the first storage medium.
  • the manner in which the first storage medium allocates the first service identifier to the first service characteristic information may refer to the manner in which the first chip allocates the first service identifier to the first service characteristic information in manner 1, which will not be described again here.
  • the identity of the first network device is unique within the flow detection domain
  • the identity of the first chip is unique within the first network device
  • the identity of the first storage medium is owned by the first chip.
  • the unique identifier assigned uniformly by the storage medium that is, the identifier of the first storage medium is unique within the first chip.
  • the identification of the first storage medium is a unique identification uniformly assigned by the first chip to all storage media of the first chip, when the architecture of the first chip is different, the identification method of the first storage medium is also different.
  • the first chip when the first chip has a multi-Die architecture, the first chip includes multiple Dies. Die refers to the die before the chip is packaged (also called a bare chip), and each Die includes a pipeline (Pipeline). , then the identification of the first storage medium can be the identification of Die.
  • Method 3 Generate the first flow identification based on the identification of the first flow-following detection instance and the first service identification.
  • the identity of the first accompanying detection instance is unique within the accompanying detection domain, and the first service identifier is unique within the first network device. Therefore, the first flow identifier generated based on the identity of the first flow-following detection instance and the first service identification is unique within the flow-following detection domain, ensuring that the first flow identification will not conflict on each network device within the flow-following detection domain. Improved accuracy of flow detection.
  • any of the above three methods can be used to realize that the first network device generates the first flow corresponding to the service flow to which the first service packet belongs based on the first service characteristic information included in the first service packet.
  • identification, and the first flow identification can uniquely identify the service flow, which satisfies the uniqueness of the flow identification in flow-following detection.
  • the field used to save or carry the flow identification includes the corresponding required bit width, and the required bit width can be the maximum bit width.
  • the required bit width of the flow identification field can be 40 bits (bits), 20 bits or less. . It can be seen from the composition structure of the first stream identifier in the above three methods that the first stream identifier generated by method one or method two requires a larger bit width, while the first stream identifier generated by method three requires a smaller bit width. . Therefore, according to the required bit width of the flow identification field or the chip architecture of the first network device, a suitable method among the above three methods can be flexibly selected to generate the first flow identification.
  • the first network device may also save the generated first service characteristic information and The corresponding relationship between the first flow identifier and the mapping flow table.
  • the mapping flow table includes multiple service characteristic information and a flow identifier corresponding to each service characteristic information.
  • the first network device receives a second service message, and the second service message includes second service characteristic information; based on the second service characteristic information included in the mapping flow table, the second service message in the mapping flow table is The flow identifier corresponding to the service characteristic information is used as the second flow identifier corresponding to the second service message.
  • the mapping flow table after the mapping flow table is constructed, the mapping flow table can also be maintained.
  • the method of maintaining the mapping flow table may be to delete the corresponding relationship between the first service characteristic information and the first flow identifier in the mapping flow table based on the fact that no service message including the first service characteristic information is received within the reference period; When the time period after deleting the corresponding relationship between the first service characteristic information and the first flow identifier reaches the reference period, the first flow identifier is recycled, and the recycled first flow identifier can be allocated to other service characteristic information.
  • the reference period can be set based on experience, or flexibly adjusted according to the application scenario, for example, the reference period is 3 minutes; the reference duration can be set based on experience, or flexibly adjusted according to the application scenario, for example, the reference duration is 10 seconds.
  • the reference duration it is possible to prevent the first network device from immediately allocating the first service identifier in the first flow identifier to other service characteristic information after deleting the corresponding relationship between the first service characteristic information and the first flow identifier.
  • step 13 includes the aging flow identifier; in step 13, delete the aging flow identifier in the mapped flow identifier, that is, delete the aging flow identifier and the corresponding service feature information; in step 14, enter the aging flow identifier into the cooling period, that is, from The cooling time after deletion of the aging flow identifier begins to be calculated from the moment of deletion; in step 15, it is judged whether the cooling time reaches the reference time. When the cooling time reaches the reference time, step 16 is executed; in step 16, the aging flow is recycled logo. After recycling the aging flow identifier, the service identifier in the recycled aging flow identifier can be assigned to other service characteristic information.
  • the first network device can also report the mapping flow table to the control device, so that the control device can send the received service flow to multiple node devices on the forwarding path according to the mapping flow table. Analyze multiple flow detection data, and then obtain the service quality corresponding to the service flow based on the analysis results.
  • Step 302 The first network device adds the first flow identifier to the first service message to obtain a second service message.
  • the first flow identifier is used to instruct the second network device that receives the second service message to process the second service message based on the first flow identifier. Perform flow testing.
  • the first network device adds the first flow identifier to the first service message to obtain the second service message.
  • the first network device adds the flow-following detection header to the first service message to obtain the second service message.
  • message, the flow-following detection header of the second service message includes the first flow identifier.
  • the second network device that receives the second service message determines that the second service message is a service message that requires flow detection by parsing the flow detection header, and based on the first flow identifier in the flow detection header Perform flow testing.
  • the first network device after obtaining the corresponding flow identifier, also performs flow detection based on the first flow identifier.
  • the first network device performs flow detection on the received first service based on the first flow identifier.
  • the packet is subjected to flow detection to obtain ingress detection data corresponding to the first flow identification; based on the first flow identification, the second service packet to be sent is performed to flow detection to obtain egress detection data corresponding to the first flow identification.
  • the first network device after obtaining the ingress detection data and egress detection data, the first network device will also send the first flow identifier and at least one of the ingress detection data or egress detection data corresponding to the first flow identifier to the control device, For example, the first network device actively and periodically sends at least one of the first flow identifier and the ingress detection data or egress detection data corresponding to the first flow identifier to the control device.
  • the first network device maintains a detection flow table of the first network device.
  • the detection flow table includes flow identifiers in the mapping flow table, and each flow identifier includes corresponding ingress detection data and egress detection data. data.
  • the first network device directly sends the detection flow table to the control device.
  • the embodiments of this application do not limit the method of obtaining flow detection data.
  • the alternative-marking method for passive and hybrid performance monitoring in Request For Comments (RFC) 8321 can be used.
  • staining mechanism to obtain flow detection data.
  • the dyeing mechanism the dyeing flag bits are added to the service packets, and then the dyeing flag bits in the service packets are alternately dyed according to the set detection cycle.
  • the value of the dyeing flag bits is set in the previous detection cycle. is 1, the value of the dyeing flag bit is alternately set to 0 in the next detection cycle, and the flow detection data in each detection cycle is obtained by counting the 0 or 1 in each detection cycle.
  • the flow-through detection head may also include a marker dyeing bit.
  • the flow detection header includes flow ID: the length of this field is 20 bits, used to record the flow identification; L (Loss): packet loss dyeing mark, the length of this field is 1 bit, used to identify the packet loss detection Different dyeing cycles, 0/1 represents different cycles; D (Delay): Delay coloring mark, the length of this field is 1 bit, if this field is set to 1, it indicates that the timestamp needs to be recorded; R (Reserved): Reserved bit, the length of this field is 6 bits, used for protocol extension definition; NH (Next Header): Next header. The length of this field is 4 bits.
  • extension header definition It is used to identify the extension header definition.
  • the value 0x00 means there is no extension header.
  • the value 0x01 ⁇ 0x08 is used for private extension;
  • extension flow identification (flow ID Ext): Use Due to the extended bit width, the length of this field is 20 bits. This field records the flow identification together with the flow ID field;
  • Flag The length of this field is 4 bits. Each bit is used to indicate a special purpose. For example, whether bit 20 is set. Determines whether the measurement mode of flow detection is end-to-end mode or hop-by-hop mode;
  • LEN (Length) Length, the length of this field is 4 bits, used to indicate the length of the flow detection extension header, in bytes.
  • Step 303 The first network device sends the second service message.
  • the first network device sends the second service message to the second network device, and the second network device is an intermediate node device or a tail node device on the forwarding path of the service flow.
  • the second network device receives the second service message. Since the second service message includes the first flow identifier, the second network device performs flow detection on the received second service message based on the first flow identifier to obtain the Ingress detection data corresponding to the first flow identifier; when the second network device forwards the second service message, it performs flow detection on the sent second service message based on the first flow identifier to obtain egress detection corresponding to the first flow identifier. data.
  • the second network device after obtaining the ingress detection data and egress detection data, the second network device will also send at least the first flow identifier and the ingress detection data or egress detection data corresponding to the first flow identifier to the control device.
  • the second network device actively and periodically sends at least one of the first flow identifier and the ingress detection data or egress detection data corresponding to the first flow identifier to the control device.
  • the second network device will maintain a detection flow table of the second network device.
  • the detection flow table includes a flow identifier obtained from the detection header of the service packet.
  • Each flow identifier includes corresponding ingress detection data and egress detection data. .
  • the second network device directly sends the detection flow table to the control device.
  • the control device can receive the first flow identifier sent by multiple network devices such as the first network device and the second network device and at least one of the inlet detection data or the egress detection data corresponding to the first flow identifier; Through statistical analysis of all detection data corresponding to the first-class identification, the network performance corresponding to the first-class identification can be obtained. Further, the first service characteristic information corresponding to the first flow identifier can be determined according to the mapping flow table reported by the first network device, thereby obtaining the service quality of the service flow corresponding to the first service characteristic information.
  • Figure 7 is a flow chart for obtaining a flow identifier provided by an embodiment of the present application. As shown in Figure 7, after receiving the service message, the first network device performs the following steps 21 to 26.
  • Step 21 Identify the service feature information of the service message.
  • Step 22 Determine whether the business feature information belongs to the business feature range. When the business feature information belongs to the business feature range, perform step 23.
  • Step 23 Determine whether the mapping flow table includes the business feature information. When the mapping flow table does not include the business feature information, perform steps 24 to 26; when the mapping flow table includes the business feature information, perform step 26. .
  • Step 24 Generate a corresponding flow identifier based on the service characteristic information.
  • Step 25 Maintain the mapping flow table.
  • maintaining the mapping flow table includes storing the corresponding relationship between the generated flow identifier and the business characteristic information in the mapping flow table, and periodically aging and recycling the mapping flow table.
  • Step 26 Perform flow detection based on the flow identifier.
  • step 21 to step 26 can be referred to the content of step 301 to step 303, and will not be described again here.
  • Figure 8 is a schematic diagram of a flow-following detection process provided by an embodiment of the present application.
  • the control device delivers the service feature range for flow detection to the head node device; after receiving the service message, the head node device identifies the service feature information included in the service message.
  • the corresponding flow identifier is assigned to the service flow to which the service message belongs; the flow identifier is carried in the transmitted service message so that the head node device, intermediate node device and tail node on the forwarding path
  • the device can identify and detect the service packets of the service flow based on the flow identifier, and send the flow identifier and the detection data of the flow detection to the control device.
  • the head node device is responsible for dynamically allocating or recycling flow identifiers, dynamically establishing a mapping flow table based on the allocation or recycling of flow identifiers, and sending the mapping flow table to the control device.
  • the control device completes path restoration, packet loss rate, delay and other service quality measurements based on the received mapping flow table and the detection data of the flow detection sent by each node device.
  • the head node device since the head node device does not need to send the first packet to the control device to obtain the flow identifier, the corresponding flow identifier can be generated in a timely and rapid manner, and the corresponding flow identifier can be effectively monitored.
  • the service quality of short-term traffic will not lose the detection data in the first detection cycle for long-term traffic.
  • the impact on the performance of the control device is avoided, the risk of the control device being attacked is reduced, and the probability of damage to the flow detection is further reduced.
  • the flow-following detection method provided by the embodiment of the present application can timely perform flow-following detection on the service packets used to generate the flow identification by generating flow identifiers on the data plane, that is, it can detect business flows (including dynamically changing business characteristic information) in a timely manner.
  • business flows including dynamically changing business characteristic information
  • long-term flow and short-term flow perform lossless in-flow detection without losing the detection data in the first detection cycle, making the detected service packets more comprehensive, realizing rapid and lossless in-flow detection, and improving the efficiency of in-flow detection. Detection capabilities of flow detection.
  • Figure 9 is a schematic structural diagram of a flow detection device provided by an embodiment of the present application.
  • the device is applied to a first network device.
  • the first network device is the head node device shown in Figure 1, 2 or 8 above.
  • the following flow detection device shown in Figure 9 can perform all or part of the operations performed by the first network device. It should be understood that the device may include more additional modules than the modules shown or omit some of the modules shown therein, and the embodiments of the present application are not limited to this.
  • the device includes:
  • the first receiving module 901 is used to receive the first service message
  • Generating module 902 configured to generate a first flow identifier corresponding to the service flow to which the first service message belongs based on the first service characteristic information included in the first service message, where the first service characteristic information is used to identify the service message belonging to the service flow. ;
  • the acquisition module 903 is configured to add a first flow identifier to the first service message to obtain a second service message.
  • the first flow identifier is used to instruct the second network device that receives the second service message to follow the flow based on the first flow identifier. detection;
  • the first sending module 904 is used to send the second service message.
  • the first service message is the first message of the service flow or the first message after the service characteristic information of the service flow changes.
  • the generating module 902 is configured to generate a first flow identifier based on an identifier of the first network device, an identifier of the first chip, and a first service identifier.
  • the first chip is a device on the first network device that receives the first flow identifier.
  • the first service identifier is allocated by the first chip to the first service feature information.
  • the generating module 902 is configured to generate a first flow identifier based on the identifier of the first network device, the identifier of the first chip, the identifier of the first storage medium, and the first service identifier.
  • the first storage medium is a storage medium on the first network device that receives the first service message, and the first service identifier is assigned by the first storage medium to the first service feature information.
  • the device further includes:
  • the second receiving module is used to receive the identification of the first flow-following detection instance sent by the control device, and the first flow-following detection instance is used to perform flow-following detection on the service flow;
  • Generating module 902 configured to generate a first flow identifier based on the identifier of the first flow-following detection instance and the first service identifier, where the first service identifier is allocated by the first network device for the first service feature information.
  • the second receiving module is also configured to receive the service characteristic range of the first flow-following detection instance sent by the control device;
  • the generating module 902 is configured to generate a first flow identifier corresponding to the service flow to which the first service message belongs based on the first service characteristic information included in the first service message when the first service characteristic information belongs to the service characteristic range.
  • the device further includes:
  • the saving module is configured to save the corresponding relationship between the first service characteristic information and the first flow identifier to a mapping flow table, where the mapping flow table includes multiple service characteristic information and a flow identifier corresponding to each service characteristic information.
  • the device further includes:
  • a deletion module configured to delete the corresponding relationship between the first service characteristic information and the first flow identifier in the mapping flow table based on the fact that no service message including the first service characteristic information is received within the reference period;
  • the recycling module is configured to recycle the first flow identification when the time period after deleting the corresponding relationship between the first service characteristic information and the first flow identification reaches the reference time length.
  • the device further includes:
  • the second sending module is used to send the mapping flow table to the control device.
  • the device can promptly perform in-flow detection on the service packets used to generate the flow identifiers, making the detected service packets more comprehensive and achieving rapid and lossless in-flow detection. .
  • it not only improves the efficiency of flow identification generation, but also reduces the information interaction between the data plane and the control plane, avoiding damage to flow detection caused by packet loss and other phenomena of information interaction. , further ensuring non-destructive flow detection and improving the detection capability of flow detection.
  • Figure 10 is a schematic structural diagram of a flow detection device provided by an embodiment of the present application.
  • the device is applied to a control device.
  • the control device is the control device shown in Figure 1, 2 or 8 above.
  • the flow-following detection device shown in Figure 10 can perform all or part of the operations performed by the control device. It should be understood that the device may include more additional modules than the modules shown or omit some of the modules shown therein, and the embodiments of the present application are not limited to this.
  • the device includes:
  • the sending module 1001 is configured to send the service characteristic range of the first flow-following detection instance to the first network device.
  • the service characteristic range of the first flow-following detection instance is used by the first network device as the first service characteristic of the first service message.
  • a first flow identifier corresponding to the service flow to which the first service message belongs is generated based on the first service characteristic information.
  • the first service message is the first message of the service flow or the first message after the service characteristic information of the service flow changes.
  • the sending module 1001 is also configured to send the first flow detection instance to the first network device.
  • the identification of the first flow-following detection instance is used by the first network device to generate the first flow identification based on the identification of the first flow-following detection instance and the first service identification.
  • the first service identification is generated by the first network device for the first service. Feature information is assigned.
  • the device further includes:
  • the receiving module is configured to receive the mapping flow table sent by the first network device, where the mapping flow table includes a plurality of service characteristic information and a flow identifier corresponding to each service characteristic information.
  • the device By sending the service characteristic range to the first network device, the device enables the first network device to accurately perform flow detection on the specified service flow, making the target of the flow detection more accurate. And because the business feature range includes multiple business feature information, it is possible to achieve accurate flow detection for business flows that belong to the business feature range but whose business feature information changes dynamically.
  • the switch shown in FIG. 11 is used to perform the above-mentioned operations performed by the first network device shown in FIG. 3 .
  • the switch includes a central processing unit (CPU), application-specific integrated circuit (ASIC)/network processor (NP) and memory.
  • the CPU and ASIC/NP are connected through the peripheral component interconnect (PCI) channel and the Ethernet channel.
  • PCI peripheral component interconnect
  • the ASIC/NP receives the first service message through the port and media access control (MAC), and identifies the first service message in the first service message through the message processing function of the iFIT module.
  • MAC media access control
  • ASIC/NP sends the identified first service characteristic information to the CPU, and the CPU generates a first flow identifier corresponding to the service flow to which the first service message belongs based on the first service characteristic information through the iFIT configuration module, and The generated first stream identifier is correspondingly stored in the memory.
  • Figure 12 shows a schematic structural diagram of a network device 2000 provided by an exemplary embodiment of the present application.
  • the network device 2000 shown in FIG. 12 is used to perform operations related to the above-mentioned flow detection method shown in FIG. 3 .
  • the network device 2000 is, for example, a switch, a router, etc., and the network device 2000 can be implemented by a general bus architecture.
  • the network device 2000 includes at least one processor 2001, a memory 2003, and at least one communication interface 2004.
  • the processor 2001 is, for example, a general central processing unit (CPU), a digital signal processor (DSP), a network processor (NP), a graphics processing unit (GPU), Neural network processors (neural-network processing units, NPU), data processing units (Data Processing Unit, DPU), microprocessors, or one or more integrated circuits used to implement the solution of the present application.
  • the processor 2001 includes an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof.
  • a PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a general array logic (GAL), or any combination thereof.
  • the disclosure describes various logical blocks, modules, and circuits.
  • the processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and so on.
  • the network device 2000 also includes a bus.
  • Buses are used to transfer information between components of network device 2000.
  • the bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc.
  • PCI peripheral component interconnect
  • EISA extended industry standard architecture
  • the bus can be divided into address bus, data bus, control bus, etc. For ease of presentation, only one line is used in Figure 12, but it does not mean that there is only one bus or one type of bus.
  • the memory 2003 is, for example, a read-only memory (ROM) or other type of static storage device that can store static information and instructions, or a random access memory (random access memory, RAM) or a device that can store information and instructions.
  • ROM read-only memory
  • RAM random access memory
  • Other types of dynamic storage devices such as electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disk storage, optical discs Storage (including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can Any other media accessed by a computer, without limitation.
  • the memory 2003 exists independently, for example, and is connected to the processor 2001 through a bus.
  • the memory 2003 may also be integrated with the processor 2001.
  • the communication interface 2004 uses any device such as a transceiver for communicating with other devices or a communication network.
  • the communication network may be an Ethernet, a radio access network (RAN) or a wireless local area network (WLAN). )wait.
  • the communication interface 2004 may include a wired communication interface and may also include a wireless communication interface.
  • the communication interface 2004 may be an Ethernet (Ethernet) interface, a Fast Ethernet (FE) interface, a Gigabit Ethernet (GE) interface, an asynchronous transfer mode (Asynchronous Transfer Mode, ATM) interface, a wireless LAN ( wireless local area networks, WLAN) interface, cellular network communication interface or a combination thereof.
  • the Ethernet interface can be an optical interface, an electrical interface, or a combination thereof.
  • the communication interface 2004 can be used for the network device 2000 to communicate with other devices.
  • the processor 2001 may include one or more CPUs, such as CPU0 and CPU1 as shown in FIG. 12 .
  • Each of these processors can be a single-core CPU processor or a multi-core CPU processor.
  • a processor here may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
  • the network device 2000 may include multiple processors, such as the processor 2001 and the processor 2005 shown in FIG. 12 .
  • processors can be a single-core processor (single-core CPU) or a multi-core processor (multi-core CPU).
  • a processor here may refer to one or more devices, circuits, and/or processing cores for processing data (such as computer program instructions).
  • the network device 2000 may also include an output device and an input device.
  • Output devices communicate with processor 2001 and can display information in a variety of ways.
  • the output device may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector (projector), etc.
  • Input devices communicate with processor 2001 and can receive user input in a variety of ways.
  • the input device may be a mouse, a keyboard, a touch screen device or a sensing device, etc.
  • the memory 2003 is used to store the program code 2010 for executing the solution of the present application
  • the processor 2001 Program code 2010 stored in memory 2003 can be executed. That is to say, the network device 2000 can implement the following flow detection method provided by the method embodiment through the processor 2001 and the program code 2010 in the memory 2003.
  • Program code 2010 may include one or more software modules.
  • the processor 2001 itself can also store program codes or instructions for executing the solution of the present application.
  • the network device 2000 in the embodiment of the present application may correspond to the first network device in each of the above method embodiments.
  • the processor 2001 in the network device 2000 reads the instructions in the memory 2003, so that as shown in Figure 12
  • the network device 2000 is capable of performing all or part of the operations performed by the first network device.
  • the processor 2001 is configured to receive the first service message through the communication interface, and generate a first flow identifier corresponding to the service flow to which the first service message belongs based on the first service feature information included in the first service message, where , the first service characteristic information is used to identify the service message belonging to the service flow; the first flow identifier is added to the first service message to obtain the second service message, and the second service message is sent.
  • the network device 2000 in the embodiment of the present application may correspond to the control device in each of the above method embodiments.
  • the processor 2001 in the network device 2000 reads the instructions in the memory 2003, so that the network device 2000 shown in Figure 12 can Perform all or part of the operations performed by the control device.
  • the processor 2001 is configured to send the service characteristic range of the first accompanying detection instance to the first network device through the communication interface.
  • the service characteristic range of the first accompanying detection instance is used by the first network device when the first service report is received.
  • a first flow identifier corresponding to the service flow to which the first service message belongs is generated based on the first service characteristic information.
  • the network device 2000 may also correspond to the flow-following detection device shown in FIG. 9 or 10.
  • Each functional module in the flow-following detection device is implemented by software of the network device 2000.
  • the functional modules included in the flow detection apparatus are generated by the processor 2001 of the network device 2000 after reading the program code 2010 stored in the memory 2003.
  • Each step of the flow detection method shown in FIG. 3 is completed through an integrated logic circuit of hardware or instructions in the form of software in the processor of the network device 2000 .
  • the steps of the methods disclosed in conjunction with the embodiments of the present application can be directly implemented by a hardware processor for execution, or can be executed by a combination of hardware and software modules in the processor.
  • the software module can be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other mature storage media in this field.
  • the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, the details will not be described here.
  • Figure 13 shows a schematic structural diagram of a network device 2100 provided by another exemplary embodiment of the present application.
  • the network device 2100 shown in Figure 13 is used to perform the following steps involved in the flow detection method shown in Figure 3. All or part of the operation.
  • the network device 2100 is, for example, a switch, a router, etc., and the network device 2100 can be implemented by a general bus architecture.
  • the network device 2100 includes: a main control board 2110 and an interface board 2130.
  • the main control board is also called the main processing unit (MPU) or route processor card.
  • the main control board 2110 is used to control and manage various components in the network device 2100, including route calculation and device management. , equipment maintenance, protocol processing functions.
  • the main control board 2110 includes: a central processing unit 2111 and a memory 2112.
  • the interface board 2130 is also called a line processing unit (LPU), line card (line card) or service board.
  • the interface board 2130 is used to provide various service interfaces and implement data packet forwarding.
  • Business interfaces include but are not limited to Ethernet network interface, POS (Packet over SONET/SDH) interface, etc., and the Ethernet interface is, for example, Flexible Ethernet Clients (FlexE Clients).
  • the interface board 2130 includes: a central processor 2131, a network processor 2132, a forwarding entry memory 2134, and a physical interface card (physical interface card, PIC) 2133.
  • the central processor 2131 on the interface board 2130 is used to control and manage the interface board 2130 and communicate with the central processor 2111 on the main control board 2110 .
  • the network processor 2132 is used to implement packet forwarding processing.
  • the network processor 2132 may be in the form of a forwarding chip.
  • the forwarding chip can be a network processor (NP).
  • the forwarding chip can be implemented through an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA).
  • ASIC application-specific integrated circuit
  • FPGA field programmable gate array
  • the network processor 2132 is used to forward the received message based on the forwarding table stored in the forwarding table memory 2134.
  • the message is uploaded to the CPU (such as central processor 2131) processing; if the destination address of the message is not the address of the network device 2100, the next hop and outgoing interface corresponding to the destination address are found from the forwarding table according to the destination address, and the message is forwarded to The outbound interface corresponding to the destination address.
  • the processing of uplink packets may include: processing of the packet incoming interface, forwarding table search; and the processing of downlink packets may include: forwarding table search, etc.
  • the central processing unit can also perform the function of the forwarding chip, such as implementing software forwarding based on a general-purpose CPU, so that there is no need for a forwarding chip in the interface board.
  • the physical interface card 2133 is used to implement the docking function of the physical layer.
  • the original traffic enters the interface board 2130 through this, and the processed packets are sent out from the physical interface card 2133.
  • the physical interface card 2133 is also called a daughter card and can be installed on the interface board 2130. It is responsible for converting photoelectric signals into messages and checking the validity of the messages before forwarding them to the network processor 2132 for processing.
  • the central processor 2131 can also perform the functions of the network processor 2132, such as implementing software forwarding based on a general-purpose CPU, so that the network processor 2132 is not required in the physical interface card 2133.
  • the network device 2100 includes multiple interface boards.
  • the network device 2100 also includes an interface board 2140.
  • the interface board 2140 includes: a central processor 2141, a network processor 2142, a forwarding entry memory 2144, and a physical interface card 2143.
  • the functions and implementation methods of each component in the interface board 2140 are the same as or similar to those of the interface board 2130 and will not be described again here.
  • the network device 2100 also includes a switching network board 2120.
  • the switching fabric unit 2120 may also be called a switching fabric unit (switch fabric unit, SFU).
  • SFU switching fabric unit
  • the switching network board 2120 is used to complete data exchange between the interface boards.
  • the interface board 2130 and the interface board 2140 can communicate through the switching network board 2120.
  • the main control board 2110 is coupled with the interface board.
  • the main control board 2110, the interface board 2130, the interface board 2140, and the switching network board 2120 are connected to the system backplane through a system bus to achieve intercommunication.
  • an inter-process communication protocol (IPC) channel is established between the main control board 2110 and the interface board 2130 and the interface board 2140.
  • the main control board 2110 and the interface board 2130 and the interface board 2140 communicate through IPC channels.
  • network device 2100 includes a control plane and a forwarding plane.
  • the control plane includes a main control board 2110 and a central processor 2111.
  • the forwarding plane includes various components that perform forwarding, such as forwarding entry memory 2134, physical interface card 2133, and network processing.
  • the control plane executes functions such as router, generates forwarding tables, processes signaling and protocol messages, configures and maintains the status of network devices.
  • the control plane sends the generated forwarding tables to the forwarding plane.
  • the network processor 2132 is based on the control
  • the forwarding table delivered above looks up the table and forwards the packets received by the physical interface card 2133.
  • the forwarding table delivered by the control plane may be stored in the forwarding table item storage 2134. In some embodiments, the control plane and forwarding plane may be completely separated and not on the same network device.
  • main control boards there may be one or more main control boards. When there are multiple main control boards, they can include the main main control board and the backup main control board. control panel. There may be one or more interface boards. The stronger the data processing capability of the network device, the more interface boards are provided. There can also be one or more physical interface cards on the interface board. There may be no switching network board, or there may be one or more switching network boards. When there are multiple switching network boards, load sharing and redundant backup can be realized together. Under the centralized forwarding architecture, network equipment does not need switching network boards, and the interface boards are responsible for processing the business data of the entire system.
  • network equipment can have at least one switching network board, which enables data exchange between multiple interface boards through the switching network board, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network equipment with a distributed architecture are greater than those with a centralized architecture.
  • the network device can also be in the form of only one board, that is, there is no switching network board. The functions of the interface board and the main control board are integrated on this board. In this case, the central processor and main control board on the interface board The central processor on the board can be combined into one central processor on this board to perform the superimposed functions of the two.
  • This form of network equipment has low data exchange and processing capabilities (for example, low-end switches or routers, etc. Internet equipment).
  • the specific architecture used depends on the specific networking deployment scenario and is not limited here.
  • the network device 2100 corresponds to the following flow detection device applied to the first network device shown in FIG. 9 mentioned above.
  • the first receiving module 901 and the first sending module 904 in the flow detection device shown in Figure 9 are equivalent to the physical interface card 2133 in the network device 2100
  • the generating module 902 and the obtaining module 903 are equivalent to the network The central processor 2111 or the network processor 2132 in the device 2100.
  • the network device 2100 also corresponds to the following flow detection device applied to the control device shown in FIG. 10 mentioned above.
  • the sending module 1001 in the flow detection device shown in Figure 10 is equivalent to the physical interface card 2133 in the network device 2100.
  • An embodiment of the present application also provides a flow detection system.
  • the processing system includes: a first network device and a control device.
  • the first network device is the network device 2000 shown in FIG. 12 or the network device 2100 shown in FIG. 13
  • the control device is the network device 2000 shown in FIG. 12 or the network device 2100 shown in FIG. 13 .
  • the flow detection method performed by the first network device and the control device please refer to the relevant description of the embodiment shown in FIG. 3 above, and will not be described again here.
  • An embodiment of the present application also provides a communication device, which includes: a transceiver, a memory, and a processor.
  • the transceiver, the memory and the processor communicate with each other through an internal connection path, the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to control the transceiver to receive signals and control the transceiver to send signals.
  • the processor executes the instructions stored in the memory, the processor is caused to execute the method required to be executed by the first network device.
  • An embodiment of the present application also provides a communication device, which includes: a transceiver, a memory, and a processor.
  • the transceiver, the memory and the processor communicate with each other through an internal connection path, the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to control the transceiver to receive signals and control the transceiver to send signals.
  • the processor executes the instructions stored in the memory, the processor is caused to execute the method required to be executed by the control device.
  • processor can be a CPU, or other general-purpose processor, digital signal processing (DSP), application specific integrated circuit (ASIC), field programmable gate array ( field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • DSP digital signal processing
  • ASIC application specific integrated circuit
  • FPGA field programmable gate array
  • a general-purpose processor can be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor that supports advanced RISC machines (ARM) architecture.
  • ARM advanced RISC machines
  • the above-mentioned memory may include a read-only memory and a random access memory, and provide instructions and data to the processor.
  • Memory may also include non-volatile random access memory.
  • the memory may also store device type information.
  • the memory may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory.
  • non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically removable memory. Erase electrically programmable read-only memory (EPROM, EEPROM) or flash memory.
  • Volatile memory can be random access memory (RAM), which is used as an external cache. By way of illustration, but not limitation, many forms of RAM are available.
  • static random access memory static random access memory
  • dynamic random access memory dynamic random access memory
  • DRAM dynamic random access memory
  • SDRAM synchronous dynamic random access memory
  • double data rate synchronous dynamic random access Memory double data rate SDRAM, DDR SDRAM
  • enhanced synchronous dynamic random access memory enhanced SDRAM, ESDRAM
  • synchronous link dynamic random access memory direct rambus RAM, DR RAM
  • Embodiments of the present application also provide a computer-readable storage medium. At least one instruction is stored in the storage medium, and the instruction is loaded and executed by the processor, so that the computer implements any of the above flow-following detection methods.
  • Embodiments of the present application also provide a computer program (product).
  • the computer program When the computer program is executed by a computer, it can cause the processor or computer to execute corresponding steps and/or processes in the above method embodiments.
  • Embodiments of the present application also provide a chip, including a processor, configured to call and run instructions stored in the memory, so that the communication device installed with the chip executes any of the above flow-following detection methods.
  • the chip and the first chip on the first network device that receives the first service message may be the same chip, or they may be different chips.
  • An embodiment of the present application also provides another chip, including: an input interface, an output interface, a processor, and a memory.
  • the input interface, the output interface, the processor, and the memory are connected through an internal connection path.
  • the processor is used to execute the code in the memory. , when the code is executed, the processor is used to perform any of the above flow detection methods.
  • the chip and the first chip on the first network device that receives the first service message may be the same chip, or they may be different chips.
  • a computer program product includes one or more computer instructions.
  • Computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e.g., computer instructions may be transmitted from a website, computer, server or data center via a wired link (e.g.
  • Coaxial cable, optical fiber, digital subscriber line) or wireless means to transmit to another website, computer, server or data center.
  • Computer-readable storage media can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or other integrated media that contains one or more available media. Available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, solid state disk), etc.
  • the program can be stored in a computer-readable storage medium.
  • the storage medium can be read-only memory, magnetic disk or optical disk, etc.
  • the computer program product includes one or more computer program instructions.
  • methods of embodiments of the present application may be described in the context of machine-executable instructions, such as included in a program module executing in a device on a target's real or virtual processor.
  • program modules include routines, programs, libraries, objects, classes, components, data structures, etc., which perform specific tasks or implement specific abstract data structures.
  • the functionality of program modules may be combined or split between the described program modules.
  • Machine-executable instructions for program modules can execute locally or on a distributed device. In a distributed device, program modules can be located in both local and remote storage media.
  • Computer program codes for implementing the methods of embodiments of the present application may be written in one or more programming languages. These computer program codes may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when executed by the computer or other programmable data processing device, the program code causes the flowcharts and/or block diagrams to be displayed. The functions/operations specified in are implemented.
  • the program code may execute entirely on the computer, partly on the computer, as a stand-alone software package, partly on the computer and partly on a remote computer or entirely on the remote computer or server.
  • the computer program code or related data may be carried by any appropriate carrier, so that the device, device or processor can perform the various processes and operations described above.
  • Examples of carriers include signals, computer-readable media, and the like.
  • Examples of signals may include electrical, optical, radio, acoustic, or other forms of propagated signals, such as carrier waves, infrared signals, and the like.
  • a machine-readable medium may be any tangible medium that contains or stores a program for or in connection with an instruction execution system, apparatus, or device.
  • the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or devices, or any suitable combination thereof. More detailed examples of machine-readable storage media include an electrical connection with one or more wires, laptop computer disk, hard drive, random memory accessor (RAM), read-only memory (ROM), erasable programmable read-only memory Memory (EPROM or flash memory), optical storage device, magnetic storage device, or any suitable combination thereof.
  • the disclosed systems, devices and methods can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the modules is only a logical function division. In actual implementation, there may be other division methods.
  • multiple modules or components may be combined or may be Integrated into another system, or some features can be ignored, or not implemented.
  • the coupling or direct coupling or communication connection between each other shown or discussed may be indirect coupling or communication connection through some interfaces, devices or modules, or may be electrical, mechanical or other forms of connection.
  • the modules described as separate components may or may not be physically separated.
  • the components shown as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments of the present application.
  • each functional module in each embodiment of the present application can be integrated into one processing module, or each module can exist physically alone, or two or more modules can be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or software function modules.
  • the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or part of the contribution to the existing technology, or all or 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 to cause a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program code. .
  • first, second and other words are used to distinguish the same or similar items with basically the same functions and functions. It should be understood that the terms “first”, “second” and “nth” There is no logical or sequential dependency, and there is no limit on the number or execution order. It should also be understood that, although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another.
  • a first network device may be referred to as a second network device, and similarly, a second network device may be referred to as a first network device, without departing from the scope of various described examples. Both the first network device and the second network device may be network devices, and in some cases, may be separate and distinct network devices.
  • the size of the sequence number of each process does not mean the order of execution.
  • the execution order of each process should be determined by its function and internal logic, and should not be determined by the execution order of the embodiments of the present application.
  • the implementation process constitutes no limitation.
  • determining B based on A does not mean determining B only based on A, and B can also be determined based on A and/or other information.
  • references throughout this specification to "one embodiment,” “an embodiment,” and “a possible implementation” mean that specific features, structures, or characteristics related to the embodiment or implementation are included herein. In at least one embodiment of the application. Therefore, “in one embodiment” or “in an embodiment” or “a possible implementation” appearing in various places throughout this specification do not necessarily refer to the same embodiment. Furthermore, the particular features, structures or characteristics may be combined in any suitable manner in one or more embodiments.

Landscapes

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

Abstract

本申请公开了一种随流检测方法、装置、设备、系统及存储介质,涉及通信技术领域。以第一网络设备为例,该方法包括:接收第一业务报文,基于第一业务报文包括的第一业务特征信息生成第一业务报文所属的业务流对应的第一流标识,该第一业务特征信息用于标识属于该业务流的业务报文;在第一业务报文中增加该第一流标识,得到第二业务报文,该第一流标识用于指示接收到第二业务报文的第二网络设备基于第一流标识进行随流检测;设备发送该第二业务报文。该方法通过纯数据面的流标识的生成,能够及时的对用来生成流标识的业务报文进行随流检测,使得被检测到的业务报文更全面,实现了迅速且无损的随流检测。

Description

随流检测方法、装置、设备、系统及存储介质
本申请要求于2022年06月15日提交的申请号为202210676353.8、发明名称为“一种数据面动态分配及回收FlowID的方法、设备及系统”的中国专利申请的优先权,本申请要求于2022年08月05日提交的申请号为202210938620.4、发明名称为“随流检测方法、装置、设备、系统及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,特别涉及随流检测方法、装置、设备、系统及存储介质。
背景技术
在通信技术领域中,需要对网络中传输的业务流进行随流检测,以感知业务流的真实传输情况。通常,控制设备会根据不同业务流的业务特征信息生成不同的流标识,然后将该业务特征信息与流标识的对应关系下发至网络设备,以使网络设备在数据面传输业务报文时,能够根据业务报文包括的业务特征信息确定该业务报文为需要进行随流检测的报文,并根据该业务特征信息对应的流标识对该业务报文进行随流检测。
但是,上述通过控制设备获取流标识的方式,在属于同一业务流的业务报文的业务特征信息发生变化的情况下,由于控制设备难以快速感知到该变化,导致业务特征信息发生变化后的业务报文未被检测到,进而使得随流检测的检测效果是有损的、不准确的。
发明内容
本申请提供了一种随流检测方法、装置、设备、系统及存储介质,用于通过数据面的网络设备为进行随流检测的业务流生成对应的流标识。
第一方面,提供了一种随流检测方法,以第一网络设备执行该方法为例,该方法包括:第一网络设备在接收第一业务报文后,基于该第一业务报文包括的第一业务特征信息生成该第一业务报文所属的业务流对应的第一流标识,其中,第一业务特征信息用于标识属于该业务流的业务报文;在生成该第一流标识后,将该第一流标识增加到第一业务报文中得到第二业务报文,并发送该第二业务报文。其中,第一流标识用于指示接收到该第二业务报文的第二网络设备基于该第一流标识进行随流检测。
该方法通过在数据面生成流标识,并将该流标识添加到需要检测的业务报文中,以实现随流检测,使得被检测到的业务报文更全面,实现了迅速且无损的随流检测。相比于通过控制面获取流标识的方式,不仅提高了流标识的生成效率,还减少了数据面与控制面的信息交互,避免了由信息交互的丢包等现象导致的随流检测受损,进一步保证了无损的随流检测,提升了随流检测的检测能力。
在一种可能的实施方式中,第一业务报文为业务流的首个报文或者为业务流的业务特征信息发生变化后的首个报文。当第一业务报文为业务流的业务特征信息发生变化后的首个报文时,能够实现对业务特征信息动态变化的业务流的迅速且无损的随流检测, 即能够动态精准的对传输的业务流进行监控。对于第一业务报文为业务流的首个报文的情况,由于无需通过控制面获取流标识,能够在数据面自动实现对业务流的随流检测,提高了随流检测的效率。
在一种可能的实施方式中,第一网络设备可以基于第一网络设备的标识、第一芯片的标识和第一业务标识生成该第一流标识。其中,第一芯片是第一网络设备上接收该第一业务报文的芯片,第一业务标识由第一芯片为第一业务特征信息分配得到。
在该情况下,由于第一网络设备的标识在随流检测域内是唯一的,第一芯片的标识在第一网络设备内是唯一的,第一业务标识在第一芯片内是唯一的。因此,生成的第一流标识在随流检测域内是唯一的,保证了在第一网络设备包括多个芯片的应用场景下,第一流标识在随流检测域内的各个网络设备上不会发生冲突,提高了随流检测的准确性。
在另一种可能的实施方式中,第一网络设备可以基于第一网络设备的标识、第一芯片的标识、第一存储介质的标识和第一业务标识生成该第一流标识。其中,第一芯片上的第一存储介质是第一网络设备上接收该第一业务报文的存储介质,第一业务标识由该第一存储介质为第一业务特征信息分配得到。
在该情况下,由于第一网络设备的标识在随流检测域内是唯一的,第一芯片的标识在第一网络设备内是唯一的,第一存储介质在第一芯片内是唯一的,第一业务标识在第一存储介质内是唯一的。因此,生成的第一流标识在随流检测域内是唯一的,保证了在第一网络设备包括多个芯片且每个芯片包括多个存储介质的应用场景下,第一流标识在随流检测域内的各个网络设备上不会发生冲突,提高了随流检测的准确性。
在又一种可能的实施方式中,第一网络设备可以基于第一随流检测实例的标识和第一业务标识生成该第一流标识。其中,第一业务标识由第一网络设备为第一业务特征信息分配得到;第一随流检测实例的标识由控制设备下发,即在基于第一业务报文包括的第一业务特征信息生成第一业务报文所属的业务流对应的第一流标识之前,第一网络设备接收控制设备发送的第一随流检测实例的标识,该第一随流检测实例用于对该业务流进行随流检测。
在该情况下,由于控制设备是对随流检测域内的多个随流检测实例进行配置的设备,第一随流检测实例的标识是控制设备统一分配下发的,能够保证第一随流检测实例的标识在随流检测域内的唯一性,且第一业务标识在第一网络设备内是唯一的。因此,生成的第一流标识在随流检测域内是唯一的,保证了第一流标识在随流检测域内的各个网络设备上不会发生冲突,提高了随流检测的准确性。
在一种可能的实施方式中,第一网络设备在接收第一业务报文后,当该第一业务特征信息属于业务特征范围时,基于第一业务报文包括的第一业务特征信息生成该第一业务报文所属的业务流对应的第一流标识。其中,该业务特征范围由控制设备下发,即在基于第一业务报文包括的第一业务特征信息生成第一业务报文所属的业务流对应的第一流标识之前,第一网络设备接收控制设备发送的第一随流检测实例的业务特征范围,该第一随流检测实例用于对该业务流进行随流检测。
通过对第一业务特征信息是否属于业务特征范围进行判断,能够实现对指定业务流的随流检测,使得随流检测的目标更精准。又因为业务特征范围包括多个业务特征信息,能够实现对属于该业务特征范围且业务特征信息会动态变化的业务流进行精准的随流检 测。
在一种可能的实施方式中,在基于第一业务报文包括的第一业务特征信息生成第一业务报文所属的业务流对应的第一流标识之后,还可以保存该第一业务特征信息与第一流标识的对应关系至映射流表。其中,该映射流表包括多个业务特征信息和每个业务特征信息对应的流标识。通过构建映射流表,使得在接收到包括该第一业务特征信息的非首个报文时,可以直接在映射流表中查找到该第一业务特征信息对应的第一流标识,无需再次生成,提高了随流检测的检测效率。
在一种可能的实施方式中,在构建映射流表后,还可以对该映射流表进行维护。维护映射流表的方式可以为基于在参考周期内未接收到包括该第一业务特征信息的业务报文,将该映射流表中的该第一业务特征信息与第一流标识的对应关系删除;当删除该第一业务特征信息与第一流标识的对应关系之后的时长达到参考时长时,将该第一流标识回收,回收后的第一流标识即可分配至其他业务特征信息。通过对映射流表的维护,能够保持映射流表的有效性,及时对老化的流标识进行回收,能够提高流标识的利用率。
在一种可能的实施方式中,第一网络设备还可以将该映射流表上报至控制设备,使得控制设备能够根据该映射流表对接收到的该业务流的转发路径上的多个网络设备分别发送的多个随流检测数据进行分析,进而根据分析结果获取得到该业务流对应的业务质量。
第二方面,提供了一种随流检测方法,以控制设备执行该方法为例,该方法包括:控制设备向第一网络设备发送第一随流检测实例的业务特征范围,该第一随流检测实例的业务特征范围用于第一网络设备当第一业务报文的第一业务特征信息属于业务特征范围时,基于第一业务特征信息生成第一业务报文所属的业务流对应的第一流标识。
该方法通过向第一网络设备发送业务特征范围,使得第一网络设备能够精准的对指定业务流进行随流检测,使得随流检测的目标更精准。又因为业务特征范围包括多个业务特征信息,能够实现对属于该业务特征范围且业务特征信息会动态变化的业务流进行精准的随流检测。
在一种可能的实施方式中,该第一业务报文为该业务流的首个报文或者为该业务流的业务特征信息发生变化后的首个报文。
在一种可能的实施方式中,控制设备还会向第一网络设备发送该第一随流检测实例的标识,该第一随流检测实例的标识用于第一网络设备基于该第一随流检测实例的标识和第一业务标识生成该第一流标识。其中,第一业务标识由第一网络设备为第一业务特征信息分配得到。由于该第一随流检测实例的标识在随流检测域内是唯一的,且第一业务标识在第一网络设备内是唯一的,因此,使得第一网络设备根据该第一随流检测实例的标识和第一业务标识生成的第一流标识在随流检测域内是唯一的,保证了第一流标识在随流检测域内的各个网络设备上不会发生冲突,提高了随流检测的准确性。
在一种可能的实施方式中,控制设备还会接收到第一网络设备发送的映射流表,该映射流表包括多个业务特征信息和每个业务特征信息对应的流标识。使得控制设备能够根据该映射流表对接收到的该业务流的转发路径上的多个网络设备分别发送的多个随流检测数据进行分析,进而根据分析结果获取得到该业务流对应的业务质量。
第三方面,提供了一种随流检测装置,该装置应用于第一网络设备,该装置包括:
第一接收模块,用于接收第一业务报文;
生成模块,用于基于所述第一业务报文包括的第一业务特征信息生成所述第一业务报文所属的业务流对应的第一流标识,所述第一业务特征信息用于标识属于所述业务流的业务报文;
获取模块,用于在所述第一业务报文中增加所述第一流标识,得到第二业务报文,所述第一流标识用于指示接收到所述第二业务报文的第二网络设备基于所述第一流标识进行随流检测;
第一发送模块,用于发送所述第二业务报文。
在一种可能的实施方式中,所述第一业务报文为所述业务流的首个报文或者为所述业务流的业务特征信息发生变化后的首个报文。
在一种可能的实施方式中,生成模块,用于基于所述第一网络设备的标识、第一芯片的标识和第一业务标识生成所述第一流标识,所述第一芯片是所述第一网络设备上接收所述第一业务报文的芯片,所述第一业务标识由所述第一芯片为所述第一业务特征信息分配得到。
在一种可能的实施方式中,生成模块,用于基于所述第一网络设备的标识、第一芯片的标识、第一存储介质的标识和第一业务标识生成所述第一流标识,所述第一芯片上的所述第一存储介质是所述第一网络设备上接收所述第一业务报文的存储介质,所述第一业务标识由所述第一存储介质为所述第一业务特征信息分配得到。
在一种可能的实施方式中,该装置还包括:
第二接收模块,用于接收控制设备发送的第一随流检测实例的标识,所述第一随流检测实例用于对所述业务流进行随流检测;
生成模块,用于基于所述第一随流检测实例的标识和第一业务标识生成所述第一流标识,所述第一业务标识由所述第一网络设备为所述第一业务特征信息分配得到。
在一种可能的实施方式中,第二接收模块,还用于接收控制设备发送的第一随流检测实例的业务特征范围;
生成模块,用于当所述第一业务特征信息属于所述业务特征范围时,基于所述第一业务报文包括的第一业务特征信息生成所述第一业务报文所属的业务流对应的第一流标识。
在一种可能的实施方式中,该装置还包括:
保存模块,用于保存所述第一业务特征信息与第一流标识的对应关系至映射流表,所述映射流表包括多个业务特征信息和每个业务特征信息对应的流标识。
在一种可能的实施方式中,该装置还包括:
删除模块,用于基于在参考周期内未接收到包括所述第一业务特征信息的业务报文,将所述映射流表中的所述第一业务特征信息与所述第一流标识的对应关系删除;
回收模块,用于当删除所述第一业务特征信息与所述第一流标识的对应关系之后的时长达到参考时长时,将所述第一流标识回收。
在一种可能的实施方式中,该装置还包括:
第二发送模块,用于向控制设备发送所述映射流表。
第四方面,提供了一种随流检测装置,该装置应用于控制设备,该装置包括:
发送模块,用于向第一网络设备发送第一随流检测实例的业务特征范围,所述第一随流检测实例的业务特征范围用于所述第一网络设备当第一业务报文的第一业务特征信息属于所述业务特征范围时,基于所述第一业务特征信息生成所述第一业务报文所属的业务流对应的 第一流标识。
在一种可能的实施方式中,所述第一业务报文为所述业务流的首个报文或者为所述业务流的业务特征信息发生变化后的首个报文。
在一种可能的实施方式中,发送模块,还用于向所述第一网络设备发送所述第一随流检测实例的标识,所述第一随流检测实例的标识用于所述第一网络设备基于所述第一随流检测实例的标识和第一业务标识生成所述第一流标识,所述第一业务标识由所述第一网络设备为所述第一业务特征信息分配得到。
在一种可能的实施方式中,该装置还包括:
接收模块,用于接收所述第一网络设备发送的映射流表,所述映射流表包括多个业务特征信息和每个业务特征信息对应的流标识。
第五方面,提供了一种网络设备,该网络设备包括:处理器,所述处理器与存储器耦合,所述存储器中存储有至少一条程序指令或代码,所述至少一条程序指令或代码由所述处理器加载并执行,以使所述网络设备实现如上第一方面或第二方面任一所述的随流检测方法。
可选地,所述处理器为一个或多个,所述存储器为一个或多个。
可选地,所述存储器可以与所述处理器集成在一起,或者所述存储器与处理器分离设置。
在具体实现过程中,存储器可以为非瞬时性(non-transitory)存储器,例如只读存储器(read only memory,ROM),其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请对存储器的类型以及存储器与处理器的设置方式不做限定。
第六方面,提供了一种通信装置,该装置包括:收发器、存储器和处理器。其中,该收发器、该存储器和该处理器通过内部连接通路互相通信,该存储器用于存储指令,该处理器用于执行该存储器存储的指令,以控制收发器接收信号,并控制收发器发送信号,并且当该处理器执行该存储器存储的指令时,使得该通信装置执行第一方面或第一方面的任一种可能的实施方式中的方法,或者执行第二方面或第二方面的任一种可能的实施方式中的方法。
第七方面,提供了一种随流检测系统,所述随流检测系统包括第一网络设备和控制设备;
所述第一网络设备用于执行所述第一方面或第一方面的任一种可能的实现方式所述的方法,所述控制设备用于执行所述第二方面或第二方面的任一种可能的实现方式所述的方法。
第八方面,提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令,所述指令由处理器加载并执行,以使计算机实现上述第一方面或第一方面的任一种可能的实施方式中的方法,或者实现上述第二方面或第二方面的任一种可能的实施方式中的方法。
第九方面,提供了一种计算机程序(产品),所述计算机程序(产品)包括:计算机程序代码,当所述计算机程序代码被计算机运行时,使得所述计算机执行上述各方面中的方法。
第十方面,提供了一种芯片,包括处理器,用于从存储器中调用并运行所述存储器中存储的指令,使得安装有所述芯片的通信设备执行上述各方面中的方法。
在一种可能的实施方式中,该芯片与第一网络设备上接收第一业务报文的第一芯片可以为同一个芯片,也可以为不同的芯片。
第十一方面,提供另一种芯片,包括:输入接口、输出接口、处理器和存储器,所述输入接口、输出接口、所述处理器以及所述存储器之间通过内部连接通路相连,所述处理器用于执行所述存储器中的代码,当所述代码被执行时,所述处理器用于执行上述各方面中的方法。
在一种可能的实施方式中,该芯片与第一网络设备上接收第一业务报文的第一芯片可以为同一个芯片,也可以为不同的芯片。
应当理解的是,本申请的第三方面至第十一方面技术方案及对应的可能的实施方式所取得的有益效果可以参见上述对第一方面和第二方面及其对应的可能的实施方式的技术效果,此处不再赘述。
附图说明
图1为本申请实施例提供的一种随流检测方法的实施环境示意图;
图2为本申请实施例提供的一种随流检测过程的示意图;
图3为本申请实施例提供的一种随流检测方法的流程图;
图4为本申请实施例提供的一种控制设备下发配置信息的示意图;
图5为本申请实施例提供的一种维护映射流表的流程图;
图6为本申请实施例提供的一种随流检测头的结构示意图;
图7为本申请实施例提供的一种获取流标识的流程图;
图8为本申请实施例提供的另一种随流检测过程的示意图;
图9为本申请实施例提供的一种随流检测装置的结构示意图;
图10为本申请实施例提供的另一种随流检测装置的结构示意图;
图11为本申请实施例提供的一种交换机的结构示意图;
图12为本申请实施例提供的一种网络设备的结构示意图;
图13为本申请实施例提供的另一种网络设备的结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
在对本申请实施例进行详细解释说明之前,先对本申请实施例的应用场景进行解释说明。
随着通信技术的不断发展,网络规模逐渐增大,通过在转发路径的各网络设备上对网络中传输的业务流进行随流检测,可以获取业务流的真实传输情况,实现实时监控网络性能,快速感知网络故障的目的,从而确保能够提供高质量、稳定可靠的网络服务。
示例性地,在随流信息遥测(in-situ flow information telemetry,iFIT)随流检测技术中,检测对象通常为业务流,业务流可以根据业务特征信息灵活的定义。其中,业务特征信息可以包括业务报文的五元组信息,五元组信息包括目的互联网协议(internet protocol,IP)地址、源IP地址、协议(Protocol)号、四层目的端口号、四层源端口号。将业务特征信息映射为一个流标识(Flow identity,Flow ID),能够简化用来标识不同业务流的业务特征信息。不同业务流的Flow ID通过管控平面(如控制设备)统一分配,以保证Flow ID在检测域内的全局唯一,使得任一网络设备能够通过Flow ID唯一识别一条业务流。在进行随流检测过程中,作为头(Initial)节点的网络设备在接收业务流的入口完成对业务特征信息的识别,然后根据管控平面为该业务特征信息分配的Flow ID,在属于该业务流的业务报文中添加随流检测信息(包括该Flow ID),实现带内的随流检测。
但是,业务流的业务特征信息存在变化的可能,即使是同一个用户的同一种类型的业务 流也无法保证五元组不发生变化。例如,某终端或服务器在不同时间发起的传输控制协议(transmission control protocol,TCP)/用户数据报协议(user datagram protocol,UDP)报文的四层源端口号就会动态变化;又例如,当出现网络故障时,同一条业务流在重新发起或者重新建链后,其业务特征信息也会发生变化;再例如,在虚拟扩展局域网(virtual extensible local area network,VXLAN)的通信网络中,同一业务流的外层隧道封装的业务特征信息是实时变化的。
在属于同一业务流的业务报文的业务特征信息发生变化的情况下,上述通过控制设备静态下发流标识的方式,控制设备难以快速感知到该变化,导致数据面无法及时获取到该变化后的业务特征信息对应的Flow ID,进而导致业务特征信息发生变化后的业务报文未被检测到,使得随流检测的检测效果是有损的、不准确的。
以图1所示的本申请实施例提供的一种随流检测方法的实施环境示意图为例,该实施环境中包括头节点设备、中间节点设备、尾节点设备和控制设备,头节点设备、中间节点设备和尾节点设备均与控制设备连接,头节点设备、中间节点设备和尾节点设备为业务流传输的转发路径上的网络设备。可以理解,接收业务流的头节点设备为业务流在网络中的入口,发送业务流的尾节点设备为业务流在网络中的出口。可选地,图1所示的实施环境中还可包括两个或两个以上的中间节点设备,本申请实施例不对中间节点设备的数量进行限定。
头节点设备、中间节点设备和尾节点设备用于实际部署随流检测,以获取对业务流进行随流检测的检测数据并将检测数据上报给控制设备。头节点设备、中间节点设备和尾节点设备可以为具有三层转发能力的网络设备,例如,路由器或交换等。
控制设备用以接收并管理各个网络设备上报的业务流的转发路径上的网络设备的检测数据。控制设备可以为服务器,服务器中部署有控制器,控制器可以定位为未来云化网络的大脑,融合网络管理、业务控制和网络分析等功能,是实现网络资源池化、网络连接自动化和自优化、运维自动化的核心使能系统。服务器也称伺服器,是提供计算服务的设备,具备承担服务并且保障服务的能力。示例性地,服务器为x86服务器,又称复杂指令系统计算机(complex instruction set computer,CISC)架构服务器或个人计算机(personal computer,PC)服务器。
参见图2,图2为本申请实施例提供的一种随流检测过程的示意图。如图2所示,在头节点设备感知到一条新的业务流的首个业务报文(简称首包)后,将业务流的首包上送至控制设备;控制设备根据首包的业务特征信息(如五元组)为该业务流分配对应的Flow ID,并将该Flow ID下发给头节点设备;头节点设备将该Flow ID携带在传输的业务报文中,以使转发路径上的头节点设备、中间节点设备和尾节点设备均能根据该Flow ID对该业务流的业务报文进行识别和随流检测,并将该Flow ID和随流检测的检测数据上送至控制设备;控制设备根据接收到的随流检测的检测数据完成路径还原、丢包率和时延等业务质量的测量。
但是,由于从上送首包到下发Flow ID需要一个时间过程,使得流标识获取的不够及时,导致无法监控到短流的业务质量,对于长流也会损失首个检测周期内的检测数据。其中,短流指的是存活时间为毫秒级的业务流,即短流的传输时长小于1厘秒;长流指的是存活时间为厘秒级以上的业务流,即长流的传输时长大于1厘秒。并且,控制设备与节点设备之间的信息交互,有可能存在丢包或链路异常等现象,若导致上送的首包或下发的流标识丢失,导致随流检测受损的概率较大。此外,若存在大量的首包同时上送至控制设备,会带来对控制 设备性能的冲击,存在控制设备被攻击的风险。
基于此,本申请实施例提供了一种随流检测方法,该方法实现了在数据面生成Flow ID,能够对业务特征信息动态变化的业务流(包括长流和短流)进行无损的随流检测,也不会损失首个检测周期内的检测数据,提升了随流检测的检测能力。并且,减小了控制面与数据面之间进行信息交互的频率,避免了对控制面的控制设备的性能冲击。
接下来,以第一网络设备和控制设备为例,对本申请实施例提供的随流检测方法进行说明。其中,结合图1所示的实施环境,第一网络设备对应图1中的头节点设备,控制设备对应图1中的控制设备。参见图3,该方法包括但不限于如下步骤301-步骤303。
步骤301,第一网络设备接收第一业务报文,基于第一业务报文包括的第一业务特征信息生成该第一业务报文所属的业务流对应的第一流标识,该第一业务特征信息用于标识属于该业务流的业务报文。
在本申请实施例中,第一网络设备接收到第一业务报文后,能够由第一网络设备自行生成该第一业务报文所属的业务流对应的第一流标识,该第一流标识能够全网唯一标识该第一业务报文所属的业务流。由此,无需与控制设备进行信息交互,实现了在数据面生成流标识。
其中,第一业务特征信息用于标识属于该业务流的业务报文,即当第一网络设备每接收到一个业务报文,都会识别业务报文中包括的业务特征信息,根据该业务特征信息确定该业务报文所属的业务流。可以理解,不同通信场景下的第一业务报文包括的第一业务特征信息的内容不同,第一业务特征信息的内容不同使得该第一业务特征信息对应的业务流的粒度也不同。
本申请实施例不对第一业务特征信息的内容进行限定,也即不对进行随流检测的业务流的粒度进行限定,该粒度可以根据应用场景灵活调整。通过设置不同的第一业务特征信息的内容,能够实现不同粒度的随流检测,使得随流检测的应用更灵活。
可选地,第一业务特征信息可以包括五元组信息中的至少一种,五元组信息包括源IP、目的IP、源端口、目的端口和协议号。当第一业务报文为远程直接数据存取(remote direct memory access,RDMA)下的业务报文时,第一业务特征信息除了包括五元组信息中的至少一种,还可以包括队列对(queue pair,QP)的标识,当第一业务报文为虚拟专用网络(virtual private network,VPN)下的业务报文时,第一业务特征信息除了包括五元组信息中的至少一种,还可以包括VPN的标识;当第一业务报文为通过隧道封装的业务报文时,第一业务特征信息可以包括隧道外层报文的五元组信息中的至少一种。
例如,当用于标识属于该业务流的业务报文的第一业务特征信息包括五元组信息时,将包括该五元组信息的业务报文确定为同一条业务流,则该业务流的粒度是五元组;当用于标识属于该业务流的业务报文的第一业务特征信息包括五元组信息和VPN ID时,将包括该五元组信息和VPN ID的业务报文确定为同一条业务流,则该业务流的粒度是五元组+VPN。可以理解,第一业务特征信息包括的内容越多,进行随流检测的业务流的粒度越细;反之,第一业务特征信息包括的内容越少,进行随流检测的业务流的粒度越粗。
本申请实施例不对第一网络设备基于第一业务报文包括的第一业务特征信息生成第一业务报文所属的业务流对应的第一流标识的触发条件进行限定。可选地,当第一业务报文为业务流的首个报文或者为业务流的业务特征信息发生变化后的首个报文时,基于该第一业务报 文包括的第一业务特征信息生成该第一业务报文所属的业务流对应的第一流标识。
当第一业务报文为业务流的业务特征信息发生变化后的首个报文时,能够实现对业务特征信息动态变化的业务流的迅速且无损的随流检测,即能够动态精准的对传输的业务流进行监控。对于第一业务报文为业务流的首个报文的情况,由于无需通过控制面获取流标识,能够在数据面自动实现对业务流的随流检测,提高了随流检测的效率。
可以理解,若第一网络设备对传输的所有业务流均进行随流检测,由于业务流的数量是极大的,对第一网络设备来说需要非常大的存储空间和较强的处理能力。因此,本申请实施例引入了业务特征范围,使得第一网络设备能够精准的对业务特征信息属于该业务特征范围的业务流进行随流检测,还能够通过对业务特征范围的灵活调整实现不同的随流检测需求。
可选地,当该第一业务特征信息属于业务特征范围时,基于第一业务报文包括的第一业务特征信息生成该第一业务报文所属的业务流对应的第一流标识。或者,当该第一业务特征信息属于业务特征范围,且第一业务报文为业务流的首个报文或者为业务流的业务特征信息发生变化后的首个报文时,基于第一业务报文包括的第一业务特征信息生成该第一业务报文所属的业务流对应的第一流标识。
由此,通过对第一业务特征信息是否属于业务特征范围的判断,能够实现对指定业务流的随流检测,使得随流检测的目标更精准。又因为业务特征范围包括多个业务特征信息,能够实现对属于该业务特征范围且业务特征信息会动态变化的业务流进行精准的随流检测。
其中,该业务特征范围可以通过对第一网络设备进行配置得到,也可以由控制设备下发至第一网络设备。当业务特征范围由控制设备下发时,第一网络设备在基于第一业务报文包括的第一业务特征信息生成第一业务报文所属的业务流对应的第一流标识之前,还会接收控制设备发送的第一随流检测实例的该业务特征范围。
本申请实施例不对业务特征范围的内容进行限定,可以根据需要进行随流检测的应用场景进行灵活调整。例如,业务特征范围包括的特征要少于第一业务特征信息包括的特征。例如,业务特征范围可以包括四元组信息(源IP、目的IP、目的端口和协议号),对第一业务报文识别得到的第一业务特征信息包括五元组信息(源IP、目的IP、源端口、目的端口和协议号),由此,该第一随流检测实例用于指示对源IP、目的IP、目的端口和协议号均相同,但是源端口可能不同的至少一条业务流进行随流检测,实现了动态的随流检测。
接下来,对不同应用场景的业务特征范围进行举例说明。示例性地,针对重大会议或活动等所提供的重点保障服务(简称重保服务),需要对重保服务的业务流进行随流检测,以确保重大会议或活动的平稳运行,在该情况下,业务特征范围可以包括重保服务的业务标识;或者,当需要获取指定用户或者指定终端的业务质量时,业务特征范围可以包括源IP;或者,当两个终端之间出现故障需要检测故障点时,业务特征范围可以包括源IP和目标IP。
在一种可能的实施方式中,控制设备会根据网络的组网架构和业务流的转发路径,指定网络中的该业务流对应的头节点设备和尾节点设备,通过向头节点设备发送随流检测实例的配置信息,例如,随流检测实例的业务特征范围或标识等,能够指示头节点设备对业务特征 信息属于该业务特征范围的业务报文进行随流检测,以此实现随流检测的触发。
参见图4,图4为本申请实施例提供的一种控制设备下发配置信息的示意图。其中,终端A到终端B之间的业务流不定时的存在有少量的丢包,但是不确定具体的丢包位置,可以通过本申请实施例提供的随流检测方法,对终端A到终端B之间的业务流进行随流检测,进而根据随流检测的检测数据分析确定对应的丢包位置。如图4所示,终端A到终端B之间包括多个节点设备,以终端A向终端B发送的业务流为例,与终端A相连的叶(leaf)1交换机和leaf2交换机为头节点设备,与终端B相连的leaf3交换机和leaf4交换机为尾节点设备,之间的脊(spine)1交换机、spine2交换机、spine3交换机和spine4交换机为中间节点。其中,spine2交换机为导致丢包的故障点。
当控制设备配置了该随流检测任务对应的随流检测实例后,控制设备向leaf1交换机、leaf2交换机、leaf3交换机和leaf4交换机下发该随流检测实例的配置信息,以指定leaf1交换机和leaf2交换机为头节点,leaf3交换机和leaf4交换机为尾节点,并指定头节点进行随流检测的业务特征范围。由leaf1交换机和leaf2交换机在接收终端A发送的业务报文后,基于该业务报文包括的业务特征信息属于该业务特征范围,且该业务报文为业务流的首个报文或者为业务流的业务特征信息发生变化后的首个报文时,根据该业务报文包括的业务特征信息生成对应的流标识,进而基于该流标识进行随流检测。
在完成对第一网络设备进行随流检测的触发之后,第一网络设备即可基于第一业务报文包括的第一业务特征信息生成第一业务报文所属的业务流对应的第一流标识。在本申请实施例中,由于第一网络设备在数据面生成的流标识需要确保是在随流检测域内的唯一性,以避免不同的业务流在随流检测域内的各网络设备上不会发声冲突。因此,本申请实施例中的流标识可以根据流标识字段的要求位宽和第一网络设备的芯片架构等适应性地生成。其中,随流检测域指的是进行随流检测所涉及到的节点设备。
基于第一业务报文包括的第一业务特征信息生成第一业务报文所属的业务流对应的第一流标识的方式,包括但不限于如下三种。
方式一,基于第一网络设备的标识、第一芯片的标识和第一业务标识生成第一流标识。
在该方式一下,第一网络设备包括多个芯片,第一网络设备通过该多个芯片中的第一芯片接收该第一业务报文,其中,第一业务标识由该第一芯片为该第一业务特征信息分配得到。因此,第一业务标识在第一芯片内是唯一的。其中,芯片可以为转发芯片。可选地,第一网络设备上生成第一流标识的芯片为第二芯片,第一网络设备上接收该第一业务报文的第一芯片与第一网络设备上生成第一流标识的第二芯片,可以为同一个芯片也可以为不同的芯片。
此外,第一网络设备的标识是控制设备为随流检测域内的网络设备统一分配的唯一标识,即第一网络设备的标识在随流检测域内是唯一的,第一芯片的标识是第一网络设备为该第一网络设备上的所有芯片统一分配的唯一标识,即第一芯片的标识在第一网络设备内是唯一的。因此,基于第一网络设备的标识、第一芯片的标识和第一业务标识生成的第一流标识在随流检测域内是唯一的,保证了在第一网络设备包括多个芯片的应用场景下,第一流标识在随流检测域内的各个网络设备上不会发生冲突,提高了随流检测的准确性。
可选地,第一芯片为第一业务特征信息分配对应的第一业务标识的方式可以为:直接将该第一业务特征信息作为第一业务标识;或者,对第一业务特征信息进行掩码处理,将掩码处理后的结果作为第一业务标识;或者,第一芯片中包括有多个业务标识,该多个业务标识 各不相同,当需要为第一业务报文分配第一业务标识时,可以从该多个业务标识中选择一个当前未被使用的业务标识作为该第一业务标识。
示例性地,流标识(Flow ID)=NodeID+ChipID+ChipFlowID,其中,NodeID代表第一网络设备的标识,ChipID代表第一芯片的标识,ChipFlowID代表第一芯片为该第一业务特征信息分配的第一业务标识。
方式二,基于第一网络设备的标识、第一芯片的标识、第一存储介质的标识和第一业务标识生成该第一流标识。
在该方式二下,第一网络设备包括多个芯片,每个芯片包括多个存储介质,第一网络设备通过该多个存储介质中的第一存储介质接收的第一业务报文,第一业务标识由该第一存储介质为第一业务特征信息分配得到。其中,第一存储介质为第一业务特征信息分配第一业务标识的方式可参见方式一中的第一芯片为第一业务特征信息分配第一业务标识的方式,此处不再赘述。
同样的,第一网络设备的标识在随流检测域内是唯一的,第一芯片的标识在第一网络设备内是唯一的,第一存储介质的标识是第一芯片为该第一芯片的所有存储介质统一分配的唯一标识,即第一存储介质的标识在第一芯片内是唯一的。因此,基于第一网络设备的标识、第一芯片的标识、第一存储介质的标识和第一业务标识生成的第一流标识在随流检测域内是唯一的,保证了在第一网络设备包括多个芯片且每个芯片包括多个存储介质的应用场景下,第一流标识在随流检测域内的各个网络设备上不会发生冲突,提高了随流检测的准确性。
由于第一存储介质的标识是第一芯片为该第一芯片的所有存储介质统一分配的唯一标识,因此,当第一芯片的架构不同时,第一存储介质的标识方式也不同。可选地,当第一芯片是多Die架构时,第一芯片包括多个Die,Die指的是芯片未封装前的晶粒(也称为裸片),每个Die包括一个流水线(Pipeline),则第一存储介质的标识可以为Die的标识,在该情况下,Flow ID=NodeID+ChipID+DieID+PipelineFlowID,其中,DieID代表第一存储介质的标识,PipelineFlowID代表第一存储介质为第一业务特征信息分配的第一业务标识;当第一芯片是多Pipeline架构时,第一芯片包括多个Die,每个Die包括多个Pipeline,则第一存储介质的标识可以为Die的标识和Pipeline的标识,在该情况下,Flow ID=NodeID+ChipID+DieID+PipelineID+PipelineFlowID,其中,DieID+PipelineID代表第一存储介质的标识。
方式三,基于第一随流检测实例的标识和第一业务标识生成第一流标识。
在该方式三下,由于不具体细化第一网络设备的芯片结构,则第一业务标识是第一网络设备为该第一业务特征信息分配得到,具体的分配方法与方式一或方式二中的分配方法相同。其中,第一随流检测实例的标识为该第一随流检测实例在随流检测域内的唯一标识,可选地,该第一随流检测实例的标识由控制设备下发。
在一种可能的实施方式中,在基于第一业务报文包括的第一业务特征信息生成第一业务报文所属的业务流对应的第一流标识之前,第一网络设备接收控制设备发送的第一随流检测实例的标识,该第一随流检测实例用于对该业务流进行随流检测。其中,控制设备会为随流检测域内所有随流检测实例统一分配对应的标识,以保证第一随流检测实例的标识在随流检测域内的唯一性。
由于第一随流检测实例的标识在随流检测域内是唯一的,且第一业务标识在第一网络设备内是唯一的。因此,基于第一随流检测实例的标识和第一业务标识生成的第一流标识在随流检测域内是唯一的,保证了第一流标识在随流检测域内的各个网络设备上不会发生冲突,提高了随流检测的准确性。
示例性地,Flow ID=InstanceID+NodeFlowID,其中,InstanceID代表第一随流检测实例的标识,NodeFlowID代表第一网络设备为该第一业务特征信息分配的第一业务标识。
由此,通过上述三种方式中的任一种方式均能够实现由第一网络设备基于第一业务报文包括的第一业务特征信息生成该第一业务报文所属的业务流对应的第一流标识,且该第一流标识能够唯一标识该业务流,满足了随流检测中流标识的唯一性。
可以理解,用于保存或者携带该流标识的字段包括对应的要求位宽,要求位宽可以为最大位宽,例如,流标识字段的要求位宽可以为40比特(bits)、20bits或者更小。通过上述三种方式中第一流标识的组成结构可以看出,方式一或方式二下生成的第一流标识所需的位宽较大,方式三下生成的第一流标识所需的位宽较小。因此,根据流标识字段的要求位宽或者第一网络设备的芯片架构,可以灵活的选用上述三种方式中合适的方式来生成第一流标识。
接下来,第一网络设备在基于第一业务报文包括的第一业务特征信息生成第一业务报文所属的业务流对应的第一流标识之后,还可以保存该生成的第一业务特征信息与第一流标识的对应关系至映射流表。其中,该映射流表包括多个业务特征信息和每个业务特征信息对应的流标识。
可选地,第一网络设备接收第二业务报文,该第二业务报文包括第二业务特征信息;基于该映射流表中包括该第二业务特征信息,将映射流表中该第二业务特征信息对应的流标识作为该第二业务报文对应的第二流标识。通过构建映射流表,使得在接收到包括该第一业务特征信息的非首个报文时,可以直接在映射流表中查找到该第一业务特征信息对应的第一流标识,无需再次生成,提高了随流检测的检测效率。
在一种可能的实施方式中,在构建映射流表后,还可以对该映射流表进行维护。维护映射流表的方式可以为基于在参考周期内未接收到包括该第一业务特征信息的业务报文,将该映射流表中的该第一业务特征信息与第一流标识的对应关系删除;当删除该第一业务特征信息与第一流标识的对应关系之后的时长达到参考时长时,将该第一流标识回收,回收后的第一流标识即可分配至其他业务特征信息。通过对映射流表的维护,能够保持映射流表的有效性,及时对老化的流标识进行回收,能够提高流标识的利用率。
其中,参考周期可以根据经验设置,或者,根据应用场景灵活调整,例如,按照参考周期为3分钟;参考时长可以根据经验设置,或者,根据应用场景灵活调整,例如,参考时长为10秒钟。通过参考时长的限定,能够防止第一网络设备在删除该第一业务特征信息与第一流标识的对应关系后,立刻将该第一流标识中的第一业务标识分配给其他的业务特征信息,以避免由于第二网络设备还未在第二网络设备的映射流表中删除该第一业务特征信息与第一流标识的对应关系,导致第二网络设备的映射流表中同一第一流标识对应两个业务特征信息的现象发生,减少随流检测的检测异常发生。
参见图5,图5为本申请实施例提供的一种维护映射流表的流程图。如图5所示,在步骤11中,第一网络设备对映射流表进行老化扫描,以扫描出映射流表中包括的老化流标识。其中,老化流标识指示在参考周期内未接收到包括该老化流标识对应的业务特征信息的业 务报文;在步骤12中,判断映射流表是否老化,若映射流表无老化,则返回执行步骤11,若映射流表老化,执行步骤13,其中,映射流表老化即为映射流表中包括老化流标识;在步骤13中,删除映射流标识中的老化流标识,即删除该老化流标识与对应的业务特征信息;在步骤14中,将该老化流标识进入冷却期,即从删除时刻开始计算该老化流标识删除后的冷却时长;在步骤15中,判断该冷却时长是否达到参考时长,当该冷却时长达到参考时长时,执行步骤16;在步骤16中,回收该老化流标识。在回收该老化流标识后,即可将该回收的老化流标识中的业务标识分配给其它业务特征信息。
在本申请实施例中,第一网络设备还可以将该映射流表上报至控制设备,使得控制设备能够根据该映射流表对接收到的该业务流的转发路径上的多个节点设备分别发送的多个随流检测数据进行分析,进而根据分析结果获取得到该业务流对应的业务质量。
步骤302,第一网络设备在第一业务报文中增加该第一流标识,得到第二业务报文,该第一流标识用于指示接收到第二业务报文的第二网络设备基于第一流标识进行随流检测。
其中,第一网络设备在第一业务报文中增加该第一流标识,得到第二业务报文可以为,第一网络设备在第一业务报文中增加该随流检测头,得到第二业务报文,该第二业务报文的随流检测头中包括该第一流标识。接收到第二业务报文的第二网络设备通过解析该随流检测头,确定该第二业务报文为需要进行随流检测的业务报文,并基于该随流检测头中的第一流标识进行随流检测。
在本申请实施例中,第一网络设备在获取得到对应的流标识之后,还基于该第一流标识进行随流检测,可选地,第一网络设备基于该第一流标识对接收的第一业务报文进行随流检测,得到该第一流标识对应的入口检测数据;基于该第一流标识对待发送的第二业务报文进行随流检测,得到第一流标识对应的出口检测数据。通过入口检测数据和出口检测数据的获取,能够方便的检测出网络设备内部发生的故障。
可选地,第一网络设备在获取得到入口检测数据和出口检测数据之后,还会向控制设备发送该第一流标识和该第一流标识对应的入口检测数据或出口检测数据中的至少一种,例如,第一网络设备主动性的周期性的向控制设备发送该第一流标识和该第一流标识对应的入口检测数据或出口检测数据中的至少一种。
在一种可能的实施方式中,第一网络设备会维护第一网络设备的检测流表,检测流表中包括映射流表中的流标识,每个流标识包括对应的入口检测数据和出口检测数据。在该情况下,第一网络设备直接向控制设备发送该检测流表。
本申请实施例不对获取随流检测数据的方式进行限定,例如,可以采用征求意见文档(Request For Comments,RFC)8321被动和混合性能监测的交替标记方法(alternate-marking method for passive and hybrid performance monitoring)的染色机制来获取随流检测数据。在染色机制中,通过在业务报文中增加染色标识位,然后根据设定的检测周期对业务报文中的染色标记位进行交替染色,例如,前一个检测周期内将染色标识位的值置为1,后一个检测周期内将该染色标识位的值交替置为0,通过对每个检测周期内的0或1进行统计,以得到每个检测周期内的随流检测数据。在该情况下,该随流检测头中还可以包括标记染色位。
示例性地,参见图6,图6为本申请实施例提供的一种随流检测头的结构示意图。如图6所示,随流检测头中包括flow ID:该字段长度为20bits,用于记录流标识;L(Loss):丢包染色标记,该字段长度为1bit,用于标识丢包检测的不同染色周期,0/1代表不同的周期;D (Delay):时延染色标记,该字段长度为1bit,如果该字段置位为1,表明需要记录时间戳;R(Reserved):保留位,该字段长度为6bits,用于协议扩展定义;NH(Next Header):下一报头,该字段长度为4bits,用于标识扩展头定义,值为0x00表示没有扩展头,值为0x01~0x08用于私有扩展;扩展流标识(flow ID Ext):用于扩展位宽,该字段长度为20bit,该字段和flow ID字段一起记录流标识;标志(flag):该字段长度为4bits,每一个bit用于指示特殊用途,例如,其中bit 20是否置位决定随流检测的测量模式为端到端模式还是逐跳模式;LEN(Length):长度,该字段长度为4bits,用于指示随流检测扩展头的长度,单位为字节。
步骤303,第一网络设备发送该第二业务报文。
可选地,第一网络设备向第二网络设备发送该第二业务报文,第二网络设备为该业务流的转发路径上的中间节点设备或尾节点设备。同样的,第二网络设备接收该第二业务报文,由于第二业务报文包括第一流标识,第二网络设备基于该第一流标识对接收的第二业务报文进行随流检测,得到该第一流标识对应的入口检测数据;当第二网络设备转发该第二业务报文时,基于该第一流标识对发送的第二业务报文进行随流检测,得到该第一流标识对应的出口检测数据。
在本申请实施例中,第二网络设备在获取得到入口检测数据和出口检测数据之后,还会向控制设备发送该第一流标识和该第一流标识对应的入口检测数据或出口检测数据中的至少一种,例如,第二网络设备主动性的周期性的向控制设备发送该第一流标识和该第一流标识对应的入口检测数据或出口检测数据中的至少一种。
可以理解,第二网络设备会维护第二网络设备的检测流表,检测流表中包括从业务报文的检测头中获取的流标识,每个流标识包括对应的入口检测数据和出口检测数据。同样,在该情况下,第二网络设备直接向控制设备发送该检测流表。
由此,控制设备能够接收到第一网络设备、第二网络设备等多个网络设备发送的第一流标识以及该第一流标识对应的入口检测数据或出口检测数据中的至少一种;对该第一流标识对应的所有检测数据进行统计分析,能够得到该第一流标识对应的网络性能。进一步地,根据第一网络设备上报的映射流表能够确定第一流标识对应的第一业务特征信息,从而获取得到第一业务特征信息对应的业务流的业务质量。
参见图7,图7为本申请实施例提供的一种获取流标识的流程图。如图7所示,第一网络设备在接收业务报文后,执行如下步骤21-步骤26。
步骤21,识别业务报文的业务特征信息。
步骤22,判断该业务特征信息是否属于业务特征范围,当该业务特征信息属于业务特征范围时执行步骤23。
步骤23,判断映射流表中是否包括该业务特征信息,当映射流表中不包括该业务特征信息时,执行步骤24-步骤26;当映射流表中包括该业务特征信息时,执行步骤26。
步骤24,基于该业务特征信息生成对应的流标识。
步骤25,维护该映射流表。
其中,维护该映射流表包括将生成的流标识与业务特征信息的对应关系保存在该映射流表中,以及定期对映射流表进行老化回收。
步骤26,基于流标识进行随流检测。
可以理解,该步骤21-步骤26的内容可参见步骤301-步骤303的内容,此处不再赘述。
参见图8,图8为本申请实施例提供的一种随流检测过程的示意图。如图8所示,控制设备向头节点设备下发随流检测的业务特征范围;头节点设备在接收到业务报文后,识别该业务报文包括的业务特征信息,当该业务特征信息属于该业务特征范围时,为该业务报文所属的业务流分配对应的流标识;将该流标识携带在传输的业务报文中,以使转发路径上的头节点设备、中间节点设备和尾节点设备均能根据该流标识对该业务流的业务报文进行识别和随流检测,并将该流标识和随流检测的检测数据上送至控制设备。
其中,头节点设备负责动态分配或回收流标识,根据流标识的分配或回收动态建立映射流表,并将该映射流表上送至控制设备。控制设备根据接收到的该映射流表和各个节点设备发送的随流检测的检测数据完成路径还原、丢包率和时延等业务质量的测量。
由此,相较于图2所示的随流检测过程,由于头节点设备无需通过向控制设备上送首包来获取流标识,使得能够及时迅速的生成对应的流标识,能够有效的监控到短流的业务质量,对于长流也不会损失首个检测周期内的检测数据。并且,由于无需控制设备与节点设备之间频繁的信息交互,避免了对控制设备性能的冲击,降低控制设备被攻击的风险,进一步降低了随流检测受损的概率。
本申请实施例提供的随流检测方法,通过在数据面生成流标识,能够及时的对用来生成流标识的业务报文进行随流检测,即能够对业务特征信息动态变化的业务流(包括长流和短流)进行无损的随流检测,也不会损失首个检测周期内的检测数据,使得被检测到的业务报文更全面,实现了迅速且无损的随流检测,提升了随流检测的检测能力。
相比于通过控制面获取流标识的方式,不仅提高了流标识的生成效率,还减少了数据面与控制面的信息交互,避免了由信息交互的丢包等现象导致的随流检测受损,避免了对控制面的控制设备的性能冲击,进一步保证了无损的随流检测。
以上介绍了本申请实施例的随流检测方法,与上述方法对应,本申请实施例还提供了随流检测装置。图9是本申请实施例提供的一种随流检测装置的结构示意图,该装置应用于第一网络设备,该第一网络设备为上述图1、2或8所示的头节点设备。基于图9所示的如下多个模块,该图9所示的随流检测装置能够执行第一网络设备所执行的全部或部分操作。应理解到,该装置可以包括比所示模块更多的附加模块或者省略其中所示的一部分模块,本申请实施例对此并不进行限制。如图9所示,该装置包括:
第一接收模块901,用于接收第一业务报文;
生成模块902,用于基于第一业务报文包括的第一业务特征信息生成第一业务报文所属的业务流对应的第一流标识,第一业务特征信息用于标识属于业务流的业务报文;
获取模块903,用于在第一业务报文中增加第一流标识,得到第二业务报文,第一流标识用于指示接收到第二业务报文的第二网络设备基于第一流标识进行随流检测;
第一发送模块904,用于发送第二业务报文。
在一种可能的实施方式中,第一业务报文为业务流的首个报文或者为业务流的业务特征信息发生变化后的首个报文。
在一种可能的实施方式中,生成模块902,用于基于第一网络设备的标识、第一芯片的标识和第一业务标识生成第一流标识,第一芯片是第一网络设备上接收第一业务报文的芯片,第一业务标识由第一芯片为第一业务特征信息分配得到。
在一种可能的实施方式中,生成模块902,用于基于第一网络设备的标识、第一芯片的标识、第一存储介质的标识和第一业务标识生成第一流标识,第一芯片上的第一存储介质是第一网络设备上接收第一业务报文的存储介质,第一业务标识由第一存储介质为第一业务特征信息分配得到。
在一种可能的实施方式中,该装置还包括:
第二接收模块,用于接收控制设备发送的第一随流检测实例的标识,第一随流检测实例用于对业务流进行随流检测;
生成模块902,用于基于第一随流检测实例的标识和第一业务标识生成第一流标识,第一业务标识由第一网络设备为第一业务特征信息分配得到。
在一种可能的实施方式中,第二接收模块,还用于接收控制设备发送的第一随流检测实例的业务特征范围;
生成模块902,用于当第一业务特征信息属于业务特征范围时,基于第一业务报文包括的第一业务特征信息生成第一业务报文所属的业务流对应的第一流标识。
在一种可能的实施方式中,该装置还包括:
保存模块,用于保存第一业务特征信息与第一流标识的对应关系至映射流表,映射流表包括多个业务特征信息和每个业务特征信息对应的流标识。
在一种可能的实施方式中,该装置还包括:
删除模块,用于基于在参考周期内未接收到包括第一业务特征信息的业务报文,将映射流表中的第一业务特征信息与第一流标识的对应关系删除;
回收模块,用于当删除第一业务特征信息与第一流标识的对应关系之后的时长达到参考时长时,将第一流标识回收。
在一种可能的实施方式中,该装置还包括:
第二发送模块,用于向控制设备发送映射流表。
该装置通过纯数据面的流标识的生成,能够及时的对用来生成流标识的业务报文进行随流检测,使得被检测到的业务报文更全面,实现了迅速且无损的随流检测。相比于通过控制面获取流标识的方式,不仅提高了流标识的生成效率,还减少了数据面与控制面的信息交互,避免了由信息交互的丢包等现象导致的随流检测受损,进一步保证了无损的随流检测,提升了随流检测的检测能力。
图10是本申请实施例提供的一种随流检测装置的结构示意图,该装置应用于控制设备,该控制设备为上述图1、2或8所示的控制设备。基于图10所示的如下多个模块,该图10所示的随流检测装置能够执行控制设备所执行的全部或部分操作。应理解到,该装置可以包括比所示模块更多的附加模块或者省略其中所示的一部分模块,本申请实施例对此并不进行限制。如图10所示,该装置包括:
发送模块1001,用于向第一网络设备发送第一随流检测实例的业务特征范围,第一随流检测实例的业务特征范围用于第一网络设备当第一业务报文的第一业务特征信息属于业务特征范围时,基于第一业务特征信息生成第一业务报文所属的业务流对应的第一流标识。
在一种可能的实施方式中,第一业务报文为业务流的首个报文或者为业务流的业务特征信息发生变化后的首个报文。
在一种可能的实施方式中,发送模块1001,还用于向第一网络设备发送第一随流检测实 例的标识,第一随流检测实例的标识用于第一网络设备基于第一随流检测实例的标识和第一业务标识生成第一流标识,第一业务标识由第一网络设备为第一业务特征信息分配得到。
在一种可能的实施方式中,该装置还包括:
接收模块,用于接收第一网络设备发送的映射流表,映射流表包括多个业务特征信息和每个业务特征信息对应的流标识。
该装置通过向第一网络设备发送业务特征范围,使得第一网络设备能够精准的对指定业务流进行随流检测,使得随流检测的目标更精准。又因为业务特征范围包括多个业务特征信息,能够实现对属于该业务特征范围的但是业务特征信息会动态变化的业务流实现精准的随流检测。
应理解的是,上述图9或10提供的装置在实现其功能时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的装置与方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
参见图11,图11为本申请实施例提供的一种交换机的结构示意图。图11所示的交换机用于执行上述图3所示第一网络设备所执行的操作。如图11所示,该交换机(switch)包括中央处理器(central processing unit,CPU)、专用集成电路(application-specific integrated circuit,ASIC)/网络处理器(network processer,NP)和存储器。CPU与ASIC/NP通过外设部件互连标准(peripheral component interconnect,PCI)通道(channel)和以太网(ethernet)channel连接。可选地,ASIC/NP通过端口(port)和媒体接入控制(media access control,MAC)接收第一业务报文,并通过iFIT模块的报文处理功能识别该第一业务报文中的第一业务特征信息;ASIC/NP将识别得到第一业务特征信息发送至CPU,CPU通过iFIT配置模块基于该第一业务特征信息生成该第一业务报文所属的业务流对应的第一流标识,将生成的第一流标识对应存储到存储器中。
参见图12,图12示出了本申请一个示例性实施例提供的网络设备2000的结构示意图。图12所示的网络设备2000用于执行上述图3所示的随流检测方法所涉及的操作。该网络设备2000例如是交换机、路由器等,该网络设备2000可以由一般性的总线体系结构来实现。
如图12所示,网络设备2000包括至少一个处理器2001、存储器2003以及至少一个通信接口2004。
处理器2001例如是通用中央处理器(central processing unit,CPU)、数字信号处理器(digital signal processor,DSP)、网络处理器(network processer,NP)、图形处理器(Graphics Processing Unit,GPU)、神经网络处理器(neural-network processing units,NPU)、数据处理单元(Data Processing Unit,DPU)、微处理器或者一个或多个用于实现本申请方案的集成电路。例如,处理器2001包括专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。PLD例如是复杂可编程逻辑器件(complex programmable logic device,CPLD)、现场可编程逻辑门阵列(field-programmable gate array,FPGA)、通用阵列逻辑(generic array logic,GAL)或其任意组合。其可以实现或执行结合本发明实施例 公开内容所描述的各种逻辑方框、模块和电路。处理器也可以是实现计算功能的组合,例如包括一个或多个微处理器组合,DSP和微处理器的组合等等。
可选的,网络设备2000还包括总线。总线用于在网络设备2000的各组件之间传送信息。总线可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图12中仅用一条线表示,但并不表示仅有一根总线或一种类型的总线。
存储器2003例如是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其它类型的静态存储设备,又如是随机存取存储器(random access memory,RAM)或者可存储信息和指令的其它类型的动态存储设备,又如是电可擦可编程只读存储器(electrically erasable programmable read-only Memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备,或者是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。存储器2003例如是独立存在,并通过总线与处理器2001相连接。存储器2003也可以和处理器2001集成在一起。
通信接口2004使用任何收发器一类的装置,用于与其它设备或通信网络通信,通信网络可以为以太网、无线接入网(radio access network,RAN)或无线局域网(wireless local area networks,WLAN)等。通信接口2004可以包括有线通信接口,还可以包括无线通信接口。具体的,通信接口2004可以为以太(Ethernet)接口、快速以太(Fast Ethernet,FE)接口、千兆以太(Gigabit Ethernet,GE)接口,异步传输模式(Asynchronous Transfer Mode,ATM)接口,无线局域网(wireless local area networks,WLAN)接口,蜂窝网络通信接口或其组合。以太网接口可以是光接口,电接口或其组合。在本申请实施例中,通信接口2004可以用于网络设备2000与其他设备进行通信。
在具体实现中,作为一种实施例,处理器2001可以包括一个或多个CPU,如图12中所示的CPU0和CPU1。这些处理器中的每一个可以是一个单核(single-core CPU)处理器,也可以是一个多核(multi-core CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。
在具体实现中,作为一种实施例,网络设备2000可以包括多个处理器,如图12中所示的处理器2001和处理器2005。这些处理器中的每一个可以是一个单核处理器(single-core CPU),也可以是一个多核处理器(multi-core CPU)。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(如计算机程序指令)的处理核。
在具体实现中,作为一种实施例,网络设备2000还可以包括输出设备和输入设备。输出设备和处理器2001通信,可以以多种方式来显示信息。例如,输出设备可以是液晶显示器(liquid crystal display,LCD)、发光二级管(light emitting diode,LED)显示设备、阴极射线管(cathode ray tube,CRT)显示设备或投影仪(projector)等。输入设备和处理器2001通信,可以以多种方式接收用户的输入。例如,输入设备可以是鼠标、键盘、触摸屏设备或传感设备等。
在一些实施例中,存储器2003用于存储执行本申请方案的程序代码2010,处理器2001 可以执行存储器2003中存储的程序代码2010。也即是,网络设备2000可以通过处理器2001以及存储器2003中的程序代码2010,来实现方法实施例提供的随流检测方法。程序代码2010中可以包括一个或多个软件模块。可选地,处理器2001自身也可以存储执行本申请方案的程序代码或指令。
在具体实施例中,本申请实施例的网络设备2000可对应于上述各个方法实施例中的第一网络设备,网络设备2000中的处理器2001读取存储器2003中的指令,使图12所示的网络设备2000能够执行第一网络设备所执行的全部或部分操作。
具体的,处理器2001用于通过通信接口接收第一业务报文,基于该第一业务报文包括的第一业务特征信息生成该第一业务报文所属的业务流对应的第一流标识,其中,第一业务特征信息用于标识属于该业务流的业务报文;将该第一流标识增加到第一业务报文中得到第二业务报文,并发送该第二业务报文。
其他可选的实施方式,为了简洁,在此不再赘述。
又例如,本申请实施例的网络设备2000可对应于上述各个方法实施例中的控制设备,网络设备2000中的处理器2001读取存储器2003中的指令,使图12所示的网络设备2000能够执行控制设备所执行的全部或部分操作。
具体的,处理器2001用于通过通信接口向第一网络设备发送第一随流检测实例的业务特征范围,该第一随流检测实例的业务特征范围用于第一网络设备当第一业务报文的第一业务特征信息属于业务特征范围时,基于第一业务特征信息生成第一业务报文所属的业务流对应的第一流标识。
其他可选的实施方式,为了简洁,在此不再赘述。
网络设备2000还可以对应于上述图9或10所示的随流检测装置,随流检测装置中的每个功能模块采用网络设备2000的软件实现。换句话说,随流检测装置包括的功能模块为网络设备2000的处理器2001读取存储器2003中存储的程序代码2010后生成的。
其中,图3所示的随流检测方法的各步骤通过网络设备2000的处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤,为避免重复,这里不再详细描述。
参见图13,图13示出了本申请另一个示例性实施例提供的网络设备2100的结构示意图,图13所示的网络设备2100用于执行上述图3所示的随流检测方法所涉及的全部或部分操作。该网络设备2100例如是交换机、路由器等,该网络设备2100可以由一般性的总线体系结构来实现。
如图13所示,网络设备2100包括:主控板2110和接口板2130。
主控板也称为主处理单元(main processing unit,MPU)或路由处理卡(route processor card),主控板2110用于对网络设备2100中各个组件的控制和管理,包括路由计算、设备管理、设备维护、协议处理功能。主控板2110包括:中央处理器2111和存储器2112。
接口板2130也称为线路接口单元(line processing unit,LPU)、线卡(line card)或业务板。接口板2130用于提供各种业务接口并实现数据包的转发。业务接口包括而不限于以太 网接口、POS(Packet over SONET/SDH)接口等,以太网接口例如是灵活以太网业务接口(Flexible Ethernet Clients,FlexE Clients)。接口板2130包括:中央处理器2131网络处理器2132、转发表项存储器2134和物理接口卡(physical interface card,PIC)2133。
接口板2130上的中央处理器2131用于对接口板2130进行控制管理并与主控板2110上的中央处理器2111进行通信。
网络处理器2132用于实现报文的转发处理。网络处理器2132的形态可以是转发芯片。转发芯片可以是网络处理器(network processor,NP)。在一些实施例中,转发芯片可以通过专用集成电路(application-specific integrated circuit,ASIC)或现场可编程门阵列(field programmable gate array,FPGA)实现。具体而言,网络处理器2132用于基于转发表项存储器2134保存的转发表转发接收到的报文,如果报文的目的地址为网络设备2100的地址,则将该报文上送至CPU(如中央处理器2131)处理;如果报文的目的地址不是网络设备2100的地址,则根据该目的地址从转发表中查找到该目的地址对应的下一跳和出接口,将该报文转发到该目的地址对应的出接口。其中,上行报文的处理可以包括:报文入接口的处理,转发表查找;下行报文的处理可以包括:转发表查找等等。在一些实施例中,中央处理器也可执行转发芯片的功能,比如基于通用CPU实现软件转发,从而接口板中不需要转发芯片。
物理接口卡2133用于实现物理层的对接功能,原始的流量由此进入接口板2130,以及处理后的报文从该物理接口卡2133发出。物理接口卡2133也称为子卡,可安装在接口板2130上,负责将光电信号转换为报文并对报文进行合法性检查后转发给网络处理器2132处理。在一些实施例中,中央处理器2131也可执行网络处理器2132的功能,比如基于通用CPU实现软件转发,从而物理接口卡2133中不需要网络处理器2132。
可选地,网络设备2100包括多个接口板,例如网络设备2100还包括接口板2140,接口板2140包括:中央处理器2141、网络处理器2142、转发表项存储器2144和物理接口卡2143。接口板2140中各部件的功能和实现方式与接口板2130相同或相似,在此不再赘述。
可选地,网络设备2100还包括交换网板2120。交换网板2120也可以称为交换网板单元(switch fabric unit,SFU)。在网络设备2100有多个接口板的情况下,交换网板2120用于完成各接口板之间的数据交换。例如,接口板2130和接口板2140之间可以通过交换网板2120通信。
主控板2110和接口板耦合。例如。主控板2110、接口板2130和接口板2140,以及交换网板2120之间通过系统总线与系统背板相连实现互通。在一种可能的实现方式中,主控板2110和接口板2130及接口板2140之间建立进程间通信协议(inter-process communication,IPC)通道,主控板2110和接口板2130及接口板2140之间通过IPC通道进行通信。
在逻辑上,网络设备2100包括控制面和转发面,控制面包括主控板2110和中央处理器2111,转发面包括执行转发的各个组件,比如转发表项存储器2134、物理接口卡2133和网络处理器2132。控制面执行路由器、生成转发表、处理信令和协议报文、配置与维护网络设备的状态等功能,控制面将生成的转发表下发给转发面,在转发面,网络处理器2132基于控制面下发的转发表对物理接口卡2133收到的报文查表转发。控制面下发的转发表可以保存在转发表项存储器2134中。在有些实施例中,控制面和转发面可以完全分离,不在同一网络设备上。
值得说明的是,主控板可能有一块或多块,有多块的时候可以包括主用主控板和备用主 控板。接口板可能有一块或多块,网络设备的数据处理能力越强,提供的接口板越多。接口板上的物理接口卡也可以有一块或多块。交换网板可能没有,也可能有一块或多块,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,网络设备可以不需要交换网板,接口板承担整个系统的业务数据的处理功能。在分布式转发架构下,网络设备可以有至少一块交换网板,通过交换网板实现多块接口板之间的数据交换,提供大容量的数据交换和处理能力。所以,分布式架构的网络设备的数据接入和处理能力要大于集中式架构的网络设备。可选地,网络设备的形态也可以是只有一块板卡,即没有交换网板,接口板和主控板的功能集成在该一块板卡上,此时接口板上的中央处理器和主控板上的中央处理器在该一块板卡上可以合并为一个中央处理器,执行两者叠加后的功能,这种形态网络设备的数据交换和处理能力较低(例如,低端交换机或路由器等网络设备)。具体采用哪种架构,取决于具体的组网部署场景,此处不做任何限定。
在具体实施例中,网络设备2100对应于上述图9所示的应用于第一网络设备的随流检测装置。在一些实施例中,图9所示的随流检测装置中的第一接收模块901和第一发送模块904相当于网络设备2100中的物理接口卡2133,生成模块902和获取模块903相当于网络设备2100中的中央处理器2111或网络处理器2132。
在一些实施例中,网络设备2100还对应于上述图10所示的应用于控制设备的随流检测装置。在一些实施例中,图10所示的随流检测装置中的发送模块1001相当于网络设备2100中的物理接口卡2133。
本申请实施例还提供了一种随流检测系统,该处理系统包括:第一网络设备和控制设备。例如,第一网络设备为图12所示的网络设备2000或图13所示的网络设备2100,控制设备为图12所示的网络设备2000或图13所示的网络设备2100。第一网络设备和控制设备所执行的随流检测方法可参见上述图3所示实施例的相关描述,此处不再加以赘述。
本申请实施例还提供了一种通信装置,该装置包括:收发器、存储器和处理器。其中,该收发器、该存储器和该处理器通过内部连接通路互相通信,该存储器用于存储指令,该处理器用于执行该存储器存储的指令,以控制收发器接收信号,并控制收发器发送信号,并且当该处理器执行该存储器存储的指令时,使得该处理器执行第一网络设备所需执行的方法。
本申请实施例还提供了一种通信装置,该装置包括:收发器、存储器和处理器。其中,该收发器、该存储器和该处理器通过内部连接通路互相通信,该存储器用于存储指令,该处理器用于执行该存储器存储的指令,以控制收发器接收信号,并控制收发器发送信号,并且当该处理器执行该存储器存储的指令时,使得该处理器执行控制设备所需执行的方法。
应理解的是,上述处理器可以是CPU,还可以是其他通用处理器、数字信号处理器(digital signal processing,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现场可编程门阵列(field-programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者是任何常规的处理器等。值得说明的是,处理器可以是支持进阶精简指令集机器(advanced RISC machines,ARM)架构的处理器。
进一步地,在一种可选的实施例中,上述存储器可以包括只读存储器和随机存取存储器,并向处理器提供指令和数据。存储器还可以包括非易失性随机存取存储器。例如,存储器还可以存储设备类型的信息。
该存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用。例如,静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic random access memory,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。
本申请实施例还提供了一种计算机可读存储介质,存储介质中存储有至少一条指令,指令由处理器加载并执行,以使计算机实现如上任一的随流检测方法。
本申请实施例还提供了一种计算机程序(产品),当计算机程序被计算机执行时,可以使得处理器或计算机执行上述方法实施例中对应的各个步骤和/或流程。
本申请实施例还提供了一种芯片,包括处理器,用于从存储器中调用并运行存储器中存储的指令,使得安装有芯片的通信设备执行如上任一的随流检测方法。在一种可能的实施方式中,该芯片与第一网络设备上接收第一业务报文的第一芯片可以为同一个芯片,也可以为不同的芯片。
本申请实施例还提供另一种芯片,包括:输入接口、输出接口、处理器和存储器,输入接口、输出接口、处理器以及存储器之间通过内部连接通路相连,处理器用于执行存储器中的代码,当代码被执行时,处理器用于执行如上任一的随流检测方法。在一种可能的实施方式中,该芯片与第一网络设备上接收第一业务报文的第一芯片可以为同一个芯片,也可以为不同的芯片。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如,固态硬盘(solid state disk))等。
本领域普通技术人员可以意识到,结合本文中所公开的实施例中描述的各方法步骤和模块,能够以软件、硬件、固件或者其任意组合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各实施例的步骤及组成。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。本领域普通技术人员 可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,该程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机程序指令。作为示例,本申请实施例的方法可以在机器可执行指令的上下文中被描述,机器可执行指令诸如包括在目标的真实或者虚拟处理器上的器件中执行的程序模块中。一般而言,程序模块包括例程、程序、库、对象、类、组件、数据结构等,其执行特定的任务或者实现特定的抽象数据结构。在各实施例中,程序模块的功能可以在所描述的程序模块之间合并或者分割。用于程序模块的机器可执行指令可以在本地或者分布式设备内执行。在分布式设备中,程序模块可以位于本地和远程存储介质二者中。
用于实现本申请实施例的方法的计算机程序代码可以用一种或多种编程语言编写。这些计算机程序代码可以提供给通用计算机、专用计算机或其他可编程的数据处理装置的处理器,使得程序代码在被计算机或其他可编程的数据处理装置执行的时候,引起在流程图和/或框图中规定的功能/操作被实施。程序代码可以完全在计算机上、部分在计算机上、作为独立的软件包、部分在计算机上且部分在远程计算机上或完全在远程计算机或服务器上执行。
在本申请实施例的上下文中,计算机程序代码或者相关数据可以由任意适当载体承载,以使得设备、装置或者处理器能够执行上文描述的各种处理和操作。载体的示例包括信号、计算机可读介质等等。
信号的示例可以包括电、光、无线电、声音或其它形式的传播信号,诸如载波、红外信号等。
机器可读介质可以是包含或存储用于或有关于指令执行系统、装置或设备的程序的任何有形介质。机器可读介质可以是机器可读信号介质或机器可读存储介质。机器可读介质可以包括但不限于电子的、磁的、光学的、电磁的、红外的或半导体系统、装置或设备,或其任意合适的组合。机器可读存储介质的更详细示例包括带有一根或多根导线的电气连接、便携式计算机磁盘、硬盘、随机存储存取器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或闪存)、光存储设备、磁存储设备,或其任意合适的组合。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、设备和模块的具体工作过程,可以参见前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、设备和方法,可以通过其它的方式实现。例如,以上所描述的设备实施例仅仅是示意性的,例如,该模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、设备或模块的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。
该作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本申请实施例方案的目的。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以是两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
该集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例中方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
本申请中术语“第一”“第二”等字样用于对作用和功能基本相同的相同项或相似项进行区分,应理解,“第一”、“第二”、“第n”之间不具有逻辑或时序上的依赖关系,也不对数量和执行顺序进行限定。还应理解,尽管以下描述使用术语第一、第二等来描述各种元素,但这些元素不应受术语的限制。这些术语只是用于将一元素与另一元素区别分开。例如,在不脱离各种所述示例的范围的情况下,第一网络设备可以被称为第二网络设备,并且类似地,第二网络设备可以被称为第一网络设备。第一网络设备和第二网络设备都可以是网络设备,并且在某些情况下,可以是单独且不同的网络设备。
还应理解,在本申请的各个实施例中,各个过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
本申请中术语“至少一个”的含义是指一个或多个,本申请中术语“多个”的含义是指两个或两个以上,例如,多个第二报文是指两个或两个以上的第二报文。本文中术语“系统”和“网络”经常可互换使用。
应理解,在本文中对各种所述示例的描述中所使用的术语只是为了描述特定示例,而并非旨在进行限制。如在对各种所述示例的描述和所附权利要求书中所使用的那样,单数形式“一个(“a”,“an”)”和“该”旨在也包括复数形式,除非上下文另外明确地指示。
还应理解,本文中所使用的术语“和/或”是指并且涵盖相关联的所列出的项目中的一个或多个项目的任何和全部可能的组合。术语“和/或”,是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本申请中的字符“/”,一般表示前后关联对象是一种“或”的关系。
还应理解,术语“包括”(也称“includes”、“including”、“comprises”和/或“comprising”)当在本说明书中使用时指定存在所陈述的特征、整数、步骤、操作、元素、和/或部件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元素、部件、和/或其分组。
还应理解,术语“若”和“如果”可被解释为意指“当...时”(“when”或“upon”)或“响应于确定”或“响应于检测到”。类似地,根据上下文,短语“若确定...”或“若检测到[所陈述的条件或事件]”可被解释为意指“在确定...时”或“响应于确定...”或“在检测到[所陈述的条件或事件]时”或“响应于检测到[所陈述的条件或事件]”。
应理解,根据A确定B并不意味着仅仅根据A确定B,还可以根据A和/或其它信息确定B。
还应理解,说明书通篇中提到的“一个实施例”、“一实施例”、“一种可能的实现方式”意味着与实施例或实现方式有关的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”、“一种可能的实现方式”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。
以上描述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (21)

  1. 一种随流检测方法,其特征在于,所述方法包括:
    第一网络设备接收第一业务报文,基于所述第一业务报文包括的第一业务特征信息生成所述第一业务报文所属的业务流对应的第一流标识,所述第一业务特征信息用于标识属于所述业务流的业务报文;
    所述第一网络设备在所述第一业务报文中增加所述第一流标识,得到第二业务报文,所述第一流标识用于指示接收到所述第二业务报文的第二网络设备基于所述第一流标识进行随流检测;
    所述第一网络设备发送所述第二业务报文。
  2. 根据权利要求1所述的方法,其特征在于,所述第一业务报文为所述业务流的首个报文或者为所述业务流的业务特征信息发生变化后的首个报文。
  3. 根据权利要求1或2所述的方法,其特征在于,所述基于所述第一业务报文包括的第一业务特征信息生成所述第一业务报文所属的业务流对应的第一流标识,包括:
    基于所述第一网络设备的标识、第一芯片的标识和第一业务标识生成所述第一流标识,所述第一芯片是所述第一网络设备上接收所述第一业务报文的芯片,所述第一业务标识由所述第一芯片为所述第一业务特征信息分配得到。
  4. 根据权利要求1或2所述的方法,其特征在于,所述基于所述第一业务报文包括的第一业务特征信息生成所述第一业务报文所属的业务流对应的第一流标识,包括:
    基于所述第一网络设备的标识、第一芯片的标识、第一存储介质的标识和第一业务标识生成所述第一流标识,所述第一芯片上的所述第一存储介质是所述第一网络设备上接收所述第一业务报文的存储介质,所述第一业务标识由所述第一存储介质为所述第一业务特征信息分配得到。
  5. 根据权利要求1或2所述的方法,其特征在于,所述基于所述第一业务报文包括的第一业务特征信息生成所述第一业务报文所属的业务流对应的第一流标识之前,还包括:
    接收控制设备发送的第一随流检测实例的标识,所述第一随流检测实例用于对所述业务流进行随流检测;
    所述基于所述第一业务报文包括的第一业务特征信息生成所述第一业务报文对应的第一流标识,包括:
    基于所述第一随流检测实例的标识和第一业务标识生成所述第一流标识,所述第一业务标识由所述第一网络设备为所述第一业务特征信息分配得到。
  6. 根据权利要求1-5任一所述的方法,其特征在于,所述基于所述第一业务报文包括的第一业务特征信息生成所述第一业务报文所属的业务流对应的第一流标识之前,还包括:
    接收控制设备发送的第一随流检测实例的业务特征范围;
    所述基于所述第一业务报文包括的第一业务特征信息生成所述第一业务报文所属的业务流对应的第一流标识,包括:
    当所述第一业务特征信息属于所述业务特征范围时,基于所述第一业务报文包括的第一业务特征信息生成所述第一业务报文所属的业务流对应的第一流标识。
  7. 根据权利要求1-6任一所述的方法,其特征在于,所述基于所述第一业务报文包括的第一业务特征信息生成所述第一业务报文所属的业务流对应的第一流标识之后,还包括:
    保存所述第一业务特征信息与第一流标识的对应关系至映射流表,所述映射流表包括多个业务特征信息和每个业务特征信息对应的流标识。
  8. 根据权利要求7所述的方法,其特征在于,所述方法还包括:
    基于在参考周期内未接收到包括所述第一业务特征信息的业务报文,将所述映射流表中的所述第一业务特征信息与所述第一流标识的对应关系删除;
    当删除所述第一业务特征信息与所述第一流标识的对应关系之后的时长达到参考时长时,将所述第一流标识回收。
  9. 根据权利要求7或8所述的方法,其特征在于,所述方法还包括:
    向控制设备发送所述映射流表。
  10. 一种随流检测方法,其特征在于,所述方法包括:
    控制设备向第一网络设备发送第一随流检测实例的业务特征范围,所述第一随流检测实例的业务特征范围用于所述第一网络设备当第一业务报文的第一业务特征信息属于所述业务特征范围时,基于所述第一业务特征信息生成所述第一业务报文所属的业务流对应的第一流标识。
  11. 根据权利要求10所述的方法,其特征在于,所述第一业务报文为所述业务流的首个报文或者为所述业务流的业务特征信息发生变化后的首个报文。
  12. 根据权利要求10或11所述的方法,其特征在于,所述方法还包括:
    向所述第一网络设备发送所述第一随流检测实例的标识,所述第一随流检测实例的标识用于所述第一网络设备基于所述第一随流检测实例的标识和第一业务标识生成所述第一流标识,所述第一业务标识由所述第一网络设备为所述第一业务特征信息分配得到。
  13. 根据权利要求10-12任一所述的方法,其特征在于,所述方法还包括:
    接收所述第一网络设备发送的映射流表,所述映射流表包括多个业务特征信息和每个业务特征信息对应的流标识。
  14. 一种芯片,其特征在于,所述芯片包括:处理器,所述处理器与存储器耦合,所述存 储器中存储有至少一条程序指令或代码,所述至少一条程序指令或代码由所述处理器加载并执行,以使所述芯片实现权利要求1-9中任一所述的随流检测方法。
  15. 根据权利要求14所述的芯片,其特征在于,所述芯片与第一网络设备上接收第一业务报文的第一芯片相同。
  16. 一种随流检测装置,其特征在于,所述装置应用于第一网络设备,所述装置包括:
    第一接收模块,用于接收第一业务报文;
    生成模块,用于基于所述第一业务报文包括的第一业务特征信息生成所述第一业务报文所属的业务流对应的第一流标识,所述第一业务特征信息用于标识属于所述业务流的业务报文;
    获取模块,用于在所述第一业务报文中增加所述第一流标识,得到第二业务报文,所述第一流标识用于指示接收到所述第二业务报文的第二网络设备基于所述第一流标识进行随流检测;
    第一发送模块,用于发送所述第二业务报文。
  17. 一种随流检测装置,其特征在于,所述装置应用于控制设备,所述装置包括:
    发送模块,用于向第一网络设备发送第一随流检测实例的业务特征范围,所述第一随流检测实例的业务特征范围用于所述第一网络设备当第一业务报文的第一业务特征信息属于所述业务特征范围时,基于所述第一业务特征信息生成所述第一业务报文所属的业务流对应的第一流标识。
  18. 一种网络设备,其特征在于,所述网络设备包括:处理器,所述处理器与存储器耦合,所述存储器中存储有至少一条程序指令或代码,所述至少一条程序指令或代码由所述处理器加载并执行,以使所述网络设备实现权利要求1-9中任一所述的随流检测方法,或者,以使所述网络设备实现权利要求10-13中任一所述的随流检测方法。
  19. 一种随流检测系统,其特征在于,所述随流检测系统包括第一网络设备和控制设备;
    所述第一网络设备用于执行权利要求1-9中任一所述的随流检测方法,所述控制设备用于执行权利要求10-13中任一所述的随流检测方法。
  20. 一种计算机可读存储介质,其特征在于,所述计算机存储介质中存储有至少一条指令,所述至少一条指令由处理器加载并执行,以使计算机实现如权利要求1-9中任一所述的随流检测方法,或者,以使计算机实现如权利要求10-13中任一所述的随流检测方法。
  21. 一种计算机程序产品,其特征在于,所述计算机程序产品包括:计算机程序代码,所述计算机程序代码由计算机加载并执行,以使所述计算机实现权利要求1-9中任一所述的随流检测方法,或者,以使所述计算机实现权利要求10-13中任一所述的随流检测方法。
PCT/CN2023/099728 2022-06-15 2023-06-12 随流检测方法、装置、设备、系统及存储介质 WO2023241520A1 (zh)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202210676353.8 2022-06-15
CN202210676353 2022-06-15
CN202210938620.4A CN117278451A (zh) 2022-06-15 2022-08-05 随流检测方法、装置、设备、系统及存储介质
CN202210938620.4 2022-08-05

Publications (1)

Publication Number Publication Date
WO2023241520A1 true WO2023241520A1 (zh) 2023-12-21

Family

ID=89192214

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/099728 WO2023241520A1 (zh) 2022-06-15 2023-06-12 随流检测方法、装置、设备、系统及存储介质

Country Status (1)

Country Link
WO (1) WO2023241520A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021093692A1 (zh) * 2019-11-12 2021-05-20 中兴通讯股份有限公司 网络质量检测方法、装置、服务器和计算机可读介质
CN113328901A (zh) * 2020-02-28 2021-08-31 华为技术有限公司 报文乱序检测方法、装置及系统
CN114189905A (zh) * 2020-09-15 2022-03-15 华为技术有限公司 一种报文处理方法及相关设备
CN114430386A (zh) * 2020-10-14 2022-05-03 华为技术有限公司 组播业务流的检测方法及相关装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021093692A1 (zh) * 2019-11-12 2021-05-20 中兴通讯股份有限公司 网络质量检测方法、装置、服务器和计算机可读介质
CN113328901A (zh) * 2020-02-28 2021-08-31 华为技术有限公司 报文乱序检测方法、装置及系统
CN114189905A (zh) * 2020-09-15 2022-03-15 华为技术有限公司 一种报文处理方法及相关设备
CN114430386A (zh) * 2020-10-14 2022-05-03 华为技术有限公司 组播业务流的检测方法及相关装置

Similar Documents

Publication Publication Date Title
US20220200896A1 (en) Path Detection Method, Apparatus, and Computer Storage Medium
US9203762B2 (en) Information handling system data center bridging features with defined application environments
WO2021244439A1 (zh) 网络性能的测量方法、装置、设备、系统及存储介质
CN113328902B (zh) 网络性能检测方法、装置及网络设备
US20220191140A1 (en) Data transmission control method, apparatus, and storage medium
CN109428782B (zh) 网络监控的方法和设备
US11336545B2 (en) Network device measurements employing white boxes
US20230086762A1 (en) Data packet forwarding method and system, network node, and storage medium
WO2022247308A1 (zh) 流量测量方法、装置及相关设备
WO2023241520A1 (zh) 随流检测方法、装置、设备、系统及存储介质
US20210029008A1 (en) Systems and methods for providing bidirectional forwarding detection with performance routing measurements
CN115842757A (zh) 随流检测方法、装置、设备、系统及存储介质
CN117278451A (zh) 随流检测方法、装置、设备、系统及存储介质
CN112332956B (zh) 冗余网络中的信息共享方法及装置、计算机存储介质
CN114915564A (zh) 网络状态测量方法、装置和系统
US11665070B2 (en) Data transmission method and related apparatus
EP4319089A1 (en) Path determination method and apparatus, device, system, and computer readable storage medium
WO2022253190A1 (zh) 业务流的性能检测方法、装置及通信网络
CN114697218B (zh) 网络管理方法和设备
WO2023005927A1 (zh) 一种基于SRv6的隧道质量检测方法和相关装置
US20240098004A1 (en) Packet forwarding method and apparatus, and communication network
US20230208545A1 (en) Message processing method, apparatus, and system, device, and storage medium
WO2023040729A1 (zh) 报文处理方法、流规范传输方法、设备、系统及存储介质
CN116781573A (zh) 故障检测方法、装置、设备、系统及计算机可读存储介质
CN116938775A (zh) 网络性能的测量方法、通信装置及计算机可读存储介质

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

Country of ref document: EP

Kind code of ref document: A1