WO2020259112A1 - Method for measuring transmission time delay and related device - Google Patents

Method for measuring transmission time delay and related device Download PDF

Info

Publication number
WO2020259112A1
WO2020259112A1 PCT/CN2020/090075 CN2020090075W WO2020259112A1 WO 2020259112 A1 WO2020259112 A1 WO 2020259112A1 CN 2020090075 W CN2020090075 W CN 2020090075W WO 2020259112 A1 WO2020259112 A1 WO 2020259112A1
Authority
WO
WIPO (PCT)
Prior art keywords
routing device
time stamp
data packet
source
destination
Prior art date
Application number
PCT/CN2020/090075
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 WO2020259112A1 publication Critical patent/WO2020259112A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • H04L43/106Active monitoring, e.g. heartbeat, ping or trace-route using time related information in packets, e.g. by adding timestamps
    • 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
    • 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/0858One way delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route

Definitions

  • the embodiments of the present application relate to but not limited to Ethernet technology, and more specifically relate to a method and related equipment for detecting transmission delay.
  • Ethernet has been widely used in transmission systems due to its good economy, interoperability and ease of use.
  • Ethernet gradually extends to metropolitan area networks and wide area networks, and then provides multi-service bearer as a carrier-grade transmission technology.
  • the complexity of Ethernet technology in network operations continues to increase, and the functions continue to increase.
  • the core data exchange technology has developed from simple circuit switching to layer two switching, and gradually developed from layer two switching to today's more mature layer three switching.
  • the Ethernet network level puts forward different requirements on the security and manageability of the system.
  • OAM Operaation Administration and Management, operation, management, and maintenance
  • the network delay is the time taken for the message to be transmitted in the transmission medium, that is, the time from when the message starts to enter the network to when it leaves the network, in milliseconds (ms) or microseconds (us).
  • the delay measurement is related to the following parameters: port rate, interface type, transmission distance, forwarding mode and buffering mode.
  • Ethernet Layer 3 OAM There are two main delay detection methods used in Ethernet Layer 3 OAM:
  • Ping Packet Internet Grope, Internet packet explorer
  • ICMP Internet Control Message Protocol
  • TCP Transmission Control Protocol
  • IP Internet Protocol
  • the working principle of ping After sending an Echo Request (response request) message to the target host, it listens and waits for the Echo Reply (response response) response of the target host. If the target host does not respond after a specified time, It is considered that the destination host is "Time out".
  • DMM Delay Measurement Message Delay Measurement Message
  • DMR Delay Measurement Reply, Delay Measurement Reply
  • CFM Connectivity Fault Management
  • the source periodically sends DMM messages to the destination. After receiving the DMM messages, the destination directly calculates the single-ended delay through the time stamp information. , Or return a DMR message to the source, and the source calculates the two-way delay.
  • DMM/DMR control messages and data service messages share the transmission channel.
  • QoS Quality of Service, quality of service
  • an embodiment of the present application provides a method for detecting transmission delay, including: a destination routing device receives a first IP data packet sent by a source routing device, and the first IP data packet carries the The source-end routing device sends the first time stamp of the first IP data message; according to the first time stamp and the second time stamp of the destination routing device receiving the first IP data message, calculate the slave The one-way transmission delay from the source-end routing device to the destination-end routing device; or, sending a second IP data packet to the source-end routing device, the second IP data packet carrying the first time stamp, The destination routing device receives the second time stamp of the first IP data packet and the destination routing device sends the third time stamp of the second IP data packet, so that the source routing device can follow The first time stamp, the second time stamp, the third time stamp, and the fourth time stamp of the source-end routing device receiving the second IP data packet are used to calculate a two-way transmission delay.
  • An embodiment of the present application also provides a method for detecting transmission delay, including: a source-end routing device sends a first IP data packet to a destination-end routing device, where the first IP data packet carries the source-end routing device Sending the first time stamp of the first IP data message, so that the destination routing device calculates according to the first time stamp and the second time stamp of the destination routing device receiving the first IP data message The one-way transmission delay from the source-end routing device to the destination-end routing device.
  • An embodiment of the present application also provides a method for detecting transmission delay, including: a source-end routing device sends a first IP data packet to a destination-end routing device, where the first IP data packet carries the source-end routing device Sending the first time stamp of the first IP data message; receiving a second IP data message sent by the destination routing device, the second IP data message carrying the first time stamp and the destination The end routing device receives the second time stamp of the first IP data message and the third time stamp of the destination routing device sending the second IP data message; according to the first time stamp and the first time stamp The second time stamp, the third time stamp, and the fourth time stamp of the source-end routing device receiving the second IP data message to calculate a two-way transmission delay.
  • An embodiment of the present application also provides a destination routing device, including: a receiving unit, a computing unit, or a sending unit; the receiving unit is configured to receive a first IP data packet sent by the source routing device, and the first The IP data message carries the first time stamp of the first IP data message sent by the source-end routing device; the calculation unit is configured to receive the first time stamp according to the first time stamp and the destination-end routing device The second time stamp of the first IP data packet is used to calculate the one-way transmission delay from the source-end routing device to the destination-end routing device; the sending unit is configured to send the second IP datagram to the source-end routing device The second IP data packet carries the first time stamp, the second time stamp at which the destination routing device receives the first IP data packet, and the destination routing device sends the second time stamp. The third time stamp of the IP data packet, so that the source routing device receives the second time stamp according to the first time stamp, the second time stamp, the third time stamp, and the source routing device The fourth time stamp of the IP data message calculate
  • An embodiment of the present application also provides a source-end routing device, including: a sending unit, configured to send a first IP data packet to a destination-end routing device, where the first IP data packet carries the source-end routing device to send The first time stamp of the first IP data message, so that the destination routing device calculates all the data based on the first time stamp and the second time stamp of the destination routing device receiving the first IP data message The one-way transmission delay from the source-end routing device to the destination-end routing device.
  • a sending unit configured to send a first IP data packet to a destination-end routing device, where the first IP data packet carries the source-end routing device to send The first time stamp of the first IP data message, so that the destination routing device calculates all the data based on the first time stamp and the second time stamp of the destination routing device receiving the first IP data message The one-way transmission delay from the source-end routing device to the destination-end routing device.
  • An embodiment of the present application also provides a source-end routing device, including: a sending unit, configured to send a first IP data packet to a destination-end routing device, where the first IP data packet carries the source-end routing device to send The first time stamp of the first IP data message; a receiving unit, configured to receive a second IP data message sent by the destination routing device, the second IP data message carrying the first time stamp , The destination routing device receives the second time stamp of the first IP data message and the destination routing device sends the third time stamp of the second IP data message; the calculation unit is configured to The first time stamp, the second time stamp, the third time stamp, and the fourth time stamp of the source-end routing device receiving the second IP data packet are used to calculate a two-way transmission delay.
  • An embodiment of the present application also provides a destination routing device, including: a second port for receiving a first IP data packet sent by a source routing device and recording that the destination routing device receives the first IP data
  • the second time stamp of the message, the first IP data message carries the first time stamp of the first IP data message sent by the source routing device;
  • the second processing unit is configured to The time stamp and the second time stamp are used to calculate the one-way transmission delay from the source-end routing device to the destination-end routing device; or, to combine the first time stamp, the second time stamp, and the second time stamp.
  • the third time stamp of the IP data message is loaded into the unused field of the second IP data message, and the header length, total packet length, and header checksum of the IP header of the second IP data message are updated,
  • MAC media access control, media access control
  • the second IP data packet is sent to the source routing device through the second port, so that the source routing device according to the first A timestamp, the second timestamp, the third timestamp, and the fourth timestamp of the source-end routing device receiving the second IP data packet to calculate a two-way transmission delay.
  • An embodiment of the present application also provides a source-end routing device, including: a first port and a first processing unit; the first processing unit is configured to send the source-end routing device to the first IP data packet A timestamp is loaded into the unused field of the first IP data message, and the header length, total packet length, and header checksum of the IP header of the first IP data message are updated, and then the MAC layer Encapsulation, and then send the first IP data message to the destination routing device through the first port, so that the destination routing device receives the first IP data according to the first time stamp and the destination routing device The second time stamp of the message calculates the one-way transmission delay from the source-end routing device to the destination-end routing device.
  • An embodiment of the present application also provides a source-side routing device, including: a first port and a first processing unit; the first processing unit is configured to load the first time stamp into the first IP datagram In the unused field of the message, update the header length, total packet length, and header checksum of the IP header of the first IP data message, then perform MAC layer encapsulation, and then send it to the destination through the first port
  • the routing device sends a first IP data packet; the first port is also used to receive a second IP data packet sent by the destination routing device, and record that the source routing device receives the second IP data
  • the fourth time stamp of the message the second IP data message carries the first time stamp, the second time stamp, and the third time when the destination routing device sends the second IP data message Stamp; the first processing unit is also used to de-MAC encapsulate and parse the second IP data message to obtain the first time stamp, the second time stamp, and the third time stamp, according to the The first time stamp, the second time stamp, the third time stamp, and
  • the embodiment of the present application also provides a destination routing device, including a memory, a processor, and a computer program stored on the memory and running on the processor.
  • a destination routing device including a memory, a processor, and a computer program stored on the memory and running on the processor.
  • An embodiment of the present application also provides a source-side routing device, including a memory, a processor, and a computer program stored on the memory and running on the processor.
  • a source-side routing device including a memory, a processor, and a computer program stored on the memory and running on the processor.
  • the embodiment of the present application also provides a computer-readable storage medium having an information processing program stored on the computer-readable storage medium, and when the information processing program is executed by a processor, the detection of the transmission delay described in any one of the above is implemented Steps of the method.
  • FIG. 1 is a schematic flowchart of a method for detecting transmission delay according to an embodiment of the application
  • FIG. 2 is a schematic flowchart of a method for detecting transmission delay according to another embodiment of this application.
  • FIG. 3 is a schematic flowchart of a method for detecting transmission delay according to another embodiment of the application.
  • FIG. 4 is a schematic flowchart of a method for detecting transmission delay according to another embodiment of this application.
  • FIG. 5 is a schematic flowchart of a method for detecting transmission delay according to another embodiment of this application.
  • FIG. 6(a) is a schematic diagram of the IP header structure of an IPv4 packet in an embodiment of the application
  • Figure 6(b) is a schematic diagram of the message structure of an IPv6 message in an embodiment of the application.
  • FIG. 7 is a schematic flowchart of a method for detecting transmission delay according to another embodiment of this application.
  • FIG. 8 is a schematic structural diagram of a system for detecting transmission delay according to an embodiment of the application.
  • FIG. 9 is a schematic flowchart of a method for detecting transmission delay according to another embodiment of this application.
  • FIG. 10 is a schematic structural diagram of a destination routing device provided by an embodiment of this application.
  • FIG. 11 is a schematic structural diagram of a source routing device provided by an embodiment of this application.
  • FIG. 12 is a schematic structural diagram of a source routing device provided by another embodiment of this application.
  • FIG. 13 is a schematic structural diagram of a destination routing device provided by another embodiment of this application.
  • FIG. 14 is a schematic structural diagram of a source-end routing device provided by another embodiment of this application.
  • FIG. 15 is a schematic structural diagram of a source routing device provided by another embodiment of this application.
  • FIG. 1 is a schematic flowchart of a method for detecting transmission delay according to an embodiment of the application. As shown in FIG. 1, the method includes:
  • Step 101 The destination-end routing device receives a first IP data packet sent by the source-end routing device, where the first IP data packet carries a first time stamp of the first IP data packet sent by the source-end routing device ;
  • Step 102 Calculate a one-way transmission delay from the source-end routing device to the destination-end routing device according to the first time stamp and the second time stamp of the destination-end routing device receiving the first IP data packet;
  • a second IP data packet is sent to the source-end routing device, where the second IP data packet carries the first timestamp, and the destination-end routing device receives the first IP datagram
  • the second timestamp of the message and the third timestamp of the second IP data message sent by the destination-end routing device so that the source-end routing device according to the first time stamp, the second time stamp,
  • the third time stamp and the fourth time stamp of the source-end routing device receiving the second IP data packet are used to calculate a two-way transmission delay.
  • the first time stamp, the second time stamp or the third time stamp is carried in an unused field of the IP packet.
  • FIG. 2 is a schematic flowchart of a method for detecting transmission delay according to another embodiment of the application. As shown in FIG. 2, the method includes:
  • Step 201 The source-end routing device sends a first IP data packet to the destination-end routing device, where the first IP data packet carries the first timestamp of the first IP data packet sent by the source-end routing device. So that the destination routing device calculates the order from the source routing device to the destination routing device according to the first time stamp and the second time stamp of the destination routing device receiving the first IP data packet. To the transmission delay.
  • the first time stamp is carried in the unused field of the IP packet.
  • FIG. 3 is a schematic flowchart of a method for detecting transmission delay according to another embodiment of the application. As shown in FIG. 3, the method includes:
  • Step 301 The source-end routing device sends a first IP data packet to the destination-end routing device, where the first IP data packet carries a first time stamp of the first IP data packet sent by the source-end routing device;
  • Step 302 Receive a second IP data packet sent by the destination routing device, where the second IP data packet carries the first time stamp, and the destination routing device receives the first IP data packet And the third time stamp of the second IP data packet sent by the destination routing device;
  • Step 303 According to the first time stamp, the second time stamp, the third time stamp, and the fourth time stamp of the source-end routing device receiving the second IP data packet, calculate the two-way transmission time Extension.
  • the first time stamp, the second time stamp or the third time stamp is carried in an unused field of the IP packet.
  • FIG. 4 is a schematic flowchart of a method for detecting transmission delay according to another embodiment of this application.
  • the application scenario in this embodiment is one-way transmission delay detection.
  • the method includes:
  • Step 401 The source-end routing device sends a first IP data packet to the destination-end routing device, where the first IP data packet carries a first time stamp of the first IP data packet sent by the source-end routing device;
  • the first timestamp may be carried in an unused field of the first IP data message.
  • the first timestamp may be carried in IPv4 The option field reserved in the packet header or the unused part of the IP packet data segment.
  • the first time stamp is carried in an IPv6 extension header or an unused part of the IP message data segment.
  • the processing unit of the source-end routing device can extract the local time information, load the timestamp information into the unused field of the IP packet before forwarding the packet to the port of the source-end routing device, and then send it to the unused field through the source-end port.
  • the destination port is forwarded out.
  • Step 402 The destination routing device receives the first IP data message, and calculates the slave according to the first time stamp and the second time stamp of the destination routing device receiving the first IP data message The one-way transmission delay from the source-end routing device to the destination-end routing device.
  • the port of the destination routing device After the port of the destination routing device receives the first IP data packet, it records the second timestamp of the destination routing device receiving the first IP data packet. Then, the processing unit of the destination routing device parses the first IP data message to obtain the first time stamp, and compares it with the local receiving time stamp, that is, the second time stamp, thereby calculating the route from the source routing device to the destination
  • FIG. 5 is a schematic flowchart of a method for detecting transmission delay according to another embodiment of this application.
  • the application scenario in this embodiment is two-way transmission delay detection.
  • the method includes:
  • Step 501 The source-end routing device sends a first IP data packet to the destination-end routing device, where the first IP data packet carries the first timestamp of the first IP data packet sent by the source-end routing device;
  • the first timestamp may be carried in an unused field of the first IP data message.
  • the first timestamp may be carried in IPv4 The option field reserved in the packet header or the unused part of the IP packet data segment.
  • the first time stamp is carried in an IPv6 extension header or an unused part of the IP message data segment.
  • the processing unit of the source-end routing device can extract the local time information, and load the time stamp information into the unused field of the IP packet header before forwarding the packet to the port of the source-end routing device, and then pass it through the source port Forward to the destination port, that is, send to the destination routing device.
  • Step 502 The destination routing device receives the first IP data packet, and records a second timestamp when the destination routing device receives the first IP data packet;
  • the port of the destination routing device After the port of the destination routing device receives the first IP data packet, it records the second timestamp of the destination routing device receiving the first IP data packet.
  • Step 503 The destination routing device sends a second IP data packet to the source routing device, where the second IP data packet carries the first time stamp, the second time stamp, and the destination The third timestamp of the end routing device sending the second IP data packet;
  • the processing unit of the destination routing device may load the first timestamp, the second timestamp, and the local sending time of the second IP data packet, that is, the third timestamp to the second IP In the unused field of the data message; then forwarded through the port of the destination routing device, that is, sent to the source routing device.
  • the timestamp may be carried in an unused field of the IP data message.
  • the timestamp is carried in an option field reserved in the IPv4 header or the IP message.
  • the unused part of the text data segment when the second IP data message is an IPv6 message, the timestamp is carried in an IPv6 extension header or an unused part of the IP message data segment.
  • Step 504 The source-end routing device receives the second IP data packet, and receives the second IP data message according to the first time stamp, the second time stamp, the third time stamp, and the source-end routing device The fourth time stamp of the second IP data message calculates the two-way transmission delay.
  • the IP header structure is shown in Figure 6(a), and the option option reserved for the data service IP header can be used
  • the field stores timestamp information.
  • the transmitted IP data message is an IPv6 message
  • the data structure of the IP message is shown in Figure 6(b).
  • the extended header of the IP message or the unused part of the data part can be used to store the time stamp information.
  • FIG. 7 is a schematic flowchart of a method for detecting transmission delay according to another embodiment of the application.
  • the application scenario in this embodiment is one-way transmission delay detection.
  • This embodiment is applied to the system architecture shown in FIG. 8.
  • the source routing device 1 includes a processing unit 101 and a port 102.
  • the destination routing device includes a processing unit 201 and a port 202, and the ports 102 and 202 communicate with each other to transmit data.
  • the method includes:
  • step 701 when the source-end routing device forwards the first IP packet to the destination-end routing device, the processing unit 101 of the source-end routing device 1 extracts local real-time time information TxTimef, and loads this time stamp TxTimef into the unused IP packet Field
  • the timestamp TxTimef is carried in an option field reserved in the IPv4 packet header or an unused part of the IP packet data segment.
  • the timestamp TxTimef is carried in an IPv6 extension header or an unused part of the IP message data segment.
  • Step 702 The processing unit 101 updates the header length/total packet length/header checksum of the IP header, then performs MAC layer encapsulation, and forwards the first IP message to port 202 of the destination routing device through port 102;
  • Step 703 After the port 202 of the destination routing device receives the first IP message, it records the message reception timestamp RxTimef, and the processing unit 201 of the destination routing device de-MAC encapsulates, parses the IP message, and obtains the message header The source timestamp TxTimef in here;
  • Step 704 The processing unit 201 calculates a one-way delay value by using RxTimef-TxTimef according to the received message timestamp RxTimef and the source sending timestamp TxTimef.
  • the one-way delay value RxTimef-TxTimef.
  • the one-way delay measurement requires strict synchronization of the source and destination clocks.
  • FIG. 9 is a schematic flowchart of a method for detecting transmission delay according to another embodiment of this application.
  • the application scenario in this embodiment is two-way transmission delay detection.
  • This embodiment is applied to the system architecture shown in FIG. 8.
  • the source routing device 1 includes a processing unit 101 and a port 102.
  • the destination routing device includes a processing unit 201 and a port 202, and the ports 102 and 202 communicate with each other to transmit data.
  • the method includes:
  • Step 901 When the source-end routing device forwards the first IP packet to the destination-end routing device, the processing unit 101 of the source-end routing device 1 extracts local real-time time information TxTimef, and loads this time stamp TxTimef into the unused IP packet Field
  • Step 902 the processing unit 101 updates the header length/total packet length/header checksum of the IP header, then performs MAC layer encapsulation, and forwards the first IP message to port 202 of the destination routing device through port 102;
  • Step 903 After the port 202 of the destination routing device receives the first IP message, it records the message receiving timestamp RxTimef, and the processing unit 201 of the destination routing device de-MAC encapsulates, parses the IP message, and obtains the message header The source timestamp TxTimef in here;
  • Step 904 The processing unit 201 loads the source time stamp TxTimef, the receiving time stamp RxTimef, and the local sending time stamp TxTimeb together into the unused field of the second IP data message;
  • the timestamp may be carried in an unused field of the IP data message.
  • the timestamp is carried in an option field reserved in the IPv4 header or the IP message.
  • the unused part of the text data segment when the second IP data message is an IPv6 message, the timestamp is carried in an IPv6 extension header or an unused part of the IP message data segment.
  • Step 905 The processing unit 201 updates the header length/total packet length/header checksum of the IP header of the second IP data packet, and then performs MAC layer encapsulation; and forwards the IP to the source-end routing device 102 port through port 202 Message out
  • Step 906 After the port 102 of the source-side routing device receives the second IP message, it records the message source receiving timestamp RxTimeb, and the processing unit 101 de-MAC encapsulates, parses the IP message, and obtains the message header The source sends a time stamp TxTimef, the destination receives a time stamp RxTimef, and the destination sends a time stamp TxTimeb;
  • step 907 the processing unit 101 calculates a two-way delay value according to the source sending TxTimef/receiving time RxTimeb and the destination sending TxTimeb/receiving time RxTimef.
  • the two-way delay value (RxTimeb-TxTimef)-(TxTimeb-RxTimef).
  • the foregoing method for detecting transmission delay can be implemented using interrupt trigger software or in a hardware module.
  • the processing unit 101 or 201 can be implemented using a dedicated chip or a hardware logic processor.
  • the source router in order to ensure the correctness of the delay detection during the double-ended delay test, the source router should store the sending timestamp and check the message when it receives the return message from the destination. Whether the TxTimef in here belongs to the previously stored transmission timestamp, if so, calculate the two-way delay value. Otherwise, the message will be considered invalid and discarded.
  • the delay detection is performed based on the data message, so the internal test requires the data flow to run normally for the delay. If it is a two-way delay test, the data traffic is required to run normally in both directions. And in the delay detection process, the local real-time time needs to be collected and quickly loaded into the message and forwarded; when the message is received, the local reception real-time time needs to be recorded quickly, and the delay value at both ends needs to be calculated. Any delay processing in the middle will affect the accuracy of delay detection. Therefore, the collection and processing of time information is best implemented by dedicated hardware logic or chips.
  • the technical solution provided by the embodiment of the application adopts the method of storing the time stamp in the unused field reserved in the data service IP message to realize the one-way or two-way delay measurement, which is similar to the prior art Ping mode and DMM/DMR mode.
  • the service channel is not occupied by the special delay detection packet, which saves the resources of the Ethernet data service transmission channel and improves the efficiency of the service channel.
  • this field is a part of the IP header and has priority in the digital service processor The level is higher, and the source route and destination route respond in a timely manner, which greatly improves the accuracy of delay measurement.
  • FIG. 10 is a schematic structural diagram of a destination routing device according to an embodiment of the application.
  • the destination routing device includes a receiving unit, and also includes a calculation unit and/or a sending unit;
  • the receiving unit is configured to receive a first IP data message sent by a source-end routing device, where the first IP data message carries a first time stamp of the first IP data message sent by the source-end routing device ;
  • the calculation unit is configured to calculate the one-way from the source-end routing device to the destination-end routing device according to the first time stamp and the second time stamp of the destination-end routing device receiving the first IP data packet Transmission delay
  • the sending unit is configured to send a second IP data packet to the source-end routing device, where the second IP data packet carries the first time stamp, and the destination-end routing device receives the first IP
  • the second time stamp of the data message and the third time stamp of the second IP data message sent by the destination-end routing device so that the source-end routing device can use the first time stamp and the second time
  • the third time stamp, the third time stamp, and the fourth time stamp of the source-end routing device receiving the second IP data packet are used to calculate a two-way transmission delay.
  • the first time stamp, the second time stamp or the third time stamp is carried in an unused field of the IP packet.
  • FIG. 11 is a schematic structural diagram of a source-end routing device provided by an embodiment of this application. As shown in FIG. 11, the source-end routing device includes:
  • the sending unit is configured to send a first IP data packet to the destination routing device, the first IP data packet carrying the first time stamp of the source routing device sending the first IP data packet, so that The destination routing device calculates the one-way transmission from the source routing device to the destination routing device according to the first time stamp and the second time stamp of the destination routing device receiving the first IP data message Time delay.
  • the first time stamp is carried in the unused field of the IP packet.
  • FIG. 12 is a schematic structural diagram of a source-end routing device provided by another embodiment of this application. As shown in FIG. 12, the source-end routing device includes:
  • a sending unit configured to send a first IP data packet to a destination-end routing device, where the first IP data packet carries a first timestamp at which the source-end routing device sends the first IP data packet;
  • the receiving unit is configured to receive a second IP data packet sent by the destination routing device, where the second IP data packet carries the first time stamp, and the destination routing device receives the first IP data The second time stamp of the message and the third time stamp of the second IP data message sent by the destination routing device;
  • the calculation unit is configured to calculate a bidirectional time stamp based on the first time stamp, the second time stamp, the third time stamp, and the fourth time stamp of the source routing device receiving the second IP data packet Transmission delay.
  • the first time stamp, the second time stamp or the third time stamp is carried in an unused field of the IP packet.
  • FIG. 13 is a schematic structural diagram of a destination routing device according to another embodiment of this application. As shown in FIG. 13, the destination routing device includes:
  • the second port is used to receive the first IP data packet sent by the source-end routing device and record the second timestamp of the first IP data packet received by the destination-end routing device, the first IP data packet Carrying the first timestamp of the first IP data packet sent by the source-end routing device;
  • the second processing unit is configured to calculate the one-way transmission delay from the source-end routing device to the destination-end routing device according to the first time stamp and the second time stamp;
  • the source-end routing device receives the second IP data packet according to the first time stamp, the second time stamp, the third time stamp, and the fourth time when the source-end routing device receives the second IP data packet Stamp, calculate the two-way transmission delay.
  • the second processing unit is a dedicated chip or a hardware logic processor.
  • the first timestamp, the second timestamp or the third timestamp is carried in an unused field of the IP packet.
  • FIG. 14 is a schematic structural diagram of a source-end routing device provided by another embodiment of this application. As shown in FIG. 14, the source-end routing device includes:
  • the first processing unit is configured to load the first time stamp of the first IP data packet sent by the source-end routing device into the unused field of the first IP data packet, and update the first IP
  • the header length, total packet length, and header checksum of the IP header of the data message are then encapsulated at the MAC layer, and then the first IP data message is sent to the destination routing device through the first port for
  • the destination routing device calculates the one-way from the source routing device to the destination routing device according to the first time stamp and the second time stamp of the destination routing device receiving the first IP data packet Transmission delay.
  • the first processing unit is a dedicated chip or a hardware logic processor.
  • FIG. 15 is a schematic structural diagram of a source-end routing device according to another embodiment of this application. As shown in FIG. 15, the source-end routing device includes:
  • the first processing unit is configured to load the first time stamp into an unused field of the first IP data message, update the length of the header of the IP header of the first IP data message, The total length of the packet and the header checksum are then encapsulated at the MAC layer, and then the first IP data packet is sent to the destination routing device through the first port;
  • the first port is also used to receive the second IP data packet sent by the destination routing device, and record the fourth time stamp of the source routing device receiving the second IP data packet;
  • the second IP data packet carries the first time stamp, the second time stamp, and the third time stamp of the destination routing device sending the second IP data packet;
  • the first processing unit is further configured to de-MAC encapsulate and parse the second IP data message to obtain the first time stamp, the second time stamp, and the third time stamp, according to the first The time stamp, the second time stamp, the third time stamp, and the fourth time stamp are used to calculate a two-way transmission delay.
  • the first timestamp, the second timestamp or the third timestamp is carried in an unused field of the IP packet.
  • the first processing unit is a dedicated chip or a hardware logic processor.
  • the embodiment of the present application also provides a destination routing device, including a memory, a processor, and a computer program stored on the memory and running on the processor.
  • a destination routing device including a memory, a processor, and a computer program stored on the memory and running on the processor.
  • An embodiment of the present application also provides a source-side routing device, including a memory, a processor, and a computer program stored on the memory and running on the processor.
  • a source-side routing device including a memory, a processor, and a computer program stored on the memory and running on the processor.
  • the embodiment of the present application also provides a computer-readable storage medium having an information processing program stored on the computer-readable storage medium, and when the information processing program is executed by a processor, the detection of the transmission delay described in any one of the above is implemented Steps of the method.
  • Such software may be distributed on a computer-readable medium, and the computer-readable medium may include a computer storage medium (or a non-transitory medium) and a communication medium (or a transitory medium).
  • the term computer storage medium includes volatile and non-volatile memory implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Sexual, removable and non-removable media.
  • Computer storage media include but are not limited to RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassette, tape, magnetic disk storage or other magnetic storage device, or Any other medium used to store desired information and that can be accessed by a computer.
  • communication media usually contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as carrier waves or other transmission mechanisms, and may include any information delivery media .

Landscapes

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

Abstract

Disclosed are a method for measuring a transmission time delay and a related device. One of the methods comprises: a destination end routing device receiving a first IP data message sent by a source end routing device, wherein the first IP data message carries a first timestamp of the source end routing device sending the first IP data message; and calculating, according to the first timestamp and a second timestamp of the destination end routing device receiving the first IP data message, a unidirectional time delay from the source end routing device to the destination end routing device.

Description

一种检测传输时延的方法及相关设备Method for detecting transmission time delay and related equipment
相关申请的交叉引用Cross references to related applications
本申请基于申请号为201910550657.8、申请日为2019年6月24日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以引入方式并入本申请。This application is filed based on a Chinese patent application with an application number of 201910550657.8 and an application date of June 24, 2019, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby incorporated into this application by way of introduction.
技术领域Technical field
本申请实施例涉及但不限于以太网技术,更具体地涉及一种检测传输时延的方法及相关设备。The embodiments of the present application relate to but not limited to Ethernet technology, and more specifically relate to a method and related equipment for detecting transmission delay.
背景技术Background technique
当前以太网技术以其良好的经济性、互通性和易用性等优势,得到了传输系统的普遍应用。随着电信级以太网技术和标准的快速发展,以太网逐步向城域网和广域网延伸,进而作为电信级传送技术提供了多业务承载。以太网技术在网络运营中的复杂性不断提高,功能不断增强,核心的数据交换技术从简单的电路交换发展到二层交换,从二层交换又逐渐发展到今天较成熟的三层交换,不同的以太网网络层次对系统的安全性和可管理性等提出了不同的要求。为了给以太网不同网络层用户提供易操作,功能强大的故障管理和性能检测能力,各层的OAM(Operation Administration and Management,运行、管理和维护)功能都是目前研究的重点。其中,网络时延是报文在传输介质中传输所用的时间,即从报文开始进入网络到离开网络之间的时间,单位为毫秒(ms)或微妙(us)。时延的测量与下面的参数有关:端口速率,接口类型,传输距离,转发模式和缓存模式。现在很多应用尤其5G商用变得对时延性能很敏感,因此需要知道实际以太网网络能提供多少的时延性能。The current Ethernet technology has been widely used in transmission systems due to its good economy, interoperability and ease of use. With the rapid development of carrier-grade Ethernet technology and standards, Ethernet gradually extends to metropolitan area networks and wide area networks, and then provides multi-service bearer as a carrier-grade transmission technology. The complexity of Ethernet technology in network operations continues to increase, and the functions continue to increase. The core data exchange technology has developed from simple circuit switching to layer two switching, and gradually developed from layer two switching to today's more mature layer three switching. The Ethernet network level puts forward different requirements on the security and manageability of the system. In order to provide users of different network layers of Ethernet with easy operation and powerful fault management and performance detection capabilities, the OAM (Operation Administration and Management, operation, management, and maintenance) functions of each layer are the focus of current research. Among them, the network delay is the time taken for the message to be transmitted in the transmission medium, that is, the time from when the message starts to enter the network to when it leaves the network, in milliseconds (ms) or microseconds (us). The delay measurement is related to the following parameters: port rate, interface type, transmission distance, forwarding mode and buffering mode. Nowadays, many applications, especially 5G commercial applications, have become very sensitive to delay performance. Therefore, it is necessary to know how much delay performance the actual Ethernet network can provide.
目前以太网三层OAM使用的时延检测方式主要有两种:Currently, there are two main delay detection methods used in Ethernet Layer 3 OAM:
1,Ping(Packet Internet Grope,因特网包探索器)模式:只支持双向延迟测量。Ping操作使用TCP(Transmission Control Protocol,传输控制协议)/IP (Internet Protocol,网际协议)协议提供的ICMP(Internet Control Message Protocol)互联网控制报文协议)协议,可以立即得到两个信息,第一是目的主机是否仍然正常运行,第二是数据包来回的时间,即网络延迟。ping的工作原理:向目标主机发出Echo Request(响应请求)报文后,就进行侦听(listen),等待目的主机的Echo Reply(响应应答)响应,若目的主机超过指定的时间仍没有响应,则认为目的主机“Time out”(超时)。1. Ping (Packet Internet Grope, Internet packet explorer) mode: only supports two-way delay measurement. Ping operation uses the ICMP (Internet Control Message Protocol) protocol provided by the TCP (Transmission Control Protocol)/IP (Internet Protocol) protocol, and you can get two pieces of information immediately. The first is Whether the destination host is still operating normally, the second is the time of the data packet back and forth, that is, the network delay. The working principle of ping: After sending an Echo Request (response request) message to the target host, it listens and waits for the Echo Reply (response response) response of the target host. If the target host does not respond after a specified time, It is considered that the destination host is "Time out".
2,CFM((Connectivity Fault Management,连接故障管理)中的DMM(Delay Measurement Message时延测量报文)/DMR(Delay Measurement Reply,时延测量应答)报文模式:支持单向和双向时延测量。DMM/DMR报文发送时,带有本地时间戳。工作原理:源端周期性地向目的端发送DMM报文,目的端收到DMM报文后,通过时间戳信息直接计算单端时延,或向源端返回DMR报文,由源端计算双向时延。2. DMM (Delay Measurement Message Delay Measurement Message)/DMR (Delay Measurement Reply, Delay Measurement Reply) message mode in CFM ((Connectivity Fault Management) (Connectivity Fault Management): supports one-way and two-way delay measurement 。DMM/DMR messages are sent with local time stamps. Working principle: The source periodically sends DMM messages to the destination. After receiving the DMM messages, the destination directly calculates the single-ended delay through the time stamp information. , Or return a DMR message to the source, and the source calculates the two-way delay.
但是,上面两种方式都存在缺陷:However, both of the above methods have drawbacks:
1,针对Ping模式,主机上ping网络设备上配置的IP地址,因为一般略高端的网络设备都会做控制层的CPU(Central Processing Unit,中央处理器)保护,对这种ping包的响应处理优先级很低,所以这个时延测试值一般都会偏高甚至会出现丢包,但这其实并不反映真实的网络性能,并且在许多网络设备上对于带选项option字段的IP报文也需要上送CPU处理,也会造成测试出来的延时偏高;1. For Ping mode, ping the IP address configured on the network device on the host, because generally higher-end network devices will be protected by the CPU (Central Processing Unit) of the control layer, and the response processing of this ping packet is prioritized The level is very low, so this delay test value will generally be high and even packet loss will occur, but this does not actually reflect the real network performance, and on many network devices, IP packets with option fields need to be sent. CPU processing will also cause high latency in the test;
2,针对DMM/DMR报文模式,DMM/DMR控制报文和数据业务报文共享传输通道,在流量堵塞或过载时,容易受QoS(Quality of Service,服务质量)调整限速,甚至丢弃。从而影响延时统计的准确性。2. For the DMM/DMR message mode, DMM/DMR control messages and data service messages share the transmission channel. When traffic is congested or overloaded, it is easy to be subject to QoS (Quality of Service, quality of service) adjustment speed limit or even discarded. This affects the accuracy of delay statistics.
发明内容Summary of the invention
有鉴于此,本申请实施例提供了一种检测传输时延的方法,包括:目的端路由设备接收源端路由设备发送的第一IP数据报文,所述第一IP数据报文携带所述源端路由设备发送所述第一IP数据报文的第一时间戳;根据所述第一时间戳和所述目的端路由设备接收所述第一IP数据报文的第二时间戳,计算从源端路由设备到目的端路由设备的单向传输时延;或者,向所述源端路由设备发送第二IP数据报文,所述第二IP数据报文携带所述第一时间戳、所述目的端路由设备接收所述第一IP数据报文的第二时间戳和所述目的端路由设备发送所述第 二IP数据报文的第三时间戳,以便所述源端路由设备根据所述第一时间戳、所述第二时间戳、所述第三时间戳和所述源端路由设备接收所述第二IP数据报文的第四时间戳,计算双向传输时延。In view of this, an embodiment of the present application provides a method for detecting transmission delay, including: a destination routing device receives a first IP data packet sent by a source routing device, and the first IP data packet carries the The source-end routing device sends the first time stamp of the first IP data message; according to the first time stamp and the second time stamp of the destination routing device receiving the first IP data message, calculate the slave The one-way transmission delay from the source-end routing device to the destination-end routing device; or, sending a second IP data packet to the source-end routing device, the second IP data packet carrying the first time stamp, The destination routing device receives the second time stamp of the first IP data packet and the destination routing device sends the third time stamp of the second IP data packet, so that the source routing device can follow The first time stamp, the second time stamp, the third time stamp, and the fourth time stamp of the source-end routing device receiving the second IP data packet are used to calculate a two-way transmission delay.
本申请实施例还提供了一种检测传输时延的方法,包括:源端路由设备向目的端路由设备发送第一IP数据报文,所述第一IP数据报文携带所述源端路由设备发送所述第一IP数据报文的第一时间戳,以便所述目的端路由设备根据所述第一时间戳和目的端路由设备接收所述第一IP数据报文的第二时间戳,计算所述源端路由设备到所述目的端路由设备的单向传输时延。An embodiment of the present application also provides a method for detecting transmission delay, including: a source-end routing device sends a first IP data packet to a destination-end routing device, where the first IP data packet carries the source-end routing device Sending the first time stamp of the first IP data message, so that the destination routing device calculates according to the first time stamp and the second time stamp of the destination routing device receiving the first IP data message The one-way transmission delay from the source-end routing device to the destination-end routing device.
本申请实施例还提供了一种检测传输时延的方法,包括:源端路由设备向目的端路由设备发送第一IP数据报文,所述第一IP数据报文携带所述源端路由设备发送所述第一IP数据报文的第一时间戳;接收所述目的端路由设备发送的第二IP数据报文,所述第二IP数据报文携带所述第一时间戳、所述目的端路由设备接收所述第一IP数据报文的第二时间戳和所述目的端路由设备发送所述第二IP数据报文的第三时间戳;根据所述第一时间戳、所述第二时间戳、所述第三时间戳和所述源端路由设备接收所述第二IP数据报文的第四时间戳,计算双向传输时延。An embodiment of the present application also provides a method for detecting transmission delay, including: a source-end routing device sends a first IP data packet to a destination-end routing device, where the first IP data packet carries the source-end routing device Sending the first time stamp of the first IP data message; receiving a second IP data message sent by the destination routing device, the second IP data message carrying the first time stamp and the destination The end routing device receives the second time stamp of the first IP data message and the third time stamp of the destination routing device sending the second IP data message; according to the first time stamp and the first time stamp The second time stamp, the third time stamp, and the fourth time stamp of the source-end routing device receiving the second IP data message to calculate a two-way transmission delay.
本申请实施例还提供了一种目的端路由设备,包括:接收单元,计算单元或者发送单元;所述接收单元,用于接收源端路由设备发送的第一IP数据报文,所述第一IP数据报文携带所述源端路由设备发送所述第一IP数据报文的第一时间戳;所述计算单元,用于根据所述第一时间戳和所述目的端路由设备接收所述第一IP数据报文的第二时间戳,计算从源端路由设备到目的端路由设备的单向传输时延;所述发送单元,用于向所述源端路由设备发送第二IP数据报文,所述第二IP数据报文携带所述第一时间戳、所述目的端路由设备接收所述第一IP数据报文的第二时间戳和所述目的端路由设备发送所述第二IP数据报文的第三时间戳,以便所述源端路由设备根据所述第一时间戳、所述第二时间戳、所述第三时间戳和所述源端路由设备接收所述第二IP数据报文的第四时间戳,计算双向传输时延。An embodiment of the present application also provides a destination routing device, including: a receiving unit, a computing unit, or a sending unit; the receiving unit is configured to receive a first IP data packet sent by the source routing device, and the first The IP data message carries the first time stamp of the first IP data message sent by the source-end routing device; the calculation unit is configured to receive the first time stamp according to the first time stamp and the destination-end routing device The second time stamp of the first IP data packet is used to calculate the one-way transmission delay from the source-end routing device to the destination-end routing device; the sending unit is configured to send the second IP datagram to the source-end routing device The second IP data packet carries the first time stamp, the second time stamp at which the destination routing device receives the first IP data packet, and the destination routing device sends the second time stamp. The third time stamp of the IP data packet, so that the source routing device receives the second time stamp according to the first time stamp, the second time stamp, the third time stamp, and the source routing device The fourth time stamp of the IP data message calculates the two-way transmission delay.
本申请实施例还提供了一种源端路由设备,包括:发送单元,用于向目的端路由设备发送第一IP数据报文,所述第一IP数据报文携带所述源端路由设备发送所述第一IP数据报文的第一时间戳,以便所述目的端路由设备根据所述第一时间戳和目的端路由设备接收所述第一IP数据报文的第二时间戳,计算所述 源端路由设备到所述目的端路由设备的单向传输时延。An embodiment of the present application also provides a source-end routing device, including: a sending unit, configured to send a first IP data packet to a destination-end routing device, where the first IP data packet carries the source-end routing device to send The first time stamp of the first IP data message, so that the destination routing device calculates all the data based on the first time stamp and the second time stamp of the destination routing device receiving the first IP data message The one-way transmission delay from the source-end routing device to the destination-end routing device.
本申请实施例还提供了一种源端路由设备,包括:发送单元,用于向目的端路由设备发送第一IP数据报文,所述第一IP数据报文携带所述源端路由设备发送所述第一IP数据报文的第一时间戳;接收单元,用于接收所述目的端路由设备发送的第二IP数据报文,所述第二IP数据报文携带所述第一时间戳、所述目的端路由设备接收所述第一IP数据报文的第二时间戳和所述目的端路由设备发送所述第二IP数据报文的第三时间戳;计算单元,用于根据所述第一时间戳、所述第二时间戳、所述第三时间戳和所述源端路由设备接收所述第二IP数据报文的第四时间戳,计算双向传输时延。An embodiment of the present application also provides a source-end routing device, including: a sending unit, configured to send a first IP data packet to a destination-end routing device, where the first IP data packet carries the source-end routing device to send The first time stamp of the first IP data message; a receiving unit, configured to receive a second IP data message sent by the destination routing device, the second IP data message carrying the first time stamp , The destination routing device receives the second time stamp of the first IP data message and the destination routing device sends the third time stamp of the second IP data message; the calculation unit is configured to The first time stamp, the second time stamp, the third time stamp, and the fourth time stamp of the source-end routing device receiving the second IP data packet are used to calculate a two-way transmission delay.
本申请实施例还提供了一种目的端路由设备,包括:第二端口,用于接收源端路由设备发送的第一IP数据报文并记录所述目的端路由设备接收所述第一IP数据报文的第二时间戳,所述第一IP数据报文携带所述源端路由设备发送所述第一IP数据报文的第一时间戳;第二处理单元,用于根据所述第一时间戳和所述第二时间戳,计算从源端路由设备到目的端路由设备的单向传输时延;或者,用于将所述第一时间戳、所述第二时间戳和发送第二IP数据报文的第三时间戳加载到第二IP数据报文的未使用字段中,更新所述第二IP数据报文的IP报文头的首部长度、包总长度、首部校验和,之后做MAC(media access control,媒体访问控制)层封装,并通过所述第二端口向所述源端路由设备发送所述第二IP数据报文,以便所述源端路由设备根据所述第一时间戳、所述第二时间戳、所述第三时间戳和所述源端路由设备接收所述第二IP数据报文的第四时间戳,计算双向传输时延。An embodiment of the present application also provides a destination routing device, including: a second port for receiving a first IP data packet sent by a source routing device and recording that the destination routing device receives the first IP data The second time stamp of the message, the first IP data message carries the first time stamp of the first IP data message sent by the source routing device; the second processing unit is configured to The time stamp and the second time stamp are used to calculate the one-way transmission delay from the source-end routing device to the destination-end routing device; or, to combine the first time stamp, the second time stamp, and the second time stamp. The third time stamp of the IP data message is loaded into the unused field of the second IP data message, and the header length, total packet length, and header checksum of the IP header of the second IP data message are updated, After that, MAC (media access control, media access control) layer encapsulation is performed, and the second IP data packet is sent to the source routing device through the second port, so that the source routing device according to the first A timestamp, the second timestamp, the third timestamp, and the fourth timestamp of the source-end routing device receiving the second IP data packet to calculate a two-way transmission delay.
本申请实施例还提供了一种源端路由设备,包括:第一端口和第一处理单元;所述第一处理单元,用于将所述源端路由设备发送第一IP数据报文的第一时间戳加载到所述第一IP数据报文的未使用字段中,更新所述第一IP数据报文的IP报文头的首部长度、包总长度、首部校验和,之后做MAC层封装,再通过所述第一端口向目的端路由设备发送所述第一IP数据报文,以便所述目的端路由设备根据所述第一时间戳和目的端路由设备接收所述第一IP数据报文的第二时间戳,计算所述源端路由设备到所述目的端路由设备的单向传输时延。An embodiment of the present application also provides a source-end routing device, including: a first port and a first processing unit; the first processing unit is configured to send the source-end routing device to the first IP data packet A timestamp is loaded into the unused field of the first IP data message, and the header length, total packet length, and header checksum of the IP header of the first IP data message are updated, and then the MAC layer Encapsulation, and then send the first IP data message to the destination routing device through the first port, so that the destination routing device receives the first IP data according to the first time stamp and the destination routing device The second time stamp of the message calculates the one-way transmission delay from the source-end routing device to the destination-end routing device.
本申请实施例还提供了一种源端路由设备,包括:第一端口和第一处理单元;所述第一处理单元,用于将所述第一时间戳加载到所述第一IP数据报文的未使用字段中,更新所述第一IP数据报文的IP报文头的首部长度、包总长度、 首部校验和,之后做MAC层封装,再通过所述第一端口向目的端路由设备发送第一IP数据报文;所述第一端口,还用于接收所述目的端路由设备发送的第二IP数据报文,并记录所述源端路由设备接收所述第二IP数据报文的第四时间戳;所述第二IP数据报文携带所述第一时间戳、所述第二时间戳和所述目的端路由设备发送所述第二IP数据报文的第三时间戳;所述第一处理单元,还用于解MAC封装以及解析所述第二IP数据报文得到所述第一时间戳、所述第二时间戳和所述第三时间戳,根据所述第一时间戳、所述第二时间戳、所述第三时间戳和所述第四时间戳,计算双向传输时延。An embodiment of the present application also provides a source-side routing device, including: a first port and a first processing unit; the first processing unit is configured to load the first time stamp into the first IP datagram In the unused field of the message, update the header length, total packet length, and header checksum of the IP header of the first IP data message, then perform MAC layer encapsulation, and then send it to the destination through the first port The routing device sends a first IP data packet; the first port is also used to receive a second IP data packet sent by the destination routing device, and record that the source routing device receives the second IP data The fourth time stamp of the message; the second IP data message carries the first time stamp, the second time stamp, and the third time when the destination routing device sends the second IP data message Stamp; the first processing unit is also used to de-MAC encapsulate and parse the second IP data message to obtain the first time stamp, the second time stamp, and the third time stamp, according to the The first time stamp, the second time stamp, the third time stamp, and the fourth time stamp are used to calculate the two-way transmission delay.
本申请实施例还提供了一种目的端路由设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现上述目的端路由设备执行的所述检测传输时延的方法。The embodiment of the present application also provides a destination routing device, including a memory, a processor, and a computer program stored on the memory and running on the processor. When the computer program is executed by the processor, The method for detecting the transmission delay executed by the routing device at the destination end is realized.
本申请实施例还提供了一种源端路由设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现上述源端路由设备执行的所述检测传输时延的方法。An embodiment of the present application also provides a source-side routing device, including a memory, a processor, and a computer program stored on the memory and running on the processor. When the computer program is executed by the processor, The method for detecting transmission delay executed by the source-end routing device is implemented.
本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有信息处理程序,所述信息处理程序被处理器执行时实现上述任一项所述检测传输时延的方法的步骤。The embodiment of the present application also provides a computer-readable storage medium having an information processing program stored on the computer-readable storage medium, and when the information processing program is executed by a processor, the detection of the transmission delay described in any one of the above is implemented Steps of the method.
本申请的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本申请而了解。本申请的目的和其他优点可通过在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。Other features and advantages of the present application will be described in the following description, and partly become obvious from the description, or understood by implementing the present application. The purpose and other advantages of the application can be realized and obtained through the structures specifically pointed out in the description, claims and drawings.
附图说明Description of the drawings
附图用来提供对本申请技术方案的进一步理解,并且构成说明书的一部分,与本申请的实施例一起用于解释本申请的技术方案,并不构成对本申请技术方案的限制。The accompanying drawings are used to provide a further understanding of the technical solution of the present application, and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application, and do not constitute a limitation to the technical solution of the present application.
图1为本申请一实施例提供的一种检测传输时延的方法的流程示意图;FIG. 1 is a schematic flowchart of a method for detecting transmission delay according to an embodiment of the application;
图2为本申请另一实施例提供的一种检测传输时延的方法的流程示意图;2 is a schematic flowchart of a method for detecting transmission delay according to another embodiment of this application;
图3为本申请另一实施例提供的一种检测传输时延的方法的流程示意图;3 is a schematic flowchart of a method for detecting transmission delay according to another embodiment of the application;
图4为本申请另一实施例提供的一种检测传输时延的方法的流程示意图;4 is a schematic flowchart of a method for detecting transmission delay according to another embodiment of this application;
图5为本申请另一实施例提供的一种检测传输时延的方法的流程示意图;FIG. 5 is a schematic flowchart of a method for detecting transmission delay according to another embodiment of this application;
图6(a)为本申请一实施例中IPv4报文的IP报文头结构示意图;FIG. 6(a) is a schematic diagram of the IP header structure of an IPv4 packet in an embodiment of the application;
图6(b)为本申请一实施例中IPv6报文的报文结构示意图;Figure 6(b) is a schematic diagram of the message structure of an IPv6 message in an embodiment of the application;
图7为本申请另一实施例提供的一种检测传输时延的方法的流程示意图;FIG. 7 is a schematic flowchart of a method for detecting transmission delay according to another embodiment of this application;
图8为本申请一实施例提供的一种检测传输时延的系统的架构示意图;FIG. 8 is a schematic structural diagram of a system for detecting transmission delay according to an embodiment of the application;
图9为本申请另一实施例提供的一种检测传输时延的方法的流程示意图;9 is a schematic flowchart of a method for detecting transmission delay according to another embodiment of this application;
图10为本申请一实施例提供的一种目的端路由设备的结构示意图;FIG. 10 is a schematic structural diagram of a destination routing device provided by an embodiment of this application;
图11为本申请一实施例提供的一种源端路由设备的结构示意图;FIG. 11 is a schematic structural diagram of a source routing device provided by an embodiment of this application;
图12为本申请另一实施例提供的一种源端路由设备的结构示意图;FIG. 12 is a schematic structural diagram of a source routing device provided by another embodiment of this application;
图13为本申请另一实施例提供的一种目的端路由设备的结构示意图;FIG. 13 is a schematic structural diagram of a destination routing device provided by another embodiment of this application;
图14为本申请另一实施例提供的一种源端路由设备的结构示意图;FIG. 14 is a schematic structural diagram of a source-end routing device provided by another embodiment of this application;
图15为本申请另一实施例提供的一种源端路由设备的结构示意图。FIG. 15 is a schematic structural diagram of a source routing device provided by another embodiment of this application.
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚明白,下文中将结合附图对本申请的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。In order to make the purpose, technical solutions, and advantages of the present application clearer, the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. It should be noted that the embodiments in this application and the features in the embodiments can be combined with each other arbitrarily if there is no conflict.
在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行。并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。The steps shown in the flowchart of the drawings may be executed in a computer system such as a set of computer-executable instructions. And, although a logical sequence is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than here.
图1为本申请一实施例提供的一种检测传输时延的方法的流程示意图,如图1所示,该方法包括:FIG. 1 is a schematic flowchart of a method for detecting transmission delay according to an embodiment of the application. As shown in FIG. 1, the method includes:
步骤101,目的端路由设备接收源端路由设备发送的第一IP数据报文,所述第一IP数据报文携带所述源端路由设备发送所述第一IP数据报文的第一时间戳;Step 101: The destination-end routing device receives a first IP data packet sent by the source-end routing device, where the first IP data packet carries a first time stamp of the first IP data packet sent by the source-end routing device ;
步骤102,根据所述第一时间戳和所述目的端路由设备接收所述第一IP数据报文的第二时间戳,计算从源端路由设备到目的端路由设备的单向传输时延;Step 102: Calculate a one-way transmission delay from the source-end routing device to the destination-end routing device according to the first time stamp and the second time stamp of the destination-end routing device receiving the first IP data packet;
或者,步骤103,向所述源端路由设备发送第二IP数据报文,所述第二IP数据报文携带所述第一时间戳、所述目的端路由设备接收所述第一IP数据报文的第二时间戳和所述目的端路由设备发送所述第二IP数据报文的第三时间戳,以便所述源端路由设备根据所述第一时间戳、所述第二时间戳、所述第三时间戳和所述源端路由设备接收所述第二IP数据报文的第四时间戳,计算双向传输 时延。Alternatively, in step 103, a second IP data packet is sent to the source-end routing device, where the second IP data packet carries the first timestamp, and the destination-end routing device receives the first IP datagram The second timestamp of the message and the third timestamp of the second IP data message sent by the destination-end routing device, so that the source-end routing device according to the first time stamp, the second time stamp, The third time stamp and the fourth time stamp of the source-end routing device receiving the second IP data packet are used to calculate a two-way transmission delay.
其中,所述第一时间戳、所述第二时间戳或者所述第三时间戳承载于IP报文的未使用字段。Wherein, the first time stamp, the second time stamp or the third time stamp is carried in an unused field of the IP packet.
图2为本申请另一实施例提供的一种检测传输时延的方法的流程示意图,如图2所示,该方法包括:FIG. 2 is a schematic flowchart of a method for detecting transmission delay according to another embodiment of the application. As shown in FIG. 2, the method includes:
步骤201,源端路由设备向目的端路由设备发送第一IP数据报文,所述第一IP数据报文携带所述源端路由设备发送所述第一IP数据报文的第一时间戳,以便所述目的端路由设备根据所述第一时间戳和目的端路由设备接收所述第一IP数据报文的第二时间戳,计算所述源端路由设备到所述目的端路由设备的单向传输时延。Step 201: The source-end routing device sends a first IP data packet to the destination-end routing device, where the first IP data packet carries the first timestamp of the first IP data packet sent by the source-end routing device. So that the destination routing device calculates the order from the source routing device to the destination routing device according to the first time stamp and the second time stamp of the destination routing device receiving the first IP data packet. To the transmission delay.
其中,所述第一时间戳承载于IP报文的未使用字段。Wherein, the first time stamp is carried in the unused field of the IP packet.
图3为本申请另一实施例提供的一种检测传输时延的方法的流程示意图,如图3所示,该方法包括:FIG. 3 is a schematic flowchart of a method for detecting transmission delay according to another embodiment of the application. As shown in FIG. 3, the method includes:
步骤301,源端路由设备向目的端路由设备发送第一IP数据报文,所述第一IP数据报文携带所述源端路由设备发送所述第一IP数据报文的第一时间戳;Step 301: The source-end routing device sends a first IP data packet to the destination-end routing device, where the first IP data packet carries a first time stamp of the first IP data packet sent by the source-end routing device;
步骤302,接收所述目的端路由设备发送的第二IP数据报文,所述第二IP数据报文携带所述第一时间戳、所述目的端路由设备接收所述第一IP数据报文的第二时间戳和所述目的端路由设备发送所述第二IP数据报文的第三时间戳;Step 302: Receive a second IP data packet sent by the destination routing device, where the second IP data packet carries the first time stamp, and the destination routing device receives the first IP data packet And the third time stamp of the second IP data packet sent by the destination routing device;
步骤303,根据所述第一时间戳、所述第二时间戳、所述第三时间戳和所述源端路由设备接收所述第二IP数据报文的第四时间戳,计算双向传输时延。Step 303: According to the first time stamp, the second time stamp, the third time stamp, and the fourth time stamp of the source-end routing device receiving the second IP data packet, calculate the two-way transmission time Extension.
其中,所述第一时间戳、所述第二时间戳或者所述第三时间戳承载于IP报文的未使用字段。Wherein, the first time stamp, the second time stamp or the third time stamp is carried in an unused field of the IP packet.
图4为本申请另一实施例提供的一种检测传输时延的方法的流程示意图,FIG. 4 is a schematic flowchart of a method for detecting transmission delay according to another embodiment of this application.
本实施例中应用场景为单向传输时延检测。The application scenario in this embodiment is one-way transmission delay detection.
如图4所示,该方法包括:As shown in Figure 4, the method includes:
步骤401,源端路由设备向目的端路由设备发送第一IP数据报文,所述第一IP数据报文携带所述源端路由设备发送所述第一IP数据报文的第一时间戳;Step 401: The source-end routing device sends a first IP data packet to the destination-end routing device, where the first IP data packet carries a first time stamp of the first IP data packet sent by the source-end routing device;
其中,所述第一时间戳可以承载于所述第一IP数据报文的未使用字段,例 如,当所述第一IP数据报文为IPv4报文时,所述第一时间戳承载于IPv4报文头预留的选项option字段或者IP报文数据段未用部分。当所述第一IP数据报文为IPv6报文时,所述第一时间戳承载于IPv6拓展头或者IP报文数据段未用部分。Wherein, the first timestamp may be carried in an unused field of the first IP data message. For example, when the first IP data message is an IPv4 message, the first timestamp may be carried in IPv4 The option field reserved in the packet header or the unused part of the IP packet data segment. When the first IP data message is an IPv6 message, the first time stamp is carried in an IPv6 extension header or an unused part of the IP message data segment.
具体而言,可以由源端路由设备的处理单元提取本地时间信息,在向源端路由设备的端口转发报文前将时间戳信息加载到IP报文的未使用字段,然后通过源端端口向目的端端口转发出去。Specifically, the processing unit of the source-end routing device can extract the local time information, load the timestamp information into the unused field of the IP packet before forwarding the packet to the port of the source-end routing device, and then send it to the unused field through the source-end port. The destination port is forwarded out.
步骤402,所述目的端路由设备接收所述第一IP数据报文,根据所述第一时间戳和所述目的端路由设备接收所述第一IP数据报文的第二时间戳,计算从源端路由设备到目的端路由设备的单向传输时延。Step 402: The destination routing device receives the first IP data message, and calculates the slave according to the first time stamp and the second time stamp of the destination routing device receiving the first IP data message The one-way transmission delay from the source-end routing device to the destination-end routing device.
具体而言,目的端路由设备的端口收到所述第一IP数据报文后,记录所述目的端路由设备接收所述第一IP数据报文的第二时间戳。然后,目的端路由设备的处理单元解析所述第一IP数据报文得到第一时间戳,再与本地的接收时间戳即第二时间戳比较,从而计算出从源端路由设备到目的端路由设备的单向传输时延值,即所述单向传输时延值=第二时间戳-第一时间戳。Specifically, after the port of the destination routing device receives the first IP data packet, it records the second timestamp of the destination routing device receiving the first IP data packet. Then, the processing unit of the destination routing device parses the first IP data message to obtain the first time stamp, and compares it with the local receiving time stamp, that is, the second time stamp, thereby calculating the route from the source routing device to the destination The one-way transmission delay value of the device, that is, the one-way transmission delay value=the second time stamp-the first time stamp.
图5为本申请另一实施例提供的一种检测传输时延的方法的流程示意图,FIG. 5 is a schematic flowchart of a method for detecting transmission delay according to another embodiment of this application.
本实施例中应用场景为双向传输时延检测。The application scenario in this embodiment is two-way transmission delay detection.
如图5所示,该方法包括:As shown in Figure 5, the method includes:
步骤501,源端路由设备向目的端路由设备发送第一IP数据报文,所述第一IP数据报文携带所述源端路由设备发送所述第一IP数据报文的第一时间戳;Step 501: The source-end routing device sends a first IP data packet to the destination-end routing device, where the first IP data packet carries the first timestamp of the first IP data packet sent by the source-end routing device;
其中,所述第一时间戳可以承载于所述第一IP数据报文的未使用字段,例如,当所述第一IP数据报文为IPv4报文时,所述第一时间戳承载于IPv4报文头预留的选项option字段或者IP报文数据段未用部分。当所述第一IP数据报文为IPv6报文时,所述第一时间戳承载于IPv6拓展头或者IP报文数据段未用部分。Wherein, the first timestamp may be carried in an unused field of the first IP data message. For example, when the first IP data message is an IPv4 message, the first timestamp may be carried in IPv4 The option field reserved in the packet header or the unused part of the IP packet data segment. When the first IP data message is an IPv6 message, the first time stamp is carried in an IPv6 extension header or an unused part of the IP message data segment.
具体而言,可以由源端路由设备的处理单元提取本地时间信息,在向源端路由设备的端口转发报文前将时间戳信息加载到IP报文头的未使用字段,然后通过源端端口向目的端端口转发出去,即发送给目的端路由设备。Specifically, the processing unit of the source-end routing device can extract the local time information, and load the time stamp information into the unused field of the IP packet header before forwarding the packet to the port of the source-end routing device, and then pass it through the source port Forward to the destination port, that is, send to the destination routing device.
步骤502,所述目的端路由设备接收所述第一IP数据报文,记录所述目的端路由设备接收所述第一IP数据报文的第二时间戳;Step 502: The destination routing device receives the first IP data packet, and records a second timestamp when the destination routing device receives the first IP data packet;
具体而言,目的端路由设备的端口收到所述第一IP数据报文后,记录所述目的端路由设备接收所述第一IP数据报文的第二时间戳。Specifically, after the port of the destination routing device receives the first IP data packet, it records the second timestamp of the destination routing device receiving the first IP data packet.
步骤503,所述目的端路由设备向所述源端路由设备发送第二IP数据报文,所述第二IP数据报文携带所述第一时间戳、所述第二时间戳和所述目的端路由设备发送所述第二IP数据报文的第三时间戳;Step 503: The destination routing device sends a second IP data packet to the source routing device, where the second IP data packet carries the first time stamp, the second time stamp, and the destination The third timestamp of the end routing device sending the second IP data packet;
具体而言,可以由目的端路由设备的处理单元将所述第一时间戳、所述第二时间戳以及所述第二IP数据报文的本地发送时间即第三时间戳加载到第二IP数据报文的未使用字段中;然后通过目的端路由设备的端口转发出去,即发送给所述源端路由设备。Specifically, the processing unit of the destination routing device may load the first timestamp, the second timestamp, and the local sending time of the second IP data packet, that is, the third timestamp to the second IP In the unused field of the data message; then forwarded through the port of the destination routing device, that is, sent to the source routing device.
其中,时间戳可以承载于IP数据报文的未使用字段,例如,当所述第二IP数据报文为IPv4报文时,时间戳承载于IPv4报文头预留的选项option字段或者IP报文数据段未用部分。当所述第二IP数据报文为IPv6报文时,时间戳承载于IPv6拓展头或者IP报文数据段未用部分。Wherein, the timestamp may be carried in an unused field of the IP data message. For example, when the second IP data message is an IPv4 message, the timestamp is carried in an option field reserved in the IPv4 header or the IP message. The unused part of the text data segment. When the second IP data message is an IPv6 message, the timestamp is carried in an IPv6 extension header or an unused part of the IP message data segment.
步骤504,所述源端路由设备接收所述第二IP数据报文,根据所述第一时间戳、所述第二时间戳、所述第三时间戳以及所述源端路由设备接收所述第二IP数据报文的第四时间戳,计算双向传输时延。Step 504: The source-end routing device receives the second IP data packet, and receives the second IP data message according to the first time stamp, the second time stamp, the third time stamp, and the source-end routing device The fourth time stamp of the second IP data message calculates the two-way transmission delay.
具体而言,源端路由设备的端口收到所述第二IP数据报文后,记录所述源端路由设备接收所述第二IP数据报文的第四时间戳。然后,由源端路由设备的处理单元解析所述第二IP数据报文得到所述第一时间戳、所述第二时间戳、所述第三时间戳,与本地的接收时间戳即第四时间戳比较,计算双向传输时延,即所述双向传输时延值=(第四时间戳-第一时间戳)-(第三时间戳-第二时间戳)。Specifically, after the port of the source-end routing device receives the second IP data packet, it records the fourth time stamp of the source-end routing device receiving the second IP data packet. Then, the processing unit of the source-end routing device parses the second IP data packet to obtain the first time stamp, the second time stamp, and the third time stamp, and the local reception time stamp, that is, the fourth time stamp. Time stamps are compared, and the two-way transmission delay is calculated, that is, the two-way transmission delay value = (fourth time stamp-first time stamp)-(third time stamp-second time stamp).
在本申请的另一实施例中,当传输的IP数据报文为IPv4报文时,IP报文头结构如图6(a)所示,可以使用数据业务IP报文头预留的选项option字段存储时间戳信息。当传输的IP数据报文为IPv6报文时,IP报文数据结构如图6(b)所示,可以使用IP报文的扩展头或者数据部分的未用部分存储时间戳信息。In another embodiment of the present application, when the transmitted IP data message is an IPv4 message, the IP header structure is shown in Figure 6(a), and the option option reserved for the data service IP header can be used The field stores timestamp information. When the transmitted IP data message is an IPv6 message, the data structure of the IP message is shown in Figure 6(b). The extended header of the IP message or the unused part of the data part can be used to store the time stamp information.
例如,当只需要计算单向时延时,在IP报文头的选项option字段或者数据段未用部分,需要1-2个8个字节宽度的空间,存储两端路由设备的单向时间戳:For example, when only one-way time delay needs to be calculated, in the option field of the IP header or the unused part of the data segment, 1-2 8-byte spaces are required to store the one-way time of the routing devices at both ends stamp:
Uint64 TxTimef,//源端路由设备发送时间戳Uint64 TxTimef, //The source routing device sends the time stamp
Uint64 RxTimef,//目标端路由设备接收时间戳Uint64 RxTimef,//The destination routing device receives the timestamp
当需要计算双向时延时,在IP报文头的option字段或者数据段未用部分,需要3-4个8个字节宽度的空间,存储两端路由设备的双向时间戳:When you need to calculate the two-way time delay, in the option field of the IP header or the unused part of the data segment, 3-4 8-byte spaces are required to store the two-way time stamps of the routing devices at both ends:
Uint64 TxTimef,//源端路由设备发送时间戳Uint64 TxTimef, //The source routing device sends the time stamp
Uint64 RxTimef,//目标端路由设备接收时间戳Uint64 RxTimef,//The destination routing device receives the timestamp
Uint64 TxTimeb,//目标端路由设备发送时间戳Uint64 TxTimeb, //The destination routing device sends the timestamp
Uint64 RxTimeb,//源端路由设备接收时间戳Uint64 RxTimeb, //The source routing device receives the time stamp
图7为本申请另一实施例提供的一种检测传输时延的方法的流程示意图,FIG. 7 is a schematic flowchart of a method for detecting transmission delay according to another embodiment of the application.
本实施例中应用场景为单向传输时延检测。本实施例应用于图8所示的系统架构,如图8所示,源端路由设备1包括处理单元101和端口102。目的端路由设备包括处理单元201和端口202,端口102和202相互通信传输数据。The application scenario in this embodiment is one-way transmission delay detection. This embodiment is applied to the system architecture shown in FIG. 8. As shown in FIG. 8, the source routing device 1 includes a processing unit 101 and a port 102. The destination routing device includes a processing unit 201 and a port 202, and the ports 102 and 202 communicate with each other to transmit data.
如图7所示,该方法包括:As shown in Figure 7, the method includes:
步骤701,源端路由设备向目的端路由设备转发第一IP报文时,源端路由设备1的处理单元101提取本地实时时间信息TxTimef,并将这个时间戳TxTimef加载到IP报文的未使用字段;In step 701, when the source-end routing device forwards the first IP packet to the destination-end routing device, the processing unit 101 of the source-end routing device 1 extracts local real-time time information TxTimef, and loads this time stamp TxTimef into the unused IP packet Field
例如,当所述第一IP数据报文为IPv4报文时,所述时间戳TxTimef承载于IPv4报文头预留的选项option字段或者IP报文数据段未用部分。当所述第一IP数据报文为IPv6报文时,所述时间戳TxTimef承载于IPv6拓展头或者IP报文数据段未用部分。For example, when the first IP data packet is an IPv4 packet, the timestamp TxTimef is carried in an option field reserved in the IPv4 packet header or an unused part of the IP packet data segment. When the first IP data message is an IPv6 message, the timestamp TxTimef is carried in an IPv6 extension header or an unused part of the IP message data segment.
步骤702,处理单元101更新IP报文头的首部长度/包总长度/首部校验和,之后做MAC层封装,并通过102端口向目的路由设备的端口202转发该第一IP报文出去;Step 702: The processing unit 101 updates the header length/total packet length/header checksum of the IP header, then performs MAC layer encapsulation, and forwards the first IP message to port 202 of the destination routing device through port 102;
步骤703,目的路由设备的端口202收到所述第一IP报文后,记录下报文接收时间戳RxTimef,由目的路由设备的处理单元201解MAC封装,解析IP报文,得到报文头里的源端时间戳TxTimef;Step 703: After the port 202 of the destination routing device receives the first IP message, it records the message reception timestamp RxTimef, and the processing unit 201 of the destination routing device de-MAC encapsulates, parses the IP message, and obtains the message header The source timestamp TxTimef in here;
步骤704,处理单元201根据接收报文时间戳RxTimef和源端发送时间戳TxTimef,利用RxTimef-TxTimef,计算出单向时延值。Step 704: The processing unit 201 calculates a one-way delay value by using RxTimef-TxTimef according to the received message timestamp RxTimef and the source sending timestamp TxTimef.
其中,单向时延值=RxTimef-TxTimef。Among them, the one-way delay value = RxTimef-TxTimef.
其中,单向时延测量要求源端和目的端的时钟严格同步。Among them, the one-way delay measurement requires strict synchronization of the source and destination clocks.
图9为本申请另一实施例提供的一种检测传输时延的方法的流程示意图,FIG. 9 is a schematic flowchart of a method for detecting transmission delay according to another embodiment of this application.
本实施例中应用场景为双向传输时延检测。本实施例应用于图8所示的系统架构,如图8所示,源端路由设备1包括处理单元101和端口102。目的端路由设备包括处理单元201和端口202,端口102和202相互通信传输数据。The application scenario in this embodiment is two-way transmission delay detection. This embodiment is applied to the system architecture shown in FIG. 8. As shown in FIG. 8, the source routing device 1 includes a processing unit 101 and a port 102. The destination routing device includes a processing unit 201 and a port 202, and the ports 102 and 202 communicate with each other to transmit data.
如图9所示,该方法包括:As shown in Figure 9, the method includes:
步骤901,源端路由设备向目的端路由设备转发第一IP报文时,源端路由设备1的处理单元101提取本地实时时间信息TxTimef,并将这个时间戳TxTimef加载到IP报文的未使用字段;Step 901: When the source-end routing device forwards the first IP packet to the destination-end routing device, the processing unit 101 of the source-end routing device 1 extracts local real-time time information TxTimef, and loads this time stamp TxTimef into the unused IP packet Field
步骤902,处理单元101更新IP报文头的首部长度/包总长度/首部校验和,之后做MAC层封装,并通过102端口向目的路由设备的端口202转发该第一IP报文出去; Step 902, the processing unit 101 updates the header length/total packet length/header checksum of the IP header, then performs MAC layer encapsulation, and forwards the first IP message to port 202 of the destination routing device through port 102;
步骤903,目的路由设备的端口202收到所述第一IP报文后,记录下报文接收时间戳RxTimef,由目的路由设备的处理单元201解MAC封装,解析IP报文,得到报文头里的源端时间戳TxTimef;Step 903: After the port 202 of the destination routing device receives the first IP message, it records the message receiving timestamp RxTimef, and the processing unit 201 of the destination routing device de-MAC encapsulates, parses the IP message, and obtains the message header The source timestamp TxTimef in here;
步骤904,处理单元201将源端时间戳TxTimef、接收时间戳RxTimef以及本地发送时间戳TxTimeb一起加载到第二IP数据报文的未使用字段;Step 904: The processing unit 201 loads the source time stamp TxTimef, the receiving time stamp RxTimef, and the local sending time stamp TxTimeb together into the unused field of the second IP data message;
其中,时间戳可以承载于IP数据报文的未使用字段,例如,当所述第二IP数据报文为IPv4报文时,时间戳承载于IPv4报文头预留的选项option字段或者IP报文数据段未用部分。当所述第二IP数据报文为IPv6报文时,时间戳承载于IPv6拓展头或者IP报文数据段未用部分。Wherein, the timestamp may be carried in an unused field of the IP data message. For example, when the second IP data message is an IPv4 message, the timestamp is carried in an option field reserved in the IPv4 header or the IP message. The unused part of the text data segment. When the second IP data message is an IPv6 message, the timestamp is carried in an IPv6 extension header or an unused part of the IP message data segment.
步骤905,处理单元201更新第二IP数据报文的IP报文头的首部长度/包总长度/首部校验和,之后做MAC层封装;并通过端口202向源端路由设备102端口转发IP报文出去;Step 905: The processing unit 201 updates the header length/total packet length/header checksum of the IP header of the second IP data packet, and then performs MAC layer encapsulation; and forwards the IP to the source-end routing device 102 port through port 202 Message out
步骤906,源端路由设备的端口102收到所述第二IP报文后,记录下报文源端接收时间戳RxTimeb,由处理单元101解MAC封装,解析IP报文,得到报文头里的源端发送时间戳TxTimef、目的端接收时间戳RxTimef、目的端发送时间戳TxTimeb;Step 906: After the port 102 of the source-side routing device receives the second IP message, it records the message source receiving timestamp RxTimeb, and the processing unit 101 de-MAC encapsulates, parses the IP message, and obtains the message header The source sends a time stamp TxTimef, the destination receives a time stamp RxTimef, and the destination sends a time stamp TxTimeb;
步骤907,处理单元101根据源端发送TxTimef/接收时间RxTimeb,目的端发送TxTimeb/接收时间RxTimef,计算出双向时延值。In step 907, the processing unit 101 calculates a two-way delay value according to the source sending TxTimef/receiving time RxTimeb and the destination sending TxTimeb/receiving time RxTimef.
其中,双向时延值=(RxTimeb-TxTimef)-(TxTimeb-RxTimef)。Among them, the two-way delay value=(RxTimeb-TxTimef)-(TxTimeb-RxTimef).
在本申请的另一实施例中,上述检测传输时延的方法可以使用中断触发软 件或是在硬件模块中实现,如处理单元101或者201等可以使用专用芯片或是硬件逻辑处理器实现。In another embodiment of the present application, the foregoing method for detecting transmission delay can be implemented using interrupt trigger software or in a hardware module. For example, the processing unit 101 or 201 can be implemented using a dedicated chip or a hardware logic processor.
在本申请的另一实施例中,在双端时延测试过程中,为了保证时延检测的正确性,源端路由器应该存储发送时间戳,当接收到目的端返回报文时,检查报文里的TxTimef是否属于之前存储的发送时间戳,如果属于,计算双向时延值。反之,将认为报文无效丢弃。In another embodiment of the present application, in order to ensure the correctness of the delay detection during the double-ended delay test, the source router should store the sending timestamp and check the message when it receives the return message from the destination. Whether the TxTimef in here belongs to the previously stored transmission timestamp, if so, calculate the two-way delay value. Otherwise, the message will be considered invalid and discarded.
本申请上述实施例提供的技术方案,时延检测是基于数据报文进行的,所以该时延就爱内测要求数据流量正常运行。如果是双向时延测试,要求数据流量双向运行正常。并且在时延检测过程中需要采集本地实时时间并快速加载到报文中并转发出去;接收到报文时,需要快速记录本地接收实时时间,计算两端时延值。中间有任何延迟处理,都会影响时延检测的准确性。所以时间信息的采集和处理最好由专用的硬件逻辑或芯片来实现。In the technical solution provided by the foregoing embodiment of the present application, the delay detection is performed based on the data message, so the internal test requires the data flow to run normally for the delay. If it is a two-way delay test, the data traffic is required to run normally in both directions. And in the delay detection process, the local real-time time needs to be collected and quickly loaded into the message and forwarded; when the message is received, the local reception real-time time needs to be recorded quickly, and the delay value at both ends needs to be calculated. Any delay processing in the middle will affect the accuracy of delay detection. Therefore, the collection and processing of time information is best implemented by dedicated hardware logic or chips.
本申请实施例提供的技术方案,采用了在数据业务IP报文中预留的未使用字段存储时间戳方式,实现单向或双向时延测量,与现有技术Ping模式和DMM/DMR模式相比,不使用专门的时延检测包占用业务通道,节省了以太网数据业务传输通道资源,提高了业务通道使用效率,并且该字段属于IP报文头的一部分,在数字业务处理器中优先级级别较高,源端路由和目的端路由响应比较及时,从而极大地提高了时延测量的准确率。The technical solution provided by the embodiment of the application adopts the method of storing the time stamp in the unused field reserved in the data service IP message to realize the one-way or two-way delay measurement, which is similar to the prior art Ping mode and DMM/DMR mode. Compared with, the service channel is not occupied by the special delay detection packet, which saves the resources of the Ethernet data service transmission channel and improves the efficiency of the service channel. Moreover, this field is a part of the IP header and has priority in the digital service processor The level is higher, and the source route and destination route respond in a timely manner, which greatly improves the accuracy of delay measurement.
图10为本申请一实施例提供的一种目的端路由设备的结构示意图,如图10所示,该目的端路由设备包括:接收单元,还包括计算单元和/或发送单元;FIG. 10 is a schematic structural diagram of a destination routing device according to an embodiment of the application. As shown in FIG. 10, the destination routing device includes a receiving unit, and also includes a calculation unit and/or a sending unit;
所述接收单元,用于接收源端路由设备发送的第一IP数据报文,所述第一IP数据报文携带所述源端路由设备发送所述第一IP数据报文的第一时间戳;The receiving unit is configured to receive a first IP data message sent by a source-end routing device, where the first IP data message carries a first time stamp of the first IP data message sent by the source-end routing device ;
所述计算单元,用于根据所述第一时间戳和所述目的端路由设备接收所述第一IP数据报文的第二时间戳,计算从源端路由设备到目的端路由设备的单向传输时延;The calculation unit is configured to calculate the one-way from the source-end routing device to the destination-end routing device according to the first time stamp and the second time stamp of the destination-end routing device receiving the first IP data packet Transmission delay
所述发送单元,用于向所述源端路由设备发送第二IP数据报文,所述第二IP数据报文携带所述第一时间戳、所述目的端路由设备接收所述第一IP数据报 文的第二时间戳和所述目的端路由设备发送所述第二IP数据报文的第三时间戳,以便所述源端路由设备根据所述第一时间戳、所述第二时间戳、所述第三时间戳和所述源端路由设备接收所述第二IP数据报文的第四时间戳,计算双向传输时延。The sending unit is configured to send a second IP data packet to the source-end routing device, where the second IP data packet carries the first time stamp, and the destination-end routing device receives the first IP The second time stamp of the data message and the third time stamp of the second IP data message sent by the destination-end routing device, so that the source-end routing device can use the first time stamp and the second time The third time stamp, the third time stamp, and the fourth time stamp of the source-end routing device receiving the second IP data packet are used to calculate a two-way transmission delay.
其中,所述第一时间戳、所述第二时间戳或者所述第三时间戳承载于IP报文的未使用字段。Wherein, the first time stamp, the second time stamp or the third time stamp is carried in an unused field of the IP packet.
图11为本申请一实施例提供的一种源端路由设备的结构示意图,如图11所示,该源端路由设备包括:FIG. 11 is a schematic structural diagram of a source-end routing device provided by an embodiment of this application. As shown in FIG. 11, the source-end routing device includes:
发送单元,用于向目的端路由设备发送第一IP数据报文,所述第一IP数据报文携带所述源端路由设备发送所述第一IP数据报文的第一时间戳,以便所述目的端路由设备根据所述第一时间戳和目的端路由设备接收所述第一IP数据报文的第二时间戳,计算所述源端路由设备到所述目的端路由设备的单向传输时延。The sending unit is configured to send a first IP data packet to the destination routing device, the first IP data packet carrying the first time stamp of the source routing device sending the first IP data packet, so that The destination routing device calculates the one-way transmission from the source routing device to the destination routing device according to the first time stamp and the second time stamp of the destination routing device receiving the first IP data message Time delay.
其中,所述第一时间戳承载于IP报文的未使用字段。Wherein, the first time stamp is carried in the unused field of the IP packet.
图12为本申请另一实施例提供的一种源端路由设备的结构示意图,如图12所示,该源端路由设备包括:FIG. 12 is a schematic structural diagram of a source-end routing device provided by another embodiment of this application. As shown in FIG. 12, the source-end routing device includes:
发送单元,用于向目的端路由设备发送第一IP数据报文,所述第一IP数据报文携带所述源端路由设备发送所述第一IP数据报文的第一时间戳;A sending unit, configured to send a first IP data packet to a destination-end routing device, where the first IP data packet carries a first timestamp at which the source-end routing device sends the first IP data packet;
接收单元,用于接收所述目的端路由设备发送的第二IP数据报文,所述第二IP数据报文携带所述第一时间戳、所述目的端路由设备接收所述第一IP数据报文的第二时间戳和所述目的端路由设备发送所述第二IP数据报文的第三时间戳;The receiving unit is configured to receive a second IP data packet sent by the destination routing device, where the second IP data packet carries the first time stamp, and the destination routing device receives the first IP data The second time stamp of the message and the third time stamp of the second IP data message sent by the destination routing device;
计算单元,用于根据所述第一时间戳、所述第二时间戳、所述第三时间戳和所述源端路由设备接收所述第二IP数据报文的第四时间戳,计算双向传输时延。The calculation unit is configured to calculate a bidirectional time stamp based on the first time stamp, the second time stamp, the third time stamp, and the fourth time stamp of the source routing device receiving the second IP data packet Transmission delay.
其中,所述第一时间戳、所述第二时间戳或者所述第三时间戳承载于IP报文的未使用字段。Wherein, the first time stamp, the second time stamp or the third time stamp is carried in an unused field of the IP packet.
图13为本申请另一实施例提供的一种目的端路由设备的结构示意图,如图 13所示,该目的端路由设备包括:FIG. 13 is a schematic structural diagram of a destination routing device according to another embodiment of this application. As shown in FIG. 13, the destination routing device includes:
第二端口,用于接收源端路由设备发送的第一IP数据报文并记录所述目的端路由设备接收所述第一IP数据报文的第二时间戳,所述第一IP数据报文携带所述源端路由设备发送所述第一IP数据报文的第一时间戳;The second port is used to receive the first IP data packet sent by the source-end routing device and record the second timestamp of the first IP data packet received by the destination-end routing device, the first IP data packet Carrying the first timestamp of the first IP data packet sent by the source-end routing device;
第二处理单元,用于根据所述第一时间戳和所述第二时间戳,计算从源端路由设备到目的端路由设备的单向传输时延;The second processing unit is configured to calculate the one-way transmission delay from the source-end routing device to the destination-end routing device according to the first time stamp and the second time stamp;
或者,用于将所述第一时间戳、所述第二时间戳和发送第二IP数据报文的第三时间戳加载到第二IP数据报文的未使用字段中,更新所述第二IP数据报文的IP报文头的首部长度、包总长度、首部校验和,之后做MAC层封装,并通过所述第二端口向所述源端路由设备发送所述第二IP数据报文,以便所述源端路由设备根据所述第一时间戳、所述第二时间戳、所述第三时间戳和所述源端路由设备接收所述第二IP数据报文的第四时间戳,计算双向传输时延。Alternatively, it is used to load the first time stamp, the second time stamp, and the third time stamp for sending the second IP data message into the unused field of the second IP data message, and update the second The header length, total packet length, and header checksum of the IP header of the IP data message are then encapsulated at the MAC layer, and the second IP datagram is sent to the source routing device through the second port So that the source-end routing device receives the second IP data packet according to the first time stamp, the second time stamp, the third time stamp, and the fourth time when the source-end routing device receives the second IP data packet Stamp, calculate the two-way transmission delay.
其中,所述第二处理单元为专用芯片或硬件逻辑处理器。Wherein, the second processing unit is a dedicated chip or a hardware logic processor.
其中,其中,所述第一时间戳、所述第二时间戳或者所述第三时间戳承载于IP报文的未使用字段。Wherein, the first timestamp, the second timestamp or the third timestamp is carried in an unused field of the IP packet.
图14为本申请另一实施例提供的一种源端路由设备的结构示意图,如图14所示,该源端路由设备包括:FIG. 14 is a schematic structural diagram of a source-end routing device provided by another embodiment of this application. As shown in FIG. 14, the source-end routing device includes:
包括:第一端口和第一处理单元;Including: a first port and a first processing unit;
所述第一处理单元,用于将所述源端路由设备发送第一IP数据报文的第一时间戳加载到所述第一IP数据报文的未使用字段中,更新所述第一IP数据报文的IP报文头的首部长度、包总长度、首部校验和,之后做MAC层封装,再通过所述第一端口向目的端路由设备发送所述第一IP数据报文,以便所述目的端路由设备根据所述第一时间戳和目的端路由设备接收所述第一IP数据报文的第二时间戳,计算所述源端路由设备到所述目的端路由设备的单向传输时延。The first processing unit is configured to load the first time stamp of the first IP data packet sent by the source-end routing device into the unused field of the first IP data packet, and update the first IP The header length, total packet length, and header checksum of the IP header of the data message are then encapsulated at the MAC layer, and then the first IP data message is sent to the destination routing device through the first port for The destination routing device calculates the one-way from the source routing device to the destination routing device according to the first time stamp and the second time stamp of the destination routing device receiving the first IP data packet Transmission delay.
其中,所述第一处理单元为专用芯片或硬件逻辑处理器。Wherein, the first processing unit is a dedicated chip or a hardware logic processor.
图15为本申请另一实施例提供的一种源端路由设备的结构示意图,如图15所示,该源端路由设备包括:FIG. 15 is a schematic structural diagram of a source-end routing device according to another embodiment of this application. As shown in FIG. 15, the source-end routing device includes:
包括:第一端口和第一处理单元;Including: a first port and a first processing unit;
所述第一处理单元,用于将所述第一时间戳加载到所述第一IP数据报文的 未使用字段中,更新所述第一IP数据报文的IP报文头的首部长度、包总长度、首部校验和,之后做MAC层封装,再通过所述第一端口向目的端路由设备发送第一IP数据报文;The first processing unit is configured to load the first time stamp into an unused field of the first IP data message, update the length of the header of the IP header of the first IP data message, The total length of the packet and the header checksum are then encapsulated at the MAC layer, and then the first IP data packet is sent to the destination routing device through the first port;
所述第一端口,还用于接收所述目的端路由设备发送的第二IP数据报文,并记录所述源端路由设备接收所述第二IP数据报文的第四时间戳;所述第二IP数据报文携带所述第一时间戳、所述第二时间戳和所述目的端路由设备发送所述第二IP数据报文的第三时间戳;The first port is also used to receive the second IP data packet sent by the destination routing device, and record the fourth time stamp of the source routing device receiving the second IP data packet; The second IP data packet carries the first time stamp, the second time stamp, and the third time stamp of the destination routing device sending the second IP data packet;
所述第一处理单元,还用于解MAC封装以及解析所述第二IP数据报文得到所述第一时间戳、所述第二时间戳和所述第三时间戳,根据所述第一时间戳、所述第二时间戳、所述第三时间戳和所述第四时间戳,计算双向传输时延。The first processing unit is further configured to de-MAC encapsulate and parse the second IP data message to obtain the first time stamp, the second time stamp, and the third time stamp, according to the first The time stamp, the second time stamp, the third time stamp, and the fourth time stamp are used to calculate a two-way transmission delay.
其中,其中,所述第一时间戳、所述第二时间戳或者所述第三时间戳承载于IP报文的未使用字段。Wherein, the first timestamp, the second timestamp or the third timestamp is carried in an unused field of the IP packet.
其中,所述第一处理单元为专用芯片或硬件逻辑处理器。Wherein, the first processing unit is a dedicated chip or a hardware logic processor.
本申请实施例还提供了一种目的端路由设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现上述目的端路由设备执行的任一项所述检测传输时延的方法。The embodiment of the present application also provides a destination routing device, including a memory, a processor, and a computer program stored on the memory and running on the processor. When the computer program is executed by the processor, The method for detecting the transmission delay executed by any one of the foregoing destination routing devices is implemented.
本申请实施例还提供了一种源端路由设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现上述源端路由设备执行的任一项所述检测传输时延的方法。An embodiment of the present application also provides a source-side routing device, including a memory, a processor, and a computer program stored on the memory and running on the processor. When the computer program is executed by the processor, The method for detecting transmission delay executed by any one of the foregoing source-end routing devices is implemented.
本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有信息处理程序,所述信息处理程序被处理器执行时实现上述任一项所述检测传输时延的方法的步骤。The embodiment of the present application also provides a computer-readable storage medium having an information processing program stored on the computer-readable storage medium, and when the information processing program is executed by a processor, the detection of the transmission delay described in any one of the above is implemented Steps of the method.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或 步骤可以由若干物理组件合作执行。某些组件或所有组件可以被实施为由处理器,如数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。A person of ordinary skill in the art can understand that all or some of the steps, functional modules/units in the system, and apparatus in the methods disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may consist of several physical components. The components are executed cooperatively. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, and the computer-readable medium may include a computer storage medium (or a non-transitory medium) and a communication medium (or a transitory medium). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile memory implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Sexual, removable and non-removable media. Computer storage media include but are not limited to RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassette, tape, magnetic disk storage or other magnetic storage device, or Any other medium used to store desired information and that can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, communication media usually contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as carrier waves or other transmission mechanisms, and may include any information delivery media .

Claims (15)

  1. 一种检测传输时延的方法,包括:A method for detecting transmission delay includes:
    目的端路由设备接收源端路由设备发送的第一IP数据报文,所述第一IP数据报文携带所述源端路由设备发送所述第一IP数据报文的第一时间戳;A destination-end routing device receives a first IP data packet sent by a source-end routing device, where the first IP data packet carries a first time stamp of the first IP data packet sent by the source-end routing device;
    根据所述第一时间戳和所述目的端路由设备接收所述第一IP数据报文的第二时间戳,计算从源端路由设备到目的端路由设备的单向传输时延;Calculating the one-way transmission delay from the source-end routing device to the destination-end routing device according to the first time stamp and the second time stamp of the destination-end routing device receiving the first IP data message;
    或者,向所述源端路由设备发送第二IP数据报文,所述第二IP数据报文携带所述第一时间戳、所述目的端路由设备接收所述第一IP数据报文的第二时间戳和所述目的端路由设备发送所述第二IP数据报文的第三时间戳,以便所述源端路由设备根据所述第一时间戳、所述第二时间戳、所述第三时间戳和所述源端路由设备接收所述第二IP数据报文的第四时间戳,计算双向传输时延。Or, send a second IP data packet to the source-end routing device, where the second IP data packet carries the first time stamp, and the first IP data packet received by the destination-end routing device The second time stamp and the third time stamp of the second IP data message sent by the destination routing device, so that the source routing device according to the first time stamp, the second time stamp, and the first time stamp The three timestamps and the fourth timestamp of the source-end routing device receiving the second IP data packet calculate the two-way transmission delay.
  2. 根据权利要求1所述的方法,其中,The method of claim 1, wherein:
    所述第一时间戳、所述第二时间戳或者所述第三时间戳承载于IP报文的未使用字段。The first timestamp, the second timestamp or the third timestamp is carried in an unused field of the IP packet.
  3. 一种检测传输时延的方法,包括:A method for detecting transmission delay includes:
    源端路由设备向目的端路由设备发送第一IP数据报文,所述第一IP数据报文携带所述源端路由设备发送所述第一IP数据报文的第一时间戳,以便所述目的端路由设备根据所述第一时间戳和目的端路由设备接收所述第一IP数据报文的第二时间戳,计算所述源端路由设备到所述目的端路由设备的单向传输时延。The source-end routing device sends a first IP data packet to the destination-end routing device, where the first IP data packet carries the first time stamp of the first IP data packet sent by the source-end routing device so that the The destination routing device calculates the one-way transmission time from the source routing device to the destination routing device according to the first time stamp and the second time stamp of the destination routing device receiving the first IP data message Extension.
  4. 根据权利要求3所述的方法,其中,The method of claim 3, wherein:
    所述第一时间戳承载于IP报文的未使用字段。The first time stamp is carried in an unused field of the IP packet.
  5. 一种检测传输时延的方法,包括:A method for detecting transmission delay includes:
    源端路由设备向目的端路由设备发送第一IP数据报文,所述第一IP数据报文携带所述源端路由设备发送所述第一IP数据报文的第一时间戳;The source-end routing device sends a first IP data packet to the destination-end routing device, where the first IP data packet carries the first timestamp of the first IP data packet sent by the source-end routing device;
    接收所述目的端路由设备发送的第二IP数据报文,所述第二IP数据报文携带所述第一时间戳、所述目的端路由设备接收所述第一IP数据报文的第二时间戳和所述目的端路由设备发送所述第二IP数据报文的第三时间戳;Receiving a second IP data packet sent by the destination routing device, where the second IP data packet carries the first time stamp, and the destination routing device receives the second IP data packet of the first IP data packet A timestamp and the third timestamp of the second IP data packet sent by the destination routing device;
    根据所述第一时间戳、所述第二时间戳、所述第三时间戳和所述源端路由设备接收所述第二IP数据报文的第四时间戳,计算双向传输时延。Calculate the two-way transmission delay according to the first time stamp, the second time stamp, the third time stamp, and the fourth time stamp of the source routing device receiving the second IP data packet.
  6. 根据权利要求5所述的方法,其中,The method of claim 5, wherein:
    所述第一时间戳、所述第二时间戳或者所述第三时间戳承载于IP报文的未使用字段。The first timestamp, the second timestamp or the third timestamp is carried in an unused field of the IP packet.
  7. 一种目的端路由设备,其中,包括:接收单元,还包括:计算单元或者发送单元;A destination routing device, which includes: a receiving unit, and further includes: a calculation unit or a sending unit;
    所述接收单元,用于接收源端路由设备发送的第一IP数据报文,所述第一IP数据报文携带所述源端路由设备发送所述第一IP数据报文的第一时间戳;The receiving unit is configured to receive a first IP data message sent by a source-end routing device, where the first IP data message carries a first time stamp of the first IP data message sent by the source-end routing device ;
    所述计算单元,用于根据所述第一时间戳和所述目的端路由设备接收所述第一IP数据报文的第二时间戳,计算从源端路由设备到目的端路由设备的单向传输时延;The calculation unit is configured to calculate the one-way from the source-end routing device to the destination-end routing device according to the first time stamp and the second time stamp of the destination-end routing device receiving the first IP data packet Transmission delay
    所述发送单元,用于向所述源端路由设备发送第二IP数据报文,所述第二IP数据报文携带所述第一时间戳、所述目的端路由设备接收所述第一IP数据报文的第二时间戳和所述目的端路由设备发送所述第二IP数据报文的第三时间戳,以便所述源端路由设备根据所述第一时间戳、所述第二时间戳、所述第三时间戳和所述源端路由设备接收所述第二IP数据报文的第四时间戳,计算双向传输时延。The sending unit is configured to send a second IP data packet to the source-end routing device, where the second IP data packet carries the first time stamp, and the destination-end routing device receives the first IP The second time stamp of the data message and the third time stamp of the second IP data message sent by the destination-end routing device, so that the source-end routing device can use the first time stamp and the second time The third time stamp, the third time stamp, and the fourth time stamp of the source-end routing device receiving the second IP data packet are used to calculate a two-way transmission delay.
  8. 一种源端路由设备,其中,包括:A source routing device, which includes:
    发送单元,用于向目的端路由设备发送第一IP数据报文,所述第一IP数据报文携带所述源端路由设备发送所述第一IP数据报文的第一时间戳,以便所述目的端路由设备根据所述第一时间戳和目的端路由设备接收所述第一IP数据报文的第二时间戳,计算所述源端路由设备到所述目的端路由设备的单向传输时延。The sending unit is configured to send a first IP data packet to the destination routing device, the first IP data packet carrying the first time stamp of the source routing device sending the first IP data packet, so that The destination routing device calculates the one-way transmission from the source routing device to the destination routing device according to the first time stamp and the second time stamp of the destination routing device receiving the first IP data message Time delay.
  9. 一种源端路由设备,包括:A source-side routing device, including:
    发送单元,用于向目的端路由设备发送第一IP数据报文,所述第一IP数据报文携带所述源端路由设备发送所述第一IP数据报文的第一时间戳;A sending unit, configured to send a first IP data packet to a destination-end routing device, where the first IP data packet carries a first timestamp at which the source-end routing device sends the first IP data packet;
    接收单元,用于接收所述目的端路由设备发送的第二IP数据报文,所述第 二IP数据报文携带所述第一时间戳、所述目的端路由设备接收所述第一IP数据报文的第二时间戳和所述目的端路由设备发送所述第二IP数据报文的第三时间戳;The receiving unit is configured to receive a second IP data packet sent by the destination routing device, where the second IP data packet carries the first time stamp, and the destination routing device receives the first IP data The second time stamp of the message and the third time stamp of the second IP data message sent by the destination routing device;
    计算单元,用于根据所述第一时间戳、所述第二时间戳、所述第三时间戳和所述源端路由设备接收所述第二IP数据报文的第四时间戳,计算双向传输时延。The calculation unit is configured to calculate a bidirectional time stamp based on the first time stamp, the second time stamp, the third time stamp, and the fourth time stamp of the source routing device receiving the second IP data packet Transmission delay.
  10. 一种目的端路由设备,包括:A destination routing device, including:
    第二端口,用于接收源端路由设备发送的第一IP数据报文并记录所述目的端路由设备接收所述第一IP数据报文的第二时间戳,所述第一IP数据报文携带所述源端路由设备发送所述第一IP数据报文的第一时间戳;The second port is used to receive the first IP data packet sent by the source-end routing device and record the second timestamp of the first IP data packet received by the destination-end routing device, the first IP data packet Carrying the first timestamp of the first IP data packet sent by the source-end routing device;
    第二处理单元,用于根据所述第一时间戳和所述第二时间戳,计算从源端路由设备到目的端路由设备的单向传输时延;The second processing unit is configured to calculate the one-way transmission delay from the source-end routing device to the destination-end routing device according to the first time stamp and the second time stamp;
    或者,用于将所述第一时间戳、所述第二时间戳和发送第二IP数据报文的第三时间戳加载到第二IP数据报文的未使用字段中,更新所述第二IP数据报文的IP报文头的首部长度、包总长度、首部校验和,之后做MAC层封装,并通过所述第二端口向所述源端路由设备发送所述第二IP数据报文,以便所述源端路由设备根据所述第一时间戳、所述第二时间戳、所述第三时间戳和所述源端路由设备接收所述第二IP数据报文的第四时间戳,计算双向传输时延。Alternatively, it is used to load the first time stamp, the second time stamp, and the third time stamp for sending the second IP data message into the unused field of the second IP data message, and update the second The header length, total packet length, and header checksum of the IP header of the IP data message are then encapsulated at the MAC layer, and the second IP datagram is sent to the source routing device through the second port So that the source-end routing device receives the second IP data packet according to the first time stamp, the second time stamp, the third time stamp, and the fourth time when the source-end routing device receives the second IP data packet Stamp, calculate the two-way transmission delay.
  11. 一种源端路由设备,包括:第一端口和第一处理单元;A source routing device, including: a first port and a first processing unit;
    所述第一处理单元,用于将所述源端路由设备发送第一IP数据报文的第一时间戳加载到所述第一IP数据报文的未使用字段中,更新所述第一IP数据报文的IP报文头的首部长度、包总长度、首部校验和,之后做MAC层封装,再通过所述第一端口向目的端路由设备发送所述第一IP数据报文,以便所述目的端路由设备根据所述第一时间戳和目的端路由设备接收所述第一IP数据报文的第二时间戳,计算所述源端路由设备到所述目的端路由设备的单向传输时延。The first processing unit is configured to load the first time stamp of the first IP data packet sent by the source-end routing device into the unused field of the first IP data packet, and update the first IP The header length, total packet length, and header checksum of the IP header of the data message are then encapsulated at the MAC layer, and then the first IP data message is sent to the destination routing device through the first port for The destination routing device calculates the one-way from the source routing device to the destination routing device according to the first time stamp and the second time stamp of the destination routing device receiving the first IP data packet Transmission delay.
  12. 一种源端路由设备,包括:第一端口和第一处理单元;A source routing device, including: a first port and a first processing unit;
    所述第一处理单元,用于将所述第一时间戳加载到所述第一IP数据报文的未使用字段中,更新所述第一IP数据报文的IP报文头的首部长度、包总长度、首部校验和,之后做MAC层封装,再通过所述第一端口向目的端路由设备发送 第一IP数据报文;The first processing unit is configured to load the first time stamp into an unused field of the first IP data message, update the length of the header of the IP header of the first IP data message, The total length of the packet and the header checksum are then encapsulated at the MAC layer, and then the first IP data packet is sent to the destination routing device through the first port;
    所述第一端口,还用于接收所述目的端路由设备发送的第二IP数据报文,并记录所述源端路由设备接收所述第二IP数据报文的第四时间戳;所述第二IP数据报文携带所述第一时间戳、所述第二时间戳和所述目的端路由设备发送所述第二IP数据报文的第三时间戳;The first port is also used to receive the second IP data packet sent by the destination routing device, and record the fourth time stamp of the source routing device receiving the second IP data packet; The second IP data packet carries the first time stamp, the second time stamp, and the third time stamp of the destination routing device sending the second IP data packet;
    所述第一处理单元,还用于解MAC封装以及解析所述第二IP数据报文得到所述第一时间戳、所述第二时间戳和所述第三时间戳,根据所述第一时间戳、所述第二时间戳、所述第三时间戳和所述第四时间戳,计算双向传输时延。The first processing unit is further configured to de-MAC encapsulate and parse the second IP data message to obtain the first time stamp, the second time stamp, and the third time stamp, according to the first The time stamp, the second time stamp, the third time stamp, and the fourth time stamp are used to calculate a two-way transmission delay.
  13. 一种目的端路由设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如权利要求1至2中任一项所述检测传输时延的方法。A destination-side routing device, comprising a memory, a processor, and a computer program stored on the memory and capable of running on the processor, the computer program being executed by the processor implements claims 1 to 2 Any one of the methods for detecting transmission delay.
  14. 一种源端路由设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如权利要求3至6中任一项所述检测传输时延的方法。A source-side routing device, comprising a memory, a processor, and a computer program stored on the memory and capable of running on the processor, and the computer program is executed by the processor to implement the following claims 3 to 6 Any one of the methods for detecting transmission delay.
  15. 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储有信息处理程序,所述信息处理程序被处理器执行时实现如权利要求1至6中任一项所述检测传输时延的方法的步骤。A computer-readable storage medium, wherein an information processing program is stored on the computer-readable storage medium, and when the information processing program is executed by a processor, the detection transmission time according to any one of claims 1 to 6 is realized. Extension of the method steps.
PCT/CN2020/090075 2019-06-24 2020-05-13 Method for measuring transmission time delay and related device WO2020259112A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910550657.8 2019-06-24
CN201910550657.8A CN112134747A (en) 2019-06-24 2019-06-24 Method for detecting transmission delay and related equipment

Publications (1)

Publication Number Publication Date
WO2020259112A1 true WO2020259112A1 (en) 2020-12-30

Family

ID=73849823

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/090075 WO2020259112A1 (en) 2019-06-24 2020-05-13 Method for measuring transmission time delay and related device

Country Status (2)

Country Link
CN (1) CN112134747A (en)
WO (1) WO2020259112A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113037859B (en) * 2021-03-24 2022-04-22 新华三技术有限公司 Session information management method, device, exchange equipment and medium
TWI804371B (en) * 2022-06-30 2023-06-01 和碩聯合科技股份有限公司 Transmission delay detection method and transmission delay detection system
CN115250243A (en) * 2022-07-22 2022-10-28 中国电信股份有限公司 Time delay data measuring method, device, system, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1937541A (en) * 2005-09-20 2007-03-28 华为技术有限公司 Network performance test method
KR20080059897A (en) * 2006-12-26 2008-07-01 한국정보통신대학교 산학협력단 Method for measuring end-to-end available bandwidth using time stamp message and delay variance in ip packet network
CN101296048A (en) * 2008-06-17 2008-10-29 杭州华三通信技术有限公司 Time synchronization method and apparatus
CN101854268A (en) * 2009-04-04 2010-10-06 华为技术有限公司 Method, device and system of IP (Internet Protocol) network performance measurement as well as method, device and system of IP network service quality control
US20110292797A1 (en) * 2010-05-28 2011-12-01 Alcatel-Lucent Usa Inc. Dynamic delay budget allocation using single-point estimation of end-to-end delay
CN108111365A (en) * 2016-11-24 2018-06-01 中国移动通信集团广东有限公司 A kind of latency measurement processing method and system

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5565121B2 (en) * 2010-06-09 2014-08-06 ソニー株式会社 COMMUNICATION PROCESSING DEVICE, COMMUNICATION PROCESSING SYSTEM, COMMUNICATION PROCESSING METHOD, AND PROGRAM
CN102217237B (en) * 2011-05-09 2013-12-04 华为技术有限公司 Method and device for medium stream performance monitoring
EP2611094A1 (en) * 2011-12-30 2013-07-03 British Telecommunications Public Limited Company Obtaining information from data items
CN104518919B (en) * 2013-09-26 2018-06-15 成都鼎桥通信技术有限公司 A kind of measuring method of group service time delay
CN103595588A (en) * 2013-11-26 2014-02-19 北京奥普维尔科技有限公司 Method for accurately measuring asynchronous Ethernet circuit time delay
CN103986943B (en) * 2014-05-31 2017-05-03 中国科学院国家授时中心 Large-ring time delay measurement method of digital satellite television timing system
CN106452972B (en) * 2016-10-31 2019-12-20 清华大学 Method and device for obtaining delay time of data packet
WO2018102966A1 (en) * 2016-12-05 2018-06-14 广东欧珀移动通信有限公司 Method for random access, network device, and terminal device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1937541A (en) * 2005-09-20 2007-03-28 华为技术有限公司 Network performance test method
KR20080059897A (en) * 2006-12-26 2008-07-01 한국정보통신대학교 산학협력단 Method for measuring end-to-end available bandwidth using time stamp message and delay variance in ip packet network
CN101296048A (en) * 2008-06-17 2008-10-29 杭州华三通信技术有限公司 Time synchronization method and apparatus
CN101854268A (en) * 2009-04-04 2010-10-06 华为技术有限公司 Method, device and system of IP (Internet Protocol) network performance measurement as well as method, device and system of IP network service quality control
US20110292797A1 (en) * 2010-05-28 2011-12-01 Alcatel-Lucent Usa Inc. Dynamic delay budget allocation using single-point estimation of end-to-end delay
CN108111365A (en) * 2016-11-24 2018-06-01 中国移动通信集团广东有限公司 A kind of latency measurement processing method and system

Also Published As

Publication number Publication date
CN112134747A (en) 2020-12-25

Similar Documents

Publication Publication Date Title
WO2020259112A1 (en) Method for measuring transmission time delay and related device
CN113709057B (en) Network congestion notification method, proxy node, network node and computer equipment
US9306819B2 (en) Controller driven OAM for split architecture network
US20220078114A1 (en) Method and Apparatus for Providing Service for Traffic Flow
US7668107B2 (en) Hardware implementation of network testing and performance monitoring in a network device
CN107483370B (en) Method for transmitting IP and CAN service on FC network
US20190312816A1 (en) Flow Control Method and Switching Device
WO2021098807A1 (en) Method and device for updating mapping
US20060274791A1 (en) Method measuring a delay time metric and measurement system
WO2018113425A1 (en) Method, apparatus and system for detecting time delay
WO2020207479A1 (en) Method and device for controlling network congestion
US10771374B2 (en) Delay measurement method and device
WO2021057671A1 (en) Oam method and apparatus for network
US20220191140A1 (en) Data transmission control method, apparatus, and storage medium
TWI721103B (en) Cluster accurate speed limiting method and device
CA3178575A1 (en) Method, device, and system for determining required bandwidth for data stream transmission
CN108881031B (en) Self-adaptive reliable data transmission method based on SDN network
CN105531967B (en) Message transmission method, device and communication system
US20230102193A1 (en) Network Performance Measurement Method, Apparatus, Device, and System, and Storage Medium
WO2023226633A1 (en) Fault processing method, and related device and system
CN116886621A (en) Message forwarding control method, DPU and related equipment
CN106161124B (en) Message test processing method and device
CN109417515A (en) For handling the methods, devices and systems of internet protocol packets
CN113691421B (en) Message generation method and device
US11582156B2 (en) Traffic detection method, apparatus, and system

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS (EPO FORM 1205A DATED 30.05.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20833476

Country of ref document: EP

Kind code of ref document: A1