WO2017113771A1 - Packet processing method and device - Google Patents

Packet processing method and device Download PDF

Info

Publication number
WO2017113771A1
WO2017113771A1 PCT/CN2016/091573 CN2016091573W WO2017113771A1 WO 2017113771 A1 WO2017113771 A1 WO 2017113771A1 CN 2016091573 W CN2016091573 W CN 2016091573W WO 2017113771 A1 WO2017113771 A1 WO 2017113771A1
Authority
WO
WIPO (PCT)
Prior art keywords
twamp test
message
bit
twamp
packet
Prior art date
Application number
PCT/CN2016/091573
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 WO2017113771A1 publication Critical patent/WO2017113771A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • 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

Definitions

  • the embodiments of the present invention relate to the field of communications technologies, and in particular, to a packet processing method and apparatus.
  • the Two-way Active Measurement Protocol provides a means of measuring the performance of the Internet Protocol (IP) between any two devices supporting this standard in the network.
  • IP Internet Protocol
  • UDP User Datagram Protocol
  • TWAMP follows the IETF RFC5357 standard. After the user initiates the statistics session, the TWAMP test packet constructed and sent from the session sender passes through the service forwarding channel and arrives at the session reflector. The session reflector is based on the source IP address, destination IP address, and source port.
  • the destination port number matches the TWAMP test packet identified as the specified session, and then exchanges the source IP address, destination IP address, source port number, and destination port number, and adds the corresponding protocol content to reset the packet lifetime TTL to 255. Then, the modified TWAMP test packet is sent back to the session sender.
  • Node A acts as the session sender, and Node C is the normally configured session reflector. When working normally, Node A constructs and initiates the TWAMP test report. After the node C matches the identification, the reflection returns the TWAMP test message.
  • the source IP address, the destination IP address, the source port number, and the destination port number of the node B may be misconfigured due to the user's misoperation.
  • the node B is misconfigured as a reflector and the node C reflects the reported packet.
  • the text arrives at the node B, and the node B reflects the message.
  • the TTL is reset to 255 according to the IETF RFC5357 standard.
  • the test packet is reflected into a ring between Node B and Node C, causing a network storm.
  • the application provides a TWAMP test message processing method and apparatus. It is used to reduce the problem that business data is reflected in the loop between network devices, causing network storms.
  • a method for processing a TWAMP message comprising:
  • the reflective device receives the TWAMP test message
  • TWAMP test packet is sent back to the sending device, where the TWAMP test packet includes the TWAMP test packet indicating that the loopback is a reflected packet. logo.
  • the method further includes: when the reflector device determines that the TWAMP test packet is a reflection packet, discarding the reflected packet.
  • the device of the present invention determines that the received TWAMP test packet is not a reflection packet, and adds the TWAMP test packet sent back to the TWAMP packet to be a reflection packet identifier. After the TWAMP test packet is sent back, if a device is misconfigured as a reflective terminal due to human error or the like in the forwarding channel of the loopback packet, the received TWAMP test packet can be distinguished by the above identifier. Whether the text is a reflection packet, so that the TWAMP test packet can be prevented from being formed into a packet loop between the correctly configured reflector device and the misconfigured reflector device in time, thereby preventing the service data from being repeatedly forwarded and replicated in the network. Network storms improve the reliability of the network.
  • the determining that the TWAMP test message is not a reflection message comprises: determining that a Z bit in the TWAMP test message is 0, and determining that the TWAMP is not a reflection message.
  • the identifier is: a Z bit with a value of 1.
  • the Z bit is a field carried by the TWAMP test message itself and is a reserved bit in the error evaluation. It is defined in the IETF RFC5357 standard.
  • the Z bit When the transmitting device sends a TWAMP test message, the Z bit must be set to 0, and the reflective device receives the location.
  • the Z bit When the TWAMP test message is described, the Z bit is not checked, and the value of the Z bit is not changed in the returned TWAM test message.
  • the reflective end device receives the TWAMP test packet, the value of the Z bit is verified, when the Z bit is If the message is 0, the TWAMP test message is sent back. If the Z bit is 1, the TWAMP test message is discarded. Therefore, the TWAMP test packet can be prevented from forming a packet loop between the properly configured reflector device and the misconfigured reflector device, preventing service data from being repeatedly forwarded and replicated in the network, causing network storms and improving network reliability. Sex.
  • the Z bit value of 1 may be used to indicate that the TWAMP test packet carrying the Z bit is not reflected, and the Z bit value is 0 to indicate that the TWAMP test packet carrying the Z bit passes through the reflective device. Reflection.
  • the Z bit may also have multiple bits, and other values are used to indicate whether the TWAMP test message carrying the Z bit is reflected.
  • the determining that the TWAMP test packet is not a reflection packet includes: determining, by the reflector device, that the sender/reflection S/R bit in the TWAMP test packet is 0, determining the The TWAMP test message is not a reflection message.
  • the identifier is: S/R bit with a value of 1.
  • the sender device When generating the TWAMP test packet, the sender device adds a sender/reflector S/R bit to the TWAMP test packet.
  • the reflective end device checks the value of the S/R bit when receiving the TWAMP test packet, and determines that the packet is not a reflected packet when the S/R bit is 0, and then sends back The TWAMP test message; when the S/R bit is 1, determining that the TWAMP test message is a reflection message, discarding the TWAMP test message. Therefore, the TWAMP test packet can be prevented from forming a packet loop between the properly configured reflector device and the misconfigured reflector device, preventing service data from being repeatedly forwarded and replicated in the network, causing network storms and improving network reliability. Sex.
  • the S/R bit value of 1 may be used to indicate that the TWAMP test packet carrying the S/R bit is not reflected, and the S/R bit value is 0 to represent the TWAMP carrying the S/R bit.
  • the test packet is reflected by the reflective device.
  • the S/R bit may also have multiple bits, and other values are used to indicate that the S/R bit is carried. Whether the TWAMP test message is reflected.
  • the present application provides a TWAMP packet processing method, where the method includes: the sending end device sends a TWAMP test packet to the reflective end device;
  • the sending end device receives the TWAMP test packet sent back by the reflective end device, and the TWAMP test packet sent back includes the identifier indicating that the returned TWAMP test packet is a reflected packet.
  • the value of the Z bit in the TWAMP test packet sent by the sending end device is 0, indicating that the TWAMP test packet is not a reflection packet.
  • the identifier in the returned TWAMP test packet is: a Z bit with a value of 1.
  • the value of the Z bit in the TWAMP test packet sent by the sending end device is 1, indicating that the TWAMP test packet is not a reflection packet.
  • the identifier in the returned TWAMP test packet is: a Z bit with a value of 0.
  • the Z bit may also have multiple bits, and other values are used to indicate whether the TWAMP test message carrying the Z bit is reflected.
  • the value of the S/R bit in the TWAMP test packet sent by the sending end device is 0, indicating that the TWAMP test packet is not a reflection packet.
  • the identifier in the returned TWAMP test packet is: S/R bit with a value of 1.
  • the value of the S/R bit in the TWAMP test packet sent by the sending end device is 1, indicating that the TWAMP test packet is not a reflection packet.
  • the identifier in the returned TWAMP test packet is: S/R bit with a value of 0.
  • the S/R bit may also have multiple bits, and other values are used to indicate whether the TWAMP test packet carrying the S/R bit is reflected.
  • the technical solution of the second aspect has the same technical effect as the technical solution of the first aspect.
  • a message processing apparatus for performing the method of the first aspect.
  • the device is located on the side of the reflective device, and the device includes: a receiving unit, a processing unit, and a sending unit;
  • the receiving unit is configured to receive a TWAMP test packet
  • the processing unit is configured to: determine that the TWAMP test packet is not a reflection packet, and generate The returned TWAMP test message, where the returned TWAMP test message includes an identifier indicating that the returned TWAMP test message is a reflected message;
  • the sending unit is configured to send the returned TWAMP test packet.
  • the processing unit is further configured to: when the TWAMP test packet is a reflection packet, discard the TWAMP test packet.
  • the processing unit is configured to determine that the Z bit in the TWAMP test packet is 0, and determine that the TWAMP is not a reflection message.
  • the identifier in the returned TWAMP test packet is: a Z bit with a value of 1.
  • the processing unit is configured to determine that the Z bit in the TWAMP test packet is 1, and determine that the TWAMP is not a reflection message.
  • the identifier in the returned TWAMP test packet is: a Z bit with a value of 0.
  • the Z bit may also have multiple bits, and the processing unit is configured to use other values to determine whether the TWAMP test message carrying the Z bit is reflected.
  • the processing unit is configured to determine that the S/R bit in the TWAMP test packet is 0, and determine that the TWAMP is not a reflection message.
  • the identifier in the returned TWAMP test packet is: S/R bit with a value of 1.
  • the processing unit is configured to determine that the S/R bit in the TWAMP test packet is 1, and determine that the TWAMP is not a reflection message.
  • the identifier in the returned TWAMP test packet is: S/R bit with a value of 0.
  • the S/R bit may also have multiple bits, and the processing unit is configured to use other values to determine whether the TWAMP test message carrying the S/R bit is reflected.
  • the technical solution of the third aspect has the same technical effects as the technical solutions of the first aspect and the second aspect.
  • a message processing apparatus for performing the method of the second aspect.
  • the device is located at the transmitting device side, and includes: a processing unit, a sending unit, and a receiving unit;
  • the processing unit is configured to generate a TWAMP test message
  • the sending unit is configured to send the TWAMP test packet
  • the receiving unit is configured to receive a TWAMP test packet sent back by the reflective device, where the returned TWAMP test packet includes an identifier indicating that the returned TWAMP test packet is a reflected packet.
  • the processing unit is configured to set a Z bit in the sent TWAMP test message to 0, indicating that the TWAMP test message is not a reflection message.
  • the identifier in the returned TWAMP test packet is: a Z bit with a value of 1.
  • the processing unit is configured to: the value of the Z bit in the sent TWAMP test message is 1, indicating that the TWAMP test message is not a reflection message.
  • the identifier in the returned TWAMP test packet is: a Z bit with a value of 0.
  • the Z bit may also have multiple bits, and other values are used to indicate whether the TWAMP test message carrying the Z bit is reflected.
  • the processing unit is configured to: set a value of S/R bit in the sent TWAMP test packet to 0, indicating that the TWAMP test packet is not a reflection message.
  • the identifier in the returned TWAMP test packet is: S/R bit with a value of 1.
  • the processing unit is configured to set a value of S/R bit in the sent TWAMP test packet to 1, indicating that the TWAMP test packet is not a reflection packet.
  • the identifier in the returned TWAMP test packet is: S/R bit with a value of 0.
  • the S/R bit may also have multiple bits, and other values are used to indicate whether the TWAMP test message carrying the S/R bit is reflected.
  • the technical solutions of the fourth aspect have the same technical effects as the technical solutions of the first to third aspects.
  • a communication system including a transmitting end device and a reflective end device, wherein the reflective end device includes the apparatus according to the third aspect, and the transmitting end device includes the fourth aspect s installation.
  • the system is for performing the method of the first aspect and the method of the second aspect.
  • the application provides a sender device, including a memory and a processor, where The memory is for storing program instruction code, and the processor is configured to execute the instruction code in the memory to complete the method of the first aspect.
  • the transmitting device includes the device described in the third aspect.
  • the present application provides a reflective device, including a memory and a processor, wherein the memory is configured to store program instruction code, and the processor is configured to execute an instruction code in the memory, completing the second aspect.
  • the reflective end device includes the device of the fourth aspect.
  • the present application provides a computer readable storage medium for storing computer software instructions for performing the functions of the first aspect and the second aspect, comprising the method for performing the first aspect and the second aspect Designed program.
  • FIG. 1 is a schematic diagram of reflection of a TWAMP message into a ring in the prior art.
  • FIG. 2 is a schematic diagram of an application scenario involved in a packet processing method provided by the present application
  • FIG. 3 is a schematic flowchart of a packet processing method according to an embodiment of the present disclosure
  • FIG. 4 is a schematic diagram of a format of a possible TWAMP test packet sent by a sender device according to an embodiment of the present application
  • FIG. 5 is a schematic flowchart of a packet processing method according to another embodiment of the present disclosure.
  • FIG. 6 is a schematic diagram of a format of a possible TWAMP test packet sent by a sender device according to another embodiment of the present application.
  • FIG. 7A is a schematic diagram of an execution body of a packet processing method according to an embodiment of the present disclosure.
  • FIG. 7B is a schematic diagram of another execution body of a packet processing method according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic diagram of a message processing apparatus according to an embodiment of the present disclosure.
  • FIG. 8B is a schematic diagram of another packet processing apparatus according to an embodiment of the present application.
  • the sender device involved in the present application may be a router or a packet transport network device or a switch.
  • the reflector device involved in the present application may be a router or a packet transport network device or a switch.
  • FIG. 2 is a schematic diagram of an application scenario involved in a packet processing method according to an embodiment of the present disclosure.
  • device A is a TWAMP test packet sending device
  • device C is a TWAMP test packet reflection.
  • End device, device A and device C have one or more intermediate devices, such as an intermediate device B.
  • the destination IP address configured in device A is 1.1.1.1
  • the source IP address is 2.2.2.2
  • the destination port number is 1111
  • the source port number is 2222.
  • the destination IP address configured in device C is 2.2.2.2
  • the source IP address is 1.1.1.1
  • the destination port number is 2222
  • the source port number is 1111.
  • the destination IP address carried by the TWAMP test packet sent from device A to device C is 1.1.1.1, the source IP address is 2.2.2.2, the destination port number is 1111, and the source port number is 2222.
  • the destination IP address carried by the TWAMP test packet of device A is 2.2.2.2, the source IP address is 1.1.1.1, the destination port number is 2222, and the source port number is 1111.
  • Device A sends a TWAMP test packet to device C. By testing the round-trip IP performance between device A and device C, parameters such as network bidirectional packet loss, delay, and jitter are counted.
  • Device B is the intermediate device in the TWAMP test packet transmission path. Device B is configured as a reflector device because of human error. That is, the destination IP address configured in device B is 1.1.1.1, and the source IP address is 2.2.2.2. The destination port number is 1111 and the source port number is 2222.
  • FIG. 3 is a schematic diagram of a format of a possible TWAMP test packet sent by a sender device.
  • the 13th to 16th bytes are the source.
  • IP address (SIP) a total of 32 bits
  • the 17th-20th byte is the destination IP address (DIP), a total of 32 bits
  • the 21st-22th byte is the source port number (Source Port), a total of 16 bits
  • the 23-24 bytes are the destination port numbers, which occupy a total of 16 bits.
  • the 41st-42th byte is an Error Estimate byte, which is 16 bits in total, and the error evaluation byte includes: S bit (1 bit), Z bit (1 bit), Scale (6 bit), multiplier (8bit).
  • the S bit indicates whether the clock generating the time stamp is synchronized to the Universal Time Coordinated (UTC) flag.
  • the S bit is 1 to indicate that the clock is synchronized with the external UTC, and S is 0 to indicate that the clock is not synchronized with the external UTC.
  • the Z bit is a reserved bit in the error evaluation. It is defined in the IETF RFC5357 standard. When the transmitting device sends a TWAMP test message, the Z bit must be set to 0.
  • Scale is the power (scale) in the error evaluation, 2 ⁇ scale, used to evaluate the error use; Multiplier is the multiplier factor in the error evaluation, also used to evaluate the error use. Starting from the 43rd byte, it is a padding (Padding), using a pseudo-random code or an all-zero code.
  • the transmitting device when it is required to detect the round-trip IP performance between the transmitting device (such as device A in FIG. 1) and the reflective device (such as device C in FIG. 1) in the network, device A is used as the transmitting end.
  • the device constructs and sends a TWAMP test message, which is forwarded to the reflective device C via the intermediate device B.
  • the Z bit value is 0.
  • the sender device generates and sends a TWAMP test packet.
  • the TWAMP test message includes an identifier indicating that the returned TWAMP test message is a reflected message. Specifically, the identifier may be a Z bit having a value of one.
  • the TWAMP test packet is a User Datagram Protocol UDP packet.
  • the next hop device receives the TWAMP test packet.
  • the device A When the device A sends the TWAMP test packet to the device C, the device A forwards the TWAMP test packet to the next hop device, that is, the device B, and the device B receives the TWAMP test packet.
  • the next hop device sets the destination IP address, the source IP address, the destination port number, and the source port number of the TWAMP test packet with the source IP address, the destination IP address, and the source port number of the next hop device.
  • the destination port number is matched. If the match is successful, 404 is performed. If the match fails, the destination IP address is forwarded to the next hop device, and 402-403 is repeatedly executed.
  • the device B When the TWAMP test packet sent by the device A arrives at the device B, the device B receives the TWAMP test packet, and the device B firstly uses the destination IP address, the source IP address, and the destination port number carried in the TWAMP test packet.
  • the source port number is matched with the source IP address, destination IP address, source port number, and destination port number configured by device B. If the destination IP address, source IP address, destination port number, and source port number carried in the TWAMP test packet are the same as the source IP address, destination IP address, source port number, and destination port number configured on device B, the match is determined. If the device B determines that the received message is a TWAMP test message, the process continues to 404.
  • the match is considered to be unsuccessful. , continue to execute 402-403. Therefore, if the match is successful, device B returns the TWAMP test message to the sender device A of the test message. If the match fails, the forwarding to the destination IP address continues to the next hop device.
  • the destination IP address, the source IP address, the destination port number, and the source port number carried in the TWAMP test packet and the source IP address, the destination IP address, the source port number, and the destination port number configured by the device B.
  • device B continues to test the TWAMP
  • the destination IP address of the packet forwards the TWAMP test packet.
  • device C sets the destination IP address, source IP address, destination port number, and source port number carried in the TWAMP test packet with the source IP address and destination IP address configured on device C.
  • the source port number and the destination port number are matched to determine the destination IP address, source IP address, destination port number, and source port number carried in the TWAMP test packet, and the source IP address, destination IP address, and source configured on device C. If the port number and the destination port number are the same, the connection is determined to be successful.
  • the device C determines that the received message is a TWAMP test message, and determines that the device C is a reflective end device corresponding to the transmitting device A.
  • the reflector device determines whether the Z bit in the received TWAMP test packet is 0. If it is 0, it executes 405. If it is not 0, discards the TWAMP test packet.
  • the Z bit is 0, and is forwarded to the reflective device C through the intermediate device B.
  • the device C determines that the Z bit in the TWAMP test packet is 0, and determines that the TWAMP is not a reflection message, and includes a TWAMP test indicating the loopback in the TWAMP test message.
  • the message is the identifier of the reflected message. For example, the value of the Z bit in the TWAMP test message is set to 1, and the device C sends back the TWAMP test message including the identifier to the sending device A.
  • the TWAMP test packet sent back by the device C passes through the device B again when it is sent back to the sender device A.
  • the port number is the same. Therefore, the destination IP address, source IP address, destination port number, and source port number carried in the TWAMP test packet sent by device C are the source IP address, destination IP address, and source port number configured on device B.
  • the destination port number is successfully matched.
  • Device B determines that a TWAMP test message is received, and device B determines whether the Z bit of the received TWAMP message is zero.
  • the reflection end device C Since the reflection end device C has set the value of the Z bit of the returned TWAMP test message to 1, therefore, the device B determines that the value of the Z bit of the received TWAMP message is not 0, and determines the received TWAMP test report.
  • the text is a reflection message.
  • device B The TWAMP test packet is discarded without reflection, thereby effectively avoiding the formation of a packet loop and reducing the risk of network storms.
  • the reflective end device sends back the TWAMP test packet to the sending end device, where the returned TWAMP test packet includes an identifier indicating that the returned TWAMP test packet is a reflected packet.
  • the device C sets the value of the Z bit in the received TWAMP test message to 1, and sends the TWAMP test message back to the sending device A.
  • the returned TWAMP test message may further include a corresponding TWAMP protocol.
  • Other fields such as the number of packet sequences, timestamp, lifetime TTL, source IP address, destination IP address, source port number, destination port number, and so on.
  • the Z bit value of 1 can also be used to indicate that the TWAMP test message carrying the Z bit is not reflected, and the Z bit value is 0 to indicate that the TWAMP test message carrying the Z bit is reflected. The reflection of the end device.
  • the Z bit may also have multiple bits, and other values are used to indicate whether the TWAMP test message carrying the Z bit is reflected.
  • FIG. 5 is a schematic flowchart of a packet processing method according to another embodiment of the present application.
  • the application is applied to the scenario shown in FIG. 2 for example.
  • the method includes:
  • the sender device generates and sends a TWAMP test packet.
  • the format of the TWAMP test message is as shown in FIG. 6.
  • the format of the message shown in Figure 3 is basically the same. The only difference is that in the 43th byte belonging to the padding byte in the TWAMP test message, a sender/reflector device S/R bit is set. The S/R bit is set to 1 bit, and the other 7 bits are set to the reserved field Resv. The Resv field can be set to all 0s, or can be set to other values for identifying the TWAMP test report.
  • the specific message type of the text is described in the 43th byte belonging to the padding byte in the TWAMP test message.
  • the S/R bit may also have multiple bits, and other values are used to indicate whether the TWAMP test message carrying the S/R bit is reflected. Further optionally, the S/R bit may also be set at other locations of the padding byte.
  • the S/R bit is 0 to indicate that the TWAMP test message is not a reflection message, and the S/R bit is 1 to indicate that the TWAMP test message is a reflection message.
  • the S/R bit in the TWAMP test packet is set to 0, indicating that the TWAMP test packet is not a reflection packet.
  • the TWAMP test packet is sent back to the sender device A, and the TWAMP test packet sent back includes the TWAMP test packet indicating that the loopback is a reflection report.
  • the identifier may be an S/R bit having a value of one.
  • the TWAMP test packet is a User Datagram Protocol UDP packet.
  • the next hop device receives the TWAMP test packet.
  • the next hop device sets the destination IP address, the source IP address, the destination port number, and the source port number of the TWAMP test packet with the source IP address, the destination IP address, and the source port number of the next hop device.
  • the destination port number is matched. If the match is successful, perform 504. If the match fails, continue forwarding to the destination IP address to the next hop device and repeat 502-503.
  • the reflector device determines whether the S/R bit in the received TWAMP test packet is 0. If it is 0, it executes 505. If it is not 0, the TWAMP test packet is discarded.
  • the S/R bit is 0, and is forwarded to the reflective device C through the intermediate device B.
  • the device C determines that the S/R bit in the TWAMP test packet is 0, and determines that the TWAMP is not a reflection packet, and includes, in the TWAMP test packet, the indication that the loopback is sent.
  • the TWAMP test packet is an identifier of the reflected message, for example, the value of the S/R bit in the TWAMP test packet is set to 1,
  • the device C sends back a TWAMP test message including the identifier to the sender device A.
  • the TWAMP test packet sent back by the device C passes through the device B again when it is sent back to the sender device A.
  • the port number is the same. Therefore, the destination IP address, source IP address, destination port number, and source port number carried in the TWAMP test packet sent by device C are the source IP address, destination IP address, and source port number configured on device B.
  • the destination port number is successfully matched.
  • Device B determines that it is receiving a TWAMP test message.
  • Device B determines whether the S/R bit of the received TWAMP test message is zero.
  • the reflection end device C Since the reflection end device C has set the value of the S/R bit of the returned TWAMP test message to 1, the device B determines that the value of the Z bit of the received TWAMP message is not 0, and determines the received report.
  • the packet is a reflection packet. At this time, the device B discards the TWAMP test packet without performing reflection, thereby effectively avoiding the formation of a packet loop and reducing the risk of network storms.
  • the reflective end device sends back the TWAMP test packet to the sending end device, where the returned TWAMP test packet includes an identifier indicating that the returned TWAMP test packet is a reflected packet.
  • the test packet is not a reflection packet.
  • the device C sets the value of the S/R bit in the received TWAMP test packet to 1, and sends the TWAMP test packet to the sending device A.
  • the returned TWAMP test packet may also include a corresponding Other fields of the TWAMP protocol, such as the number of packet sequences, timestamps, time-to-live TTL, source IP address, destination IP address, source port number, destination port number, and so on.
  • the S/R bit value of 1 may be used to indicate that the TWAMP test packet carrying the S/R bit is not reflected, and the S/R bit value is 0 to represent the TWAMP carrying the S/R bit.
  • the test packet is reflected by the reflective device.
  • the transmitting end device may be the transmitting end device 600 as shown in FIG. 7A
  • the reflective end device may be the reflective end device 700 as shown in FIG. 7B.
  • the transmitting device 600 includes a processor 601 and a network interface 602 that communicates with the reflective device 700 via the network interface 602.
  • the processor 601 is configured to generate a TWAMP test packet.
  • the network interface 602 is configured to send a TWAMP test packet, and is further configured to receive a TWAMP test packet sent by the reflective device, where the returned TWAMP test packet includes an identifier indicating that the returned TWAMP packet is a reflected packet.
  • the processor 601 is further configured to set the Z bit in the TWAMP test message to 0, to indicate that the TWAMP test message is not a reflection message, and the returned TWAMP test message includes the indication of the loopback.
  • the TWAMP test packet is the identifier of the reflected message.
  • the identifier may be a Z bit having a value of one.
  • the processor 601 is further configured to set a Z bit in the TWAMP test packet to 1 to indicate that the TWAMP test packet is not a reflection packet; and the returned TWAMP test packet includes an indication.
  • the loopback TWAMP test packet is an identifier of the reflected packet.
  • the identifier may be a Z bit having a value of zero.
  • the Z bit may also have multiple bits, and other values are used to indicate whether the TWAMP test message carrying the Z bit is reflected.
  • the processor 601 is further configured to set a sender/reflector S/R bit in the TWAMP test packet to 0, to indicate that the TWAMP test packet is not a reflection packet;
  • the TWAMP test message includes an identifier indicating that the returned TWAMP test message is a reflected message.
  • the identifier may be an S/R bit having a value of one.
  • the processor 601 is further configured to set a sender/reflection S/R bit in the TWAMP test packet to 1 to indicate that the TWAMP test packet is not a reflection packet;
  • the TWAMP test message includes an identifier indicating that the returned TWAMP test message is a reflected message.
  • the identifier may be an S/R bit having a value of zero.
  • the S/R bit may also have multiple bits, and other values are used to indicate whether the TWAMP test message carrying the S/R bit is reflected.
  • the reflective end device 700 includes a processor 701 and a network interface 702 that communicates with the transmitting device 600 via a network interface 702.
  • the network interface 702 is configured to receive the TWAMP test packet sent by the sender device.
  • the processor 701 is configured to determine that the TWAMP test packet is not a reflection packet, and generate a loopback TWAMP test packet, where the returned TWAMP test packet includes the TWAMP test packet indicating that the loopback is a reflection packet. logo.
  • the network interface 702 is further configured to send the returned TWAMP test packet.
  • the processor 701 is further configured to determine that the Z bit in the TWAMP test packet sent by the sending end device is 0, and determine that the TWAMP is not a reflected message.
  • the processor 701 is further configured to set a value of the reserved Z bit in the returned TWAMP test message to 1 to indicate that the returned TWAMP test message is a reflected message.
  • the processor 701 is further configured to determine that a Z bit in the TWAMP test packet sent by the sending end device is 1, and determine that the TWAMP is not a reflection message.
  • the processor 701 is further configured to set a value of the reserved Z bit in the returned TWAMP test message to 0, to indicate that the returned TWAMP test message is a reflected message.
  • the Z bit may also have multiple bits, and other values are used to indicate whether the TWAMP test message carrying the Z bit is reflected.
  • the processor 701 is further configured to determine that the sender/reflector S/R bit is 0, and then determine that the TWAMP test packet is not a reflection message, and the processor 701 is further configured to: The S/R bit in the TWAMP test packet sent back is set to 1, indicating that the TWAMP test packet sent back is a reflected message.
  • the processor 701 is further configured to determine that the sender/reflector S/R bit is 1, and determine that the TWAMP test packet is not a reflection message; and the processor 701 is further configured to:
  • the S/R bit in the loopback TWAMP test message is set to 0, and is used to indicate the loopback.
  • the TWAMP test message is a reflection message.
  • the S/R bit may also have multiple bits, and other values are used to indicate whether the TWAMP test packet carrying the S/R bit is reflected.
  • the transmitting device 600 can include a processor 601, a network interface 602, a memory 603, and a bus 604.
  • Processor 601, network interface 602, and memory 603 communicate over bus 604.
  • the processor 601 communicates with the reflective end device 700 via the network interface 602.
  • the reflective end device may include a processor 701, a network interface 702, a memory 703, and a bus 704.
  • processor 701, network interface 702, and memory 703 communicate over bus 704.
  • the processor 701 communicates with the source device 600 via the network interface 702.
  • the processor 601 and the processor 701 may be one or more central processing units (CPUs).
  • CPUs central processing units
  • the CPU may be a single core CPU or a multi-core CPU.
  • the network interface 602 and the network interface 702 may be wired interfaces, such as a Fiber Distributed Data Interface (FDDI), and a Gigabit Ethernet (GE) interface.
  • FDDI Fiber Distributed Data Interface
  • GE Gigabit Ethernet
  • the memory 603 and the memory 703 may be, but not limited to, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM), a compact disk read only memory (CD-ROM), a hard disk, or the like. One or more.
  • RAM random access memory
  • ROM read only memory
  • EPROM erasable programmable read only memory
  • CD-ROM compact disk read only memory
  • hard disk or the like.
  • the memory 603 and the memory 703 are used to store program codes.
  • the memory 603 stores the program instruction code
  • the processor 601 is configured to execute the instruction code in the memory 603 to complete the method in Embodiment 1 or Embodiment 2.
  • the memory 703 stores program instruction codes
  • the processor 701 is configured to execute the instruction codes in the memory 703 to complete the methods in Embodiment 1 and Embodiment 2.
  • Example 4 Example 4:
  • FIG. 8A shows a schematic diagram of a message processing apparatus 800. Used to perform embodiment 1 and The packet processing method provided in the second embodiment.
  • the message processing device 800 is located on the side of the transmitting device 600.
  • the message processing apparatus 800 includes: a processing unit 801, a transmitting unit 802, and a receiving unit 803;
  • the processing unit 801 is configured to generate a TWAMP test message.
  • the sending unit 802 is configured to send the TWAMP message.
  • the receiving unit 803 is configured to receive a TWAMP test packet sent back by the reflective device, where the returned TWAMP test packet includes an identifier indicating that the TWAMP packet is a reflected packet.
  • Each of the above units may be a logical unit.
  • the CPU may read a functional component generated after the software code stored in the memory is run, or may be implemented by a hardware unit.
  • the processing unit 801 is further configured to set the Z bit in the TWAMP test message to 0, to indicate that the TWAMP test message is not a reflection message, and the returned TWAMP test message includes the indication of the loopback
  • the TWAMP test message is the identifier of the reflected message.
  • the identifier may be a Z bit having a value of one.
  • the processing unit 801 is further configured to set a Z bit in the TWAMP test packet to 1 to indicate that the TWAMP test packet is not a reflection packet; and the loopback TWAMP test packet includes The TWAMP test message indicating the loopback is an identifier of the reflected message.
  • the identifier may be a Z bit having a value of zero.
  • the Z bit may also have multiple bits, and other values are used to indicate whether the TWAMP test message carrying the Z bit is reflected.
  • the processing unit 801 is further configured to set a sender/reflection S/R bit in the TWAMP test packet to 0, to indicate that the TWAMP test packet is not a reflection packet;
  • the reflector device is configured to set the S/R bit in the loopback TWAMP test packet to 1 to indicate that the loopback TWAMP test packet is a reflection packet.
  • the processing unit 801 is further configured to set a sender/reflection S/R bit in the TWAMP test packet to 1 to indicate that the TWAMP test packet is not a reflection packet;
  • the reflective end device is configured to set the S/R bit in the loopback TWAMP test message A value of 0 indicates that the TWAMP test message sent back is a reflection message.
  • the S/R bit may also have multiple bits, and other values are used to indicate whether the TWAMP test message carrying the S/R bit is reflected.
  • the packet processing apparatus 800 provided in FIG. 8A can be integrated into the transmitting device 600 described in FIG. 7A and applied to the scenario shown in FIG. 2 to implement the function of the transmitting device.
  • processing unit 801 can be implemented with processor 601 of FIG. 7A, and one or more of transmitting unit 802 and receiving unit 803 can be implemented by the network interface of FIG. 7A.
  • transmitting unit 802 and receiving unit 803 can be implemented by the network interface of FIG. 7A.
  • FIG. 8B shows a schematic diagram of another message processing apparatus 900.
  • the message processing device 900 is located on the side of the transmitting device 700.
  • the message processing apparatus 900 includes: a receiving unit 901, a processing unit 902, and a transmitting unit 903.
  • the receiving unit 901 is configured to receive a TWAMP test message.
  • the processing unit 902 is configured to: determine that the TWAMP test packet is not a reflection packet, and generate a TWAMP test packet that is sent back, where the returned TWAMP test packet includes a TWAMP test packet indicating that the loopback is a reflection packet. logo.
  • the sending unit 903 is configured to send the returned TWAMP test packet.
  • Each of the above units may be a logical unit.
  • the CPU may read a functional component generated after the software code stored in the memory is run, or may be implemented by a hardware unit.
  • the processing unit 902 is further configured to determine that the Z bit in the TWAMP test packet is 0, and determine that the TWAMP is not a reflection message.
  • the processing unit 902 is further configured to set a value of the reserved Z bit in the returned TWAMP test message to 1 to indicate that the returned TWAMP test message is a reflected message.
  • the processing unit 902 is further configured to determine that the Z bit in the TWAMP test packet is 1, and determine that the TWAMP is not a reflection message.
  • the processing unit 902 is further configured to The value of the reserved Z bit in the returned TWAMP test message is set to 0, and is used to indicate that the returned TWAMP test message is a reflected message.
  • the Z bit may also have multiple bits, and other values are used to indicate whether the TWAMP test message carrying the Z bit is reflected.
  • the processing unit 902 is further configured to determine that the sender/reflection S/R bit is 0, and then determine that the TWAMP test packet is not a reflection message, and the processing unit 902 is further configured to: The S/R bit in the TWAMP test packet sent back is set to 1, indicating that the TWAMP test packet sent back is a reflected message.
  • the processing unit 902 is further configured to determine that the sender/reflector S/R bit is 1, and then determine that the TWAMP test packet is not a reflection message; and the processing unit 902 is further configured to: The S/R bit in the TWAMP test packet sent back is set to 0, and is used to indicate that the TWAMP test packet sent back is a reflected message.
  • the S/R bit may also have multiple bits, and other values are used to indicate whether the TWAMP test packet carrying the S/R bit is reflected.
  • the packet processing apparatus 900 provided in FIG. 8B can be integrated into the reflective end device 700 described in FIG. 6B and applied to the scenario shown in FIG. 2 to implement the function of the reflected device.
  • processing unit 902 can be implemented with processor 701 of FIG. 7B, and one or more of receiving unit 901 and transmitting unit 903 can be implemented by network interface 702 of FIG. 7B.
  • Other additional functions that can be implemented by the message processing apparatus 900 and the interaction process with the source device are described in the descriptions of Embodiment 1 and Embodiment 2, and details are not described herein again.
  • the packet processing apparatus provided in the present application is exemplified by the division of the above functional modules.
  • the functions may be assigned with different functional modules as needed, that is, the internal structure of the device is divided into different Functional modules to perform all or part of the functions described above.
  • the application provides a communication system, including a sender device and a reflector device.
  • the sending The end device and the reflective end device may be the transmitting end device and the reflective end device provided in Embodiment 3.
  • the transmitting end device may include the packet processing device on the transmitting end device side provided in Embodiment 4, and the reflective end device may include the packet processing device on the reflective end device side provided in Embodiment 4.
  • the transmitting device and the reflective device are configured to perform the methods described in Embodiment 1 and Embodiment 2.
  • the communication system may further include controlling the client device and the server, and after controlling the interaction control signaling message between the client device and the server to establish a control session, the control client device notifies the server to establish a statistical session by using a signaling message.
  • the signaling is mainly to negotiate the IP address and UDP port number of both ends of the statistics session. After the two sides negotiate successfully, the statistical session is established successfully.
  • the sending device sends a test packet, and the test packet carries the information such as the timestamp and the sequence number. After receiving the test packet, the device responds, sends a response test packet, and responds to the test packet. Carry information such as time stamp, response serial number, and so on.
  • the sending device calculates the IP performance statistics result and sends it to the controlling client device.
  • the statistics are uniformly maintained by the controlling client device and presented to the user.
  • the establishment of the control session between the control client and the server in the present embodiment, and the establishment of the statistical session between the sender device and the sender device are performed according to the prior art, and are not described herein again.
  • Computer readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another.
  • a storage medium may be any available media that can be accessed by a general purpose or special purpose computer.

Abstract

Embodiments of the present application disclose a packet processing method and device. The method comprises: receiving by a reflector a TWAMP (Two-Way Active Measurement Protocol) test packet transmitted by a sender; modifying a value of a Z bit in the returned TWAMP test packet or modifying a value of a newly added sender/reflector (S/R) bit in the TWAMP test packet to determine whether the returned TWAMP test packet is a reflected packet, thereby reducing the risk of forming a reflection loop of the returned TWAMP test packet between a mistakenly configured reflector and a correctly configured reflector, avoiding network storm.

Description

一种报文的处理方法和装置Message processing method and device
本申请要求于2015年12月31日提交中国专利局、申请号为201511029103.1、发明名称为“一种报文的处理方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to Chinese Patent Application No. 201511029103.1, entitled "Processing and Apparatus for Processing a Message", filed on December 31, 2015, the entire contents of which is incorporated herein by reference. In the application.
技术领域Technical field
本申请实施例涉及通信技术领域,尤其涉及一种报文处理方法和装置。The embodiments of the present invention relate to the field of communications technologies, and in particular, to a packet processing method and apparatus.
背景技术Background technique
双向主动测量协议(英文:Two-way Active Measurement Protocol,TWAMP)提供了一种测量网络中任意两台支持这项标准的设备之间的往返互联网协议(英文:Internet Protocol,IP)性能的方法,使用用户数据报协议(英文:User Datagram Protocol,UDP)数据包作为测量探帧,统计网络双向丢包、时延和抖动。TWAMP遵循IETF RFC5357标准,当用户启动统计会话后,从会话发送端构造和发出的TWAMP测试报文,经过业务转发通道,抵达会话反射端,会话反射端基于源IP地址、目的IP地址、源端口号、目的端口号匹配识别为指定会话的TWAMP测试报文,然后交换源IP地址、目的IP地址、源端口号、目的端口号,添加相应的协议内容,将报文生存时间TTL重置为255,再将修改后的TWAMP测试报文回送给会话发送端。如图1所示,为了测试节点A和节点C之间的往返IP性能,节点A作为会话发送端,节点C为正常配置的会话反射端,正常工作时,由节点A构造和发起TWAMP测试报文,经过节点C匹配识别,反射回送该TWAMP测试报文。某些情况下,由于用户的误操作,节点B的源IP地址、目的IP地址、源端口号、目的端口号可能配置错误,导致节点B被误配置为反射端,由节点C反射回送的报文到达节点B,节点B反射报文,在回送报文时,根据IETF RFC5357标准要求,又会将TTL重置为255。测试报文在节点B和节点C之间反射成环,引发网络风暴。 The Two-way Active Measurement Protocol (TWAMP) provides a means of measuring the performance of the Internet Protocol (IP) between any two devices supporting this standard in the network. The User Datagram Protocol (UDP) data packet is used as a measurement probe frame to measure network bidirectional packet loss, delay, and jitter. TWAMP follows the IETF RFC5357 standard. After the user initiates the statistics session, the TWAMP test packet constructed and sent from the session sender passes through the service forwarding channel and arrives at the session reflector. The session reflector is based on the source IP address, destination IP address, and source port. The destination port number matches the TWAMP test packet identified as the specified session, and then exchanges the source IP address, destination IP address, source port number, and destination port number, and adds the corresponding protocol content to reset the packet lifetime TTL to 255. Then, the modified TWAMP test packet is sent back to the session sender. As shown in Figure 1, in order to test the round-trip IP performance between Node A and Node C, Node A acts as the session sender, and Node C is the normally configured session reflector. When working normally, Node A constructs and initiates the TWAMP test report. After the node C matches the identification, the reflection returns the TWAMP test message. In some cases, the source IP address, the destination IP address, the source port number, and the destination port number of the node B may be misconfigured due to the user's misoperation. As a result, the node B is misconfigured as a reflector and the node C reflects the reported packet. The text arrives at the node B, and the node B reflects the message. When the message is sent back, the TTL is reset to 255 according to the IETF RFC5357 standard. The test packet is reflected into a ring between Node B and Node C, causing a network storm.
发明内容Summary of the invention
本申请提供了一种TWAMP测试报文处理方法和装置。用于减少业务数据在网络设备之间反射成环,引发网络风暴的问题。The application provides a TWAMP test message processing method and apparatus. It is used to reduce the problem that business data is reflected in the loop between network devices, causing network storms.
第一方面,提供了一种TWAMP报文的处理方法,该方法包括:In a first aspect, a method for processing a TWAMP message is provided, the method comprising:
反射端设备接收TWAMP测试报文;The reflective device receives the TWAMP test message;
反射端设备确定所述TWAMP测试报文不是反射报文,则向发送端设备回送该TWAMP测试报文,该回送的TWAMP测试报文中包括指示所述回送的TWAMP测试报文是反射报文的标识。And the TWAMP test packet is sent back to the sending device, where the TWAMP test packet includes the TWAMP test packet indicating that the loopback is a reflected packet. Logo.
所述方法还包括:所述反射端设备确定所述TWAMP测试报文是反射报文时,丢弃所述反射报文。The method further includes: when the reflector device determines that the TWAMP test packet is a reflection packet, discarding the reflected packet.
通过上述方案,反射端设备确定接收到的TWAMP测试报文不是反射报文,并在回送的TWAMP报文中增加所述回送的TWAMP测试报文是反射报文的标识,实现了当反射端设备在回送所述TWAMP测试报文后,如果在回送报文的转发通道中某个设备由于人为误操作等原因被误配置为反射端的情况下,可以通过上述标识,来区分接收到的TWAMP测试报文是否是反射报文,从而能够及时有效的避免TWAMP测试报文在正确配置的反射端设备和误配置的反射端设备之间形成报文环路,防止业务数据在网络中反复转发复制,引发网络风暴,提高网络的可靠性。The device of the present invention determines that the received TWAMP test packet is not a reflection packet, and adds the TWAMP test packet sent back to the TWAMP packet to be a reflection packet identifier. After the TWAMP test packet is sent back, if a device is misconfigured as a reflective terminal due to human error or the like in the forwarding channel of the loopback packet, the received TWAMP test packet can be distinguished by the above identifier. Whether the text is a reflection packet, so that the TWAMP test packet can be prevented from being formed into a packet loop between the correctly configured reflector device and the misconfigured reflector device in time, thereby preventing the service data from being repeatedly forwarded and replicated in the network. Network storms improve the reliability of the network.
可选的,所述确定所述TWAMP测试报文不是反射报文,包括:确定所述TWAMP测试报文中的Z比特为0,则确定所述TWAMP不是反射报文。Optionally, the determining that the TWAMP test message is not a reflection message comprises: determining that a Z bit in the TWAMP test message is 0, and determining that the TWAMP is not a reflection message.
可选的,所述标识为:值为1的Z比特。Optionally, the identifier is: a Z bit with a value of 1.
Z比特是TWAMP测试报文自身所携带的字段,是误差评估中的保留位,在IETF RFC5357标准中定义,发送端设备发送TWAMP测试报文时,Z比特必须设置为0,反射端设备接收所述TWAMP测试报文时,对于Z比特不进行校验,在回送的TWAM测试报文中也不会改变Z比特的值。通过本申请的方案,反射端设备接收所述TWAMP测试报文时,对Z比特的值进行校验,当Z比特 为0时,确定所述报文不是反射报文,则回送该TWAMP测试报文;当Z比特为1时,确定所述TWAMP测试报文是反射报文,则丢弃该TWAMP测试报文。从而能够及时有效的避免TWAMP测试报文在正确配置的反射端设备和误配置的反射端设备之间形成报文环路,防止业务数据在网络中反复转发复制,引发网络风暴,提高网络的可靠性。The Z bit is a field carried by the TWAMP test message itself and is a reserved bit in the error evaluation. It is defined in the IETF RFC5357 standard. When the transmitting device sends a TWAMP test message, the Z bit must be set to 0, and the reflective device receives the location. When the TWAMP test message is described, the Z bit is not checked, and the value of the Z bit is not changed in the returned TWAM test message. Through the solution of the present application, when the reflective end device receives the TWAMP test packet, the value of the Z bit is verified, when the Z bit is If the message is 0, the TWAMP test message is sent back. If the Z bit is 1, the TWAMP test message is discarded. Therefore, the TWAMP test packet can be prevented from forming a packet loop between the properly configured reflector device and the misconfigured reflector device, preventing service data from being repeatedly forwarded and replicated in the network, causing network storms and improving network reliability. Sex.
可选的,也可以用Z比特值为1来表示携带该Z比特的TWAMP测试报文没有经过反射,而用Z比特值为0来表示携带该Z比特的TWAMP测试报文经过了反射端设备的反射。Optionally, the Z bit value of 1 may be used to indicate that the TWAMP test packet carrying the Z bit is not reflected, and the Z bit value is 0 to indicate that the TWAMP test packet carrying the Z bit passes through the reflective device. Reflection.
可选地,Z比特也可以有多位,用其他的值来表示携带该Z比特的TWAMP测试报文是否经过反射。Optionally, the Z bit may also have multiple bits, and other values are used to indicate whether the TWAMP test message carrying the Z bit is reflected.
可选的,所述确定所述TWAMP测试报文不是反射报文,包括:所述反射端设备确定所述TWAMP测试报文中的发送端/反射端S/R比特为0,则确定所述TWAMP测试报文不是反射报文。Optionally, the determining that the TWAMP test packet is not a reflection packet includes: determining, by the reflector device, that the sender/reflection S/R bit in the TWAMP test packet is 0, determining the The TWAMP test message is not a reflection message.
可选的,所述标识为:值为1的S/R比特Optionally, the identifier is: S/R bit with a value of 1.
发送端设备在生成TWAMP测试报文时,在TWAMP测试报文中增加一个发送端/反射端S/R比特。通过本申请的方案,反射端设备接收所述TWAMP测试报文时,对S/R比特的值进行校验,当S/R比特为0时,确定所述报文不是反射报文,则回送该TWAMP测试报文;当S/R比特为1时,确定所述TWAMP测试报文是反射报文,则丢弃该TWAMP测试报文。从而能够及时有效的避免TWAMP测试报文在正确配置的反射端设备和误配置的反射端设备之间形成报文环路,防止业务数据在网络中反复转发复制,引发网络风暴,提高网络的可靠性。When generating the TWAMP test packet, the sender device adds a sender/reflector S/R bit to the TWAMP test packet. With the solution of the present application, the reflective end device checks the value of the S/R bit when receiving the TWAMP test packet, and determines that the packet is not a reflected packet when the S/R bit is 0, and then sends back The TWAMP test message; when the S/R bit is 1, determining that the TWAMP test message is a reflection message, discarding the TWAMP test message. Therefore, the TWAMP test packet can be prevented from forming a packet loop between the properly configured reflector device and the misconfigured reflector device, preventing service data from being repeatedly forwarded and replicated in the network, causing network storms and improving network reliability. Sex.
可选的,也可以用S/R比特值为1来表示携带该S/R比特的TWAMP测试报文没有经过反射,而用S/R比特值为0来表示携带该S/R比特的TWAMP测试报文经过了反射端设备的反射。Optionally, the S/R bit value of 1 may be used to indicate that the TWAMP test packet carrying the S/R bit is not reflected, and the S/R bit value is 0 to represent the TWAMP carrying the S/R bit. The test packet is reflected by the reflective device.
可选地,S/R比特也可以有多位,用其他的值来表示携带该S/R比特的 TWAMP测试报文是否经过反射。Optionally, the S/R bit may also have multiple bits, and other values are used to indicate that the S/R bit is carried. Whether the TWAMP test message is reflected.
第二方面,本申请提供了一种TWAMP报文处理方法,该方法包括:发送端设备向反射端设备发送TWAMP测试报文;In a second aspect, the present application provides a TWAMP packet processing method, where the method includes: the sending end device sends a TWAMP test packet to the reflective end device;
发送端设备接收所述反射端设备回送的TWAMP测试报文,该回送的TWAMP测试报文中包括指示所述回送的TWAMP测试报文是反射报文的标识。The sending end device receives the TWAMP test packet sent back by the reflective end device, and the TWAMP test packet sent back includes the identifier indicating that the returned TWAMP test packet is a reflected packet.
可选的,所述发送端设备发送的所述TWAMP测试报文中的Z比特的值为0,表示所述TWAMP测试报文不是反射报文。Optionally, the value of the Z bit in the TWAMP test packet sent by the sending end device is 0, indicating that the TWAMP test packet is not a reflection packet.
可选的,所述回送的TWAMP测试报文中的标识为:值为1的Z比特。Optionally, the identifier in the returned TWAMP test packet is: a Z bit with a value of 1.
可选的,所述发送端设备发送的所述TWAMP测试报文中的Z比特的值为1,表示所述TWAMP测试报文不是反射报文。Optionally, the value of the Z bit in the TWAMP test packet sent by the sending end device is 1, indicating that the TWAMP test packet is not a reflection packet.
可选的,所述回送的TWAMP测试报文中的标识为:值为0的Z比特。Optionally, the identifier in the returned TWAMP test packet is: a Z bit with a value of 0.
可选地,Z比特也可以有多位,用其他的值来表示携带该Z比特的TWAMP测试报文是否经过反射。Optionally, the Z bit may also have multiple bits, and other values are used to indicate whether the TWAMP test message carrying the Z bit is reflected.
可选的,所述发送端设备发送的所述TWAMP测试报文中的S/R比特的值为0,表示所述TWAMP测试报文不是反射报文。Optionally, the value of the S/R bit in the TWAMP test packet sent by the sending end device is 0, indicating that the TWAMP test packet is not a reflection packet.
可选的,所述回送的TWAMP测试报文中的标识为:值为1的S/R比特。Optionally, the identifier in the returned TWAMP test packet is: S/R bit with a value of 1.
可选的,所述发送端设备发送的所述TWAMP测试报文中的S/R比特的值为1,表示所述TWAMP测试报文不是反射报文。Optionally, the value of the S/R bit in the TWAMP test packet sent by the sending end device is 1, indicating that the TWAMP test packet is not a reflection packet.
可选的,所述回送的TWAMP测试报文中的标识为:值为0的S/R比特。Optionally, the identifier in the returned TWAMP test packet is: S/R bit with a value of 0.
可选地,所述S/R比特也可以有多位,用其他的值来表示携带该S/R比特的TWAMP测试报文是否经过反射。Optionally, the S/R bit may also have multiple bits, and other values are used to indicate whether the TWAMP test packet carrying the S/R bit is reflected.
第二方面的技术方案与第一方面的技术方案具有相同的技术效果。The technical solution of the second aspect has the same technical effect as the technical solution of the first aspect.
第三方面,提供了一种报文处理装置,用于完成第一方面的方法。所述装置位于反射端设备侧,所述装置包括:接收单元、处理单元和发送单元;其中,In a third aspect, a message processing apparatus is provided for performing the method of the first aspect. The device is located on the side of the reflective device, and the device includes: a receiving unit, a processing unit, and a sending unit;
所述接收单元,用于接收TWAMP测试报文;The receiving unit is configured to receive a TWAMP test packet;
所述处理单元,用于:确定所述TWAMP测试报文不是反射报文,则生成 回送的TWAMP测试报文,所述回送的TWAMP测试报文中包括指示所述回送的TWAMP测试报文是反射报文的标识;The processing unit is configured to: determine that the TWAMP test packet is not a reflection packet, and generate The returned TWAMP test message, where the returned TWAMP test message includes an identifier indicating that the returned TWAMP test message is a reflected message;
所述发送单元,用于发送所述回送的TWAMP测试报文。The sending unit is configured to send the returned TWAMP test packet.
所述处理单元,还用于确定所述TWAMP测试报文是反射报文时,丢弃所述TWAMP测试报文。The processing unit is further configured to: when the TWAMP test packet is a reflection packet, discard the TWAMP test packet.
可选的,所述处理单元,用于确定所述TWAMP测试报文中的Z比特为0,则确定所述TWAMP不是反射报文。Optionally, the processing unit is configured to determine that the Z bit in the TWAMP test packet is 0, and determine that the TWAMP is not a reflection message.
可选的,所述回送的TWAMP测试报文中的标识为:值为1的Z比特。Optionally, the identifier in the returned TWAMP test packet is: a Z bit with a value of 1.
可选的,所述处理单元,用于确定所述TWAMP测试报文中的Z比特为1,则确定所述TWAMP不是反射报文。Optionally, the processing unit is configured to determine that the Z bit in the TWAMP test packet is 1, and determine that the TWAMP is not a reflection message.
可选的,所述回送的TWAMP测试报文中的标识为:值为0的Z比特,。Optionally, the identifier in the returned TWAMP test packet is: a Z bit with a value of 0.
可选地,Z比特也可以有多位,所述处理单元,用于用其他的值来确定携带该Z比特的TWAMP测试报文是否经过反射。Optionally, the Z bit may also have multiple bits, and the processing unit is configured to use other values to determine whether the TWAMP test message carrying the Z bit is reflected.
可选的,所述处理单元,用于确定所述TWAMP测试报文中的S/R比特为0,则确定所述TWAMP不是反射报文。Optionally, the processing unit is configured to determine that the S/R bit in the TWAMP test packet is 0, and determine that the TWAMP is not a reflection message.
可选的,所述回送的TWAMP测试报文中的标识为:值为1的S/R比特。Optionally, the identifier in the returned TWAMP test packet is: S/R bit with a value of 1.
可选的,所述处理单元,用于确定所述TWAMP测试报文中的S/R比特为1,则确定所述TWAMP不是反射报文。Optionally, the processing unit is configured to determine that the S/R bit in the TWAMP test packet is 1, and determine that the TWAMP is not a reflection message.
可选的,所述回送的TWAMP测试报文中的标识为:值为0的S/R比特。Optionally, the identifier in the returned TWAMP test packet is: S/R bit with a value of 0.
可选地,S/R比特也可以有多位,所述处理单元,用于用其他的值来确定携带该S/R比特的TWAMP测试报文是否经过反射。Optionally, the S/R bit may also have multiple bits, and the processing unit is configured to use other values to determine whether the TWAMP test message carrying the S/R bit is reflected.
第三方面的技术方案与第一方面和第二方面的技术方案具有相同的技术效果。The technical solution of the third aspect has the same technical effects as the technical solutions of the first aspect and the second aspect.
第四方面,提供了一种报文处理装置,用于完成第二方面的方法。所述装置位于发送端设备侧,包括:处理单元、发送单元和接收单元;其中,In a fourth aspect, a message processing apparatus is provided for performing the method of the second aspect. The device is located at the transmitting device side, and includes: a processing unit, a sending unit, and a receiving unit;
所述处理单元,用于生成TWAMP测试报文; The processing unit is configured to generate a TWAMP test message;
所述发送单元,用于发送所述TWAMP测试报文;The sending unit is configured to send the TWAMP test packet;
所述接收单元,用于接收反射端设备回送的TWAMP测试报文,所述回送的TWAMP测试报文中包括指示所述回送的TWAMP测试报文是反射报文的标识。The receiving unit is configured to receive a TWAMP test packet sent back by the reflective device, where the returned TWAMP test packet includes an identifier indicating that the returned TWAMP test packet is a reflected packet.
可选的,所述处理单元,用于将所述发送的TWAMP测试报文中的Z比特设置为0,表示所述TWAMP测试报文不是反射报文。Optionally, the processing unit is configured to set a Z bit in the sent TWAMP test message to 0, indicating that the TWAMP test message is not a reflection message.
可选的,所述回送的TWAMP测试报文中的标识为:值为1的Z比特。Optionally, the identifier in the returned TWAMP test packet is: a Z bit with a value of 1.
可选的,所述处理单元,用于将所述发送的TWAMP测试报文中的Z比特的值为1,表示所述TWAMP测试报文不是反射报文。Optionally, the processing unit is configured to: the value of the Z bit in the sent TWAMP test message is 1, indicating that the TWAMP test message is not a reflection message.
可选的,所述回送的TWAMP测试报文中的标识为:值为0的Z比特。Optionally, the identifier in the returned TWAMP test packet is: a Z bit with a value of 0.
可选地,Z比特也可以有多位,用其他的值来表示携带该Z比特的TWAMP测试报文是否经过反射。Optionally, the Z bit may also have multiple bits, and other values are used to indicate whether the TWAMP test message carrying the Z bit is reflected.
可选的,所述处理单元,用于将所述发送的TWAMP测试报文中的S/R比特的值为0,表示所述TWAMP测试报文不是反射报文。Optionally, the processing unit is configured to: set a value of S/R bit in the sent TWAMP test packet to 0, indicating that the TWAMP test packet is not a reflection message.
可选的,所述回送的TWAMP测试报文中的标识为:值为1的S/R比特。Optionally, the identifier in the returned TWAMP test packet is: S/R bit with a value of 1.
可选的,所述处理单元,用于将所述发送的TWAMP测试报文中的S/R比特的值为1,表示所述TWAMP测试报文不是反射报文。Optionally, the processing unit is configured to set a value of S/R bit in the sent TWAMP test packet to 1, indicating that the TWAMP test packet is not a reflection packet.
可选的,所述回送的TWAMP测试报文中的标识为:值为0的S/R比特。Optionally, the identifier in the returned TWAMP test packet is: S/R bit with a value of 0.
可选地,S/R比特也可以有多位,用其他的值来表示携带该S/R比特的TWAMP测试报文是否经过反射。Optionally, the S/R bit may also have multiple bits, and other values are used to indicate whether the TWAMP test message carrying the S/R bit is reflected.
第四方面的技术方案具有第一至第三方面的技术方案具有相同的技术效果。The technical solutions of the fourth aspect have the same technical effects as the technical solutions of the first to third aspects.
第五方面,提供了一种通信系统,包括发送端设备和反射端设备,其特征在于:所述反射端设备包括第三方面所述的装置,所述发送端设备包括第四方面中所述的装置。该系统用于完成第一方面所述的方法和第二方面所述的方法。In a fifth aspect, a communication system is provided, including a transmitting end device and a reflective end device, wherein the reflective end device includes the apparatus according to the third aspect, and the transmitting end device includes the fourth aspect s installation. The system is for performing the method of the first aspect and the method of the second aspect.
第六方面,本申请提供了一种发送端设备,包括存储器和处理器,其中, 所述存储器用于存储程序指令代码,所述处理器用于执行存储器中的指令代码,完成第一方面所述的方法。所述发送端设备包括第三方面所述的装置。In a sixth aspect, the application provides a sender device, including a memory and a processor, where The memory is for storing program instruction code, and the processor is configured to execute the instruction code in the memory to complete the method of the first aspect. The transmitting device includes the device described in the third aspect.
第七方面,本申请提供了一种反射端设备,包括存储器和处理器,其中,所述存储器用于存储程序指令代码,所述处理器用于执行存储器中的指令代码,完成第二方面所述的方法。所述反射端设备包括第四方面所述的装置。In a seventh aspect, the present application provides a reflective device, including a memory and a processor, wherein the memory is configured to store program instruction code, and the processor is configured to execute an instruction code in the memory, completing the second aspect. Methods. The reflective end device includes the device of the fourth aspect.
第八方面,本申请提供了一种计算机可读存储介质,用于存储为执行上述第一方面和第二方面功能所用的计算机软件指令,其包含用于执行第一方面和第二方面方法所设计的程序。In an eighth aspect, the present application provides a computer readable storage medium for storing computer software instructions for performing the functions of the first aspect and the second aspect, comprising the method for performing the first aspect and the second aspect Designed program.
附图说明DRAWINGS
为了更清楚地说明本申请实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings used in the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present application. Those skilled in the art can also obtain other drawings based on these drawings without paying any creative work.
图1为现有技术中TWAMP报文反射成环示意图FIG. 1 is a schematic diagram of reflection of a TWAMP message into a ring in the prior art.
图2为本申请提供的报文处理方法所涉及的一种应用场景示意图;2 is a schematic diagram of an application scenario involved in a packet processing method provided by the present application;
图3为本申请一个实施例提供的一种报文处理方法的流程示意图;FIG. 3 is a schematic flowchart of a packet processing method according to an embodiment of the present disclosure;
图4为本申请一个实施例中发送端设备发送的一种可能的TWAMP测试报文的格式示意图;4 is a schematic diagram of a format of a possible TWAMP test packet sent by a sender device according to an embodiment of the present application;
图5为本申请另一实施例提供的一种报文处理方法的流程示意图;FIG. 5 is a schematic flowchart of a packet processing method according to another embodiment of the present disclosure;
图6为本申请另一实施例中发送端设备发送的一种可能的TWAMP测试报文的格式示意图;6 is a schematic diagram of a format of a possible TWAMP test packet sent by a sender device according to another embodiment of the present application;
图7A为本申请实施例提供的一种报文处理方法的执行主体示意图;FIG. 7A is a schematic diagram of an execution body of a packet processing method according to an embodiment of the present disclosure;
图7B为本申请实施例提供的一种报文处理方法的另一执行主体示意图;FIG. 7B is a schematic diagram of another execution body of a packet processing method according to an embodiment of the present disclosure;
图8A为本申请实施例提供的一种报文处理装置的示意图;FIG. 8 is a schematic diagram of a message processing apparatus according to an embodiment of the present disclosure;
图8B为本申请实施例提供的另一种报文处理装置的示意图。 FIG. 8B is a schematic diagram of another packet processing apparatus according to an embodiment of the present application.
具体实施方式detailed description
本申请实施例描述的应用场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域技术人员可知,随着网络架构的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。The application scenarios described in the embodiments of the present application are for the purpose of more clearly explaining the technical solutions of the embodiments of the present application, and do not constitute a limitation of the technical solutions provided by the embodiments of the present application. Those skilled in the art may understand that with the evolution of the network architecture and The technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.
本申请所涉及发送端设备可以是路由器或分组传送网设备或交换机,本申请所涉及反射端设备可以是路由器或分组传送网设备或交换机。The sender device involved in the present application may be a router or a packet transport network device or a switch. The reflector device involved in the present application may be a router or a packet transport network device or a switch.
实施例1Example 1
图2为本申请一个实施例提供的一种报文处理方法所涉及的一种应用场景示意图,如图2所示,设备A为TWAMP测试报文发送端设备,设备C为TWAMP测试报文反射端设备,设备A和设备C之间有一个或多个中间设备,比如有一个中间设备B。其中,设备A中配置的目的IP地址是1.1.1.1,源IP地址是2.2.2.2,目的端口号是1111,源端口号是2222。设备C中配置的目的IP地址是2.2.2.2,源IP地址是1.1.1.1,目的端口号是2222,源端口号是1111。因此,从设备A发往设备C的TWAMP测试报文所携带的目的IP地址是1.1.1.1,源IP地址是2.2.2.2,目的端口号是1111,源端口号是2222;从设备C反射回设备A的TWAMP测试报文所携带的目的IP地址是2.2.2.2,源IP地址是1.1.1.1,目的端口号是2222,源端口号是1111。设备A发送TWAMP测试报文给设备C,通过测试设备A和设备C之间的往返IP性能,统计网络双向丢包、时延和抖动等参数。设备B为TWAMP测试报文传送路径中的中间设备,由于人为误操作,设备B被配置为反射端设备,即设备B中配置的目的IP地址是1.1.1.1,源IP地址是2.2.2.2,目的端口号是1111,源端口号是2222。FIG. 2 is a schematic diagram of an application scenario involved in a packet processing method according to an embodiment of the present disclosure. As shown in FIG. 2, device A is a TWAMP test packet sending device, and device C is a TWAMP test packet reflection. End device, device A and device C have one or more intermediate devices, such as an intermediate device B. The destination IP address configured in device A is 1.1.1.1, the source IP address is 2.2.2.2, the destination port number is 1111, and the source port number is 2222. The destination IP address configured in device C is 2.2.2.2, the source IP address is 1.1.1.1, the destination port number is 2222, and the source port number is 1111. Therefore, the destination IP address carried by the TWAMP test packet sent from device A to device C is 1.1.1.1, the source IP address is 2.2.2.2, the destination port number is 1111, and the source port number is 2222. The destination IP address carried by the TWAMP test packet of device A is 2.2.2.2, the source IP address is 1.1.1.1, the destination port number is 2222, and the source port number is 1111. Device A sends a TWAMP test packet to device C. By testing the round-trip IP performance between device A and device C, parameters such as network bidirectional packet loss, delay, and jitter are counted. Device B is the intermediate device in the TWAMP test packet transmission path. Device B is configured as a reflector device because of human error. That is, the destination IP address configured in device B is 1.1.1.1, and the source IP address is 2.2.2.2. The destination port number is 1111 and the source port number is 2222.
图3为发送端设备发送的一种可能的TWAMP测试报文的格式示意图。如图3所示:在发送端设备发送的TWAMP测试报文中,第13-16字节为源 IP地址(SIP),共占32比特;第17-20字节为目的IP地址(DIP),共占32比特;第21-22字节为源端口号(Source Port),共占16比特;第23-24字节为目的端口号(Destination Port),共占16比特。第41-42字节为误差评估(Error Estimate)字节,所述误差评估共占16bit,所述误差评估字节包括:S比特(1bit)、Z比特(1bit)、Scale(6bit)、multiplier(8bit)。其中S比特表示产生时戳的时钟是否同步到世界标准时间(英文:Universal Time Coordinated,UTC)标识,S比特为1表示时钟与外部的UTC同步,S为0表示时钟与外部的UTC未同步。Z比特是误差评估中的保留位,在IETF RFC5357标准中定义,发送端设备发送TWAMP测试报文时,Z比特必须设置为0,反射端设备接收所述TWAMP测试报文时,对于Z比特不进行校验,发送端设备接收反射端设备回送的TWAMP测试报文时,也不对Z比特进行校验。Scale是误差评估中的幂(标尺),2^scale,用于评估误差使用;Multiplier是误差评估中的乘数因子,同样用于评估误差使用。从第43字节开始,是填充字节(Padding),采用伪随机码或者全0码。FIG. 3 is a schematic diagram of a format of a possible TWAMP test packet sent by a sender device. As shown in Figure 3, in the TWAMP test packet sent by the sender device, the 13th to 16th bytes are the source. IP address (SIP), a total of 32 bits; the 17th-20th byte is the destination IP address (DIP), a total of 32 bits; the 21st-22th byte is the source port number (Source Port), a total of 16 bits; The 23-24 bytes are the destination port numbers, which occupy a total of 16 bits. The 41st-42th byte is an Error Estimate byte, which is 16 bits in total, and the error evaluation byte includes: S bit (1 bit), Z bit (1 bit), Scale (6 bit), multiplier (8bit). The S bit indicates whether the clock generating the time stamp is synchronized to the Universal Time Coordinated (UTC) flag. The S bit is 1 to indicate that the clock is synchronized with the external UTC, and S is 0 to indicate that the clock is not synchronized with the external UTC. The Z bit is a reserved bit in the error evaluation. It is defined in the IETF RFC5357 standard. When the transmitting device sends a TWAMP test message, the Z bit must be set to 0. When the reflective device receives the TWAMP test message, it does not for the Z bit. When the check is performed, the transmitting device does not check the Z bit when receiving the TWAMP test packet sent back by the reflective device. Scale is the power (scale) in the error evaluation, 2^scale, used to evaluate the error use; Multiplier is the multiplier factor in the error evaluation, also used to evaluate the error use. Starting from the 43rd byte, it is a padding (Padding), using a pseudo-random code or an all-zero code.
在本申请实施例中,当需要检测网络中发送端设备(比如图1中的设备A)和反射端设备(比如图1的设备C)之间的往返IP性能时,由设备A作为发送端设备,构造并发送一个TWAMP测试报文,经中间设备B转发到反射端设备C。发送端设备发送的TWAMP测试报文中,Z比特值为0。下面结合图4对本申请实施例提供的报文处理方法进行详细说明。本申请以该方法应用于图2所示的场景来进行举例说明。所述方法包括:In the embodiment of the present application, when it is required to detect the round-trip IP performance between the transmitting device (such as device A in FIG. 1) and the reflective device (such as device C in FIG. 1) in the network, device A is used as the transmitting end. The device constructs and sends a TWAMP test message, which is forwarded to the reflective device C via the intermediate device B. In the TWAMP test packet sent by the sender device, the Z bit value is 0. The packet processing method provided by the embodiment of the present application is described in detail below with reference to FIG. This application is exemplified by applying the method to the scenario shown in FIG. 2. The method includes:
401:发送端设备生成并发送TWAMP测试报文。401: The sender device generates and sends a TWAMP test packet.
设备A作为发送端设备,生成并发送TWAMP测试报文,该TWAMP测试报文经中间设备B被转发到反射端设备C。当设备A作为发送端设备发送所述TWAMP测试报文时,将所述TWAMP测试报文中的Z比特设置为0,表示所述TWAMP测试报文不是反射报文。反射端设备C收到所述TWAMP测试报文时,回送所述TWAMP测试报文给所述发送端设备A,该回送的 TWAMP测试报文中包括指示所述回送的TWAMP测试报文是反射报文的标识。具体地,所述标识可以是值为1的Z比特。所述TWAMP测试报文是用户数据报协议UDP报文。Device A acts as the sender device, generates and sends a TWAMP test message, and the TWAMP test message is forwarded to the reflective device C via the intermediate device B. When the device A sends the TWAMP test packet as the sender device, the Z bit in the TWAMP test packet is set to 0, indicating that the TWAMP test packet is not a reflection packet. When the transmitting device C receives the TWAMP test packet, it sends back the TWAMP test packet to the sending device A, and the returned device The TWAMP test message includes an identifier indicating that the returned TWAMP test message is a reflected message. Specifically, the identifier may be a Z bit having a value of one. The TWAMP test packet is a User Datagram Protocol UDP packet.
402:下一跳设备接收所述TWAMP测试报文。402: The next hop device receives the TWAMP test packet.
在设备A向设备C发送所述TWAMP测试报文时,设备A经过路由查询,将该TWAMP测试报文转发到下一跳设备,即设备B,设备B接收到所述TWAMP测试报文。When the device A sends the TWAMP test packet to the device C, the device A forwards the TWAMP test packet to the next hop device, that is, the device B, and the device B receives the TWAMP test packet.
403:下一跳设备将所述TWAMP测试报文的目的IP地址、源IP地址、目的端口号以及源端口号与该下一跳设备自身配置的源IP地址、目的IP地址、源端口号以及目的端口号分别进行匹配,如果匹配成功,则执行404,如果匹配失败,则继续向目的IP地址转发至下一跳设备,重复执行402-403。403: The next hop device sets the destination IP address, the source IP address, the destination port number, and the source port number of the TWAMP test packet with the source IP address, the destination IP address, and the source port number of the next hop device. The destination port number is matched. If the match is successful, 404 is performed. If the match fails, the destination IP address is forwarded to the next hop device, and 402-403 is repeatedly executed.
设备A发送的所述TWAMP测试报文到达设备B时,由设备B接收所述TWAMP测试报文,设备B首先对所述TWAMP测试报文所携带的目的IP地址、源IP地址、目的端口号以及源端口号与设备B自身配置的源IP地址、目的IP地址、源端口号以及目的端口号分别进行匹配。如果TWAMP测试报文所携带的目的IP地址、源IP地址、目的端口号以及源端口号,分别与设备B配置的源IP地址、目的IP地址、源端口号以及目的端口号一致,则确定匹配成功,设备B确定该收到的报文是TWAMP测试报文,继续执行404。如果TWAMP测试报文所携带的目的IP地址、源IP地址、目的端口号以及源端口号,与设备B配置的源IP地址、目的IP地址、源端口号以及目的端口号不一致,则认为匹配失败,继续执行402-403。因此,如果匹配成功,则设备B将TWAMP测试报文返回给该测试报文的发送端设备A。如果匹配失败,则继续向目的IP地址转发至下一跳设备。When the TWAMP test packet sent by the device A arrives at the device B, the device B receives the TWAMP test packet, and the device B firstly uses the destination IP address, the source IP address, and the destination port number carried in the TWAMP test packet. The source port number is matched with the source IP address, destination IP address, source port number, and destination port number configured by device B. If the destination IP address, source IP address, destination port number, and source port number carried in the TWAMP test packet are the same as the source IP address, destination IP address, source port number, and destination port number configured on device B, the match is determined. If the device B determines that the received message is a TWAMP test message, the process continues to 404. If the destination IP address, source IP address, destination port number, and source port number carried in the TWAMP test packet are inconsistent with the source IP address, destination IP address, source port number, and destination port number configured on device B, the match is considered to be unsuccessful. , continue to execute 402-403. Therefore, if the match is successful, device B returns the TWAMP test message to the sender device A of the test message. If the match fails, the forwarding to the destination IP address continues to the next hop device.
在本申请实施例中,TWAMP测试报文所携带的目的IP地址、源IP地址、目的端口号以及源端口号,与设备B配置的源IP地址、目的IP地址、源端口号以及目的端口号不一致,匹配失败,设备B继续向该TWAMP测试 报文的目的IP地址转发该TWAMP测试报文。当该TWAMP测试报文到达设备C时,设备C将该TWAMP测试报文所携带的目的IP地址、源IP地址、目的端口号以及源端口号,与设备C配置的源IP地址、目的IP地址、源端口号以及目的端口号分别匹配,确定该TWAMP测试报文所携带的目的IP地址、源IP地址、目的端口号以及源端口号,与设备C配置的源IP地址、目的IP地址、源端口号以及目的端口号一致,则确定匹配成功。设备C确定接收到的报文是TWAMP测试报文,并且确定设备C是对应于发送端设备A的反射端设备。In the embodiment of the present application, the destination IP address, the source IP address, the destination port number, and the source port number carried in the TWAMP test packet, and the source IP address, the destination IP address, the source port number, and the destination port number configured by the device B. Inconsistent, matching failed, device B continues to test the TWAMP The destination IP address of the packet forwards the TWAMP test packet. When the TWAMP test packet arrives at device C, device C sets the destination IP address, source IP address, destination port number, and source port number carried in the TWAMP test packet with the source IP address and destination IP address configured on device C. The source port number and the destination port number are matched to determine the destination IP address, source IP address, destination port number, and source port number carried in the TWAMP test packet, and the source IP address, destination IP address, and source configured on device C. If the port number and the destination port number are the same, the connection is determined to be successful. The device C determines that the received message is a TWAMP test message, and determines that the device C is a reflective end device corresponding to the transmitting device A.
404:反射端设备确定收到的TWAMP测试报文中的Z比特是否为0,如果是0,则执行405,如果不是0,则丢弃该TWAMP测试报文。404: The reflector device determines whether the Z bit in the received TWAMP test packet is 0. If it is 0, it executes 405. If it is not 0, discards the TWAMP test packet.
由发送端设备A发送的所述TWAMP测试报文中,所述Z比特为0,经过中间设备B转发到达反射端设备C。设备C接收所述TWAMP测试报文后,确定所述TWAMP测试报文中的Z比特是0,确定所述TWAMP不是反射报文,则在该TWAMP测试报文中包括指示所述回送的TWAMP测试报文是反射报文的标识,比如将TWAMP测试报文中的Z比特的值设置为1,设备C向发送端设备A回送包括所述标识的TWAMP测试报文。In the TWAMP test packet sent by the sender device A, the Z bit is 0, and is forwarded to the reflective device C through the intermediate device B. After receiving the TWAMP test packet, the device C determines that the Z bit in the TWAMP test packet is 0, and determines that the TWAMP is not a reflection message, and includes a TWAMP test indicating the loopback in the TWAMP test message. The message is the identifier of the reflected message. For example, the value of the Z bit in the TWAMP test message is set to 1, and the device C sends back the TWAMP test message including the identifier to the sending device A.
由设备C回送的TWAMP测试报文在回送到发送端设备A时,再次经过设备B。由于人为误配置,设备C回送的TWAMP测试报文所携带的目的IP地址、源IP地址、目的端口号以及源端口号,与设备B配置的源IP地址、目的IP地址、源端口号以及目的端口号一致,因此,设备C回送的TWAMP测试报文所携带的目的IP地址、源IP地址、目的端口号以及源端口号,与设备B配置的源IP地址、目的IP地址、源端口号以及目的端口号匹配成功。设备B确定接收到的是TWAMP测试报文,设备B确定接收到的TWAMP报文的Z比特是否为0。由于反射端设备C已经将回送的TWAMP测试报文的Z比特的值设置为1,因此,设备B确定接收到的TWAMP报文的Z比特的值不为0,则确定接收到的TWAMP测试报文是反射报文,此时,设备B 丢弃该TWAMP测试报文,而不进行反射,从而有效避免形成报文环路,减少了发生网络风暴的风险。The TWAMP test packet sent back by the device C passes through the device B again when it is sent back to the sender device A. The destination IP address, source IP address, destination port number, and source port number carried in the TWAMP test packet sent by device C, and the source IP address, destination IP address, source port number, and destination configured on device B. The port number is the same. Therefore, the destination IP address, source IP address, destination port number, and source port number carried in the TWAMP test packet sent by device C are the source IP address, destination IP address, and source port number configured on device B. The destination port number is successfully matched. Device B determines that a TWAMP test message is received, and device B determines whether the Z bit of the received TWAMP message is zero. Since the reflection end device C has set the value of the Z bit of the returned TWAMP test message to 1, therefore, the device B determines that the value of the Z bit of the received TWAMP message is not 0, and determines the received TWAMP test report. The text is a reflection message. At this time, device B The TWAMP test packet is discarded without reflection, thereby effectively avoiding the formation of a packet loop and reducing the risk of network storms.
405:反射端设备向发送端设备回送所述TWAMP测试报文,该回送的TWAMP测试报文中包括指示所述回送的TWAMP测试报文是反射报文的标识。405: The reflective end device sends back the TWAMP test packet to the sending end device, where the returned TWAMP test packet includes an identifier indicating that the returned TWAMP test packet is a reflected packet.
设备C接收到的TWAMP测试报文的Z比特的值为0,则表示该TWAMP测试报文不是反射报文。设备C将接收到的所述TWAMP测试报文中的Z比特的值设置为1,并将该TWAMP测试报文回送给发送端设备A,该回送的TWAMP测试报文还可以包括相应的TWAMP协议的其它字段,如报文序列数、时间戳、生存时间TTL、源IP地址,目的IP地址,源端口号、目的端口号等。If the value of the Z bit of the TWAMP test message received by the device C is 0, it indicates that the TWAMP test message is not a reflection message. The device C sets the value of the Z bit in the received TWAMP test message to 1, and sends the TWAMP test message back to the sending device A. The returned TWAMP test message may further include a corresponding TWAMP protocol. Other fields, such as the number of packet sequences, timestamp, lifetime TTL, source IP address, destination IP address, source port number, destination port number, and so on.
在实施例1中,也可以用Z比特值为1来表示携带该Z比特的TWAMP测试报文没有经过反射,而用Z比特值为0来表示携带该Z比特的TWAMP测试报文经过了反射端设备的反射。In Embodiment 1, the Z bit value of 1 can also be used to indicate that the TWAMP test message carrying the Z bit is not reflected, and the Z bit value is 0 to indicate that the TWAMP test message carrying the Z bit is reflected. The reflection of the end device.
可选地,Z比特也可以有多位,用其他的值来表示携带该Z比特的TWAMP测试报文是否经过反射。Optionally, the Z bit may also have multiple bits, and other values are used to indicate whether the TWAMP test message carrying the Z bit is reflected.
实施例2Example 2
图5为本申请另一个实施例提供的一种报文处理方法的流程示意图,本申请以该方法应用于图2所示的场景来进行举例说明。所述方法包括:FIG. 5 is a schematic flowchart of a packet processing method according to another embodiment of the present application. The application is applied to the scenario shown in FIG. 2 for example. The method includes:
501:发送端设备生成并发送TWAMP测试报文。501: The sender device generates and sends a TWAMP test packet.
设备A作为发送端设备,生成并发送TWAMP测试报文,该TWAMP测试报文经中间设备B被转发到反射端设备C。该TWAMP测试报文的格式如图6所示。与图3所示的报文格式基本相同,区别只在于:TWAMP测试报文中属于填充字节的第43字节中,设置一个发送端设备/反射端设备S/R比特。所述S/R比特设置为1比特,其它7比特设置为保留字段Resv。所述Resv字段可以设置为全0,也可以设置为其它值,用于标识TWAMP测试报 文的具体报文类型。Device A acts as the sender device, generates and sends a TWAMP test message, and the TWAMP test message is forwarded to the reflective device C via the intermediate device B. The format of the TWAMP test message is as shown in FIG. 6. The format of the message shown in Figure 3 is basically the same. The only difference is that in the 43th byte belonging to the padding byte in the TWAMP test message, a sender/reflector device S/R bit is set. The S/R bit is set to 1 bit, and the other 7 bits are set to the reserved field Resv. The Resv field can be set to all 0s, or can be set to other values for identifying the TWAMP test report. The specific message type of the text.
可选地,S/R比特也可以有多位,用其他的值来表示携带该S/R比特的TWAMP测试报文是否经过反射。进一步可选的,所述S/R比特也可以设置于填充字节的其它位置。Optionally, the S/R bit may also have multiple bits, and other values are used to indicate whether the TWAMP test message carrying the S/R bit is reflected. Further optionally, the S/R bit may also be set at other locations of the padding byte.
本申请实施例中,用S/R比特为0来表示TWAMP测试报文不是反射报文,S/R比特为1来表示TWAMP测试报文是反射报文进行举例说明。当设备A作为发送端设备发送所述TWAMP测试报文时,将所述TWAMP测试报文中的S/R比特设置为0,表示TWAMP测试报文不是反射报文。反射端设备C收到所述TWAMP测试报文时,回送所述TWAMP测试报文给所述发送端设备A,该回送的TWAMP测试报文中包括指示所述回送的TWAMP测试报文是反射报文的标识。具体地,所述标识可以是值为1的S/R比特。所述TWAMP测试报文是用户数据报协议UDP报文。In the embodiment of the present application, the S/R bit is 0 to indicate that the TWAMP test message is not a reflection message, and the S/R bit is 1 to indicate that the TWAMP test message is a reflection message. When the device A sends the TWAMP test packet as the sender device, the S/R bit in the TWAMP test packet is set to 0, indicating that the TWAMP test packet is not a reflection packet. When the TWAMP test packet is received, the TWAMP test packet is sent back to the sender device A, and the TWAMP test packet sent back includes the TWAMP test packet indicating that the loopback is a reflection report. The logo of the text. Specifically, the identifier may be an S/R bit having a value of one. The TWAMP test packet is a User Datagram Protocol UDP packet.
502:下一跳设备接收所述TWAMP测试报文。502: The next hop device receives the TWAMP test packet.
503:下一跳设备将所述TWAMP测试报文的目的IP地址、源IP地址、目的端口号以及源端口号与该下一跳设备自身配置的源IP地址、目的IP地址、源端口号以及目的端口号分别进行匹配,如果匹配成功,则执行504,如果匹配失败,则继续向目的IP地址转发至下一跳设备,重复执行502-503。503: The next hop device sets the destination IP address, the source IP address, the destination port number, and the source port number of the TWAMP test packet with the source IP address, the destination IP address, and the source port number of the next hop device. The destination port number is matched. If the match is successful, perform 504. If the match fails, continue forwarding to the destination IP address to the next hop device and repeat 502-503.
其中,步骤502-503的具体过程与实施例1中步骤402-403相同,可参照实施例1的描述,此处不再赘述。The specific process of the steps 502-503 is the same as the steps 402-403 of the embodiment 1, and the description of the embodiment 1 is omitted, and details are not described herein again.
504:反射端设备确定收到的所述TWAMP测试报文中的S/R比特是否为0,如果是0,则执行505,如果不是0,则丢弃该TWAMP测试报文。504: The reflector device determines whether the S/R bit in the received TWAMP test packet is 0. If it is 0, it executes 505. If it is not 0, the TWAMP test packet is discarded.
由发送端设备A发送的所述TWAMP测试报文中,所述S/R比特为0,经过中间设备B转发到达反射端设备C。设备C接收所述TWAMP测试报文后,确定所述TWAMP测试报文中的S/R比特是0,确定所述TWAMP不是反射报文,则在该TWAMP测试报文中包括指示所述回送的TWAMP测试报文是反射报文的标识,比如将TWAMP测试报文中的S/R比特的值设置为1, 设备C向发送端设备A回送包括所述标识的TWAMP测试报文。由设备C回送的TWAMP测试报文在回送到发送端设备A时,再次经过设备B。由于人为误配置,设备C回送的TWAMP测试报文所携带的目的IP地址、源IP地址、目的端口号以及源端口号,与设备B配置的源IP地址、目的IP地址、源端口号以及目的端口号一致,因此,设备C回送的TWAMP测试报文所携带的目的IP地址、源IP地址、目的端口号以及源端口号,与设备B配置的源IP地址、目的IP地址、源端口号以及目的端口号匹配成功。设备B确定接收到的是TWAMP测试报文。设备B确定接收到的TWAMP测试报文的S/R比特是否为0。由于反射端设备C已经将回送的TWAMP测试报文的S/R比特的值设置为1,因此,设备B确定接收到的TWAMP报文的Z比特的值不为0,则确定接收到的报文是反射报文,此时,设备B丢弃该TWAMP测试报文,而不进行反射,从而有效避免形成报文环路,减少了发生网络风暴的风险。In the TWAMP test packet sent by the sending device A, the S/R bit is 0, and is forwarded to the reflective device C through the intermediate device B. After receiving the TWAMP test packet, the device C determines that the S/R bit in the TWAMP test packet is 0, and determines that the TWAMP is not a reflection packet, and includes, in the TWAMP test packet, the indication that the loopback is sent. The TWAMP test packet is an identifier of the reflected message, for example, the value of the S/R bit in the TWAMP test packet is set to 1, The device C sends back a TWAMP test message including the identifier to the sender device A. The TWAMP test packet sent back by the device C passes through the device B again when it is sent back to the sender device A. The destination IP address, source IP address, destination port number, and source port number carried in the TWAMP test packet sent by device C, and the source IP address, destination IP address, source port number, and destination configured on device B. The port number is the same. Therefore, the destination IP address, source IP address, destination port number, and source port number carried in the TWAMP test packet sent by device C are the source IP address, destination IP address, and source port number configured on device B. The destination port number is successfully matched. Device B determines that it is receiving a TWAMP test message. Device B determines whether the S/R bit of the received TWAMP test message is zero. Since the reflection end device C has set the value of the S/R bit of the returned TWAMP test message to 1, the device B determines that the value of the Z bit of the received TWAMP message is not 0, and determines the received report. The packet is a reflection packet. At this time, the device B discards the TWAMP test packet without performing reflection, thereby effectively avoiding the formation of a packet loop and reducing the risk of network storms.
505.反射端设备向发送端设备回送所述TWAMP测试报文,该回送的TWAMP测试报文中包括指示所述回送的TWAMP测试报文是反射报文的标识。505. The reflective end device sends back the TWAMP test packet to the sending end device, where the returned TWAMP test packet includes an identifier indicating that the returned TWAMP test packet is a reflected packet.
设备C接收到的测试报文的S/R比特的值为0,则表示该测试报文不是反射报文。设备C将接收到的所述TWAMP测试报文中的S/R比特的值设置为1,并将该TWAMP测试报文回送给发送端设备A,该回送的TWAMP测试报文还可以包括相应的TWAMP协议的其它字段,如报文序列数、时间戳、生存时间TTL、源IP地址,目的IP地址,源端口号、目的端口号等。If the value of the S/R bit of the test packet received by the device C is 0, the test packet is not a reflection packet. The device C sets the value of the S/R bit in the received TWAMP test packet to 1, and sends the TWAMP test packet to the sending device A. The returned TWAMP test packet may also include a corresponding Other fields of the TWAMP protocol, such as the number of packet sequences, timestamps, time-to-live TTL, source IP address, destination IP address, source port number, destination port number, and so on.
可选的,也可以用S/R比特值为1来表示携带该S/R比特的TWAMP测试报文没有经过反射,而用S/R比特值为0来表示携带该S/R比特的TWAMP测试报文经过了反射端设备的反射。Optionally, the S/R bit value of 1 may be used to indicate that the TWAMP test packet carrying the S/R bit is not reflected, and the S/R bit value is 0 to represent the TWAMP carrying the S/R bit. The test packet is reflected by the reflective device.
实施例3Example 3
图7A和图7B示出了用于执行实施例1和实施例2提供的方法的发送端 设备和反射端设备的可能的硬件结构示意图。发送端设备可以是如图7A所示的发送端设备600,反射端设备可以是如图7B所示的反射端设备700。7A and 7B show a transmitting end for performing the methods provided in Embodiment 1 and Embodiment 2 A schematic diagram of possible hardware structures of devices and reflector devices. The transmitting end device may be the transmitting end device 600 as shown in FIG. 7A, and the reflective end device may be the reflective end device 700 as shown in FIG. 7B.
发送端设备600包括处理器601和网络接口602,所述处理器601通过网络接口602与反射端设备700通信。The transmitting device 600 includes a processor 601 and a network interface 602 that communicates with the reflective device 700 via the network interface 602.
处理器601,用于生成TWAMP测试报文;The processor 601 is configured to generate a TWAMP test packet.
网络接口602,用于发送TWAMP测试报文,还用于接收反射端设备回送的TWAMP测试报文,该回送的TWAMP测试报文中包括指示该回送的TWAMP报文是反射报文的标识。The network interface 602 is configured to send a TWAMP test packet, and is further configured to receive a TWAMP test packet sent by the reflective device, where the returned TWAMP test packet includes an identifier indicating that the returned TWAMP packet is a reflected packet.
所述处理器601还用于将所述TWAMP测试报文中的Z比特设置为0,用于表示该TWAMP测试报文不是反射报文;该回送的TWAMP测试报文中包括指示所述回送的TWAMP测试报文是反射报文的标识。所述标识可以是值为1的Z比特。The processor 601 is further configured to set the Z bit in the TWAMP test message to 0, to indicate that the TWAMP test message is not a reflection message, and the returned TWAMP test message includes the indication of the loopback. The TWAMP test packet is the identifier of the reflected message. The identifier may be a Z bit having a value of one.
可选的,所述处理器601还用于将所述TWAMP测试报文中的Z比特设置为1,用于表示该TWAMP测试报文不是反射报文;该回送的TWAMP测试报文中包括指示所述回送的TWAMP测试报文是反射报文的标识。所述标识可以是值为0的Z比特。Optionally, the processor 601 is further configured to set a Z bit in the TWAMP test packet to 1 to indicate that the TWAMP test packet is not a reflection packet; and the returned TWAMP test packet includes an indication. The loopback TWAMP test packet is an identifier of the reflected packet. The identifier may be a Z bit having a value of zero.
可选地,Z比特也可以有多位,用其他的值来表示携带该Z比特的TWAMP测试报文是否经过反射。Optionally, the Z bit may also have multiple bits, and other values are used to indicate whether the TWAMP test message carrying the Z bit is reflected.
可选的,所述处理器601,还用于将所述TWAMP测试报文中的发送端/反射端S/R比特设置为0,用于表示该TWAMP测试报文不是反射报文;该回送的TWAMP测试报文中包括指示所述回送的TWAMP测试报文是反射报文的标识。所述标识可以是值为1的S/R比特。Optionally, the processor 601 is further configured to set a sender/reflector S/R bit in the TWAMP test packet to 0, to indicate that the TWAMP test packet is not a reflection packet; The TWAMP test message includes an identifier indicating that the returned TWAMP test message is a reflected message. The identifier may be an S/R bit having a value of one.
可选的,所述处理器601,还用于将所述TWAMP测试报文中的发送端/反射端S/R比特设置为1,用于表示该TWAMP测试报文不是反射报文;该回送的TWAMP测试报文中包括指示所述回送的TWAMP测试报文是反射报文的标识。所述标识可以是值为0的S/R比特。 Optionally, the processor 601 is further configured to set a sender/reflection S/R bit in the TWAMP test packet to 1 to indicate that the TWAMP test packet is not a reflection packet; The TWAMP test message includes an identifier indicating that the returned TWAMP test message is a reflected message. The identifier may be an S/R bit having a value of zero.
可选地,S/R比特也可以有多位,用其他的值来表示携带该S/R比特的TWAMP测试报文是否经过反射。Optionally, the S/R bit may also have multiple bits, and other values are used to indicate whether the TWAMP test message carrying the S/R bit is reflected.
反射端设备700包括处理器701和网络接口702,所述处理器701通过网络接口702与发送端设备600通信。The reflective end device 700 includes a processor 701 and a network interface 702 that communicates with the transmitting device 600 via a network interface 702.
网络接口702,用于接收发送端设备发送的所述TWAMP测试报文。The network interface 702 is configured to receive the TWAMP test packet sent by the sender device.
处理器701,用于确定所述TWAMP测试报文不是反射报文,则生成回送的TWAMP测试报文,所述回送的TWAMP测试报文中包括指示所述回送的TWAMP测试报文是反射报文的标识。The processor 701 is configured to determine that the TWAMP test packet is not a reflection packet, and generate a loopback TWAMP test packet, where the returned TWAMP test packet includes the TWAMP test packet indicating that the loopback is a reflection packet. Logo.
所述网络接口702,还用于发送所述回送的TWAMP测试报文。The network interface 702 is further configured to send the returned TWAMP test packet.
所述处理器701,还用于确定所述发送端设备发送的所述TWAMP测试报文中的Z比特为0,则确定所述TWAMP不是反射报文。所述处理器701,还用于将所述回送的TWAMP测试报文中的保留的Z比特的值设置为1,用于表示该回送的TWAMP测试报文是反射报文。The processor 701 is further configured to determine that the Z bit in the TWAMP test packet sent by the sending end device is 0, and determine that the TWAMP is not a reflected message. The processor 701 is further configured to set a value of the reserved Z bit in the returned TWAMP test message to 1 to indicate that the returned TWAMP test message is a reflected message.
可选的,所述处理器701,还用于确定所述发送端设备发送的所述TWAMP测试报文中的Z比特为1,则确定所述TWAMP不是反射报文。所述处理器701,还用于将所述回送的TWAMP测试报文中的保留的Z比特的值设置为0,用于表示该回送的TWAMP测试报文是反射报文。Optionally, the processor 701 is further configured to determine that a Z bit in the TWAMP test packet sent by the sending end device is 1, and determine that the TWAMP is not a reflection message. The processor 701 is further configured to set a value of the reserved Z bit in the returned TWAMP test message to 0, to indicate that the returned TWAMP test message is a reflected message.
可选的,Z比特也可以有多位,用其他的值来表示携带该Z比特的TWAMP测试报文是否经过反射。Optionally, the Z bit may also have multiple bits, and other values are used to indicate whether the TWAMP test message carrying the Z bit is reflected.
可选的,所述处理器701,还用于确定的发送端/反射端S/R比特为0,则确定所述TWAMP测试报文不是反射报文,所述处理器701,还用于将所述回送的TWAMP测试报文中的所述S/R比特设置为1,用于表示该回送的TWAMP测试报文是反射报文。Optionally, the processor 701 is further configured to determine that the sender/reflector S/R bit is 0, and then determine that the TWAMP test packet is not a reflection message, and the processor 701 is further configured to: The S/R bit in the TWAMP test packet sent back is set to 1, indicating that the TWAMP test packet sent back is a reflected message.
可选的,所述处理器701,还用于确定的发送端/反射端S/R比特为1,则确定所述TWAMP测试报文不是反射报文;所述处理器701,还用于将所述回送的TWAMP测试报文中的所述S/R比特设置为0,用于表示该回送的 TWAMP测试报文是反射报文。Optionally, the processor 701 is further configured to determine that the sender/reflector S/R bit is 1, and determine that the TWAMP test packet is not a reflection message; and the processor 701 is further configured to: The S/R bit in the loopback TWAMP test message is set to 0, and is used to indicate the loopback. The TWAMP test message is a reflection message.
可选的,S/R比特也可以有多位,用其他的值来表示携带该S/R比特的TWAMP测试报文是否经过反射。Optionally, the S/R bit may also have multiple bits, and other values are used to indicate whether the TWAMP test packet carrying the S/R bit is reflected.
在另一种实施方式中,如图7A所示,发送端设备600可以包括处理器601、网络接口602、存储器603和总线604。处理器601、网络接口602和存储器603通过总线604通信。处理器601通过网络接口602与反射端设备700通信。In another embodiment, as shown in FIG. 7A, the transmitting device 600 can include a processor 601, a network interface 602, a memory 603, and a bus 604. Processor 601, network interface 602, and memory 603 communicate over bus 604. The processor 601 communicates with the reflective end device 700 via the network interface 602.
在另一种实施方式中,如图7B所示,反射端设备可以包括处理器701、网络接口702、存储器703和总线704。处理器701、网络接口702和存储器703通过总线704通信。处理器701通过网络接口702与发送端设备600通信。In another embodiment, as shown in FIG. 7B, the reflective end device may include a processor 701, a network interface 702, a memory 703, and a bus 704. Processor 701, network interface 702, and memory 703 communicate over bus 704. The processor 701 communicates with the source device 600 via the network interface 702.
处理器601和处理器701可以是一个或多个中央处理器(英文:Central Processing Unit,CPU)。在处理器601或处理器701是一个CPU的情况下,该CPU可以是单核CPU,也可以是多核CPU。The processor 601 and the processor 701 may be one or more central processing units (CPUs). In the case where the processor 601 or the processor 701 is a CPU, the CPU may be a single core CPU or a multi-core CPU.
网络接口602和网络接口702可以是有线接口,例如光纤分布式数据接口(英文:Fiber Distributed Data Interface,FDDI),前兆以太网(英文:Gigabit Ethernet,GE)接口。The network interface 602 and the network interface 702 may be wired interfaces, such as a Fiber Distributed Data Interface (FDDI), and a Gigabit Ethernet (GE) interface.
存储器603和存储器703可以是但不限于随机存储存储器(RAM)、只读存储器(ROM),可擦除可编程只读存储器(EPROM)、光盘只读存储器(CD-ROM)、硬盘等中的一种或多种。存储器603和存储器703用于存储程序代码。The memory 603 and the memory 703 may be, but not limited to, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM), a compact disk read only memory (CD-ROM), a hard disk, or the like. One or more. The memory 603 and the memory 703 are used to store program codes.
存储器603存储程序指令代码,处理器601用于执行存储器603中的指令代码,完成实施例1或实施例2中的方法。The memory 603 stores the program instruction code, and the processor 601 is configured to execute the instruction code in the memory 603 to complete the method in Embodiment 1 or Embodiment 2.
存储器703存储程序指令代码,处理器701用于执行存储器703中的指令代码,完成实施例1和实施例2中的方法。实施例4:The memory 703 stores program instruction codes, and the processor 701 is configured to execute the instruction codes in the memory 703 to complete the methods in Embodiment 1 and Embodiment 2. Example 4:
图8A示出了一种报文处理装置800的示意图。用于执行实施例1和实 施例2提供的报文处理方法。报文处理装置800位于发送端设备600侧。报文处理装置800包括:处理单元801、发送单元802和接收单元803;FIG. 8A shows a schematic diagram of a message processing apparatus 800. Used to perform embodiment 1 and The packet processing method provided in the second embodiment. The message processing device 800 is located on the side of the transmitting device 600. The message processing apparatus 800 includes: a processing unit 801, a transmitting unit 802, and a receiving unit 803;
处理单元801,用于生成TWAMP测试报文。The processing unit 801 is configured to generate a TWAMP test message.
发送单元802,用于发送所述TWAMP报文。The sending unit 802 is configured to send the TWAMP message.
接收单元803,用于接收反射端设备回送的TWAMP测试报文,该回送的TWAMP测试报文中包括指示该TWAMP报文是反射报文的标识。The receiving unit 803 is configured to receive a TWAMP test packet sent back by the reflective device, where the returned TWAMP test packet includes an identifier indicating that the TWAMP packet is a reflected packet.
上述各个单元可以是逻辑意义上的单元,在具体实施过程中可以由CPU读取存储器中存储的软件代码运行之后生成的功能组件,也可以是由硬件单元来实现。Each of the above units may be a logical unit. In a specific implementation process, the CPU may read a functional component generated after the software code stored in the memory is run, or may be implemented by a hardware unit.
所述处理单元801,还用于将所述TWAMP测试报文中的Z比特设置为0,用于表示该TWAMP测试报文不是反射报文;该回送的TWAMP测试报文中包括指示所述回送的TWAMP测试报文是反射报文的标识。所述标识可以是值为1的Z比特。The processing unit 801 is further configured to set the Z bit in the TWAMP test message to 0, to indicate that the TWAMP test message is not a reflection message, and the returned TWAMP test message includes the indication of the loopback The TWAMP test message is the identifier of the reflected message. The identifier may be a Z bit having a value of one.
可选的,所述处理单元801,还用于将所述TWAMP测试报文中的Z比特设置为1,用于表示该TWAMP测试报文不是反射报文;该回送的TWAMP测试报文中包括指示所述回送的TWAMP测试报文是反射报文的标识。所述标识可以是值为0的Z比特。Optionally, the processing unit 801 is further configured to set a Z bit in the TWAMP test packet to 1 to indicate that the TWAMP test packet is not a reflection packet; and the loopback TWAMP test packet includes The TWAMP test message indicating the loopback is an identifier of the reflected message. The identifier may be a Z bit having a value of zero.
可选地,Z比特也可以有多位,用其他的值来表示携带该Z比特的TWAMP测试报文是否经过反射。Optionally, the Z bit may also have multiple bits, and other values are used to indicate whether the TWAMP test message carrying the Z bit is reflected.
可选的,所述处理单元801,还用于将所述TWAMP测试报文中的发送端/反射端S/R比特设置为0,用于表示该TWAMP测试报文不是反射报文;所述反射端设备用于将所述回送的TWAMP测试报文中的所述S/R比特设置为1,用于表示该回送的TWAMP测试报文是反射报文。Optionally, the processing unit 801 is further configured to set a sender/reflection S/R bit in the TWAMP test packet to 0, to indicate that the TWAMP test packet is not a reflection packet; The reflector device is configured to set the S/R bit in the loopback TWAMP test packet to 1 to indicate that the loopback TWAMP test packet is a reflection packet.
可选的,所述处理单元801,还用于将所述TWAMP测试报文中的发送端/反射端S/R比特设置为1,用于表示该TWAMP测试报文不是反射报文;所述反射端设备用于将所述回送的TWAMP测试报文中的所述S/R比特设置 为0,用于表示该回送的TWAMP测试报文是反射报文。Optionally, the processing unit 801 is further configured to set a sender/reflection S/R bit in the TWAMP test packet to 1 to indicate that the TWAMP test packet is not a reflection packet; The reflective end device is configured to set the S/R bit in the loopback TWAMP test message A value of 0 indicates that the TWAMP test message sent back is a reflection message.
可选地,S/R比特也可以有多位,用其他的值来表示携带该S/R比特的TWAMP测试报文是否经过反射。Optionally, the S/R bit may also have multiple bits, and other values are used to indicate whether the TWAMP test message carrying the S/R bit is reflected.
图8A提供的报文处理装置800,可以集成在图7A所述的发送端设备600中,应用于图2所示的场景中,实现发送端设备的功能。例如,处理单元801可以用图7A的处理器601实现,发送单元802和接收单元803中的一个或多个可以由图7A的网络接口实现。报文处理装置800可以实现的其它附加功能、以及与反射端设备的交互过程,参见实施例1和实施例2中方法的描述,此处不再赘述。The packet processing apparatus 800 provided in FIG. 8A can be integrated into the transmitting device 600 described in FIG. 7A and applied to the scenario shown in FIG. 2 to implement the function of the transmitting device. For example, processing unit 801 can be implemented with processor 601 of FIG. 7A, and one or more of transmitting unit 802 and receiving unit 803 can be implemented by the network interface of FIG. 7A. For other additional functions that can be implemented by the packet processing device 800 and the interaction process with the reflective device, refer to the description of the methods in Embodiment 1 and Embodiment 2, and details are not described herein again.
图8B示出了另一种报文处理装置900的示意图。报文处理装置900位于发送端设备700侧。报文处理装置900包括:接收单元901、处理单元902和发送单元903.FIG. 8B shows a schematic diagram of another message processing apparatus 900. The message processing device 900 is located on the side of the transmitting device 700. The message processing apparatus 900 includes: a receiving unit 901, a processing unit 902, and a transmitting unit 903.
接收单元901,用于接收TWAMP测试报文。The receiving unit 901 is configured to receive a TWAMP test message.
处理单元902,用于确定所述TWAMP测试报文不是反射报文,则生成回送的TWAMP测试报文,所述回送的TWAMP测试报文中包括指示所述回送的TWAMP测试报文是反射报文的标识。The processing unit 902 is configured to: determine that the TWAMP test packet is not a reflection packet, and generate a TWAMP test packet that is sent back, where the returned TWAMP test packet includes a TWAMP test packet indicating that the loopback is a reflection packet. Logo.
发送单元903,用于发送所述回送的TWAMP测试报文。The sending unit 903 is configured to send the returned TWAMP test packet.
上述各个单元可以是逻辑意义上的单元,在具体实施过程中可以由CPU读取存储器中存储的软件代码运行之后生成的功能组件,也可以是由硬件单元来实现。Each of the above units may be a logical unit. In a specific implementation process, the CPU may read a functional component generated after the software code stored in the memory is run, or may be implemented by a hardware unit.
可选的,所述处理单元902,还用于确定所述TWAMP测试报文中的Z比特为0,则确定所述TWAMP不是反射报文。所述处理单元902,还用于将所述回送的TWAMP测试报文中的保留的Z比特的值设置为1,用于表示该回送的TWAMP测试报文是反射报文。Optionally, the processing unit 902 is further configured to determine that the Z bit in the TWAMP test packet is 0, and determine that the TWAMP is not a reflection message. The processing unit 902 is further configured to set a value of the reserved Z bit in the returned TWAMP test message to 1 to indicate that the returned TWAMP test message is a reflected message.
可选的,所述处理单元902,还用于确定所述TWAMP测试报文中的Z比特为1,则确定所述TWAMP不是反射报文。所述处理单元902,还用于 将所述回送的TWAMP测试报文中的保留的Z比特的值设置为0,用于表示该回送的TWAMP测试报文是反射报文。Optionally, the processing unit 902 is further configured to determine that the Z bit in the TWAMP test packet is 1, and determine that the TWAMP is not a reflection message. The processing unit 902 is further configured to The value of the reserved Z bit in the returned TWAMP test message is set to 0, and is used to indicate that the returned TWAMP test message is a reflected message.
可选的,Z比特也可以有多位,用其他的值来表示携带该Z比特的TWAMP测试报文是否经过反射。Optionally, the Z bit may also have multiple bits, and other values are used to indicate whether the TWAMP test message carrying the Z bit is reflected.
可选的,所述处理单元902,还用于确定的发送端/反射端S/R比特为0,则确定所述TWAMP测试报文不是反射报文,所述处理单元902,还用于将所述回送的TWAMP测试报文中的所述S/R比特设置为1,用于表示该回送的TWAMP测试报文是反射报文。Optionally, the processing unit 902 is further configured to determine that the sender/reflection S/R bit is 0, and then determine that the TWAMP test packet is not a reflection message, and the processing unit 902 is further configured to: The S/R bit in the TWAMP test packet sent back is set to 1, indicating that the TWAMP test packet sent back is a reflected message.
可选的,所述处理单元902,还用于确定的发送端/反射端S/R比特为1,则确定所述TWAMP测试报文不是反射报文;所述处理单元902,还用于将所述回送的TWAMP测试报文中的所述S/R比特设置为0,用于表示该回送的TWAMP测试报文是反射报文。Optionally, the processing unit 902 is further configured to determine that the sender/reflector S/R bit is 1, and then determine that the TWAMP test packet is not a reflection message; and the processing unit 902 is further configured to: The S/R bit in the TWAMP test packet sent back is set to 0, and is used to indicate that the TWAMP test packet sent back is a reflected message.
可选的,S/R比特也可以有多位,用其他的值来表示携带该S/R比特的TWAMP测试报文是否经过反射。Optionally, the S/R bit may also have multiple bits, and other values are used to indicate whether the TWAMP test packet carrying the S/R bit is reflected.
图8B提供的报文处理装置900,可以集成在图6B所述的反射端设备700中,应用于图2所示的场景中,实现反射的设备的功能。例如,处理单元902可以用图7B的处理器701实现,接收单元901和发送单元903中的一个或多个可以由图7B的网络接口702实现。报文处理装置900可以实现的其它附加功能、以及与发送端设备的交互过程,参见实施例1和实施例2中的描述,此处不再赘述。The packet processing apparatus 900 provided in FIG. 8B can be integrated into the reflective end device 700 described in FIG. 6B and applied to the scenario shown in FIG. 2 to implement the function of the reflected device. For example, processing unit 902 can be implemented with processor 701 of FIG. 7B, and one or more of receiving unit 901 and transmitting unit 903 can be implemented by network interface 702 of FIG. 7B. Other additional functions that can be implemented by the message processing apparatus 900 and the interaction process with the source device are described in the descriptions of Embodiment 1 and Embodiment 2, and details are not described herein again.
本申请中提供的报文处理装置,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配有不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或部分功能。The packet processing apparatus provided in the present application is exemplified by the division of the above functional modules. In actual applications, the functions may be assigned with different functional modules as needed, that is, the internal structure of the device is divided into different Functional modules to perform all or part of the functions described above.
实施例5Example 5
本申请提供了一种通信系统,包括发送端设备和反射端设备。所述发送 端设备和反射端设备可以是实施例3所提供的发送端设备和反射端设备。所述发送端设备可以包括实施例4中所提供的发送端设备侧的报文处理装置,所述反射端设备可以包括实施例4中所提供的反射端设备侧的报文处理装置。所述发送端设备和所述反射端设备用于执行实施例1和实施例2所描述的方法。The application provides a communication system, including a sender device and a reflector device. The sending The end device and the reflective end device may be the transmitting end device and the reflective end device provided in Embodiment 3. The transmitting end device may include the packet processing device on the transmitting end device side provided in Embodiment 4, and the reflective end device may include the packet processing device on the reflective end device side provided in Embodiment 4. The transmitting device and the reflective device are configured to perform the methods described in Embodiment 1 and Embodiment 2.
所述通信系统还可以进一步包括控制客户端设备和服务器,控制客户端设备和服务器之间交互控制信令报文建立控制会话后,控制客户端设备通过信令报文通知服务器建立统计会话。该信令主要是协商统计会话两端的IP地址,UDP端口号等信息,两边协商成功后,统计会话便建立成功。统计会话启动后,发送端设备发送测试报文,测试报文内携带时间戳、发送序列号等信息,反射端设备收到测试报文后进行应答,发送应答测试报文,应答测试报文中携带时间戳、应答序列号等信息。发送端设备收到应答测试报文后,计算IP性能统计结果后发送给控制客户端设备,统计数据统一由控制客户端设备维护并呈现给用户。在本实施方式中所描述的控制客户端与服务器之间控制会话的建立,以及发送端设备和发送端设备之间统计会话的建立,都按照现有技术进行,此处不再赘述。The communication system may further include controlling the client device and the server, and after controlling the interaction control signaling message between the client device and the server to establish a control session, the control client device notifies the server to establish a statistical session by using a signaling message. The signaling is mainly to negotiate the IP address and UDP port number of both ends of the statistics session. After the two sides negotiate successfully, the statistical session is established successfully. After the statistics session is started, the sending device sends a test packet, and the test packet carries the information such as the timestamp and the sequence number. After receiving the test packet, the device responds, sends a response test packet, and responds to the test packet. Carry information such as time stamp, response serial number, and so on. After receiving the response test packet, the sending device calculates the IP performance statistics result and sends it to the controlling client device. The statistics are uniformly maintained by the controlling client device and presented to the user. The establishment of the control session between the control client and the server in the present embodiment, and the establishment of the statistical session between the sender device and the sender device are performed according to the prior art, and are not described herein again.
本领域技术人员应该可以意识到,在上述一个或多个示例中,本申请所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质中的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中,通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。Those skilled in the art will appreciate that in one or more examples described above, the functions described herein can be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored in or transmitted as one or more instructions or code in a computer readable medium. Computer readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another. A storage medium may be any available media that can be accessed by a general purpose or special purpose computer.
本说明书的各个部分均采用递进的方式进行描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点介绍的都是与其他实施例不同之处。尤其,对于装置和系统实施例而言,由于其基本相似于方法实施例,所 以描述的比较简单,相关之处参见方法实施例部分的说明即可。The various parts of the specification are described in a progressive manner, and the same or similar parts between the various embodiments may be referred to each other, and each embodiment focuses on differences from other embodiments. In particular, for apparatus and system embodiments, since it is substantially similar to the method embodiment, The description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
最后,需要说明的是:以上所述仅为本申请技术方案的较佳实施例而已,并非用于限定本申请的保护范围。显然,本领域技术人员可以对本申请进行各种改动和变型而不脱离本申请的范围。倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。 Finally, it should be noted that the above description is only a preferred embodiment of the technical solution of the present application, and is not intended to limit the scope of protection of the present application. It will be apparent to those skilled in the art that various modifications and changes can be made in the present application without departing from the scope of the application. All such modifications, equivalents, improvements, etc., are intended to be included within the scope of the present application.

Claims (23)

  1. 一种双向主动测量协议TWAMP报文的处理方法,其特征在于,该方法包括:A method for processing a bidirectional active measurement protocol TWAMP message, characterized in that the method comprises:
    反射端设备接收TWAMP测试报文;The reflective device receives the TWAMP test message;
    反射端设备确定所述TWAMP测试报文不是反射报文,则向发送端设备回送该TWAMP测试报文,该回送的TWAMP测试报文中包括指示所述回送的TWAMP测试报文是反射报文的标识。And the TWAMP test packet is sent back to the sending device, where the TWAMP test packet includes the TWAMP test packet indicating that the loopback is a reflected packet. Logo.
  2. 根据权利要求1所述的方法,其特征在于,所述确定所述TWAMP测试报文不是反射报文,包括:确定所述TWAMP测试报文中的Z比特为0,则确定所述TWAMP测试报文不是反射报文。The method according to claim 1, wherein the determining that the TWAMP test message is not a reflection message comprises: determining that a Z bit in the TWAMP test message is 0, determining the TWAMP test report. The text is not a reflection message.
  3. 根据权利要求2所述的方法,其特征在于,所述标识为:值为1的Z比特。The method of claim 2 wherein said identification is a Z bit having a value of one.
  4. 根据权利要求1所述的方法,其特征在于,所述确定所述TWAMP测试报文不是反射报文,包括:所述反射端设备确定所述TWAMP测试报文中的发送端/反射端S/R比特为0,则确定所述TWAMP测试报文不是反射报文。The method according to claim 1, wherein the determining that the TWAMP test message is not a reflection message comprises: the reflector device determining a sender/reflection end S/ in the TWAMP test message. If the R bit is 0, it is determined that the TWAMP test message is not a reflection message.
  5. 根据权利要求4所述的方法,其特征在于,还包括:所述标识为:值为1的S/R比特。The method according to claim 4, further comprising: said identifier being: an S/R bit having a value of one.
  6. 根据权利要求1-5中任一项所述的方法,其特征在于,还包括:所述反射端设备确定所述TWAMP测试报文是反射报文时,丢弃所述反射报文。The method according to any one of claims 1 to 5, further comprising: when the reflection end device determines that the TWAMP test message is a reflection message, discarding the reflection message.
  7. 一种双向主动测量协议TWAMP报文处理方法,其特征在于,包括:A TWAMP packet processing method for a bidirectional active measurement protocol, comprising:
    发送端设备向反射端设备发送TWAMP测试报文;The sending end device sends a TWAMP test packet to the reflective end device;
    发送端设备接收所述反射端设备回送的TWAMP测试报文,该回送的TWAMP测试报文中包括指示所述回送的TWAMP测试报文是反射报文的标识。 The sending end device receives the TWAMP test packet sent back by the reflective end device, and the TWAMP test packet sent back includes the identifier indicating that the returned TWAMP test packet is a reflected packet.
  8. 根据权利要求7所述的方法,其特征在于:所述发送端设备发送的所述TWAMP测试报文中的Z比特的值为0,表示所述TWAMP测试报文不是反射报文。The method according to claim 7, wherein the value of the Z bit in the TWAMP test message sent by the sender device is 0, indicating that the TWAMP test message is not a reflection message.
  9. 根据权利要求8所述的方法,其特征在于,所述标识为:值为1的Z比特。The method of claim 8 wherein said identification is a Z bit having a value of one.
  10. 根据权利要求7所述的方法,其特征在于:所述TWAMP测试报文中的发送端/反射端S/R比特设置为0,表示所述发送端设备发送的所述TWAMP测试报文不是反射报文。The method according to claim 7, wherein the S/R bit of the transmitting end/reflecting end in the TWAMP test message is set to 0, indicating that the TWAMP test message sent by the sending end device is not a reflection. Message.
  11. 根据权利要求10所述的方法,其特征在于:所述标识为:值为1的S/R比特。The method of claim 10 wherein said identifier is an S/R bit having a value of one.
  12. 一种双向主动测量协议TWAMP报文处理装置,其特征在于,所述装置位于反射端设备侧,所述装置包括:接收单元、处理单元和发送单元;其中,A two-way active measurement protocol TWAMP message processing device, wherein the device is located on a side of a reflective device, the device includes: a receiving unit, a processing unit, and a sending unit;
    所述接收单元,用于接收TWAMP测试报文;The receiving unit is configured to receive a TWAMP test packet;
    所述处理单元,用于:确定所述TWAMP测试报文不是反射报文,则生成回送的TWAMP测试报文,所述回送的TWAMP测试报文中包括指示所述回送的TWAMP测试报文是反射报文的标识;The processing unit is configured to: determine that the TWAMP test packet is not a reflection packet, and generate a TWAMP test packet that is sent back, where the returned TWAMP test packet includes a TWAMP test packet indicating that the loopback is a reflection The identifier of the message;
    所述发送单元,用于发送所述回送的TWAMP测试报文。The sending unit is configured to send the returned TWAMP test packet.
  13. 根据权利要求12所述的装置,其特征在于:所述处理单元,用于确定所述TWAMP测试报文中的Z比特为0,则确定所述TWAMP不是反射报文。The apparatus according to claim 12, wherein the processing unit is configured to determine that the Z bit in the TWAMP test message is 0, and determine that the TWAMP is not a reflection message.
  14. 根据权利要求13所述的装置,其特征在在于:所述标识为:值为1的Z比特。The apparatus of claim 13 wherein said identifier is a Z bit having a value of one.
  15. 根据权利要求12所述的装置,其特征在于:所述处理单元,用于确定所述TWAMP测试报文中的发送端/反射端S/R比特为0,则确定所述TWAMP测试报文不是反射报文。 The apparatus according to claim 12, wherein the processing unit is configured to determine that the sender/reflection S/R bit in the TWAMP test message is 0, and determine that the TWAMP test packet is not Reflected message.
  16. 根据权利要求15所述的装置,其特征在于:所述标识为:值为1的S/R比特。The apparatus of claim 15 wherein said identifier is an S/R bit having a value of one.
  17. 根据权利要求12-16中任一项所述的装置,其特征在于:所述处理单元,还用于确定所述TWAMP测试报文是反射报文时,丢弃所述反射报文。The device according to any one of claims 12-16, wherein the processing unit is further configured to: when the TWAMP test message is a reflection message, discard the reflected message.
  18. 一种双向主动测量协议TWAMP报文处理装置,其特征在于,所述装置位于发送端设备侧,所述装置包括处理单元、发送单元和接收单元;其中,A two-way active measurement protocol TWAMP message processing device, wherein the device is located at a transmitting device side, and the device includes a processing unit, a transmitting unit, and a receiving unit;
    所述处理单元,用于生成TWAMP测试报文;The processing unit is configured to generate a TWAMP test message;
    所述发送单元,用于发送所述TWAMP测试报文;The sending unit is configured to send the TWAMP test packet;
    所述接收单元,用于接收反射端设备回送的TWAMP测试报文,所述回送的TWAMP测试报文中包括指示所述回送的TWAMP测试报文是反射报文的标识。The receiving unit is configured to receive a TWAMP test packet sent back by the reflective device, where the returned TWAMP test packet includes an identifier indicating that the returned TWAMP test packet is a reflected packet.
  19. 根据权利要求18所述的装置,其特征在于:所述处理单元,还用于将所述发送单元发送的所述TWAMP测试报文中的Z比特设置为0。The apparatus according to claim 18, wherein said processing unit is further configured to set a Z bit in said TWAMP test message sent by said transmitting unit to zero.
  20. 根据权利要求19所述的装置,其特征在于:所述标识为:值为1的Z比特。The apparatus according to claim 19, wherein said identifier is: Z bits having a value of one.
  21. 根据权利要求18所述的装置,其特征在于:所述处理单元,还用于将所述发送单元发送的所述TWAMP测试报文中的发送端/反射端S/R比特设置为0。The apparatus according to claim 18, wherein said processing unit is further configured to set a sender/reflector S/R bit in said TWAMP test message sent by said transmitting unit to zero.
  22. 根据权利要求21所述的装置,其特征在于:所述标识为:值为1的S/R比特。The apparatus according to claim 21, wherein said identifier is an S/R bit having a value of one.
  23. 一种通信系统,包括发送端设备和反射端设备,其特征在于:所述反射端设备包括权利要求13-17中任一项所述的装置,所述发送端设备包括权利要求18-22中任一项所述的装置。 A communication system comprising a transmitting end device and a reflecting end device, characterized in that the reflecting end device comprises the device according to any one of claims 13-17, the transmitting end device comprising the claims 18-22 The device of any of the preceding claims.
PCT/CN2016/091573 2015-12-31 2016-07-25 Packet processing method and device WO2017113771A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201511029103.1A CN105634937B (en) 2015-12-31 2015-12-31 A kind for the treatment of method and apparatus of message
CN201511029103.1 2015-12-31

Publications (1)

Publication Number Publication Date
WO2017113771A1 true WO2017113771A1 (en) 2017-07-06

Family

ID=56049464

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/091573 WO2017113771A1 (en) 2015-12-31 2016-07-25 Packet processing method and device

Country Status (2)

Country Link
CN (1) CN105634937B (en)
WO (1) WO2017113771A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105634937B (en) * 2015-12-31 2019-03-26 华为技术有限公司 A kind for the treatment of method and apparatus of message
CN107465565B (en) * 2016-06-06 2019-08-30 中兴通讯股份有限公司 Link test method and apparatus and system
CN107666671B (en) * 2016-07-29 2022-08-16 中兴通讯股份有限公司 Method and device for detecting wrong connection based on TWAMP
CN107846301B (en) * 2016-09-21 2022-03-04 中兴通讯股份有限公司 End-to-end service test system and method
CN109104323A (en) * 2017-06-20 2018-12-28 中兴通讯股份有限公司 A kind of test method of packet loss parameter, the first equipment and the second equipment
CN110381071B (en) * 2019-07-24 2021-05-28 新华三技术有限公司合肥分公司 Message transmission method and device and sender equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103546376A (en) * 2012-07-09 2014-01-29 中兴通讯股份有限公司 Response message transmission method and node
US20150103674A1 (en) * 2013-10-15 2015-04-16 Avaya Inc. Network loop prevention
WO2015184890A1 (en) * 2014-10-29 2015-12-10 中兴通讯股份有限公司 Packet loss measurement method and apparatus
CN105634937A (en) * 2015-12-31 2016-06-01 华为技术有限公司 Processing method and device of message

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103546376A (en) * 2012-07-09 2014-01-29 中兴通讯股份有限公司 Response message transmission method and node
US20150103674A1 (en) * 2013-10-15 2015-04-16 Avaya Inc. Network loop prevention
WO2015184890A1 (en) * 2014-10-29 2015-12-10 中兴通讯股份有限公司 Packet loss measurement method and apparatus
CN105634937A (en) * 2015-12-31 2016-06-01 华为技术有限公司 Processing method and device of message

Also Published As

Publication number Publication date
CN105634937B (en) 2019-03-26
CN105634937A (en) 2016-06-01

Similar Documents

Publication Publication Date Title
WO2017113771A1 (en) Packet processing method and device
US10965568B2 (en) Bit-forwarding ingress router, bit-forwarding router, and operation, administration and maintenance test method
US11388292B2 (en) Monitoring voice-over-IP performance over the internet
WO2016058245A1 (en) Processing method and apparatus for operation, administration and maintenance (oam) message
KR101459252B1 (en) Traceroute_delay diagnostic command
WO2015180559A1 (en) Fault detection method and apparatus for service chain
US20060274791A1 (en) Method measuring a delay time metric and measurement system
WO2016045098A1 (en) Switch, controller, system and link quality detection method
CN106067854B (en) A kind of network quality detection method and equipment
WO2018210213A1 (en) Method and device for implementing ioam packaging and storage medium
US11139995B2 (en) Methods and router devices for verifying a multicast datapath
JP7124206B2 (en) Packet processing methods and gateway devices
US8971195B2 (en) Querying health of full-meshed forwarding planes
WO2011144114A2 (en) Method, device and system for detecting path information
Xhonneux et al. Flexible failure detection and fast reroute using eBPF and SRv6
JP2015023580A (en) Method and apparatus for determining network latency with limited computing resource
KR101533056B1 (en) udp networking method for enhancement of stability
WO2017215503A1 (en) Service quality measurement method and apparatus
WO2022222544A1 (en) Method and apparatus for operation administration and maintenance (oam) detection
WO2020238799A1 (en) Twamp-based detection method and related device
KR100708589B1 (en) METHOD FOR MEASURING PACKET DELAY PER HOP BASIS USING TIME STAMP MESSAGE IN A IPv6 PACKET NETWORK
WO2023247048A1 (en) Network loopback packet test request and response
JP2023553972A (en) Method and apparatus for collecting bit error information
WO2014101187A1 (en) Ip performance measurement method and device
JP2016025641A (en) Communication system, communication device, data communication method, and program

Legal Events

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

Ref document number: 16880566

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16880566

Country of ref document: EP

Kind code of ref document: A1