WO2018196556A1 - Transmission delay probing method, device and system - Google Patents

Transmission delay probing method, device and system Download PDF

Info

Publication number
WO2018196556A1
WO2018196556A1 PCT/CN2018/081385 CN2018081385W WO2018196556A1 WO 2018196556 A1 WO2018196556 A1 WO 2018196556A1 CN 2018081385 W CN2018081385 W CN 2018081385W WO 2018196556 A1 WO2018196556 A1 WO 2018196556A1
Authority
WO
WIPO (PCT)
Prior art keywords
network device
delay
timestamp
network
round
Prior art date
Application number
PCT/CN2018/081385
Other languages
French (fr)
Chinese (zh)
Inventor
徐晓旸
宋伟
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2018196556A1 publication Critical patent/WO2018196556A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B10/00Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
    • H04B10/07Arrangements for monitoring or testing transmission systems; Arrangements for fault measurement of transmission systems
    • H04B10/075Arrangements for monitoring or testing transmission systems; Arrangements for fault measurement of transmission systems using an in-service signal
    • H04B10/077Arrangements for monitoring or testing transmission systems; Arrangements for fault measurement of transmission systems using an in-service signal using a supervisory or additional signal
    • H04B10/0775Performance monitoring and measurement of transmission parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • H04L43/0864Round trip delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B10/00Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
    • H04B10/07Arrangements for monitoring or testing transmission systems; Arrangements for fault measurement of transmission systems
    • H04B10/073Arrangements for monitoring or testing transmission systems; Arrangements for fault measurement of transmission systems using an out-of-service signal
    • H04B10/0731Testing or characterisation of optical devices, e.g. amplifiers
    • 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

  • the present application relates to the field of communications, and in particular, to a transmission delay detection method, device, and system.
  • Transmission delay is one of the basic indicators to measure network quality, and its detection accuracy directly affects the credibility of network quality measurement results.
  • the transmission delay between network devices is divided into two types: one-way delay and round-trip delay.
  • the one-way delay between network devices refers to the time required for the probe message to be transmitted from the source network device to the target network device.
  • the round-trip delay between network devices refers to the time required for the probe message to be transmitted from the source network device to the target network device and then returned from the target network device to the source network device.
  • the probe message logically acts only as a start and stop signal, so it is necessary to ensure that the target network device can immediately return a probe message to the source network device after receiving the probe message.
  • the measurement of the transmission time and reception time of the detection packets must be very accurate.
  • time stamps are general concepts used to represent time and represent the difference between the current time and the reference time point.
  • the base time point of the time stamp is generally "00:00:00 on January 1, 1970"; of course, there are other types of reference time points, for example, the time point when the program is started.
  • the transmission timestamp of the probe packet and the reference time point of the received timestamp must be the same.
  • the clocks of the source network device and the target network device need to be calibrated, that is, for the two networks.
  • the device synchronizes the clock.
  • Current clock synchronization includes low precision clock synchronization (eg, millisecond clock synchronization) and high precision clock synchronization (eg, microsecond clock synchronization).
  • High-precision clock synchronization typically requires dedicated hardware support.
  • the clock synchronization process between the source network device and the target network device may be omitted in obtaining a round trip delay between network devices.
  • the transmission delay between network devices is also related to how the source network device and/or the target network device sample the timestamp.
  • a central processing unit English: central processing unit, CPU for short
  • the sampled timestamp usually has an error of 10 microseconds to milliseconds; when using dedicated hardware (for example, network card) for timestamps
  • dedicated hardware for example, network card
  • the error of the timestamp obtained by sampling can usually be controlled within 1 microsecond.
  • most of the software uses pure software (ie, using CPU) or pure hardware (ie, using a dedicated network card or a dedicated chip) to sample the timestamp, the former is less accurate, and the latter is more accurate but expensive.
  • Embodiments of the present application provide a transmission delay detection method, device, and system, which are capable of acquiring a high-precision transmission delay between network devices.
  • a first aspect of the present invention provides a method for detecting a transmission delay, comprising: transmitting, by a network card, a first probe packet to be sent to a second network device to a first network device, where the first network device has a packet forwarding function and a mirroring function; obtaining a first timestamp when the network card receives the mirroring message of the first probe packet from the first network device, and the first time when the network card receives the first probe packet returned by the second network device from the first network device a second timestamp; and obtaining a round-trip delay between the first network device and the second network device based on the first timestamp and the second timestamp.
  • a high-performance round-trip delay between the first network device and the second network device can be obtained by using a universal network card that supports only the recording of the timestamp of the reception direction without a dedicated network card supporting the recording of the two-way time stamp.
  • the process of acquiring a round-trip delay between the first network device and the second network device includes: acquiring a first time delay between the second timestamp and the first timestamp, as the first Round trip delay between a network device and a second network device.
  • a high-precision round-trip delay between the first network device and the second network device without considering the port forwarding delay of the first network device may be obtained, wherein the first network device may be a switch or a router.
  • the process of acquiring a round-trip delay between the first network device and the second network device includes: based on the first timestamp, the second timestamp, and the first The port forwarding delay between the inbound interface and the outbound interface of the network device acquires a round trip delay between the first network device and the second network device.
  • the port forwarding delay of the first network device is considered, a higher-precision round-trip delay between the first network device and the second network device can be acquired.
  • obtaining a round-trip delay between the first network device and the second network device includes: acquiring a first time between the second timestamp and the first timestamp The difference between the first delay and the port forwarding delay of the first network device is obtained as a round-trip delay between the first network device and the second network device.
  • a higher precision round trip delay between the first network device and the second network device can be obtained by a simple subtraction operation.
  • the method for detecting a transmission delay further includes: sending, by using a network card, a second detection packet to be sent to the third network device to the first network device; acquiring the network card a third timestamp when receiving the mirrored message of the second probe packet from the first network device, and a fourth timestamp when the network card receives the second probe packet returned by the third network device from the first network device; a third timestamp and a fourth timestamp, obtaining a round-trip delay between the first network device and the third network device; and based on a round-trip delay between the first network device and the second network device, and the first network device The round-trip delay between the third network devices acquires a round-trip delay between the second network device and the third network device.
  • a high-performance round-trip delay between the first network device and the third network device can be further obtained by using a general-purpose network card that supports only the recording of the time stamp of the reception direction without a dedicated network card supporting the recording of the two-way time stamp.
  • the process of acquiring a round-trip delay between the first network device and the third network device includes: acquiring a fourth timestamp and a third timestamp The second delay is used as a round trip delay between the first network device and the third network device.
  • a high-precision round-trip delay between the first network device and the third network device without considering the port forwarding delay of the first network device can be obtained.
  • the process of acquiring a round-trip delay between the first network device and the third network device includes: based on the third timestamp, the fourth timestamp, and the A port forwarding delay between the inbound interface and the outbound interface of the network device, and obtaining a round-trip delay between the first network device and the third network device.
  • the port forwarding delay of the first network device is considered, a higher-precision round-trip delay between the first network device and the third network device can be acquired.
  • the process of acquiring a round-trip delay between the second network device and the third network device includes: acquiring, between the second time delay and the first time delay The difference is used as a round trip delay between the second network device and the third network device.
  • the first network device and the third network may be acquired by a simple subtraction operation based on a round-trip delay between the first network device and the second network device and a round-trip delay between the first network device and the third network device. High-precision round-trip delay between devices.
  • a transmission delay detecting apparatus includes: a network card; a memory storing computer executable instructions; and a processor operable to execute the computer-executable instructions to implement the first Aspect of the transmission delay detection method.
  • a third aspect provides a transmission delay detecting system, including a transmission delay detecting device and a first network device, where the first network device has a packet forwarding function and a mirroring function, and the transmission delay detecting device includes: a network card; a memory storing computer executable instructions; and a processor operable to execute the computer-executable instructions to implement the transmission delay detecting method of the first aspect.
  • the transmission delay detecting apparatus and system can acquire a first network device and a second by utilizing a universal network card that only supports recording of a time stamp of a receiving direction without a dedicated network card supporting recording of two-way time stamping. High-precision round-trip delay between network devices.
  • 1 is a schematic diagram showing a first exemplary process of acquiring a transmission delay between network devices
  • FIG. 2 is a schematic diagram showing a second exemplary process of acquiring a transmission delay between network devices
  • FIG. 3 is a schematic diagram showing a third exemplary process of acquiring a transmission delay between network devices
  • FIG. 4 is a schematic block diagram showing a transmission delay detecting apparatus according to an embodiment of the present application.
  • FIG. 5 is a flowchart showing a transmission delay detecting method implemented by the transmission delay detecting module shown in FIG. 4;
  • FIG. 6 is a schematic diagram showing an example scenario in which the transmission delay detecting apparatus shown in FIG. 4 acquires a round-trip delay between a first network device and a second network device;
  • FIG. 7 is a schematic diagram showing an example scenario in which a transmission delay detection system acquires a round-trip delay between a second network device and a third network device according to an embodiment of the present application;
  • FIG. 8 is a configuration diagram showing an exemplary hardware architecture of the transmission delay detecting apparatus shown in FIG.
  • the source network device may be a host in the form of a physical machine or a virtual machine, or may be another device including a processor, a memory, and a network card;
  • the target network device may be a switch, a router, or Other devices with packet forwarding function;
  • the operating system for example, Linux operating system
  • the probe program acquires the transmission timestamp t0 when transmitting the probe message to be sent to the target network device to the kernel, and acquires the reception time when receiving the probe message returned by the target network device from the kernel.
  • P1 is t1 to obtain the round-trip delay (t1–t0) between the source network device and the target network device.
  • the transmission timestamp t0 and the reception timestamp t1 acquired by the probe program are time stamps acquired by the user space of the operating system on which the processor runs, the precision is very low, and there is an error of 1 millisecond to 10 milliseconds.
  • a packet capture program resides in the user space of the operating system; when the kernel forwards the probe packet sent by the probe program to the network card, the packet capture program captures the probe packet from the kernel and The probe program returns the captured probe packet and the transmission timestamp t0 when the kernel forwards the probe packet to the network card; when the kernel receives the probe packet returned by the target network device from the network card, the packet capture program captures the probe from the kernel.
  • the message returns the captured probe message to the probe program, and the receiving timestamp t1 when the kernel receives the probe message from the network card; the probe program is obtained based on the sending timestamp t0 and the receiving timestamp t1 returned by the packet capture program.
  • the transmission timestamp t0 and the reception timestamp t1 returned by the packet capture program are timestamps acquired by the kernel of the operating system on which the processor runs, and the accuracy is higher than that of the probe program in the example shown in FIG. Get the timestamp, but there is still an error of 10 microseconds to 100 microseconds.
  • a packet capture program resides in the user space of the operating system; when the network card forwards the probe packet sent by the probe program to the target network device, the packet capture program captures the probe packet from the network card. And returning the captured probe packet to the probe program, and the sending timestamp t0 when the network card forwards the probe packet to the target network device; when the network card receives the probe packet returned by the target network device from the target network device, the packet capture The program captures the probe packet from the network card and returns the captured probe packet to the probe program, and the receiving timestamp t1 when the network card receives the probe packet from the target network device; the probe program is based on the sending timestamp returned by the packet capture program.
  • T0 and the reception timestamp t1 obtain the round-trip delay (t1 - t0) between the source network device and the target network device.
  • the transmission time stamp t0 and the reception time stamp t1 returned by the packet capture program are time stamps of the network card itself, and the precision is higher than the time stamp in the example shown in FIG. 1 and the time stamp in the example shown in FIG. 2, The error can be controlled within 1 microsecond.
  • the conventional acquisition of round-trip delay between network devices is discussed above with reference to FIGS. 1 through 3.
  • the conventional acquisition of one-way delay between network devices is discussed below.
  • the source switch can encapsulate the transmission timestamp t0 into the probe packet and send the probe packet to the target switch, and the target switch records when the probe packet is received.
  • the timestamp t1 is received and the transmission timestamp t0 is extracted from the probe packet, so that the one-way delay (t1–t0) between the source switch and the target switch can be obtained.
  • the high-precision clock synchronization must be performed between the source switch and the target switch with the support of professional hardware, and the package detection packet, the processing of the detection packet, and the calculation of the transmission delay are required to be performed under the support of the programmable chip. action.
  • a transmission delay detecting device and a transmission delay detecting method implemented by the transmission delay detecting device are proposed. Obtain high-precision transmission delays between network devices.
  • FIG. 4 is a schematic block diagram showing a transmission delay detecting apparatus according to an embodiment of the present invention.
  • the transmission delay detecting device 402 includes a transmission delay detecting module 402-2 and a network card 402-4, and the transmission delay detecting device may be a host in the form of a physical machine or a virtual machine or includes a processor, a memory, and The other devices of the network card are implemented, and can obtain the round-trip delay between the first network device having the packet forwarding function and the mirroring function and another network device.
  • the transmission delay detection method implemented by the transmission delay detection module 402-2 includes: S502, sending, by the network card 402-4, the first detection packet to be sent to the second network device to the first network device.
  • S504 Acquire a first timestamp when the network card 402-4 receives the mirrored message of the first probe packet from the first network device, and the network card 402-4 receives the first returned by the second network device from the first network device. a second timestamp when the message is detected; and S506, acquiring a round-trip delay between the first network device and the second network device based on the first timestamp and the second timestamp.
  • the second timestamp and the first time may be acquired if there is no port forwarding delay between the inbound interface and the outbound interface of the first network device or the port forwarding delay of the first network device is not considered.
  • the first time delay between the timestamps is used as a round trip delay between the first network device and the second network device.
  • the first timestamp and the second timestamp may be based on And a port forwarding delay of the first network device, and obtaining a round-trip delay between the first network device and the second network device.
  • the first time delay between the second timestamp and the first timestamp may be first obtained, and then the difference between the first time delay and the port forwarding delay of the first network device is obtained, as the first network device and Round trip delay between the second network devices.
  • FIG. 6 is a schematic diagram showing an example scenario in which the transmission delay detecting apparatus shown in FIG. 4 acquires a round-trip delay between a first network device and a second network device.
  • transmission delay detection device 402 is directly coupled to first network device 404
  • first network device 404 is network coupled to second network device 406.
  • the first network device 404 may be a network device having a message forwarding function and a mirroring function such as a switch, a router, or the like.
  • the transmission delay detecting module 402-2 sends a first probe message to the first network device 404 via the network card 402-4; the first network device When receiving the first probe packet forwarded by the network card 402-4, the 404 returns the mirrored packet of the first probe packet to the network card 402-4, and forwards the first probe packet to the second network device.
  • the second network device 406 when receiving the first probe packet forwarded to it by the first network device 404, immediately returns the first probe packet to the first network device 404, so that the first probe packet is sent via the first probe packet.
  • the first network device 404 returns to the transmission delay detecting device 402.
  • the transmission delay detecting module 402-2 captures the mirrored message of the first detecting packet returned by the first network device 404 from the inbound direction of the network card 402-4. And obtaining the timestamp t1 when the network card 402-4 receives the mirrored message of the first probe message returned by the first network device 404; the transmission delay detecting module 402-2 fetches from the inbound direction of the network card 402-4.
  • the network card 402-4 receives the timestamp t2 when the first probe message returned by the second network device 406; then, the transmission delay detection module 402-2 calculates the first network device 404 and the second based on the timestamps t1 and t2. Round trip delay between network devices 406.
  • the first probe packet is configured by the transmission delay detection module 402-2, and the encapsulation format of the first probe packet is not limited, but the following conditions must be met: (1) the mirroring rule of the first network device 404 can be matched; (2) can be received and transmitted by the first network device 404 and the second network device 406; (3) can be returned to the transmission delay detecting device 402; (4) can be transmitted from the network delay card detecting module 402-2 from the network card 402 -4 is grabbed in the inbound direction.
  • the round-trip delay between the transmission delay detecting device 402 and the second network device 406 is divided into the following three parts: a line forwarding delay Th between the transmission delay detecting device 402 and the first network device 404, and a first network device 404.
  • the line forwarding delay Th is only related to physical factors such as the material and length of the line between the transmission delay detecting device 402 and the first network device 404, and can be regarded as a fixed value in the same detection scenario;
  • the forwarding of a probe message between the inbound interface and the outbound interface of the first network device 404 is performed by a hardware chip in the first network device 404;
  • the port forwarding delay Ts of the first network device 404 is short and substantially fixed, approximately 1 microsecond to 3 microseconds, and is determined by the selection of the hardware chip in the first network device 404 and the size of the first probe message; when the outgoing interface of the first network device 404 is congested, when the port is forwarded
  • the delay Ts will increase sharply; to avoid this, the forwarding priority of the first probe message can be set to the highest; the port forwarding delay Ts of the first network device 404 can pass any measurement that has already existed or is developed in the future.
  • the method is obtained, and can also be obtained from the manufacturer of the
  • the timestamp when the network card 402-4 forwards the first probe message to the first network device 404 is t0 (t0 is not measurable), and the time stamp when the network card 402-4 receives the mirrored message returned by the first network device 404
  • t1 is the timestamp of the network card 402-4 itself
  • the network card 402-4 receives the timestamp of the first probe message returned by the first network device 404 and returned by the second network device 406 as t2 ( T2 is the timestamp of the network card 402-4 itself, then
  • the round trip delay Tx between the first network device 404 and the second network device 406 can be calculated:
  • Tx t2–t1–Ts.
  • the transmission delay detection module 402-2 captures The mirrored packet and the first probe packet acquire the timestamp t1 when the network card 402-4 receives the mirrored packet and the timestamp t2 when the first probe packet is received.
  • the transmission delay detecting module 402-2 calculates the first network device 404 and the second network device 404 based on the timestamp of the network card 402-4.
  • the accuracy of the round trip delay between the two is relatively high.
  • the transmission delay detecting method implemented by the transmission delay detecting module 402-2 includes the step S502 shown in FIG.
  • the S506 may further include: S508, sending, by the network card 402-4, the second probe packet to be sent to the third network device to the first network device; and S510, the acquiring the network card 402-4 receiving the second probe packet from the first network device.
  • the fourth timestamp and the third timestamp may be acquired.
  • the second delay between the two is used as a round trip delay between the first network device and the third network device.
  • the third timestamp, the fourth timestamp, and the first network device may be used.
  • the port forwarding delay is obtained, and the round-trip delay between the first network device and the third network device is obtained; for example, the second time delay between the fourth timestamp and the third timestamp may be first obtained, and then the second time is obtained.
  • the difference between the port forwarding delay of the first network device and the third network device is used as a round trip delay between the first network device and the third network device.
  • the transmission delay detection device 402 and the first network device 404 can be utilized to construct at least a portion of the transmission delay detection system to obtain a round trip delay between the second network device and the third network device.
  • FIG. 7 is a schematic diagram showing an example scenario in which a transmission delay detection system acquires a round-trip delay between a second network device and a third network device according to an embodiment of the present application.
  • the transmission delay detecting device 402 is directly connected to the first network device 404; the first network device 404 is connected to the second network device 406; the second network device 406 and the third network device 408 are connected. Internet connection.
  • the transmission delay detecting module 402-2 transmits the first to be sent to the second network device 406 to the first network device 404 via the network card 402-4.
  • the mirrored message of the text is returned to the network card 402-4, and the first probe packet is forwarded to the second network device 406; the first network device 404 receives the second probe packet forwarded to it by the network card 402-4.
  • the second network device 406 receives the first network device 404 and forwards it to the network device 404.
  • the first probe packet is immediately returned to the first network device 404, so that the first probe packet is returned to the transmission delay detecting device 402 via the first network device 404; the third network device 408 Forwarded to the first network device 404 for forwarding to it
  • the second probe packet is sent, the second probe packet is immediately returned to the first network device 404, so that the second probe packet is returned to the transmission delay detecting device 402 via the first network device 404; and the transmission delay detecting module 402 is transmitted.
  • the mirroring packet of the first probe packet returned by the first network device 404 is captured from the inbound direction of the network card 402-4, and the acquiring network card 402-4 receives the first probe packet returned by the first network device 404.
  • the time delay t1 of the mirrored message; the transmission delay detecting module 402-2 grabs the first probe message returned by the second network device 406 from the inbound direction of the network card 402-4, and acquires the network card 402-4.
  • the timestamp t2 when the first probe packet is returned by the second network device 406; the transmission delay detecting module 402-2 grabs the second probe packet returned by the first network device 404 from the inbound direction of the network card 402-4.
  • the transmission delay detecting module 402-2 is from the network card 402-4 The inbound direction captures the second probe packet returned by the third network device 408, and And acquiring the timestamp t4 when the network card 402-4 receives the second probe packet returned by the third network device 408; then, the transmission delay detecting module 402-2 calculates the second based on the timestamps t1, t2, t3, and t4. Round trip delay Ty between network device 406 and third network device 408.
  • the second probe packet may also be configured by the transmission delay detection module 402-2, and the encapsulation format of the second probe packet is not limited, but the following conditions must be met: (1) the first network device 404 can be matched. Mirroring rules; (2) can be received and transmitted by the second network device 406 and the third network device 408; (3) can be returned to the transmission delay detecting device 402; (4) can be transmitted delay detecting module 402-2 Grab from the inbound direction of the network card 402-4.
  • the first probe packet and the second probe packet may be the same packet or different packets, and may have the same format or different formats.
  • the second probe may be sent.
  • the forwarding priority of the text is set to the highest.
  • the port forwarding delay of the first network device 404 is Ts
  • the round-trip delay Tx t2 ⁇ t1 ⁇ Ts between the first network device 404 and the second network device 406
  • first Round trip delay between network device 404 and third network device 408 Ty t4 - t3 - Ts
  • the transmission delay detecting module 402-2 calculates the second network device 406 based on the time stamps t1 to t4 recorded by the network card 402-4,
  • the round trip delay Tz between the third network devices 408 is independent of the port forwarding delay Ts of the first network device 404, and thus the accuracy is higher.
  • FIG. 8 is a configuration diagram showing an exemplary hardware architecture of the transmission delay detecting apparatus shown in FIG.
  • the transmission delay detecting device 402 includes a network card 402-4, a processor 402-6, and a memory 402-8, wherein the network card 402-4, the processor 402-6, and the memory 402-8 pass through the bus.
  • processor 402-6 implements transmission delay detection module 402-2 by executing computer executable instructions stored in memory 402-8, i.e., performs the transmission delay detection method described above in connection with Figures 5-7.
  • the transmission delay detecting module 402-2 may be resident in the user space in the operating system.
  • the application communicates with the network card 402-4 via a kernel in the operating system.
  • the disclosed systems, devices, and methods may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, or an electrical, mechanical or other form of connection.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

Landscapes

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

Abstract

Disclosed are a transmission delay probing method, device and system, capable of obtaining a high-precision transmission delay between network devices. The transmission delay probing method comprises: sending, by a network card, to a first network device a first probing message to be sent to a second network device, wherein the first network device has a message forwarding function and mirroring function; obtaining a first timestamp when the network card receives a mirror message of the first probing message from the first network device, and a second timestamp when the network card receives, from the first network device, the first probing message returned from the second network device; and obtaining a round-trip delay between the first network device and the second network device on the basis of the first timestamp and the second timestamp.

Description

传输时延探测方法、设备和***Transmission delay detection method, device and system
本申请要求于2017年4月25日提交中国专利局、申请号为201710279875.3、发明名称为“传输时延探测方法、设备和***”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 200910279875.3, entitled "Transmission Time Delay Detection Method, Apparatus and System", filed on April 25, 2017, the entire contents of which are incorporated herein by reference. In the application.
技术领域Technical field
本申请涉及通信领域,尤其涉及一种传输时延探测方法、设备和***。The present application relates to the field of communications, and in particular, to a transmission delay detection method, device, and system.
背景技术Background technique
传输时延是度量网络质量的基础指标之一,其探测精度直接影响网络质量的测量结果的可信度。通常,网络设备之间的传输时延分为单程时延和往返时延两类。网络设备之间的单程时延是指探测报文从源网络设备传输到目标网络设备所需的时间。网络设备之间的往返时延是指探测报文从源网络设备传输到目标网络设备再从目标网络设备返回到源网络设备所需的时间。Transmission delay is one of the basic indicators to measure network quality, and its detection accuracy directly affects the credibility of network quality measurement results. Generally, the transmission delay between network devices is divided into two types: one-way delay and round-trip delay. The one-way delay between network devices refers to the time required for the probe message to be transmitted from the source network device to the target network device. The round-trip delay between network devices refers to the time required for the probe message to be transmitted from the source network device to the target network device and then returned from the target network device to the source network device.
这里,探测报文在逻辑上只起计时起止的信号作用,因此必须确保目标网络设备在接收到探测报文后能立即向源网络设备返回探测报文。为了获取网络设备之间的传输时延的高精度的探测结果,探测报文的发送时间和接收时间的测量必须十分精准。Here, the probe message logically acts only as a start and stop signal, so it is necessary to ensure that the target network device can immediately return a probe message to the source network device after receiving the probe message. In order to obtain high-precision detection results of transmission delays between network devices, the measurement of the transmission time and reception time of the detection packets must be very accurate.
在计算机和通信领域,时间戳是用来表示时间的通用概念,代表了当前时间与基准时间点之间的差值。例如,在Linux操作***中,时间戳的基准时间点一般采用“1970年1月1日00:00:00”;当然,也存在其它类型的基准时间点,例如,程序启动时的时间点。为了获取网络设备之间的准确的传输时延,探测报文的发送时间戳和接收时间戳的基准时间点必须一致。In the field of computers and communications, time stamps are general concepts used to represent time and represent the difference between the current time and the reference time point. For example, in the Linux operating system, the base time point of the time stamp is generally "00:00:00 on January 1, 1970"; of course, there are other types of reference time points, for example, the time point when the program is started. In order to obtain an accurate transmission delay between network devices, the transmission timestamp of the probe packet and the reference time point of the received timestamp must be the same.
在获取网络设备之间的单程时延时,除了需要确保源网络设备和目标网络设备的基准时间点一致以外,还需要对源网络设备和目标网络设备的时钟进行校准,即对这两台网络设备进行时钟同步。对网络设备之间的传输时延的探测精度要求越高,时钟同步的精度要求也越高。目前的时钟同步包括低精度的时钟同步(例如,毫秒级的时钟同步)和高精度的时钟同步(例如,微秒级的时钟同步)两种。高精度的时钟同步通常需要专用硬件支持。在获取网络设备之间的往返时延时,源网络设备和目标网络设备之间的时钟同步过程可省略。In obtaining the one-way delay between network devices, in addition to ensuring that the reference time points of the source network device and the target network device are consistent, the clocks of the source network device and the target network device need to be calibrated, that is, for the two networks. The device synchronizes the clock. The higher the detection accuracy requirement for the transmission delay between network devices, the higher the accuracy requirement for clock synchronization. Current clock synchronization includes low precision clock synchronization (eg, millisecond clock synchronization) and high precision clock synchronization (eg, microsecond clock synchronization). High-precision clock synchronization typically requires dedicated hardware support. The clock synchronization process between the source network device and the target network device may be omitted in obtaining a round trip delay between network devices.
网络设备之间的传输时延还与源网络设备和/或目标网络设备对时间戳的采样方式有关。当使用中央处理器(英文:central processing unit,简称CPU)对时间戳进行采样时,采样得到的时间戳通常存在10微秒至毫秒级的误差;当使用专用硬件(例如,网卡)对时间戳进行采样时,采样得到的时间戳的误差通常可控制在1微秒以内。目前,大多采用纯软件方式(即,使用CPU)或纯硬件方式(即,使用专用网卡或专用芯片) 来对时间戳进行采样,前者精度较低,后者精度较高但价格昂贵。The transmission delay between network devices is also related to how the source network device and/or the target network device sample the timestamp. When using a central processing unit (English: central processing unit, CPU for short) to sample timestamps, the sampled timestamp usually has an error of 10 microseconds to milliseconds; when using dedicated hardware (for example, network card) for timestamps When sampling, the error of the timestamp obtained by sampling can usually be controlled within 1 microsecond. At present, most of the software uses pure software (ie, using CPU) or pure hardware (ie, using a dedicated network card or a dedicated chip) to sample the timestamp, the former is less accurate, and the latter is more accurate but expensive.
发明内容Summary of the invention
本申请的实施例提供了一种传输时延探测方法、设备和***,能够获取网络设备之间的高精度的传输时延。Embodiments of the present application provide a transmission delay detection method, device, and system, which are capable of acquiring a high-precision transmission delay between network devices.
第一方面,提供了一种传输时延探测方法,包括:经由网卡向第一网络设备发送待发送给第二网络设备的第一探测报文,其中,第一网络设备具备报文转发功能和镜像功能;获取网卡从第一网络设备接收第一探测报文的镜像报文时的第一时间戳、和网卡从第一网络设备接收由第二网络设备返回的第一探测报文时的第二时间戳;以及基于第一时间戳和第二时间戳,获取第一网络设备与第二网络设备之间的往返时延。这里,可以利用仅支持接收方向的时间戳的记录的通用网卡,而无需支持双向时间戳的记录的专用网卡,来获取第一网络设备与第二网络设备之间的高精度的往返时延。A first aspect of the present invention provides a method for detecting a transmission delay, comprising: transmitting, by a network card, a first probe packet to be sent to a second network device to a first network device, where the first network device has a packet forwarding function and a mirroring function; obtaining a first timestamp when the network card receives the mirroring message of the first probe packet from the first network device, and the first time when the network card receives the first probe packet returned by the second network device from the first network device a second timestamp; and obtaining a round-trip delay between the first network device and the second network device based on the first timestamp and the second timestamp. Here, a high-performance round-trip delay between the first network device and the second network device can be obtained by using a universal network card that supports only the recording of the timestamp of the reception direction without a dedicated network card supporting the recording of the two-way time stamp.
在第一种可能的实现方式中,获取第一网络设备与第二网络设备之间的往返时延的处理包括:获取第二时间戳与第一时间戳之间的第一时延,作为第一网络设备与第二网络设备之间的往返时延。这里,可以获取在没有考虑第一网络设备的端口转发时延的情况下的第一网络设备与第二网络设备之间的高精度的往返时延,其中第一网络设备可以是交换机或路由器。In a first possible implementation, the process of acquiring a round-trip delay between the first network device and the second network device includes: acquiring a first time delay between the second timestamp and the first timestamp, as the first Round trip delay between a network device and a second network device. Here, a high-precision round-trip delay between the first network device and the second network device without considering the port forwarding delay of the first network device may be obtained, wherein the first network device may be a switch or a router.
结合上述可能的实现方式,在第二种可能的实现方式中,获取第一网络设备与第二网络设备之间的往返时延的处理包括:基于第一时间戳、第二时间戳、以及第一网络设备的入接口和出接口之间的端口转发时延,获取第一网络设备与第二网络设备之间的往返时延。这里,相比上述第一种可能的实现方式,由于考虑了第一网络设备的端口转发时延,所以可以获取第一网络设备与第二网络设备之间的更高精度的往返时延。In combination with the foregoing possible implementation manner, in a second possible implementation manner, the process of acquiring a round-trip delay between the first network device and the second network device includes: based on the first timestamp, the second timestamp, and the first The port forwarding delay between the inbound interface and the outbound interface of the network device acquires a round trip delay between the first network device and the second network device. Here, compared with the first possible implementation manner described above, since the port forwarding delay of the first network device is considered, a higher-precision round-trip delay between the first network device and the second network device can be acquired.
结合上述可能的实现方式,在第三种可能的实现方式中,获取第一网络设备与第二网络设备之间的往返时延包括:获取第二时间戳与第一时间戳之间的第一时延;获取第一时延与第一网络设备的端口转发时延之间的差值,作为第一网络设备与第二网络设备之间的往返时延。这里,可以通过简单的减法运算获取第一网络设备与第二网络设备之间的更高精度的往返时延。In combination with the foregoing possible implementation manner, in a third possible implementation manner, obtaining a round-trip delay between the first network device and the second network device includes: acquiring a first time between the second timestamp and the first timestamp The difference between the first delay and the port forwarding delay of the first network device is obtained as a round-trip delay between the first network device and the second network device. Here, a higher precision round trip delay between the first network device and the second network device can be obtained by a simple subtraction operation.
结合上述可能的实现方式,在第四种可能的实现方式中,该传输时延探测方法还包括:经由网卡向第一网络设备发送待发送给第三网络设备的第二探测报文;获取网卡从第一网络设备接收第二探测报文的镜像报文时的第三时间戳、和网卡从第一网络设备接收由第三网络设备返回的第二探测报文时的第四时间戳;基于第三时间戳和第四时间戳,获取第一网络设备与第三网络设备之间的往返时延;以及基于第一网络设备与第二网络设备之间的往返时延和第一网络设备与第三网络设备之间的往返时延,获取第二网络设备与第三网络设备之间的往返时延。这里,可以利用仅支持接收方向的时间戳的记录的通用网卡,而无需支持双向时间戳的记录的专用网卡,进一步获取第一网络设备与 第三网络设备之间的高精度的往返时延。In combination with the foregoing possible implementation manner, in a fourth possible implementation manner, the method for detecting a transmission delay further includes: sending, by using a network card, a second detection packet to be sent to the third network device to the first network device; acquiring the network card a third timestamp when receiving the mirrored message of the second probe packet from the first network device, and a fourth timestamp when the network card receives the second probe packet returned by the third network device from the first network device; a third timestamp and a fourth timestamp, obtaining a round-trip delay between the first network device and the third network device; and based on a round-trip delay between the first network device and the second network device, and the first network device The round-trip delay between the third network devices acquires a round-trip delay between the second network device and the third network device. Here, a high-performance round-trip delay between the first network device and the third network device can be further obtained by using a general-purpose network card that supports only the recording of the time stamp of the reception direction without a dedicated network card supporting the recording of the two-way time stamp.
结合上述可能的实现方式,在第五种可能的实现方式中,获取第一网络设备与第三网络设备之间的往返时延的处理包括:获取第四时间戳与第三时间戳之间的第二时延,作为第一网络设备与第三网络设备之间的往返时延。这里,可以获取在没有考虑第一网络设备的端口转发时延的情况下的第一网络设备与第三网络设备之间的高精度的往返时延。In combination with the foregoing possible implementation manner, in a fifth possible implementation, the process of acquiring a round-trip delay between the first network device and the third network device includes: acquiring a fourth timestamp and a third timestamp The second delay is used as a round trip delay between the first network device and the third network device. Here, a high-precision round-trip delay between the first network device and the third network device without considering the port forwarding delay of the first network device can be obtained.
结合上述可能的实现方式,在第六种可能的实现方式中,获取第一网络设备与第三网络设备之间的往返时延的处理包括:基于第三时间戳、第四时间戳、以及第一网络设备的入接口和出接口之间的端口转发时延,获取第一网络设备与第三网络设备之间的往返时延。这里,相比上述第五种可能的实现方式,由于考虑了第一网络设备的端口转发时延,所以可以获取第一网络设备与第三网络设备之间的更高精度的往返时延。In combination with the foregoing possible implementation manner, in a sixth possible implementation, the process of acquiring a round-trip delay between the first network device and the third network device includes: based on the third timestamp, the fourth timestamp, and the A port forwarding delay between the inbound interface and the outbound interface of the network device, and obtaining a round-trip delay between the first network device and the third network device. Here, compared with the fifth possible implementation manner described above, since the port forwarding delay of the first network device is considered, a higher-precision round-trip delay between the first network device and the third network device can be acquired.
结合上述可能的实现方式,在第七种可能的实现方式中,获取第二网络设备与第三网络设备之间的往返时延的处理包括:获取第二时延与第一时延之间的差值,作为第二网络设备与第三网络设备之间的往返时延。这里,可以基于第一网络设备与第二网络设备之间的往返时延和第一网络设备与第三网络设备之间的往返时延,通过简单的减法运算获取第一网络设备与第三网络设备之间的高精度的往返时延。In combination with the foregoing possible implementation manner, in a seventh possible implementation, the process of acquiring a round-trip delay between the second network device and the third network device includes: acquiring, between the second time delay and the first time delay The difference is used as a round trip delay between the second network device and the third network device. Here, the first network device and the third network may be acquired by a simple subtraction operation based on a round-trip delay between the first network device and the second network device and a round-trip delay between the first network device and the third network device. High-precision round-trip delay between devices.
第二方面,提供了一种传输时延探测设备,包括:网卡;存储器,存储有计算机可执行指令;以及处理器,在执行计算机可执行指令时可操作该传输时延探测设备以实现第一方面的传输时延探测方法。In a second aspect, a transmission delay detecting apparatus includes: a network card; a memory storing computer executable instructions; and a processor operable to execute the computer-executable instructions to implement the first Aspect of the transmission delay detection method.
第三方面,提供了一种传输时延探测***,包括传输时延探测设备和第一网络设备,该第一网络设备具备报文转发功能和镜像功能,该传输时延探测设备包括:网卡;存储器,存储有计算机可执行指令;以及处理器,在执行计算机可执行指令时可操作该传输时延探测设备以实现第一方面的传输时延探测方法。A third aspect provides a transmission delay detecting system, including a transmission delay detecting device and a first network device, where the first network device has a packet forwarding function and a mirroring function, and the transmission delay detecting device includes: a network card; a memory storing computer executable instructions; and a processor operable to execute the computer-executable instructions to implement the transmission delay detecting method of the first aspect.
根据本申请的实施例的传输时延探测设备和***可以利用仅支持接收方向的时间戳的记录的通用网卡,而无需支持双向时间戳的记录的专用网卡,来获取第一网络设备与第二网络设备之间的高精度的往返时延。The transmission delay detecting apparatus and system according to an embodiment of the present application can acquire a first network device and a second by utilizing a universal network card that only supports recording of a time stamp of a receiving direction without a dedicated network card supporting recording of two-way time stamping. High-precision round-trip delay between network devices.
附图说明DRAWINGS
通过阅读以下参照附图对本申请的非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显,其中,相同或相似的附图标记表示相同或相似的特征。Other features, objects, and advantages of the present invention will become more apparent from the detailed description of the appended claims. .
图1是示出传统的获取网络设备之间的传输时延的第一示例过程的示意图;1 is a schematic diagram showing a first exemplary process of acquiring a transmission delay between network devices;
图2是示出传统的获取网络设备之间的传输时延的第二示例过程的示意图;2 is a schematic diagram showing a second exemplary process of acquiring a transmission delay between network devices;
图3是示出传统的获取网络设备之间的传输时延的第三示例过程的示意图;3 is a schematic diagram showing a third exemplary process of acquiring a transmission delay between network devices;
图4是示出根据本申请实施例的传输时延探测设备的示意框图;FIG. 4 is a schematic block diagram showing a transmission delay detecting apparatus according to an embodiment of the present application; FIG.
图5是示出由图4所示的传输时延探测模块实现的传输时延探测方法的流程图;FIG. 5 is a flowchart showing a transmission delay detecting method implemented by the transmission delay detecting module shown in FIG. 4;
图6是示出图4所示的传输时延探测设备获取第一网络设备与第二网络设备之间的往返时延的示例场景的示意图;6 is a schematic diagram showing an example scenario in which the transmission delay detecting apparatus shown in FIG. 4 acquires a round-trip delay between a first network device and a second network device;
图7是示出根据本申请实施例的传输时延探测***获取第二网络设备与第三网络设备之间的往返时延的示例场景的示意图;7 is a schematic diagram showing an example scenario in which a transmission delay detection system acquires a round-trip delay between a second network device and a third network device according to an embodiment of the present application;
图8是示出图4所示的传输时延探测设备的示例性硬件架构的结构图。FIG. 8 is a configuration diagram showing an exemplary hardware architecture of the transmission delay detecting apparatus shown in FIG.
具体实施方式detailed description
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行描述。The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.
下面将详细描述本发明的各个方面的特征和示例性实施例。在下面的详细描述中,提出了许多具体细节,以便提供对本发明的全面理解。但是,对于本领域技术人员来说很明显的是,本发明可以在不需要这些具体细节中的一些细节的情况下实施。下面对实施例的描述仅仅是为了通过示出本发明的示例来提供对本发明的更好的理解。本发明决不限于下面所提出的任何具体配置和算法,而是在不脱离本发明的原则的前提下覆盖了元素、部件和算法的任何修改、替换和改进。Features and exemplary embodiments of various aspects of the invention are described in detail below. In the following detailed description, numerous specific details are set forth However, it will be apparent to those skilled in the art that the present invention may be practiced without some of the details. The following description of the embodiments is merely provided to provide a better understanding of the invention. The present invention is in no way limited to any specific configurations and algorithms set forth below, but without departing from the spirit and scope of the invention.
此外,本申请一个实施方式中所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施例中。在下面的描述中,提供许多具体细节从而给出对本发明的实施例的充分理解。然而,本领域技术人员将意识到,可以通过减少所述特定细节中的一个或多个实践本发明的技术方案。Furthermore, the described features, structures, or characteristics of one embodiment of the present application can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are set forth However, those skilled in the art will appreciate that the technical aspects of the present invention can be practiced by reducing one or more of the specific details.
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
图1至图3是示出传统的获取网络设备之间的传输时延的过程的示意图。在图1至图3示出的示例中,源网络设备可以是物理机或虚拟机形式的主机也可以是包括处理器、存储器、和网卡的其他设备;目标网络设备可以是交换机、路由器、或者具有报文转发功能的其他设备;源网络设备中的处理器上运行有操作***(例如,Linux操作***),该操作***的体系架构包括用户空间和内核两部分;操作***的用户空间中驻留有探测程序,该探测程序经由操作***的内核与外部通信。1 to 3 are schematic diagrams showing a conventional process of acquiring a transmission delay between network devices. In the examples shown in FIGS. 1 to 3, the source network device may be a host in the form of a physical machine or a virtual machine, or may be another device including a processor, a memory, and a network card; the target network device may be a switch, a router, or Other devices with packet forwarding function; the operating system (for example, Linux operating system) runs on the processor in the source network device, and the architecture of the operating system includes user space and kernel; the user space of the operating system is stationed. There is a probe program that communicates with the outside via the kernel of the operating system.
在图1示出的示例中,探测程序在向内核发送待发送给目标网络设备的探测报文时获取发送时间戳t0,并在从内核接收由目标网络设备返回的探测报文时获取接收时间戳 t1,从而获取源网络设备与目标网络设备之间的往返时延(t1–t0)。这里,探测程序所获取的发送时间戳t0和接收时间戳t1都是处理器在其上运行的操作***的用户空间获取的时间戳,精度非常低,存在1毫秒到10毫秒的误差。In the example shown in FIG. 1, the probe program acquires the transmission timestamp t0 when transmitting the probe message to be sent to the target network device to the kernel, and acquires the reception time when receiving the probe message returned by the target network device from the kernel. P1 is t1 to obtain the round-trip delay (t1–t0) between the source network device and the target network device. Here, the transmission timestamp t0 and the reception timestamp t1 acquired by the probe program are time stamps acquired by the user space of the operating system on which the processor runs, the precision is very low, and there is an error of 1 millisecond to 10 milliseconds.
在图2示出的示例中,操作***的用户空间中还驻留有抓包程序;在内核向网卡转发由探测程序发送的探测报文时,抓包程序从内核抓取探测报文并向探测程序返回所抓取的探测报文、以及内核向网卡转发探测报文时的发送时间戳t0;在内核从网卡接收由目标网络设备返回的探测报文时,抓包程序从内核抓取探测报文并向探测程序返回所抓取的探测报文、以及内核从网卡接收探测报文时的接收时间戳t1;探测程序基于由抓包程序所返回的发送时间戳t0和接收时间戳t1获取源网络设备与目标网络设备之间的往返时延(t1–t0)。这里,抓包程序所返回的发送时间戳t0和接收时间戳t1都是处理器在其上运行的操作***的内核获取的时间戳,精度虽高于图1示出的示例中由探测程序所获取的时间戳,但仍然存在10微秒至100微秒的误差。In the example shown in FIG. 2, a packet capture program resides in the user space of the operating system; when the kernel forwards the probe packet sent by the probe program to the network card, the packet capture program captures the probe packet from the kernel and The probe program returns the captured probe packet and the transmission timestamp t0 when the kernel forwards the probe packet to the network card; when the kernel receives the probe packet returned by the target network device from the network card, the packet capture program captures the probe from the kernel. The message returns the captured probe message to the probe program, and the receiving timestamp t1 when the kernel receives the probe message from the network card; the probe program is obtained based on the sending timestamp t0 and the receiving timestamp t1 returned by the packet capture program. Round trip delay (t1–t0) between the source network device and the target network device. Here, the transmission timestamp t0 and the reception timestamp t1 returned by the packet capture program are timestamps acquired by the kernel of the operating system on which the processor runs, and the accuracy is higher than that of the probe program in the example shown in FIG. Get the timestamp, but there is still an error of 10 microseconds to 100 microseconds.
在图3所示的示例中,操作***的用户空间中还驻留有抓包程序;在网卡向目标网络设备转发由探测程序发送的探测报文时,抓包程序从网卡抓取探测报文并向探测程序返回所抓取的探测报文、以及网卡向目标网络设备转发探测报文时的发送时间戳t0;在网卡从目标网络设备接收由目标网络设备返回的探测报文时,抓包程序从网卡抓取探测报文并向探测程序返回所抓取的探测报文、以及网卡从目标网络设备接收探测报文时的接收时间戳t1;探测程序基于由抓包程序返回的发送时间戳t0和接收时间戳t1获取源网络设备与目标网络设备之间的往返时延(t1–t0)。这里,抓包程序所返回的发送时间戳t0和接收时间戳t1都是网卡自身的时间戳,精度高于图1示出的示例中的时间戳和图2示出的示例中的时间戳,误差可控制在1微秒以内。In the example shown in FIG. 3, a packet capture program resides in the user space of the operating system; when the network card forwards the probe packet sent by the probe program to the target network device, the packet capture program captures the probe packet from the network card. And returning the captured probe packet to the probe program, and the sending timestamp t0 when the network card forwards the probe packet to the target network device; when the network card receives the probe packet returned by the target network device from the target network device, the packet capture The program captures the probe packet from the network card and returns the captured probe packet to the probe program, and the receiving timestamp t1 when the network card receives the probe packet from the target network device; the probe program is based on the sending timestamp returned by the packet capture program. T0 and the reception timestamp t1 obtain the round-trip delay (t1 - t0) between the source network device and the target network device. Here, the transmission time stamp t0 and the reception time stamp t1 returned by the packet capture program are time stamps of the network card itself, and the precision is higher than the time stamp in the example shown in FIG. 1 and the time stamp in the example shown in FIG. 2, The error can be controlled within 1 microsecond.
由于目前的大多数网卡只支持在接收探测报文时记录接收时间戳t1,而不支持在发送探测报文时记录发送时间戳t0,因此图3所示的示例只适用于少量支持双向时间戳的记录的专用网卡。但是,这类网卡的价格比较昂贵。Since most of the current network cards only support the reception of the timestamp t1 when receiving the probe message, and do not support the record timestamp t0 when the probe message is sent, the example shown in FIG. 3 is only applicable to a small number of support bidirectional timestamps. The dedicated network card for the record. However, such NICs are more expensive.
以上结合图1至图3讨论了传统的获取网络设备之间的往返时延的情况,下面讨论传统的获取网络设备之间的单程时延的情况。例如,在源网络设备和目标网络设备均为交换机的情况下,源交换机可以将发送时间戳t0封装进探测报文并将探测报文发送给目标交换机,目标交换机在接收到探测报文时记录接收时间戳t1并从探测报文中提取出发送时间戳t0,从而可以获取源交换机与目标交换机之间的单程时延(t1–t0)。这里,源交换机和目标交换机之间必须在专业硬件的支持下执行高度精的时钟同步,并且需要在可编程芯片的支持下执行封装探测报文、处理探测报文、计算传输时延等非常规动作。The conventional acquisition of round-trip delay between network devices is discussed above with reference to FIGS. 1 through 3. The conventional acquisition of one-way delay between network devices is discussed below. For example, in the case that both the source network device and the target network device are switches, the source switch can encapsulate the transmission timestamp t0 into the probe packet and send the probe packet to the target switch, and the target switch records when the probe packet is received. The timestamp t1 is received and the transmission timestamp t0 is extracted from the probe packet, so that the one-way delay (t1–t0) between the source switch and the target switch can be obtained. Here, the high-precision clock synchronization must be performed between the source switch and the target switch with the support of professional hardware, and the package detection packet, the processing of the detection packet, and the calculation of the transmission delay are required to be performed under the support of the programmable chip. action.
鉴于以上讨论的获取网络设备之间的传输时延的示例过程存在的一个或多个问题,提出了一种传输时延探测设备及由该传输时延探测设备实现的传输时延探测方法,能够获取网络设备之间的高精度的传输时延。In view of one or more problems in the above exemplary process for obtaining a transmission delay between network devices, a transmission delay detecting device and a transmission delay detecting method implemented by the transmission delay detecting device are proposed. Obtain high-precision transmission delays between network devices.
图4是示出根据本发明实施例的传输时延探测设备的示意框图。如图4所示,传输 时延探测设备402包括传输时延探测模块402-2和网卡402-4,该传输时延探测设备可以由物理机或虚拟机形式的主机或者包括处理器、存储器和网卡的其他设备实现,并且能够获取具备报文转发功能和镜像功能的第一网络设备与另一网络设备之间的往返时延。FIG. 4 is a schematic block diagram showing a transmission delay detecting apparatus according to an embodiment of the present invention. As shown in FIG. 4, the transmission delay detecting device 402 includes a transmission delay detecting module 402-2 and a network card 402-4, and the transmission delay detecting device may be a host in the form of a physical machine or a virtual machine or includes a processor, a memory, and The other devices of the network card are implemented, and can obtain the round-trip delay between the first network device having the packet forwarding function and the mirroring function and another network device.
下面结合图5,以获取第一网络设备与第二网络设备之间的往返时延为例详细描述由传输时延探测模块402-2实现的传输时延探测方法的流程图。如图5所示,由传输时延探测模块402-2实现的传输时延探测方法包括:S502,经由网卡402-4向第一网络设备发送待发送给第二网络设备的第一探测报文;S504,获取网卡402-4从第一网络设备接收第一探测报文的镜像报文时的第一时间戳、和网卡402-4从第一网络设备接收由第二网络设备返回的第一探测报文时的第二时间戳;以及S506,基于第一时间戳和第二时间戳,获取第一网络设备与第二网络设备之间的往返时延。The flowchart of the transmission delay detection method implemented by the transmission delay detecting module 402-2 is described in detail below by taking the round-trip delay between the first network device and the second network device as an example. As shown in FIG. 5, the transmission delay detection method implemented by the transmission delay detection module 402-2 includes: S502, sending, by the network card 402-4, the first detection packet to be sent to the second network device to the first network device. S504: Acquire a first timestamp when the network card 402-4 receives the mirrored message of the first probe packet from the first network device, and the network card 402-4 receives the first returned by the second network device from the first network device. a second timestamp when the message is detected; and S506, acquiring a round-trip delay between the first network device and the second network device based on the first timestamp and the second timestamp.
在一些实施例中,在第一网络设备的入接口和出接口之间不存在端口转发时延或者不考虑第一网络设备的端口转发时延的情况下,可以获取第二时间戳与第一时间戳之间的第一时延,作为第一网络设备与第二网络设备之间的往返时延。In some embodiments, the second timestamp and the first time may be acquired if there is no port forwarding delay between the inbound interface and the outbound interface of the first network device or the port forwarding delay of the first network device is not considered. The first time delay between the timestamps is used as a round trip delay between the first network device and the second network device.
在一些实施例中,在第一网络设备的入接口和出接口之间存在端口转发时延或者考虑第一网络设备的端口转发时延的情况下,可以基于第一时间戳、第二时间戳、以及第一网络设备的端口转发时延,获取第一网络设备与第二网络设备之间的往返时延。例如,可以首先获取第二时间戳与第一时间戳之间的第一时延,然后获取第一时延与第一网络设备的端口转发时延之间的差值,作为第一网络设备与第二网络设备之间的往返时延。In some embodiments, if there is a port forwarding delay between the ingress interface and the egress interface of the first network device or considering the port forwarding delay of the first network device, the first timestamp and the second timestamp may be based on And a port forwarding delay of the first network device, and obtaining a round-trip delay between the first network device and the second network device. For example, the first time delay between the second timestamp and the first timestamp may be first obtained, and then the difference between the first time delay and the port forwarding delay of the first network device is obtained, as the first network device and Round trip delay between the second network devices.
图6是示出图4所示的传输时延探测设备获取第一网络设备与第二网络设备之间的往返时延的示例场景的示意图。在图6所示的示例场景中,传输时延探测设备402与第一网络设备404直连,第一网络设备404与第二网络设备406网络连接。这里,第一网络设备404可以是诸如,交换机、路由器等的具备报文转发功能和镜像功能的网络设备。6 is a schematic diagram showing an example scenario in which the transmission delay detecting apparatus shown in FIG. 4 acquires a round-trip delay between a first network device and a second network device. In the example scenario illustrated in FIG. 6, transmission delay detection device 402 is directly coupled to first network device 404, and first network device 404 is network coupled to second network device 406. Here, the first network device 404 may be a network device having a message forwarding function and a mirroring function such as a switch, a router, or the like.
为了获取第一网络设备404与第二网络设备406之间的往返时延,传输时延探测模块402-2经由网卡402-4向第一网络设备404发送第一探测报文;第一网络设备404在接收到由网卡402-4转发给其的第一探测报文时,将第一探测报文的镜像报文返回给网卡402-4,同时将第一探测报文转发给第二网络设备406;第二网络设备406在接收到由第一网络设备404转发给其的第一探测报文时,立即将第一探测报文返回给第一网络设备404,以使第一探测报文经由第一网络设备404返回到传输时延探测设备402;传输时延探测模块402-2从网卡402-4的入方向抓取由第一网络设备404返回的第一探测报文的镜像报文,并且获取网卡402-4接收由第一网络设备404返回的第一探测报文的镜向报文时的时间戳t1;传输时延探测模块402-2从网卡402-4的入方向抓取由第二网络设备406返回的第一探测报文,并且获取网卡402-4接收由第二网络设备406返回的第一探测报文时的时间戳t2;然后,传输时延探测模块402-2基于时间戳t1和t2,计算第一网络设备404与第二网络设备406之间的往返时延。In order to obtain the round-trip delay between the first network device 404 and the second network device 406, the transmission delay detecting module 402-2 sends a first probe message to the first network device 404 via the network card 402-4; the first network device When receiving the first probe packet forwarded by the network card 402-4, the 404 returns the mirrored packet of the first probe packet to the network card 402-4, and forwards the first probe packet to the second network device. The second network device 406, when receiving the first probe packet forwarded to it by the first network device 404, immediately returns the first probe packet to the first network device 404, so that the first probe packet is sent via the first probe packet. The first network device 404 returns to the transmission delay detecting device 402. The transmission delay detecting module 402-2 captures the mirrored message of the first detecting packet returned by the first network device 404 from the inbound direction of the network card 402-4. And obtaining the timestamp t1 when the network card 402-4 receives the mirrored message of the first probe message returned by the first network device 404; the transmission delay detecting module 402-2 fetches from the inbound direction of the network card 402-4. The first probe packet returned by the second network device 406, and obtained The network card 402-4 receives the timestamp t2 when the first probe message returned by the second network device 406; then, the transmission delay detection module 402-2 calculates the first network device 404 and the second based on the timestamps t1 and t2. Round trip delay between network devices 406.
这里,第一探测报文由传输时延探测模块402-2构造,并且第一探测报文的封装格式不限,但必须满足以下条件:(1)能匹配第一网络设备404的镜像规则;(2)能被第一网络设备404和第二网络设备406接收和发送;(3)能被返回到传输时延探测设备402;(4)能被传输时延探测模块402-2从网卡402-4的入方向抓取。Here, the first probe packet is configured by the transmission delay detection module 402-2, and the encapsulation format of the first probe packet is not limited, but the following conditions must be met: (1) the mirroring rule of the first network device 404 can be matched; (2) can be received and transmitted by the first network device 404 and the second network device 406; (3) can be returned to the transmission delay detecting device 402; (4) can be transmitted from the network delay card detecting module 402-2 from the network card 402 -4 is grabbed in the inbound direction.
在图6所示的示例场景中,因为第一探测报文在传输时延探测设备402内部的转发对传输时延探测设备402与第二网络设备406之间的往返时延没有影响,因此可以将传输时延探测设备402与第二网络设备406之间的往返时延分成以下三部分:传输时延探测设备402与第一网络设备404之间的线路转发时延Th、第一网络设备404的入接口和出接口之间的端口转发时延Ts、以及第一网络设备404与第二网络设备406之间的往返时延Tx。In the example scenario shown in FIG. 6, since the forwarding of the first probe message within the transmission delay detecting device 402 has no effect on the round-trip delay between the transmission delay detecting device 402 and the second network device 406, The round-trip delay between the transmission delay detecting device 402 and the second network device 406 is divided into the following three parts: a line forwarding delay Th between the transmission delay detecting device 402 and the first network device 404, and a first network device 404. The port forwarding delay Ts between the ingress interface and the outbound interface, and the round trip delay Tx between the first network device 404 and the second network device 406.
在实际网络环境中,线路转发时延Th仅与传输时延探测设备402与第一网络设备404之间的线路的材质、长度等物理因素有关,在同一探测场景下可视为定值;第一探测报文在第一网络设备404的入接口和出接口之间的转发由第一网络设备404中的硬件芯片执行;第一网络设备404的端口转发时延Ts短且基本固定,约为1微秒至3微秒,并且由第一网络设备404中的硬件芯片的选型和第一探测报文的大小决定;当第一网络设备404的出接口出现报文拥塞时,端口转发时延Ts会剧烈增长;为避免这种情况,可将第一探测报文的转发优先级设为最高;第一网络设备404的端口转发时延Ts可通过目前已经存在的或者将来开发的任何测量方法获取,也可从第一网络设备404的生产厂商获取,此处不再赘述。In the actual network environment, the line forwarding delay Th is only related to physical factors such as the material and length of the line between the transmission delay detecting device 402 and the first network device 404, and can be regarded as a fixed value in the same detection scenario; The forwarding of a probe message between the inbound interface and the outbound interface of the first network device 404 is performed by a hardware chip in the first network device 404; the port forwarding delay Ts of the first network device 404 is short and substantially fixed, approximately 1 microsecond to 3 microseconds, and is determined by the selection of the hardware chip in the first network device 404 and the size of the first probe message; when the outgoing interface of the first network device 404 is congested, when the port is forwarded The delay Ts will increase sharply; to avoid this, the forwarding priority of the first probe message can be set to the highest; the port forwarding delay Ts of the first network device 404 can pass any measurement that has already existed or is developed in the future. The method is obtained, and can also be obtained from the manufacturer of the first network device 404, and details are not described herein again.
假定网卡402-4向第一网络设备404转发第一探测报文时的时间戳为t0(t0不可度量),网卡402-4接收第一网络设备404返回给其的镜像报文时的时间戳为t1(t1为网卡402-4自身的时间戳),网卡402-4接收第一网络设备404转发给其的、由第二网络设备406返回的第一探测报文时的时间戳为t2(t2为网卡402-4自身的时间戳),则It is assumed that the timestamp when the network card 402-4 forwards the first probe message to the first network device 404 is t0 (t0 is not measurable), and the time stamp when the network card 402-4 receives the mirrored message returned by the first network device 404 For t1 (t1 is the timestamp of the network card 402-4 itself), the network card 402-4 receives the timestamp of the first probe message returned by the first network device 404 and returned by the second network device 406 as t2 ( T2 is the timestamp of the network card 402-4 itself, then
t1–t0=Th*2+TsT1–t0=Th*2+Ts
t2–t0=Th*2+Ts*2+TxT2–t0=Th*2+Ts*2+Tx
综合上述两个等式,可计算得出第一网络设备404与第二网络设备406之间的往返时延Tx:Combining the above two equations, the round trip delay Tx between the first network device 404 and the second network device 406 can be calculated:
Tx=t2–t1–Ts。Tx=t2–t1–Ts.
在图6所示的示例场景中,第一探测报文在第一网络设备404的入接口上命中镜像规则后,经第一网络设备404中的转发芯片的转发回到传输时延探测设备402;由第一网络设备404返回的第一探测报文的镜像报文和由第二网络设备406返回的第一探测报文在进入网卡402-4时,传输时延探测模块402-2抓取该镜像报文和第一探测报文,同时获取网卡402-4接收镜像报文时的时间戳t1和接收第一探测报文时的时间戳t2。In the example scenario shown in FIG. 6, after the first probe packet hits the mirroring rule on the inbound interface of the first network device 404, it is forwarded back to the transmission delay detecting device 402 via the forwarding chip in the first network device 404. When the mirrored message of the first probe packet returned by the first network device 404 and the first probe packet returned by the second network device 406 enter the network card 402-4, the transmission delay detection module 402-2 captures The mirrored packet and the first probe packet acquire the timestamp t1 when the network card 402-4 receives the mirrored packet and the timestamp t2 when the first probe packet is received.
这里,由于网卡402-4的时间戳t1和t2的精度比较高,所以传输时延探测模块402-2基于网卡402-4的时间戳计算得出的第一网络设备404和第二网络设备404之间的往返延时的精度比较高。Here, since the accuracy of the time stamps t1 and t2 of the network card 402-4 is relatively high, the transmission delay detecting module 402-2 calculates the first network device 404 and the second network device 404 based on the timestamp of the network card 402-4. The accuracy of the round trip delay between the two is relatively high.
在一些实施例中,为了获取第二网络设备与第三网络设备之间的往返时延,由传输时延探测模块402-2实现的传输时延探测方法除了包括图5所示的步骤S502至S506以外还可以包括:S508,经由网卡402-4向第一网络设备发送待发送给第三网络设备的第二探测报文;S510,获取网卡402-4从第一网络设备接收第二探测报文的镜像报文时的第三时间戳、和网卡402-4从第一网络设备接收由第三网络设备返回的第二探测报文时的第四时间戳;S512,基于第三时间戳和第四时间戳,获取第一网络设备与第三网络设备之间的往返时延;以及S514,基于第一网络设备与第二网络设备之间的往返时延和第一网络设备与第三网络设备之间的往返时延,获取第二网络设备与第三网络设备之间的往返时延。In some embodiments, in order to obtain the round-trip delay between the second network device and the third network device, the transmission delay detecting method implemented by the transmission delay detecting module 402-2 includes the step S502 shown in FIG. The S506 may further include: S508, sending, by the network card 402-4, the second probe packet to be sent to the third network device to the first network device; and S510, the acquiring the network card 402-4 receiving the second probe packet from the first network device. a third timestamp when the mirrored message of the text, and a fourth timestamp when the network card 402-4 receives the second probe packet returned by the third network device from the first network device; S512, based on the third timestamp and a fourth timestamp, obtaining a round-trip delay between the first network device and the third network device; and S514, based on a round-trip delay between the first network device and the second network device, and the first network device and the third network The round-trip delay between the devices acquires the round-trip delay between the second network device and the third network device.
类似地,在第一网络设备的入接口和出接口之间不存在端口转发时延或者不考虑第一网络设备的端口转发时延的情况下,可以获取第四时间戳与第三时间戳之间的第二时延,作为第一网络设备与第三网络设备之间的往返时延。在第一网络设备的入接口和出接口之间存在端口转发时延或者考虑第一网络设备的端口转发时延的情况下,可以基于第三时间戳、第四时间戳、以及第一网络设备的端口转发时延,获取第一网络设备与第三网络设备之间的往返时延;例如,可以首先获取第四时间戳与第三时间戳之间的第二时延,然后获取第二时延与第一网络设备的端口转发时延之间的差值,作为第一网络设备与第三网络设备之间的往返时延。Similarly, in the case that there is no port forwarding delay between the inbound interface and the outbound interface of the first network device, or the port forwarding delay of the first network device is not considered, the fourth timestamp and the third timestamp may be acquired. The second delay between the two is used as a round trip delay between the first network device and the third network device. In the case that there is a port forwarding delay between the inbound interface and the outbound interface of the first network device or considering the port forwarding delay of the first network device, the third timestamp, the fourth timestamp, and the first network device may be used. The port forwarding delay is obtained, and the round-trip delay between the first network device and the third network device is obtained; for example, the second time delay between the fourth timestamp and the third timestamp may be first obtained, and then the second time is obtained. The difference between the port forwarding delay of the first network device and the third network device is used as a round trip delay between the first network device and the third network device.
在一些实施例中,可以利用传输时延探测设备402和第一网络设备404构造传输时延探测***的至少一部分,来获取第二网络设备和第三网络设备之间的往返时延。In some embodiments, the transmission delay detection device 402 and the first network device 404 can be utilized to construct at least a portion of the transmission delay detection system to obtain a round trip delay between the second network device and the third network device.
图7是示出根据本申请实施例的传输时延探测***获取第二网络设备与第三网络设备之间的往返时延的示例场景的示意图。在图7所示的示例场景中,传输时延探测设备402和第一网络设备404直连;第一网络设备404与第二网络设备406网络连接;第二网络设备406与第三网络设备408网络连接。FIG. 7 is a schematic diagram showing an example scenario in which a transmission delay detection system acquires a round-trip delay between a second network device and a third network device according to an embodiment of the present application. In the example scenario shown in FIG. 7, the transmission delay detecting device 402 is directly connected to the first network device 404; the first network device 404 is connected to the second network device 406; the second network device 406 and the third network device 408 are connected. Internet connection.
为了获取第二网络设备406与第三网络设备408之间的往返时延,传输时延探测模块402-2经由网卡402-4向第一网络设备404发送待发送给第二网络设备406的第一探测报文、和待发送给第三网络设备408的第二探测报文;第一网络设备404在接收到由网卡402-4转发给其的第一探测报文时,将第一探测报文的镜像报文返回给网卡402-4,同时将第一探测报文转发给第二网络设备406;第一网络设备404在接收到由网卡402-4转发给其的第二探测报文时,将第二探测报文的镜像报文返回给网卡402-4,同时将第二探测报文转发给第三网络设备408;第二网络设备406在接收到由第一网络设备404转发给其的第一探测报文时,立即将该第一探测报文返回第一网络设备404,以使第一探测报文经由第一网络设备404返回到传输时延探测设备402;第三网络设备408在接收到由第一网络设备404转发给其的第二探测报文时,立即将第二探测报文返回给第一 网络设备404,以使第二探测报文经由第一网络设备404返回到传输时延探测设备402;传输时延探测模块402-2从网卡402-4的入方向抓取由第一网络设备404返回的第一探测报文的镜像报文,并且获取网卡402-4接收由第一网络设备404返回的第一探测报文的镜向报文时的时间戳t1;传输时延探测模块402-2从网卡402-4的入方向抓取由第二网络设备406返回的第一探测报文,并且获取网卡402-4接收由第二网络设备406返回的第一探测报文时的时间戳t2;传输时延探测模块402-2从网卡402-4的入方向抓取由第一网络设备404返回的第二探测报文的镜像报文,并且获取网卡402-4接收由第一网络设备404返回的第二探测报文的镜向报文时的时间戳t3;传输时延探测模块402-2从网卡402-4的入方向抓取由第三网络设备408返回的第二探测报文,并且获取网卡402-4接收由第三网络设备408返回的第二探测报文时的时间戳t4;然后,传输时延探测模块402-2基于时间戳t1、t2、t3和t4,计算第二网络设备406与第三网络设备408之间的往返时延Ty。In order to obtain the round-trip delay between the second network device 406 and the third network device 408, the transmission delay detecting module 402-2 transmits the first to be sent to the second network device 406 to the first network device 404 via the network card 402-4. a probe packet, and a second probe packet to be sent to the third network device 408; the first network device 404, when receiving the first probe packet forwarded to it by the network card 402-4, the first probe packet The mirrored message of the text is returned to the network card 402-4, and the first probe packet is forwarded to the second network device 406; the first network device 404 receives the second probe packet forwarded to it by the network card 402-4. Returning the mirrored message of the second probe message to the network card 402-4, and forwarding the second probe message to the third network device 408; the second network device 406 receives the first network device 404 and forwards it to the network device 404. The first probe packet is immediately returned to the first network device 404, so that the first probe packet is returned to the transmission delay detecting device 402 via the first network device 404; the third network device 408 Forwarded to the first network device 404 for forwarding to it When the second probe packet is sent, the second probe packet is immediately returned to the first network device 404, so that the second probe packet is returned to the transmission delay detecting device 402 via the first network device 404; and the transmission delay detecting module 402 is transmitted. -2: The mirroring packet of the first probe packet returned by the first network device 404 is captured from the inbound direction of the network card 402-4, and the acquiring network card 402-4 receives the first probe packet returned by the first network device 404. The time delay t1 of the mirrored message; the transmission delay detecting module 402-2 grabs the first probe message returned by the second network device 406 from the inbound direction of the network card 402-4, and acquires the network card 402-4. The timestamp t2 when the first probe packet is returned by the second network device 406; the transmission delay detecting module 402-2 grabs the second probe packet returned by the first network device 404 from the inbound direction of the network card 402-4. a mirrored message, and obtaining a timestamp t3 when the network card 402-4 receives the mirrored message of the second probe message returned by the first network device 404; the transmission delay detecting module 402-2 is from the network card 402-4 The inbound direction captures the second probe packet returned by the third network device 408, and And acquiring the timestamp t4 when the network card 402-4 receives the second probe packet returned by the third network device 408; then, the transmission delay detecting module 402-2 calculates the second based on the timestamps t1, t2, t3, and t4. Round trip delay Ty between network device 406 and third network device 408.
类似地,第二探测报文也可以由传输时延探测模块402-2构造,并且第二探测报文的封装格式不限,但必须满足以下条件:(1)能匹配第一网络设备404的镜像规则;(2)能被第二网络设备406和第三网络设备408接收和发送;(3)能被返回到传输时延探测设备402;(4)能被传输时延探测模块402-2从网卡402-4的入方向抓取。这里,第一探测报文和第二探测报文可以是相同的报文也可以是不同的报文,可以具有相同的格式也可以具有不同的格式。Similarly, the second probe packet may also be configured by the transmission delay detection module 402-2, and the encapsulation format of the second probe packet is not limited, but the following conditions must be met: (1) the first network device 404 can be matched. Mirroring rules; (2) can be received and transmitted by the second network device 406 and the third network device 408; (3) can be returned to the transmission delay detecting device 402; (4) can be transmitted delay detecting module 402-2 Grab from the inbound direction of the network card 402-4. Here, the first probe packet and the second probe packet may be the same packet or different packets, and may have the same format or different formats.
类似地,为了避免在第一网络设备404的出接口出现报文拥塞时第二探测报文在第一网络设备的入接口和出接口之间的转发时延剧烈增长,可将第二探测报文的转发优先级设为最高。Similarly, in order to avoid that the forwarding delay of the second probe packet between the inbound interface and the outbound interface of the first network device increases sharply when the packet is congested on the outbound interface of the first network device 404, the second probe may be sent. The forwarding priority of the text is set to the highest.
在图7所示的示例场景中,第一网络设备404的端口转发时延为Ts,第一网络设备404与第二网络设备406之间的往返时延Tx=t2–t1–Ts,第一网络设备404与第三网络设备408之间的往返时延Ty=t4–t3–Ts,第二网络设备406与第三网络设备408之间的往返时延Tz=Ty–Tx=(t4–t3)–(t2–t1)。这里,由于网卡402-4记录的时间戳t1至t4的精度比较高,并且传输时延探测模块402-2基于网卡402-4记录的时间戳t1至t4计算得出的第二网络设备406和第三网络设备408之间的往返延时Tz与第一网络设备404的端口转发时延Ts无关,因此精度更高。In the example scenario shown in FIG. 7, the port forwarding delay of the first network device 404 is Ts, and the round-trip delay Tx=t2−t1−Ts between the first network device 404 and the second network device 406, first Round trip delay between network device 404 and third network device 408 Ty = t4 - t3 - Ts, round trip delay between second network device 406 and third network device 408 Tz = Ty - Tx = (t4 - t3 )–(t2–t1). Here, since the accuracy of the time stamps t1 to t4 recorded by the network card 402-4 is relatively high, and the transmission delay detecting module 402-2 calculates the second network device 406 based on the time stamps t1 to t4 recorded by the network card 402-4, The round trip delay Tz between the third network devices 408 is independent of the port forwarding delay Ts of the first network device 404, and thus the accuracy is higher.
图8是示出图4所示的传输时延探测设备的示例性硬件架构的结构图。如图8所示,传输时延探测设备402包括网卡402-4、处理器402-6、以及存储器402-8,其中,网卡402-4、处理器402-6、以及存储器402-8通过总线相互连接,处理器402-6通过执行存储器402-8中存储的计算机可执行指令来实现传输时延探测模块402-2,即执行以上结合图5至图7描述的传输时延探测方法。在传输时延探测设备402中的处理器402-6上运行有图1至图3所示的操作***时,传输时延探测模块402-2可以是驻留在该操作***中的用户空间中的应用程序,并且经由该操作***中的内核与网卡402-4通信。FIG. 8 is a configuration diagram showing an exemplary hardware architecture of the transmission delay detecting apparatus shown in FIG. As shown in FIG. 8, the transmission delay detecting device 402 includes a network card 402-4, a processor 402-6, and a memory 402-8, wherein the network card 402-4, the processor 402-6, and the memory 402-8 pass through the bus. Interconnected, processor 402-6 implements transmission delay detection module 402-2 by executing computer executable instructions stored in memory 402-8, i.e., performs the transmission delay detection method described above in connection with Figures 5-7. When the operating system shown in FIG. 1 to FIG. 3 is run on the processor 402-6 in the transmission delay detecting device 402, the transmission delay detecting module 402-2 may be resident in the user space in the operating system. The application communicates with the network card 402-4 via a kernel in the operating system.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元 及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both, for clarity of hardware and software. Interchangeability, the composition and steps of the various examples have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的***、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。A person skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the system, the device and the unit described above can refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.
在本申请所提供的几个实施例中,应该理解到,所揭露的***、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, or an electrical, mechanical or other form of connection.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本发明实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。The above is only the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any equivalent person can be easily conceived within the technical scope of the present invention by any person skilled in the art. Modifications or substitutions are intended to be included within the scope of the invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims (10)

  1. 一种传输时延探测方法,包括:A transmission delay detection method includes:
    经由网卡向第一网络设备发送待发送给第二网络设备的第一探测报文,其中,所述第一网络设备具备报文转发功能和镜像功能;Transmitting, by the network card, the first probe packet to be sent to the second network device, where the first network device is configured to have a packet forwarding function and a mirroring function;
    获取所述网卡从所述第一网络设备接收所述第一探测报文的镜像报文时的第一时间戳、和所述网卡从所述第一网络设备接收由所述第二网络设备返回的所述第一探测报文时的第二时间戳;以及Acquiring a first timestamp when the network card receives the mirroring message of the first probe packet from the first network device, and receiving, by the network card, the first network device from the second network device The second timestamp of the first probe message;
    基于所述第一时间戳和所述第二时间戳,获取所述第一网络设备与所述第二网络设备之间的往返时延。And obtaining, according to the first timestamp and the second timestamp, a round-trip delay between the first network device and the second network device.
  2. 根据权利要求1所述的传输时延探测方法,其特征在于,获取所述第一网络设备与所述第二网络设备之间的往返时延的处理包括:The transmission delay detection method according to claim 1, wherein the processing of obtaining a round-trip delay between the first network device and the second network device comprises:
    获取所述第二时间戳与所述第一时间戳之间的第一时延,作为所述第一网络设备与所述第二网络设备之间的往返时延。Obtaining a first time delay between the second timestamp and the first timestamp as a round-trip delay between the first network device and the second network device.
  3. 根据权利要求1所述的传输时延探测方法,其特征在于,获取所述第一网络设备与所述第二网络设备之间的往返时延的处理包括:The transmission delay detection method according to claim 1, wherein the processing of obtaining a round-trip delay between the first network device and the second network device comprises:
    基于所述第一时间戳、所述第二时间戳、以及所述第一网络设备的入接口和出接口之间的端口转发时延,获取所述第一网络设备与所述第二网络设备之间的往返时延。Acquiring the first network device and the second network device based on the first timestamp, the second timestamp, and a port forwarding delay between an inbound interface and an outbound interface of the first network device Round trip delay between.
  4. 如权利要求3所述的传输时延探测方法,其中,获取所述第一网络设备与所述第二网络设备之间的往返时延包括:The method for detecting a transmission delay according to claim 3, wherein the obtaining a round trip delay between the first network device and the second network device comprises:
    获取所述第二时间戳与所述第一时间戳之间的第一时延;Obtaining a first time delay between the second timestamp and the first timestamp;
    获取所述第一时延与所述第一网络设备的端口转发时延之间的差值,作为所述第一网络设备与所述第二网络设备之间的往返时延。Obtaining a difference between the first time delay and a port forwarding delay of the first network device, as a round-trip delay between the first network device and the second network device.
  5. 根据权利要求2所述的传输时延探测方法,其特征在于,还包括:The method for detecting a transmission delay according to claim 2, further comprising:
    经由所述网卡向所述第一网络设备发送待发送给第三网络设备的第二探测报文;Sending, by the network card, a second probe packet to be sent to the third network device to the first network device;
    获取所述网卡从所述第一网络设备接收所述第二探测报文的镜像报文时的第三时间戳、和所述网卡从所述第一网络设备接收由所述第三网络设备返回的所述第二探测报文时的第四时间戳;Acquiring a third timestamp when the network card receives the mirrored message of the second probe packet from the first network device, and receiving, by the network card, the third network device from the first network device The fourth timestamp of the second probe message;
    基于所述第三时间戳和所述第四时间戳,获取所述第一网络设备与所述第三网络设 备之间的往返时延;以及Obtaining a round trip delay between the first network device and the third network device based on the third timestamp and the fourth timestamp;
    基于所述第一网络设备与所述第二网络设备之间的往返时延和所述第一网络设备与所述第三网络设备之间的往返时延,获取所述第二网络设备与所述第三网络设备之间的往返时延。Obtaining the second network device and the device based on a round-trip delay between the first network device and the second network device and a round-trip delay between the first network device and the third network device The round trip delay between the third network devices.
  6. 根据权利要求5所述的传输时延探测方法,其特征在于,获取所述第一网络设备与所述第三网络设备之间的往返时延的处理包括:The transmission delay detection method according to claim 5, wherein the processing of obtaining a round-trip delay between the first network device and the third network device comprises:
    获取所述第四时间戳与所述第三时间戳之间的第二时延,作为所述第一网络设备与所述第三网络设备之间的往返时延。Obtaining a second delay between the fourth timestamp and the third timestamp as a round-trip delay between the first network device and the third network device.
  7. 根据权利要求5所述的方法,其特征在于,获取所述第一网络设备与所述第三网络设备之间的往返时延的处理包括:The method of claim 5, wherein the obtaining the round-trip delay between the first network device and the third network device comprises:
    基于所述第三时间戳、所述第四时间戳、以及所述第一网络设备的入接口和出接口之间的端口转发时延,获取所述第一网络设备与所述第三网络设备之间的往返时延。Acquiring the first network device and the third network device based on the third timestamp, the fourth timestamp, and a port forwarding delay between an inbound interface and an outbound interface of the first network device Round trip delay between.
  8. 根据权利要求6所述的传输时延探测方法,其特征在于,获取所述第二网络设备与所述第三网络设备之间的往返时延的处理包括:The method for detecting a round-trip delay between the second network device and the third network device includes:
    获取所述第二时延与所述第一时延之间的差值,作为所述第二网络设备与所述第三网络设备之间的往返时延。Obtaining a difference between the second time delay and the first time delay as a round-trip delay between the second network device and the third network device.
  9. 一种传输时延探测设备,包括:A transmission delay detecting device includes:
    网卡;Network card
    存储器,存储有计算机可执行指令;以及a memory storing computer executable instructions;
    处理器,在执行所述计算机可执行指令时可操作所述传输时延探测设备以实现权利要求1至8中任一项所述的传输时延探测方法。The processor, when the computer executable instructions are executed, can operate the transmission delay detecting device to implement the transmission delay detecting method according to any one of claims 1 to 8.
  10. 一种传输时延探测***,包括传输时延探测设备和第一网络设备,其中,所述第一网络设备具备报文转发功能和镜像功能,所述传输时延探测设备包括:A transmission delay detecting system includes a transmission delay detecting device and a first network device, wherein the first network device has a packet forwarding function and a mirroring function, and the transmission delay detecting device includes:
    网卡;Network card
    存储器,存储有计算机可执行指令;以及a memory storing computer executable instructions;
    处理器,在执行所述计算机可执行指令时可操作所述传输时延探测设备以实现权利要求1至8中任一项所述的传输时延探测方法。The processor, when the computer executable instructions are executed, can operate the transmission delay detecting device to implement the transmission delay detecting method according to any one of claims 1 to 8.
PCT/CN2018/081385 2017-04-25 2018-03-30 Transmission delay probing method, device and system WO2018196556A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710279875.3 2017-04-25
CN201710279875.3A CN108737207A (en) 2017-04-25 2017-04-25 Propagation delay time detection method, equipment and system

Publications (1)

Publication Number Publication Date
WO2018196556A1 true WO2018196556A1 (en) 2018-11-01

Family

ID=63919437

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/081385 WO2018196556A1 (en) 2017-04-25 2018-03-30 Transmission delay probing method, device and system

Country Status (2)

Country Link
CN (1) CN108737207A (en)
WO (1) WO2018196556A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113162829A (en) * 2021-05-19 2021-07-23 北京安信智通科技有限公司 Method and device for determining transmission delay and storage medium

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109347701B (en) * 2018-11-09 2024-05-17 公安部第三研究所 System and method for realizing test control on performance of network isolation product
CN111817977B (en) * 2019-04-12 2024-04-16 华为技术有限公司 Network congestion control method and device
CN112217686B (en) * 2019-07-12 2022-12-27 华为技术有限公司 System, method and device for evaluating round trip delay
CN112152938B (en) * 2020-08-19 2022-11-22 鹏城实验室 Method for determining round trip delay in cloud virtual environment
CN112468371B (en) * 2020-12-01 2022-06-10 武汉绿色网络信息服务有限责任公司 Method and equipment for determining transmission delay information of DPI equipment
CN113014351B (en) * 2021-03-15 2022-07-22 四川英得赛克科技有限公司 Non-invasive time synchronization method, system and storage medium
CN113037859B (en) * 2021-03-24 2022-04-22 新华三技术有限公司 Session information management method, device, exchange equipment and medium
CN115412463B (en) * 2021-05-28 2024-06-04 ***通信有限公司研究院 Time delay measurement method and device and digital twin network
CN113741397B (en) * 2021-09-09 2023-04-21 四川虹美智能科技有限公司 Performance test method and system for intelligent household equipment
CN114095398A (en) * 2021-10-22 2022-02-25 深信服科技股份有限公司 Method and device for determining detection time delay, electronic equipment and storage medium
CN115865759A (en) * 2023-02-27 2023-03-28 科来网络技术股份有限公司 Network equipment time delay obtaining method and system based on flow mirror protocol

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103152223A (en) * 2013-03-15 2013-06-12 华为技术有限公司 Network performance monitoring method and device
CN104144088A (en) * 2014-07-24 2014-11-12 重庆邮电大学 Network delay measuring method with delay measuring accuracy improved
CN105763347A (en) * 2014-12-15 2016-07-13 华为技术有限公司 Method for obtaining parameter, network equipment and system
CN106375154A (en) * 2016-09-05 2017-02-01 瑞斯康达科技发展股份有限公司 Delay measurement verification method, device and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102045754B (en) * 2009-10-22 2014-04-30 华为技术有限公司 Transmitter, base station equipment and method for aligning transmitter signals

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103152223A (en) * 2013-03-15 2013-06-12 华为技术有限公司 Network performance monitoring method and device
CN104144088A (en) * 2014-07-24 2014-11-12 重庆邮电大学 Network delay measuring method with delay measuring accuracy improved
CN105763347A (en) * 2014-12-15 2016-07-13 华为技术有限公司 Method for obtaining parameter, network equipment and system
CN106375154A (en) * 2016-09-05 2017-02-01 瑞斯康达科技发展股份有限公司 Delay measurement verification method, device and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113162829A (en) * 2021-05-19 2021-07-23 北京安信智通科技有限公司 Method and device for determining transmission delay and storage medium

Also Published As

Publication number Publication date
CN108737207A (en) 2018-11-02

Similar Documents

Publication Publication Date Title
WO2018196556A1 (en) Transmission delay probing method, device and system
US9344265B2 (en) Network packet timing synchronization for virtual machine host systems
JP4931108B2 (en) High-precision time synchronization processing device and program thereof, and network congestion level warning device and program thereof
US11349587B2 (en) Generating a timestamp
WO2015191315A1 (en) Apparatus and method to estimate round trip time via transport control protocol signals
Turull et al. Pktgen: Measuring performance on high speed networks
JP6351889B1 (en) Communication system and slave device
US11424902B2 (en) System and method for synchronizing nodes in a network device
US20220224500A1 (en) Hardware Clock with Built-In Accuracy Check
US20210203428A1 (en) Technologies for high-precision timestamping of packets
US20200034320A1 (en) Driver for network timing systems
US20100293243A1 (en) method and apparatus for measuring directionally differentiated (one-way) network latency
US9065748B2 (en) Symmetrical latency with TDM circuit emulated service
Geissler et al. KOMon—Kernel-based online monitoring of VNF packet processing times
US20150172154A1 (en) Minimizing symmetrical latency impact by jitter buffer for tdm ces
US8989039B2 (en) Packet transfer delay measurement system
CN112311619B (en) Network message delay detection method and device and electronic equipment
US20080080565A1 (en) IEEE-1588 monitoring on 1000 BASE-T Ethernet technology
US10887078B2 (en) Device, system, and method for determining a forwarding delay through a networking device
JP2009077311A (en) Passing time measuring instrument, control method thereof, and network relay apparatus
Rotsos et al. An open testing framework for next-generation OpenFlow switches
US20200296021A1 (en) Analysis apparatus and analysis method
Rischke et al. Comparison of UPF acceleration technologies and their tail-latency for URLLC
US9031063B2 (en) Direct updating of network delay in synchronization packets
JP6572136B2 (en) COMMUNICATION SYSTEM, COMMUNICATION DEVICE, SECOND DEVICE, COMMUNICATION METHOD, AND COMPUTER PROGRAM

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18791015

Country of ref document: EP

Kind code of ref document: A1