CN107465565A - Link test method and apparatus and system - Google Patents

Link test method and apparatus and system Download PDF

Info

Publication number
CN107465565A
CN107465565A CN201610398523.5A CN201610398523A CN107465565A CN 107465565 A CN107465565 A CN 107465565A CN 201610398523 A CN201610398523 A CN 201610398523A CN 107465565 A CN107465565 A CN 107465565A
Authority
CN
China
Prior art keywords
test
message
transmitter
reflector
twamp
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201610398523.5A
Other languages
Chinese (zh)
Other versions
CN107465565B (en
Inventor
窦战伟
郭俊
卢伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201610398523.5A priority Critical patent/CN107465565B/en
Priority to PCT/CN2017/084951 priority patent/WO2017211169A1/en
Publication of CN107465565A publication Critical patent/CN107465565A/en
Application granted granted Critical
Publication of CN107465565B publication Critical patent/CN107465565B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays

Landscapes

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

Abstract

The invention provides a kind of link test method and apparatus and system.Wherein, this method includes:Test packet is obtained by User Network Interface simulation input message, wherein, test packet is used to test current ink using the test protocol in two-way active measurement agreement TWAMP;Test packet is sent to reflector;The response message that perception reflex device response test message is sent, wherein, response message matches with the stream matched rule for the transmitter being pre-configured with;Test result to current ink is obtained according to response message.By the present invention, to solve the problems, such as that testing efficiency when testing network link caused by standard TWAMP agreements deployment difficulty is larger is relatively low, so as to realize the effect for the efficiency for improving TWAMP link tests.

Description

Link testing method, device and system
Technical Field
The present invention relates to the field of communications, and in particular, to a link testing method, apparatus and system.
Background
The TWAMP Protocol (Two-Way Active Measurement Protocol) is a Protocol for measuring IP performance, and is mainly used for measuring performance such as IP network link delay and packet loss rate. The TWAMP protocol consists of two part protocols: TWAMP Control protocol (TWAMP-Control) and TWAMP Test protocol (TWAMP-Test). TWAMP-Control is mainly used to initialize, start and stop test sessions. TWAMP-Test is mainly used to interact Test packets between the endpoints of the Test while performing measurements of IP performance.
TWAMP generally consists of 4 logical entities, and the simple architecture is shown in fig. 1:
1) Control-Client: the TWAMP test initiating terminal sends a request for establishing control connection to the Server entity, negotiates the communication mode of the message, and receives the port number of the test message from the Session-Reflector terminal. Control-Client controls the start and termination of TWAMP-Test sessions.
2) Server (Server): receiving a connection establishing request sent by a Control-Client terminal, negotiating a message communication mode with the Control-Client terminal, receiving a port number of a test message by a Session-indicator terminal, and the like. The Server side manages one or more TEAMP-Test sessions.
3) Session transmitter (Session-Sender): and sending the node of the Test message to the Session-Reflector in the TWAMP-Test Session, receiving the Test message from the Session-Reflector reflecting part, collecting the performance information, and counting the Test result.
4) Session-Reflector (Session-Reflector): and in the TWAMP-Test Session, receiving a Test message from a Session-Sender end and sending a response message.
In the testing stage, a Session-Sender sends a testing message (as shown in fig. 2) to a Session-Reflector, where the testing message includes a serial number and a timestamp sent by the message. After receiving the test message sent by the Session-Sender, the Session-Reflector reflects the test message back to the Session-Sender, and adds information such as its packet receiving timestamp, packet sending timestamp, and message sequence number to the reflected test message (as shown in fig. 3). And after receiving the test message transmitted by the Session-Reflector, the Session-Sender collects message information and measures IP performance.
Assuming that the packet sending timestamp of the Session-Sender in the above process is defined as T1, the packet receiving timestamp is defined as T4, the packet receiving timestamp of the Session-Reflector is defined as T2, and the packet sending timestamp locates T3, the delay of the link can be calculated by the following method. Link latency ═ (T4-T1) - (T3-T2).
The processing time delay of the Reflector is T3-T2.
The forward delay link is T2-T1 (meaningful in the case of network clock synchronization, and meaningless otherwise).
Reverse link delay T4-T3 (significant in the case of network clock synchronization, otherwise). Assuming that the number of messages sent by the Session-Sender end is defined as TxC and the number of messages sent by the Session-Reflector end is defined as RxC in the test process, i can calculate the number of lost packets of the whole return link through TxC-RxC.
The existing TWAMP protocol is a standard protocol for IP network performance measurement, and when measuring network performance, a TWAMP control protocol and a TWAMP test protocol need to be run simultaneously, which requires that the deployed device must have the capability of running a TCP/IP protocol and the IP forwarding capability, otherwise, TWAMP will be deployed more difficultly. However, in a complex networking such as a PTN bearer network, a network may have a two-layer (L2) service and a three-layer (L3) service, for example, in a typical LTE networking, as shown in fig. 4, an access layer employs an L2VPN, deploys an MPLS-TP L2VPN service, a core layer employs an L3VPN, deploys an MPLS-TP L3VPN service, and L2 and L3 services are bridged and intercommunicated through the inside of a bridging device.
With the increasing demands on network performance, network operators also pay more and more attention to testing and monitoring of performance and connectivity of global links from L2 access devices to L3 core console devices. Under this complex networking, difficulties and challenges will be brought to the deployment of the standard TWAMP test protocol, mainly for the following reasons:
1) in an L2 network deployed without IP addresses, the network devices cannot run TCP/IP protocols, such as the L2 access and aggregation network in fig. 4. Since the standard TWAMP protocol is based on the TCP/IP protocol, it is not possible to deploy the standard TWAMP protocol in an L2 network for L2 end-to-end or L2-to-L3 end-to-end link performance metrics.
2) Even if the L2 access device has the capability of running TCP/IP protocol, since each L2 access device may have access to a large number of base station controllers or CE (customer edge) devices, if the standard TWAMP protocol is used to test the link performance from the L2 access device to the L3 core console device, it is necessary to start a TWAMP test session for each access base station controller or CE device and allocate an IP address to the access base station controller or CE device. However, on the L2 access device, the IP address resources that can be allocated to it are limited, which makes large-scale deployment of TWAMP detection exceptionally difficult. Meanwhile, the large-scale starting of the TCP/IP protocol measured at L2 may also affect the service flow of the base station controller and influence the user experience.
3) When the standard TWAMP protocol is deployed on a large scale, the TWAMP control protocol and the test protocol need to be run simultaneously. Since the TWAMP test protocol runs on top of the control protocol, when the control protocol is abnormal, the test protocol is terminated, which is not beneficial to the uninterrupted test of the test protocol for a long time, and is also not beneficial to the control and maintenance of the TWAMP test session.
4) When some devices only support the TWAMP reflector but do not support the TWAMP control protocol, the standard TWAMP cannot be deployed.
That is to say, when an IP performance test is performed on a network link at present, since the standard TWAMP protocol is difficult to deploy, the link test range is greatly limited, and thus the test efficiency is low when the network link is tested.
Disclosure of Invention
The embodiment of the invention provides a link testing method, a device and a system, which are used for at least solving the problem of low testing efficiency when a network link is tested in the related technology.
According to an embodiment of the present invention, there is provided a link test method including: simulating an input message through a user network interface to obtain a test message, wherein the test message is used for testing a current link by using a test protocol in a two-way active measurement protocol TWAMP; sending the test message to a reflector; identifying a response message sent by the reflector in response to the test message, wherein the response message is matched with a stream matching rule of a pre-configured transmitter; and obtaining the test result of the current link according to the response message.
Optionally, before the simulating the input message through the user network interface to obtain the test message, the method further includes: configuring transmission parameters of the transmitter, wherein the transmission parameters at least include an Internet Protocol (Internet Protocol) IP address of an end device as a virtual source IP address, and wherein the end device includes at least one of: a base station controller, a customer edge router; generating a stream matching rule of the transmitter according to the transmitting parameters; or configuring transmission parameters of the transmitter, wherein the transmission parameters at least include an internet protocol IP address of an end device as a virtual destination IP address, and the end device includes at least one of: a base station controller, a customer edge router; and generating a flow matching rule of the transmitter according to the transmission parameters.
Optionally, the generating the flow matching rule of the transmitter according to the transmission parameter includes: generating a flow matching rule of the transmitter according to the message information in the test message, wherein the flow matching rule of the transmitter includes at least one of the following: a source IP address, a destination IP address, a source User Datagram Protocol (UDP) port number, a destination UDP User Datagram Protocol (User Datagram Protocol) port number, and Differentiated Services Code Point (DSCP) information.
Optionally, before the simulating the input message through the user network interface to obtain the test message, the method includes: and configuring a three-layer service virtual interface on the two-layer equipment where the transmitter is located, and configuring a preset IP address for the three-layer service virtual interface, wherein the three-layer service virtual interface is used for triggering an Address Resolution Protocol (ARP) during offline testing.
Optionally, the identifying a response message sent by the reflector in response to the test message includes: receiving a message; performing parameter matching on the received message according to the flow matching rule of the transmitter; and when the parameter matching is successful, judging that the message is identified as the response message sent by the reflector.
Optionally, the obtaining a test result of the current link according to the response packet includes: obtaining the test time delay and/or the packet loss rate obtained by the current link test according to the response message; and sending first alarm information when the test time delay and/or the packet loss rate meet a preset threshold condition.
Optionally, the obtaining, according to the response packet, a test delay obtained by testing the current link includes: acquiring the following timestamps carried in the response message: a first timestamp for the transmitter to send the test message, a second timestamp for the reflector to receive the test message, and a third timestamp for the reflector to send the response message; acquiring a fourth timestamp of the response message received by the transmitter; obtaining at least one of the following test delays according to the first time stamp, the second time stamp, the third time stamp, and the fourth time stamp: forward delay of the current link, reverse delay of the current link, and loop delay of the current link.
Optionally, the obtaining, according to the response packet, a packet loss rate obtained by testing the current link includes: acquiring the packet sending number of the test message sent by the transmitter and the packet receiving number of the response message received by the transmitter; and obtaining the packet loss rate according to the difference value between the packet receiving number and the packet sending number.
Optionally, after the transmitter sends the test message to the reflector, the method further includes: and if the response message is not received in a preset period, judging that the current link has a communication fault, and sending second alarm information.
Optionally, the device in which the transmitter is located includes at least one of: the device comprises an access device, a landing device and a bridging device, wherein the device where the reflector is located comprises at least one of the following devices: the device comprises an access device, a landing device and a bridging device, wherein the bridging device is used for connecting a two-layer convergence network and a three-layer core network.
According to still another embodiment of the present invention, there is also provided a link testing method including: receiving a message through a user network interface; identifying whether the message is a test message sent by a transmitter according to a flow matching rule of a pre-configured reflector, wherein the test message is used for testing a current link by using a test protocol in a two-way active measurement protocol TWAMP; when the test message is identified, responding to the test message to generate a response message; and sending the response message to the transmitter.
Optionally, before receiving the message through the user network interface, the method further includes: configuring reflection parameters of the reflector; generating a flow matching rule of the reflector according to the reflection parameter, wherein the flow matching rule of the reflector comprises at least one of the following rules: a source Internet Protocol (IP) address, a destination IP address, a source User Datagram Protocol (UDP) port number, a destination UDP user datagram protocol port number, and Differential Service Code Point (DSCP) information.
Optionally, the identifying whether the message is a test message sent by the transmitter according to the preconfigured stream matching rule of the reflector includes: performing parameter matching on the received message according to the flow matching rule of the reflector; and when the parameter matching is successful, judging that the message is identified as the test message sent by the transmitter.
According to still another embodiment of the present invention, there is also provided a link testing method including: the method comprises the steps that a transmitter simulates an input message through a user network interface of the transmitter to obtain a test message, wherein the test message is used for testing a current link by using a test protocol in a two-way active measurement protocol TWAMP; and sending the test message to a reflector; the reflector receives messages through a user network interface of the reflector; the reflector identifies whether the message is a test message sent by the transmitter according to a preset flow matching rule of the reflector; when the test message is identified, the reflector responds to the test message to generate a response message and sends the response message to the transmitter; the transmitter identifies a response message sent by the reflector, wherein the response message is matched with a preset flow matching rule of the transmitter; and the transmitter acquires the test result of the current link according to the response message.
There is also provided, in accordance with yet another embodiment of the present invention, apparatus for link testing, the apparatus being located at a transmitter, the apparatus including: the system comprises an analog unit, a test unit and a control unit, wherein the analog unit is used for obtaining a test message by simulating an input message through a user network interface, and the test message is used for testing a current link by using a test protocol in a two-way active measurement protocol TWAMP; a first sending unit, configured to send the test packet to a reflector; an identifying unit, configured to identify a response message sent by the reflector in response to the test message, where the response message matches a stream matching rule of a preconfigured transmitter; and the acquisition unit acquires the test result of the current link according to the response message.
Optionally, the method further comprises: a first configuration unit, configured to configure transmission parameters of the transmitter before the test packet is obtained by simulating an input packet through a user network interface, where the transmission parameters at least include an internet protocol IP address of an end device as a virtual source IP address, or an internet protocol IP address of the end device as a virtual destination IP address, where the end device includes at least one of: a base station controller, a customer edge router; and the generating unit is used for generating the flow matching rule of the transmitter according to the transmitting parameters.
Optionally, the generating unit includes: a generating module, configured to generate a flow matching rule of the transmitter according to the message information in the test message, where the flow matching rule of the transmitter includes at least one of the following: the system comprises a source IP address, a destination IP address, a source User Datagram Protocol (UDP) port number, a destination User Datagram Protocol (UDP) port number and Differential Service Code Point (DSCP) information.
Optionally, the method further comprises: and a second configuration unit, configured to configure a three-layer service virtual interface on a two-layer device where the transmitter is located before the test packet is obtained by simulating an input packet through the user network interface, and configure a predetermined IP address for the three-layer service virtual interface, where the three-layer service virtual interface is used to trigger an address resolution protocol ARP during an offline test.
Optionally, the identification unit includes: the receiving module is used for receiving the message; a matching module, configured to perform parameter matching on the received message according to the flow matching rule of the transmitter; and the identification module is used for judging that the message is identified as the response message sent by the reflector when the parameter matching is successful.
Optionally, the obtaining unit includes: a first obtaining module, configured to obtain, according to the response packet, a test delay and/or a packet loss rate obtained by the current link test; and the first sending module is used for sending first alarm information when the test time delay and/or the packet loss rate meet a preset threshold condition.
Optionally, the method further comprises: and the second sending unit is used for judging that the current link has a communication fault and sending second alarm information when the response message is not received in a preset period after the transmitter sends the test message to the reflector.
Optionally, the device in which the transmitter is located includes at least one of: the device comprises an access device, a landing device and a bridging device, wherein the device where the reflector is located comprises at least one of the following devices: the device comprises an access device, a landing device and a bridging device, wherein the bridging device is used for connecting a two-layer convergence network and a three-layer core network.
There is also provided, in accordance with yet another embodiment of the present invention, apparatus for link testing, the apparatus being located at a reflector, the apparatus including: a receiving unit, configured to receive a message through a user network interface; the identification unit is used for identifying whether the message is a test message sent by a transmitter or not according to a flow matching rule of a pre-configured reflector, wherein the test message is used for testing a current link by using a test protocol in a two-way active measurement protocol TWAMP; a first generating unit, configured to generate a response message in response to the test message when the test message is identified; and a sending unit, configured to send the response message to the transmitter.
Optionally, the method further comprises: a configuration unit, configured to configure the reflection parameter of the reflector before the message is received through the user network interface; a second generating unit, configured to generate a flow matching rule of the reflector according to the reflection parameter, where the flow matching rule of the reflector includes at least one of: a source Internet Protocol (IP) address, a destination IP address, a source User Datagram Protocol (UDP) port number, a destination UDP port number, and Differential Service Code Point (DSCP) information.
Optionally, the identification unit includes: a matching module, configured to perform parameter matching on the received message according to the flow matching rule of the reflector; and the identification module is used for judging that the message is identified as the test message sent by the transmitter when the parameter matching is successful.
According to still another embodiment of the present invention, there is also provided a link test system including: the device comprises a transmitter, wherein the transmitter is used for executing the following operations: simulating an input message through a user network interface to obtain a test message, wherein the test message is used for testing a current link by using a test protocol in a two-way active measurement protocol TWAMP; sending the test message to a reflector; identifying a response message sent by the reflector in response to the test message, wherein the response message is matched with a stream matching rule of a pre-configured transmitter; obtaining a test result of the current link according to the response message; the apparatus comprises a reflector, wherein the reflector is configured to: receiving a message through a user network interface; identifying whether the message is a test message sent by a transmitter according to a flow matching rule of a pre-configured reflector, wherein the test message is used for testing a current link by using a test protocol in a two-way active measurement protocol TWAMP; when the test message is identified, responding to the test message to generate a response message; and sending the response message to the transmitter.
According to still another embodiment of the present invention, there is also provided a storage medium. The storage medium is configured to store program code for performing the steps of: receiving a message through a user network interface; identifying whether the message is a test message sent by a transmitter according to a flow matching rule of a pre-configured reflector, wherein the test message is used for testing a current link by using a test protocol in a two-way active measurement protocol TWAMP; when the test message is identified, responding to the test message to generate a response message; and sending the response message to the transmitter.
By the invention, the current link is tested by using the test protocol in the reserved two-way active measurement protocol TWAMP, so that the standard TWAMP protocol is lightened, the dependence of the TWAMP test on a TCP/IP protocol is relieved, and the limitation of an IP address on the link test by using the TWAMP protocol is reduced. Moreover, in some devices which do not support the TWAMP control protocol, the network link can be tested by deploying the TWAMP test protocol. Therefore, the testing range of the TWAMP testing on the network link is widened, the universality and the flexibility of the testing are improved, and the efficiency of the TWAMP link testing is improved.
Further, when the link test is performed by deploying the TWAMP protocol on a large scale, the TWAMP control protocol and the test protocol can be prevented from running simultaneously. The method and the device avoid that the test protocol is uninterruptedly stopped when the control protocol is abnormal, and are more beneficial to the effective maintenance of the test session.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a simple architecture diagram of a TWAMP protocol in the related art;
FIG. 2 is a diagram of a Sender-Test packet encapsulation format in a non-authentication mode in the related art;
fig. 3 is a format diagram of a Reflector-Test packet encapsulation in a non-authentication mode in the related art;
fig. 4 is a schematic diagram of typical LTE networking and service end-to-end detection in the related art;
FIG. 5 is a simplified architectural diagram of an alternative TWAMP in accordance with an alternative embodiment of the present invention;
FIG. 6 is a flow chart of an alternative link testing method according to an alternative embodiment of the present invention;
FIG. 7 is a schematic diagram of an alternative link test method in accordance with an alternative embodiment of the present invention;
FIG. 8 is a schematic diagram of another alternative link test method according to an alternative embodiment of the present invention;
FIG. 9 is a schematic diagram of yet another alternative link test method in accordance with an alternative embodiment of the present invention;
FIG. 10 is a schematic diagram of yet another alternative link test method in accordance with an alternative embodiment of the present invention;
FIG. 11 is a schematic diagram of yet another alternative link test method in accordance with an alternative embodiment of the present invention;
FIG. 12 is a schematic diagram of yet another alternative link test method in accordance with an alternative embodiment of the present invention;
FIG. 13 is a schematic diagram of yet another alternative link test method in accordance with an alternative embodiment of the present invention;
FIG. 14 is a schematic diagram of yet another alternative link test method in accordance with an alternative embodiment of the present invention;
FIG. 15 is a schematic diagram of yet another alternative link test method in accordance with an alternative embodiment of the present invention;
FIG. 16 is a schematic diagram of yet another alternative link test method in accordance with an alternative embodiment of the present invention;
FIG. 17 is a schematic diagram of yet another alternative link test method in accordance with an alternative embodiment of the present invention;
FIG. 18 is a schematic diagram of yet another alternative link test method in accordance with an alternative embodiment of the present invention;
FIG. 19 is a schematic diagram of yet another alternative link test method in accordance with an alternative embodiment of the present invention;
FIG. 20 is a schematic diagram of yet another alternative link test apparatus in accordance with an alternative embodiment of the present invention;
FIG. 21 is a schematic diagram of another alternative link test apparatus according to an alternative embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Example 1
In order to solve the problem encountered when the standard TWAMP protocol is deployed in a complex networking, the embodiment of the invention provides a scheme for realizing link testing based on a lightweight TWAMP test protocol. The above-mentioned link testing method can be but is not limited to be applied to the architecture shown in fig. 5, and the specific scheme is as follows: in the embodiment of the invention, the control protocol in the standard TWAMP protocol is removed in the link test process, and only the test protocol is reserved, so that the standard TWAMP protocol is light, and the dependence of the TWAMP on the TCP/IP protocol is eliminated. When the TWAMP protocol is deployed in the link test process, the limitation of IP planning or limited IP address resources is avoided, the application scene range of the link test is expanded while the test protocol is deployed more flexibly and rapidly, and the effect of improving the test efficiency of the network link test is further realized.
In the present embodiment, a link testing method is provided. Fig. 6 is a flowchart of an alternative link testing method according to an embodiment of the present invention, and as shown in fig. 6, the flowchart includes the following steps:
s602, simulating an input message through a user network interface to obtain a test message, wherein the test message is used for testing a current link by using a test protocol in a two-way active measurement protocol TWAMP;
s604, sending a test message to the reflector;
s606, identifying a response message sent by the reflector response test message, wherein the response message is matched with a stream matching rule of a pre-configured transmitter;
s608, the test result of the current link is obtained according to the response message.
Alternatively, in the present embodiment, the above-mentioned link testing method may be applied, but not limited, to the link testing system shown in fig. 5, such as the session transmitter of the control terminal in the above-mentioned system. A session transmitter (i.e. a transmitter) in the control terminal simulates an input message through a user network interface of the transmitter to obtain a test message, wherein the test message is used for testing a current link by using a test protocol in a two-way active measurement protocol TWAMP; and sending a test message to a session reflector (namely a reflector) of the server; the reflector receives the message through a user network interface of the reflector; the reflector identifies whether the message is a test message sent by the transmitter according to a preset flow matching rule of the reflector; when the test message is identified, the reflector responds to the test message to generate a response message and sends the response message to the transmitter; the transmitter identifies a response message sent by the reflector, wherein the response message is matched with a stream matching rule of a pre-configured transmitter; and the transmitter acquires the test result of the current link according to the response message.
Optionally, in this embodiment, the TWAMP used in the test process in the above link test method may be, but is not limited to: a control Protocol in a standard Two-Way active measurement Protocol (TWAMP) is removed, and only a test Protocol is reserved. That is, in the present embodiment, the test flow matching rule is generated in advance in the emitter and reflector configuration according to TWAMP; the TWAMP transmitter simulates a user incoming message through a user side network interface (UNI interface) of the transmitter and sends a test message to the reflector; the reflector identifies the transmitter to send a test message according to the flow matching rule, generates a response message and sends the response message to the transmitter; and the transmitter identifies the response message sent by the reflector according to the flow matching rule and acquires the test result of the current link according to the response message. By using the test protocol in the lightweight TWAMP, the dependence of the TWAMP on a TCP/IP protocol and the limitation of a network scene when the standard TWAMP protocol is deployed are relieved. Therefore, more flexible protocol deployment is realized, and flexible testing of links under different scenes in a network environment is guaranteed, so that the effect of improving the link testing efficiency is achieved.
In addition, in this embodiment, the test packet may be obtained by, but not limited to, simulating a User incoming packet (input packet) through a User Network Interface (UNI), and further, since the packet sent through the UNI includes a real service packet and the test packet obtained through the simulation, in order to accurately distinguish the TWAMP test packet from the service packet, in this embodiment, a stream matching rule is automatically generated at the transmitter, so as to ensure that the test packet is accurately distinguished from the transmitted packet, thereby preventing the TWAMP test packet from being forwarded along with the service traffic, and reducing the influence of the test process on the service traffic.
Specifically, as shown in fig. 4, the access layer adopts L2VPN, and deploys Transport-oriented multi-protocol Label Switching-Transport Profile (MPLS-TP) two-layer Virtual Private Network (Virtual Private Network) service (i.e., L2VPN service); the core layer adopts a three-layer virtual private Network (virtual private Network) service (namely an L3VPN service), the MPLS-TP L3VPN service is deployed, and the L2 service and the L3 service are bridged and communicated through the interior of bridging equipment. In the embodiment of the present invention, it is assumed that the transmitter is disposed in the access device of the access layer, and the reflector is disposed in the ground device of the core layer, but not limited to, the TWAMP message flow matching rules are respectively disposed in the transmitter and the reflector, and are issued to the respective corresponding message forwarding devices, and when receiving a message, the message forwarding devices may identify the message according to the configured flow matching rules, thereby implementing link performance measurement on the identified test message (or response message).
It should be noted that, in this embodiment, by testing the current link using the test protocol in the reserved bidirectional active measurement protocol TWAMP, the standard TWAMP protocol is made lightweight, and not only is the TWAMP test independent of the TCP/IP protocol removed, so as to reduce the limitation of the IP address on the link test using the TWAMP protocol. Moreover, in some devices which do not support the TWAMP control protocol, the network link can be tested by deploying the TWAMP test protocol. Therefore, the testing range of the TWAMP testing on the network link is widened, the universality and the flexibility of the testing are improved, and the efficiency of the TWAMP link testing is improved. Further, when the link test is performed by deploying the TWAMP protocol on a large scale, the TWAMP control protocol and the test protocol can be prevented from running simultaneously. The method and the device avoid that the test protocol is uninterruptedly stopped when the control protocol is abnormal, and are more beneficial to the effective maintenance of the test session.
Optionally, in this embodiment, before the test packet is obtained by simulating an input packet through the user network interface, at least one of the following is further included:
1) configuring transmission parameters of a transmitter, wherein the transmission parameters at least comprise an IP address of an end device used as a virtual source IP address, and the end device comprises at least one of the following: a base station controller, a customer edge router; generating a flow matching rule of the transmitter according to the transmitting parameters;
2) configuring transmission parameters of a transmitter, wherein the transmission parameters at least comprise an IP address of the terminal device used as a virtual destination IP address, and the terminal device comprises at least one of the following: a base station controller, a customer edge router; and generating a flow matching rule of the transmitter according to the transmission parameters.
It should be noted that, because the TWAMP test packet is identified based on the flow matching rule, when the access device has no IP plan or has limited IP address resources, in this embodiment, the access device may borrow, but is not limited to, an IP address of an end device (e.g., a base station controller and/or a Customer Edge router (CE device)) as a virtual IP address of the access device, and simulate an input packet through a UNI interface to obtain the test packet.
When the transmitter is located in an access device (e.g., a layer two convergence network device, i.e., an L2 device), the IP address of the borrowing end device is used as the virtual source IP address in the manner 1); and when the transmitter is located in a floor device (e.g., a three-layer core network device, i.e., an L3 device) or a bridge device, the IP address of the borrowing end device will be the virtual destination IP address in mode 2).
Optionally, in this embodiment, the link testing method may implement not only an online link test, but also an offline link test. In the off-line test process, the transmitter may, but is not limited to, trigger an address resolution protocol ARP through a configured three-layer service Virtual Interface (L3VI (Virtual Interface)), so that the corresponding MAC address may also be acquired in an off-line state.
For example, suppose that the device a is an L2 access device, the device B is a bridging device, and is configured to perform bridging and interworking between an L2 service and an L3 service, the device C is an L3 core network ground device, and the device D is a base station controller, and is connected to the device a. A. The B inter-device deploys L2VPN traffic and the B, C inter-device deploys L3VPN traffic. If a TWAMP test is to be deployed between an access device (a device) and a ground device (C device), if the transmitter is located in the access device a, the access device a initiates the test, and since the test is offline, after receiving a response message, the bridge device may not obtain the MAC address of the access device (a device), so that the response message sent back by the reflector may not reach the access device (a device), and the test may not be successful. Therefore, in this embodiment, gratuitous ARP learning may be triggered by the L3VI interface by configuring the L3VI interface in advance and configuring the IP address of the interface, so that the bridge device can acquire the MAC address of the access device (a device) at the time of offline test.
Optionally, in this embodiment, the obtaining a test result of the current link according to the response packet includes: obtaining the test time delay and/or the packet loss rate obtained by testing the current link according to the response message; and when the test time delay and/or the packet loss rate meet the preset threshold value condition, sending first alarm information.
Optionally, in this embodiment, after sending the test packet to the reflector, the method further includes: if the response message is not received in the preset period, judging that the current link has a communication fault, and sending second alarm information.
It should be noted that, in this embodiment, the TWAMP test performed on the current link by using the test protocol in the TWAMP may be a test on link connectivity, or may be a test on link performance.
The testing of the link connectivity may include, but is not limited to, at least one of the following:
1) judging whether the current link is connected or not by judging whether the response message is received or not in a preset period;
2) and judging whether the current link is connected or not by judging whether the packet loss rate is greater than a preset threshold value or not.
By monitoring the link connectivity in real time, the method and the device can report the connectivity loss alarm information or the packet loss rate out-of-limit alarm information in time at the first time when the link has connectivity failure.
After the A device deploys the TWAMP in a large scale, in order to prevent the performance statistics from influencing the service flow, the time delay performance statistics can be closed according to needs, at the moment, the TWAMP only carries out connectivity test, and when the link has packet loss or the threshold of the link packet loss reaches a certain value, a connectivity loss alarm is reported.
Furthermore, performance tests on the link may include, but are not limited to: according to the test time delay and/or the packet loss rate obtained by testing the current link; and analyzing the fault of the current link to send corresponding alarm information according to the analyzed fault.
Specifically, the description is made with reference to the following example, as shown in fig. 7, where the device a is an L2 access device, the device B is a bridging device, and is responsible for bridging and interworking an L2 service and an L3 service, the device C is an L3 core network ground device, and the device D is a base station controller (not shown in the figure) and is connected to the device a. A. The B inter-device deploys L2VPN traffic and the B, C inter-device deploys L3VPN traffic. If TWAMP measurements are to be deployed before the access device a and the bridge floor device C, if the access device a initiates the measurements from L2, the specific implementation is as follows:
s1, configuring a lightweight TWAMP test emitter on the A equipment, appointing optional parameters such as a source IP, a destination IP, a source UDP port number, a destination port number, a source MAC, a destination MAC, a next hop gateway, an access interface, a message DSCP and the like, generating an emitter TWAMP message flow matching rule according to the configured parameters, and sending the emitter TWAMP message flow matching rule to the message forwarding device. Here: during service online test, the source IP address is the IP address of the borrowed base station controller or CE equipment, the destination MAC is the MAC address of the bridging equipment B, and if the destination MAC is not specified, the next hop gateway address needs to be specified. Note that the borrowed virtual IP does not affect the L2 processing flow of the traffic.
S2, configuring a lightweight TWAMP test reflector on the C device, designating optional parameters of a source IP, a destination IP, a source UDP port number, a destination port number, a source MAC, a destination MAC, an access interface, a message DSCP and the like of the reflector, forming a TWAMP message flow matching rule of the reflector according to the configured parameters, and sending the TWAMP message flow matching rule to the message forwarding device. One reflector flow matching rule may match one TWAMP test flow or may match a plurality of TWAMP test flows.
S3, at the emitter (Sender), when the TWAMP needs the service online Test, the TWAMP protocol processing module of the A device borrows the IP address of the base station or the CE device as the virtual IP address of the access device, simulates the incoming message of the user (the message which simulates the incoming of the UNI interface) through the UNI interface, and sends the Test message (Sender-Test Packet) to the C, the message carries the Packet sending timestamp T1 of the A device, and the TWAMP protocol processing module simultaneously carries out the statistics of the Packet sending count (Txc).
S4, in the Reflector (Reflector), after the C device receives the packet through the packet forwarding device of the UNI, the C device performs packet matching according to the previously issued stream matching rule, and if the matching is successful, the C device considers that the packet is a Sender-Test packet of the lightweight TWAMP, and the C device lightweight TWAMP Reflector generates a Reflector-Test packet and sends the Reflector-Test packet to the a device. The Reflector-Test message carries a packet sending timestamp T1 in the Sender-Test message, and simultaneously carries a packet receiving timestamp T2 and a packet sending timestamp T3 of the Reflector-Test message. If the matching is unsuccessful, the message is regarded as a service message, and the message is continuously forwarded according to the forwarding rule.
S5, after the message is received by the transmitter and the A device UNI side message forwarding device, the message is matched according to the previously issued stream matching rule, if the matching is successful, the message is considered to be a Reflector-Test message sent by the lightweight TWAMP Reflector, the TWAMP protocol processing module carries out the statistics of packet receiving counting (RxC), and meanwhile, the packet sending timestamp T1 of the Sender-Test message and the packet receiving timestamp T2 and the packet sending timestamp T3 of the Reflector-Test message are analyzed from the Reflector-Test message, and then the statistics of link performances such as packet loss rate, forward delay, reverse delay, loopback delay and the like are carried out.
And S6, when the A-end equipment needs to perform link connectivity Test, the TWAMP protocol processing module starts connectivity detection, and when the emitter sends a Sender-Test message and does not receive a Reflector-Test message reflected by the Reflector within a period, the TWAMP protocol processing module considers that the link connectivity is faulty and sends a connectivity alarm to the user. And reporting out-of-limit alarm when the link delay or packet loss rate reaches a preset threshold value. And the user performs subsequent processing as required.
By the embodiment provided by the application, the current link is tested by using the test protocol in the reserved two-way active measurement protocol TWAMP, so that the standard TWAMP protocol is light, the dependence of the TWAMP test on the TCP/IP protocol is relieved, and the limitation of an IP address on the link test by using the TWAMP protocol is reduced. Moreover, in some devices which do not support the TWAMP control protocol, the network link can be tested by deploying the TWAMP test protocol. Therefore, the testing range of the TWAMP testing on the network link is widened, the universality and the flexibility of the testing are improved, and the efficiency of the TWAMP link testing is improved. Further, when the link test is performed by deploying the TWAMP protocol on a large scale, the TWAMP control protocol and the test protocol can be prevented from running simultaneously. The method and the device avoid that the test protocol is uninterruptedly stopped when the control protocol is abnormal, and are more beneficial to the effective maintenance of the test session.
As an optional scheme, before the test message is obtained by simulating an input message through the user network interface, the method further includes:
1) configuring transmission parameters of a transmitter, wherein the transmission parameters at least comprise an IP address of an end device used as a virtual source IP address, and the end device comprises at least one of the following: a base station controller, a customer edge router; generating a flow matching rule of the transmitter according to the transmitting parameters; or,
2) configuring transmission parameters of a transmitter, wherein the transmission parameters at least comprise an IP address of the terminal device used as a virtual destination IP address, and the terminal device comprises at least one of the following: a base station controller, a customer edge router; and generating a flow matching rule of the transmitter according to the transmission parameters.
It should be noted that, because the TWAMP test packet is identified based on the flow matching rule, when the access device has no IP plan or has limited IP address resources, in this embodiment, the access device may borrow, but is not limited to, an IP address of an end device (e.g., a base station controller and/or a Customer Edge router (CE device)) as a virtual IP address of the access device, and simulate an input packet through a UNI interface to obtain the test packet.
When the transmitter is located in the access device, the IP address of the borrowing end device is used as the virtual source IP address in the mode 1); and when the transmitter is located in the floor device or the bridge device, the IP address of the borrowing end device will be the virtual destination IP address in the mode 2).
Optionally, in this embodiment, generating the flow matching rule of the transmitter according to the transmission parameter includes: generating a flow matching rule of the transmitter according to message information in the test message, wherein the flow matching rule of the transmitter comprises at least one of the following: source IP address, destination IP address, source UDP port number, destination UDP port number, differentiated services code point DSCP information.
According to the embodiment provided by the application, the IP address of the borrowed end equipment is used as the virtual IP address, so that the test limitation caused by TWAMP test in the prior art under the conditions of no IP planning or limited IP resources is overcome, and the dependence on TCP/IP during TWAMP deployment is eliminated during link test. Thereby achieving the purposes of expanding the test range and improving the test efficiency.
As an optional solution, before the test message is obtained by simulating the input message through the user network interface, the method includes:
s1, configuring a three-layer service virtual interface on the two-layer device where the transmitter is located, and configuring a preset IP address for the three-layer service virtual interface, wherein the three-layer service virtual interface is used for triggering an address resolution protocol ARP during an offline test.
It should be noted that, during the offline test, the bridging device may not be able to obtain the MAC address of the device where the transmitter is located, so that the response message reflected back to the test message may not reach the device where the transmitter is located. Therefore, in this embodiment, it is necessary to configure an L3VI interface and configure an IP address of the interface on the device where the TWAMP transmitter is located, and trigger gratuitous ARP learning by the L3VI interface, so that the bridge device can obtain the MAC address of the device where the transmitter is located.
For example, suppose that the device a is an L2 access device, the device B is a bridging device, and is configured to perform bridging and interworking between an L2 service and an L3 service, the device C is an L3 core network ground device, and the device D is a base station controller, and is connected to the device a. A. The B inter-device deploys L2VPN traffic and the B, C inter-device deploys L3VPN traffic.
If a TWAMP test is to be deployed between an access device (a device) and a ground device (C device), if a transmitter is located in the access device a, the access device a initiates the test, and since the test is offline, the access device (a device) where the transmitter is located triggers gratuitous ARP learning by configuring an L3VI interface in advance and configuring an IP address of the interface, so that the bridge device can learn to acquire the MAC address of the access device (a device) before returning a response message.
By the embodiment provided by the application, the TWAMP test is completed in an off-line state, so that the test efficiency is further ensured.
As an alternative, receiving the response message sent by the reflector in response to the test message includes:
s1, receiving the message;
s2, matching parameters of the received message according to the flow matching rule of the transmitter;
and S3, when the parameter matching is successful, judging that the message is identified as a response message sent by the reflector.
For example, suppose that the device a is an L2 access device, the device B is a bridging device, and is configured to perform bridging and interworking between an L2 service and an L3 service, the device C is an L3 core network ground device, and the device D is a base station controller, and is connected to the device a. A. The B inter-device deploys L2VPN traffic and the B, C inter-device deploys L3VPN traffic.
After the C device receives the message through the UNI message forwarding device, the C device performs message matching according to a previously issued stream matching rule, if the matching is successful, the C device is considered to be a Sender-Test message of the lightweight TWAMP, and the lightweight TWAMP Reflector of the C device generates a response message (Reflector-Test packet) of the Reflector and sends the response message to the a device. The Reflector-Test message carries a packet sending timestamp T1 in the Sender-Test message, and simultaneously carries a packet receiving timestamp T2 and a packet sending timestamp T3 of the Reflector-Test message. If the matching is unsuccessful, the message is regarded as a service message, and the message is continuously forwarded according to the forwarding rule.
According to the embodiment provided by the application, the service message and the test message (and the response message) are accurately distinguished through the pre-configured flow matching rule, so that the influence of the test process on the service flow is reduced.
As an optional scheme, the obtaining a test result of the current link according to the response message includes:
s1, obtaining the test time delay and/or the packet loss rate obtained by the current link test according to the response message;
and S2, when the test time delay and/or the packet loss rate meet the preset threshold value condition, sending first alarm information.
Optionally, in this embodiment, obtaining, according to the response packet, a test delay obtained by testing the current link includes: acquiring the following timestamps carried in the response message: the first time stamp T1 of the test message is sent by the transmitter, the second time stamp T of the test message is received by the reflector, and the third time stamp T3 of the response message is sent by the reflector; acquiring a fourth timestamp T4 of the response message received by the transmitter; obtaining at least one of the following test time delays according to the first time stamp, the second time stamp, the third time stamp and the fourth time stamp: forward delay of the current link, reverse delay of the current link, and loop delay of the current link.
The forward delay may be, but is not limited to, T2-T1, the reverse delay may be, but is not limited to, T4-T3, the reflector processing delay may be, but is not limited to, T3-T2, and the loop delay may be, but is not limited to, (T4-T1) - (T3-T2).
Optionally, in this embodiment, the obtaining, according to the response packet, the packet loss rate obtained by testing the current link includes: acquiring the number TxC of packets sent by the transmitter to the test message and the number RxC of packets received to the response message; and acquiring the packet loss rate according to the difference value of the packet receiving number and the packet sending number.
The packet loss number may be, but is not limited to, TxC-RxC, and the packet loss rate may be determined according to the packet loss number, for example, the packet loss rate is (TxC-RxC)/TxC.
As an optional scheme, after sending the test message to the reflector, the method further includes:
and S1, if the response message is not received in the preset period, judging that the current link has a communication fault, and sending second alarm information.
By the embodiment provided by the application, after the lightweight TWAMP is deployed in a large scale, in order to prevent performance statistics from influencing service flow, the performance statistics such as time delay can be closed as required, and the individual connectivity test of the link can be realized by judging whether the response message is received.
As an alternative, the device in which the transmitter is located includes at least one of: the device comprises an access device, a landing device and a bridging device, wherein the device where the reflector is located comprises at least one of the following devices: the device comprises an access device, a landing device and a bridging device, wherein the bridging device is used for connecting a two-layer convergence network and a three-layer core network.
For example, suppose that the device a is an L2 access device, the device B is a bridging device, and is configured to perform bridging and interworking between an L2 service and an L3 service, the device C is an L3 core network ground device, and the device D is a base station controller and is connected to the device a. In this example, the above test method may be applied to a process of testing a linear link from an access device end to a floor device end actively initiated by an L2 side to an L3 side, may also be applied to a process of testing a linear link from an L2 side to an L3 side actively initiated segment (i.e., from an access device end to a bridge device end), and may also be applied to a process of testing a linear link from an L2 side to an L3 side actively initiated segment (i.e., from a bridge device end to a floor device end).
For example, in the present example, the above test method may be applied in an end-to-end linear link test process in the L2VPN network.
For example, suppose that the device a is an L2 access device, the device B is a bridging device, and is configured to perform bridging and interworking between an L2 service and an L3 service, the device C is an L3 core network ground device, and the device D is a base station controller and is connected to the device a. In this example, the above test method may be applied to a process of testing a linear link from an access device end to a console device end actively initiated from an L3 side to an L2 side, may also be applied to a process of testing a linear link from an L3 side to an L2 side actively initiated segment (i.e., from a bridge device end to an access device end), and may also be applied to a process of testing a linear link from an L3 side to an L2 side actively initiated segment (i.e., from a console device end to a bridge device end).
For example, in the present example, the above test method may be applied in an end-to-end linear link test process in an L3VPN network.
The following examples may be specifically mentioned:
as an alternative example 1): end-to-end online performance measurements are actively initiated on the side of L2 to the side of L3, as shown in fig. 8. Under the condition that the service is on line, the access device L2 actively initiates TWAMP measurement, and collects and counts performance metrics such as link delay, packet loss and the like from the access of L2 to the access of L3 to the ground devices in real time. Mainly comprises the following steps:
s1, in the manner described in the above embodiment, a lightweight TWAMP reflector is deployed on the core console device C, and optional parameters such as a source IP address, a destination IP address, a source UDP port number, a destination UDP port number, and a message DSCP of the reflector are specified.
S2, deploying a lightweight TWAMP transmitter on the access device a, and specifying optional parameters of the transmitter, such as a source IP address, a destination IP address, a source UDP port number, a destination UDP port number, a source MAC address, and a destination MAC address. Note that the source IP address is borrowed from the base station IP address, and the destination IP address is the L3 floor device IP address. When the destination MAC is specified, the MAC address is the MAC address of the bridging device B, otherwise, the next-hop gateway address needs to be specified.
S3, send TWAMP test on device a.
S4, in the manner described in the above embodiment, the TWAMP transmitter of the a device simulates the incoming message of the user and sends the test message to the C device through the UNI interface.
S5, in the manner described in the above embodiment, on the UNI side of the C device, the packet forwarding device matches the TWAMP test packet according to the TWAMP flow matching rule, generates a reflection packet, and sends the reflection packet to the a device.
S6, in the manner described in the above embodiment, on the UNI side of the a device, after the packet forwarding device matches the TWAMP test packet according to the TWAMP flow matching rule, the packet forwarding device sends the TWAMP test packet to the TWAMP protocol module for processing, and the TWAMP protocol module performs packet loss and delay statistics.
S7, after the A device deploys TWAMP in large scale, in order to prevent the performance statistics from affecting the service flow, the time delay performance statistics can be closed according to the need, at the moment, the TWAMP only carries out connectivity test, and when the link packet loss rate reaches a preset threshold value, a connectivity out-of-limit alarm is reported; or reporting the alarm of connectivity loss when no response message is received in a certain period.
As an alternative example 2): as shown in fig. 9, under the condition that a service is online, the L3 core ground device actively initiates TWAMP measurement, and collects and counts performance metrics such as delay and packet loss of a link from the L3 ground device to the L2 access device in real time. Mainly comprises the following steps:
s1, in the manner described in the above embodiment, a lightweight TWAMP reflector is deployed on the L2 access device a, and the source IP address, the destination IP address, the source UDP port number, the destination UDP port number, and the parameters such as the message DSCP of the reflector are specified.
S2, a lightweight TWAMP transmitter is deployed on the L3 core landing device C, and parameters of a source IP address, a destination IP address, a source UDP port number, a destination UDP port number, a message DSCP and the like of the transmitter are specified. Note that the destination IP address here is a base station or CE device IP address, and the source address is a L3 floor device IP address.
S3, send TWAMP test on device C.
S4, as described in the above embodiments, the TWAMP transmitter of the C device simulates the incoming message of the user and sends the test message to the a device through the UNI interface.
S5, in the manner described in the above embodiment, on the L2UNI side of the a device, the packet forwarding device matches the TWAMP test packet according to the TWAMP flow matching rule, generates a reflection packet, and sends the reflection packet to the C device.
S6, in the manner described in the above embodiment, on the L3UNI side of the C device, after the packet forwarding device matches the TWAMP test packet according to the TWAMP flow matching rule, the packet forwarding device sends the TWAMP test packet to the TWAMP protocol module for processing, and the TWAMP protocol module performs packet loss and delay statistics.
S7, after the C device deploys TWAMP in large scale, in order to prevent the performance statistics from affecting the service flow, the time delay performance statistics can be closed according to the need, at the moment, the TWAMP only carries out connectivity test, and when the link packet loss rate reaches a preset threshold value, a connectivity out-of-limit alarm is reported; or reporting the alarm of connectivity loss when no response message is received in a certain period.
As an optional example 3): as shown in fig. 10, under the condition that a service is offline or before the service is online, the L2 access device actively initiates TWAMP measurement, and collects performance metrics such as delay and packet loss of a link between the L2 access device and the L3 floor device in real time. Mainly comprises the following steps:
s1, in the manner described in the above embodiment, deploy the lightweight TWAMP reflector in the core console device C, and specify parameters such as the source IP address, the destination IP address, the source UDP port number, the destination UDP port number, and the message DSCP of the reflector.
S2, deploying a lightweight TWAMP transmitter on the access device a, and specifying parameters of a source IP address, a destination IP address, a source UDP port number, a destination UDP port number, a source MAC address, a destination MAC address, and the like of the transmitter. Note that the source IP address here may be borrowed from a base station IP address or an L3vi interface IP address, and the destination IP address is an L3 floor device IP address. When the destination MAC is specified, the MAC address is the MAC address of the bridging device B, otherwise, the next-hop gateway address needs to be specified.
S3, because of the offline test, the bridge device may not obtain the MAC address of the access device a, so that the reflected test packet may not reach the transmitter, and the test may not be successful, therefore, before the test, the TWAMP transmitter is required to trigger gratuitous ARP learning, so that the bridge device can learn the MAC address of the access device. Or configuring an L3VI interface and an IP address of the interface at the L2 access device, and triggering ARP learning by the three-layer L3VI interface so that the bridge device can acquire the MAC address of the L2 access device.
S4, send TWAMP test on device a.
S5, in the manner described in the above embodiment, the TWAMP transmitter of the a device simulates the incoming message of the user and sends the test message to the C device through the UNI interface.
S6, in the manner described in the above embodiment, on the UNI side of the C device, the packet forwarding device matches the TWAMP test packet according to the TWAMP flow matching rule, generates a reflection packet, and sends the reflection packet to the a device.
S7, in the manner described in the above embodiment, on the UNI side of the a device, after the packet forwarding device matches the TWAMP test packet according to the TWAMP flow matching rule, the packet forwarding device sends the TWAMP test packet to the TWAMP protocol module for processing, and the TWAMP protocol module performs packet loss and delay statistics.
S8, after the A device deploys TWAMP in large scale, in order to prevent the performance statistics from affecting the service flow, the time delay performance statistics can be closed according to the need, at the moment, the TWAMP value is used for connectivity test, and when the link packet loss rate reaches a preset threshold value, a connectivity out-of-limit alarm is reported; or reporting the alarm of connectivity loss when no response message is received in a certain period.
As an alternative example 4): as shown in fig. 11, under the condition that a service is offline or before the service is online, the L3 side actively initiates end-to-end offline performance measurement to the L2 side, where TWAMP measurement is actively initiated by an L3 core landing device, and performance metrics such as delay and packet loss of a link from the L3 landing device to an L2 access device are collected and counted in real time. Mainly comprises the following steps:
s1, in the manner described in the above embodiment, a lightweight TWAMP reflector is deployed on the L2 access device a, and the source IP address, the destination IP address, the source UDP port number, the destination UDP port number, and the parameters such as the message DSCP of the reflector are specified.
S2, a lightweight TWAMP transmitter is deployed on the core console device C, and specifies parameters such as a source IP address, a destination IP address, a source UDP port number, a destination UDP port number, and a message DSCP of the transmitter. Note that the destination IP address here is a base station IP address, the L3VI interface IP address, and the source address is an L3 floor device IP address.
S3, because the bridge device may not obtain the MAC address of the access device a in the offline test, the test message sent by the transmitter may not reach the reflector, and the test may not be successful, therefore, before the test, the TWAMP reflector is required to trigger gratuitous ARP learning, so that the bridge device can learn the MAC address of the access device. Or configuring an L3VI interface and an IP address of the interface at the L2 access device, and triggering ARP learning by the three-layer L3VI interface so that the bridge device can acquire the MAC address of the L2 access device.
S4, send TWAMP test on device C.
S5, as described in the above embodiments, the TWAMP transmitter of the C device simulates the incoming message of the user and sends the test message to the a device through the UNI interface.
S6, in the manner described in the above embodiment, on the L2UNI side of the a device, the packet forwarding device matches the TWAMP test packet according to the TWAMP flow matching rule, generates a reflection packet, and sends the reflection packet to the C device.
S7, in the manner described in the above embodiment, on the L3UNI side of the C device, after the packet forwarding device matches the TWAMP test packet according to the TWAMP flow matching rule, the packet forwarding device sends the TWAMP test packet to the TWAMP protocol module for processing, and the TWAMP protocol module performs packet loss and delay statistics.
S8, after the C device deploys TWAMP in large scale, in order to prevent the performance statistics from affecting the service flow, the time delay performance statistics can be closed according to the need, at the moment, the TWAMP only carries out connectivity test, and when the link packet loss rate reaches a preset threshold value, a connectivity out-of-limit alarm is reported; or reporting the alarm of connectivity loss when no response message is received in a certain period.
As an optional example 5): l2 to L2 end-to-end segment measurement, as shown in fig. 12, this embodiment is mainly used in L2+ L3 networking, and L2 access side to bridging device L2 side segment network link measurement. The method comprises the steps that TWAMP measurement is actively initiated from an L2 access device, and performance metrics such as link delay, packet loss and the like from the L2 access device to a bridging device L2 side are collected and counted in real time; mainly comprises the following steps:
s1, in the manner described in the above embodiment, a TWAMP reflector is deployed on the side of L2 of the bridge device B, and the source IP address, the destination IP address, the source UDP port number, the destination UDP port number, the source MAC, the destination MAC, the packet DSCP, and other parameters of the reflector are specified.
S2, deploying a lightweight TWAMP transmitter on the access device a, and specifying parameters of a source IP address, a destination IP address, a source UDP port number, a destination UDP port number, a source MAC address, a destination MAC address, and the like of the transmitter.
S3, send TWAMP test on device a.
S4, the TWAMP transmitter of the a device simulates incoming messages of the user and sends test messages to the B device through the UNI interface in the manner described in the above embodiments.
S5, as described in the above embodiment, on the L2 side of the bridge device B, the packet forwarding apparatus matches the TWAMP test packet according to the TWAMP flow matching rule, generates a reflection packet, and sends the reflection packet to the a device.
S6, in the manner described in the above embodiment, on the L2UNI side of the a device, after the packet forwarding device matches the TWAMP test packet according to the TWAMP flow matching rule, the packet forwarding device sends the TWAMP test packet to the TWAMP protocol module for processing, and the TWAMP protocol module performs packet loss and delay statistics.
S7, after the A device deploys TWAMP in large scale, in order to prevent the performance statistics from affecting the service flow, the time delay performance statistics can be closed according to the need, at the moment, the TWAMP value is used for connectivity test, and when the link packet loss rate reaches a preset threshold value, a connectivity out-of-limit alarm is reported; or reporting the alarm of connectivity loss when no response message is received in a certain period.
When conducting online or offline testing, reference may be made to the configurations of the online and offline test scenarios of examples 1 to 4.
As an optional example 6): end-to-end segment measurement from the L3 side to the L3 side, as shown in fig. 13, this embodiment is mainly used for L2+ L3 networking, and L3 floor device-to-bridge device L3 side segment network link measurement. The L3 ground equipment actively initiates TWAMP measurement, and collects and counts performance metrics such as link delay, packet loss and the like from the L3 ground equipment to the L3 bridge equipment in real time. Mainly comprises the following steps:
s1, in the manner described in the above embodiment, a TWAMP reflector is deployed on the L3 side of the bridge device (B device), and parameters such as a source IP address, a destination IP address, a source UDP port number, a destination UDP port number, and a message DSCP of the reflector are specified.
S2, deploying a lightweight TWAMP transmitter on the access device (C device), and specifying parameters of the transmitter, such as a source IP address, a destination IP address, a source UDP port number, a destination UDP port number, and a DSCP.
S3, launch TWAMP test on C device.
S4, the TWAMP transmitter of the C device simulates incoming messages of the user and sends test messages to the B device through the UNI interface in the manner described in the above embodiments.
S5, as described in the above embodiment, on the L3UNI side of the bridge device B, the packet forwarding apparatus matches the TWAMP test packet according to the TWAMP flow matching rule, generates a reflection packet, and sends the reflection packet to the C device.
S6, in the manner described in the above embodiment, on the L3UNI side of the C device, after the packet forwarding device matches the TWAMP test packet according to the TWAMP flow matching rule, the packet forwarding device sends the TWAMP test packet to the TWAMP protocol module for processing, and the TWAMP protocol module performs packet loss and delay statistics.
S7, if the measurement is to be initiated on the L3 side of the bridge device (B device), the transmitter and reflector just need to be interchanged for the location interface.
S8, after the C device deploys TWAMP in large scale, in order to prevent the performance statistics from affecting the service flow, the time delay performance statistics can be closed according to the need, at the moment, the TWAMP value is used for connectivity test, and when the link packet loss rate reaches a preset threshold value, a connectivity out-of-limit alarm is reported; or reporting the alarm of connectivity loss when no response message is received in a certain period.
As an optional example 7): l2VPN end-to-end measurement, as shown in fig. 14, this embodiment is mainly used for L2VPN networking, and L2 access side to another L2 access side end-to-end link measurement. The method comprises the steps that TWAMP measurement is actively initiated from an L2 access device, and performance metrics such as link delay, packet loss and the like from the access device on one side of L2 to the access device on the other side of L2 are collected and counted in real time; the specific implementation manner is the same as that of the fifth embodiment.
As an alternative example 8): l3VPN end-to-end measurement, as shown in fig. 15, this embodiment is mainly used for L3VPN networking, and L3 access side to another L3 access side end-to-end link measurement. The method comprises the steps that TWAMP measurement is actively initiated from an L3 access device, and performance metrics such as link delay, packet loss and the like from the access device on one side of L3 to the access device on the other side of L3 are collected and counted in real time; the specific implementation mode is the same as that of the sixth embodiment.
As an optional example 9): in L2 to L3 end-to-end overlay measurement, as shown in fig. 16, this embodiment is used in L2+ L3 complex networking, and L2 access device to L3 core floor device end-to-end link performance metrics are overlaid with L2 network and L3 network segment end-to-end link performance metrics. This measurement is a superposition of examples 1 to 6, and can monitor the performance of each segment of the network in real time. Mainly comprises the following steps:
s1, a transmitter Sender1 directed to the core ground device C and a reflector Sender2 directed to the bridge device B are disposed on the access device a.
At S2, a reflector2 of a Sender2 is disposed on the L2 side of the bridge device B.
At S3, a transmitter Sender3 pointing to C is disposed on the L3 side of the bridge device B.
S4, configure reflector1 of Sender1 and reflector3 of Sender3 in core floor device C.
S5, through the configuration, the Sender1 and the reflector1 measure the link performance from the L2 access device to the L3 core landing device; the Sender2 and the reflector2 measure the link performance of the L2 access device to the L2 side of the bridge device; the Sender3 and the reflector3 measure the link performance between the bridge device L3 side to the core floor device.
The connectivity test in this scenario is the same as the test method in the previous example, and the description of this example is omitted here.
As an alternative example 10): in L3-L2 end-to-end overlay measurement, as shown in fig. 17, this embodiment is used in L2+ L3 complex networking, and L3 core floor device-to-L2 access device end-to-end link performance metrics are overlaid with L2 network and L3 network segment end-to-end link performance metrics. The measurement mode is a superposition of the example 1 to the practical example 6, and the performance of each section of the network can be monitored in real time. Mainly comprises the following steps:
s1, configuring a transmitter Sender1 pointing to L2 access device a and a reflector Sender2 pointing to bridge device B on access device C.
At S2, a reflector2 of a Sender2 is disposed on the L3 side of the bridge device B.
S3, a transmitter Sender3 directed to the access device a is disposed on the L2 side of the bridge device B.
S4, access device a at L2 is configured with reflector1 for Sender1 and reflector3 for Sender 3.
S5, through the configuration, the Sender1 and the reflector1 measure the link performance from the L3 core landing device to the L2 access device; the Sender2 and the reflector2 measure the link performance of the L3 core ground device to the L3 side of the bridge device; the Sender3 and the reflector3 measure the link performance from the side of the bridge device L2 to the access device L2.
The connectivity test in this scenario is the same as the test method in the previous example, and the description of this example is omitted here.
As an optional example 11): as shown in fig. 18, the end-to-end measurement from the L2 side to the base station controller or the CE device is to actively initiate TWAMP measurement in the L2 access device, and collect and count performance metrics such as link delay and packet loss between the L2 access device and the base station controller or the CE device in real time. Mainly comprises the following steps:
s1, according to the foregoing embodiment, a TWAMP reflector is deployed on a base station controller or a CE device, and optional parameters such as a source IP address, a destination IP address, a source UDP port number, a destination UDP port number, a source MAC, a destination MAC, and a message DSCP of the reflector are specified.
S2, deploying a lightweight TWAMP transmitter on the access device a, and specifying optional parameters of the transmitter, such as a source IP address, a destination IP address, a source UDP port number, a destination UDP port number, a source MAC address, and a destination MAC address.
S3, send TWAMP test on device a.
S4, according to the above embodiment, the TWAMP transmitter of the a device sends a test message to the base station controller or the CE device.
S5, the base station controller or the CE device reflects the test message to the device a according to the above embodiment.
And S6, after the A equipment receives the test message reflected by the base station controller or the CE equipment, packet loss and time delay statistics are carried out.
The connectivity test in this scenario is the same as the test method in the previous example, and the description of this example is omitted here.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
In this embodiment, a link testing method is further provided, as shown in fig. 19, including:
s1902, receiving a message through a user network interface;
s1904, identifying whether the message is a test message sent by the transmitter according to a flow matching rule of a pre-configured reflector, wherein the test message is used for testing the current link by using a test protocol in a two-way active measurement protocol TWAMP;
s1906, when the test message is identified, responding to the test message to generate a response message;
s1908, sends a response message to the transmitter.
Optionally, a scheme for implementing a link test based on a lightweight TWAMP test protocol is proposed in the embodiment of the present invention. The above-mentioned link testing method can be applied, but not limited, to the architecture shown in fig. 5, such as to the session reflector of the server. The specific scheme is as follows: a session transmitter (namely a transmitter) in a control terminal simulates an input message through a user network interface of the transmitter to obtain a test message, wherein the test message is used for testing a current link by using a test protocol in a two-way active measurement protocol TWAMP; and sending a test message to a session reflector (namely a reflector) of the server; the reflector receives the message through a user network interface of the reflector; the reflector identifies whether the message is a test message sent by the transmitter according to a preset flow matching rule of the reflector; when the test message is identified, the reflector responds to the test message to generate a response message and sends the response message to the transmitter; the transmitter identifies a response message sent by the reflector, wherein the response message is matched with a stream matching rule of a pre-configured transmitter; and the transmitter acquires the test result of the current link according to the response message.
Optionally, in this embodiment, the control protocol in the standard TWAMP protocol is removed during the link test, and only the test protocol is reserved, so that the standard TWAMP protocol is light, and thus the TWAMP is not dependent on the TCP/IP protocol. When the TWAMP protocol is deployed in the link test process, the limitation of IP planning or limited IP address resources is avoided, the application scene range of the link test is expanded while the test protocol is deployed more flexibly and rapidly, and the effect of improving the test efficiency of the network link test is further realized.
Optionally, in this embodiment, the TWAMP used in the test process in the above link test method may be, but is not limited to: a control Protocol in a standard Two-Way Active Measurement Protocol (TWAMP) is removed, and only a test Protocol is reserved. That is, by using the test protocol in the TWAMP that is lightweight, the TWAMP is not dependent on the TCP/IP protocol. Therefore, more flexible protocol deployment is realized, and flexible testing of links under different scenes in a network environment is guaranteed, so that the effect of improving the link testing efficiency is achieved.
In addition, in this embodiment, the test packet may be obtained by, but not limited to, simulating a User incoming packet (input packet) through a User Network Interface (UNI), and further, since the packet sent through the UNI includes a real service packet and the test packet obtained through the simulation, in order to accurately distinguish the TWAMP test packet from the service packet, in this embodiment, a flow matching rule is pre-configured in the transmitter to ensure that the test packet is accurately distinguished from the transmitted packet, so that the TWAMP test packet is prevented from being forwarded along with the service traffic, and the influence of the test process on the service traffic is reduced.
Optionally, in this embodiment, before receiving the message through the user network interface, the method further includes: configuring reflection parameters of a reflector; generating a flow matching rule for the reflector based on the reflection parameters, wherein the flow matching rule for the reflector comprises at least one of: source IP address, destination IP address, source UDP port number, destination UDP port number, differentiated services code point DSCP information.
Optionally, in this embodiment, identifying whether the message is a test message sent by the transmitter according to a stream matching rule of a preconfigured reflector includes: performing parameter matching on the received message according to the flow matching rule of the reflector; and when the parameter matching is successful, judging that the identified message is a test message sent by the transmitter.
By the embodiment provided by the application, the current link is tested by using the test protocol in the reserved two-way active measurement protocol TWAMP, so that the standard TWAMP protocol is light, the dependence of the TWAMP test on the TCP/IP protocol is relieved, and the limitation of an IP address on the link test by using the TWAMP protocol is reduced. Moreover, in some devices which do not support the TWAMP control protocol, the network link can be tested by deploying the TWAMP test protocol. Therefore, the testing range of the TWAMP testing on the network link is widened, the universality and the flexibility of the testing are improved, and the efficiency of the TWAMP link testing is improved. Further, when the link test is performed by deploying the TWAMP protocol on a large scale, the TWAMP control protocol and the test protocol can be prevented from running simultaneously. The method and the device avoid that the test protocol is uninterruptedly stopped when the control protocol is abnormal, and are more beneficial to the effective maintenance of the test session.
Example 3
In this embodiment, a link testing apparatus is further provided, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, and the description already made is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 20 is a block diagram of a link test apparatus according to an embodiment of the present invention, as shown in fig. 20, the apparatus is located at a transmitter, and the apparatus includes:
1) the simulating unit 2002 is configured to obtain a test packet by simulating an input packet through a user network interface, where the test packet is used to test a current link by using a test protocol in a two-way active measurement protocol TWAMP;
2) a first sending unit 2004, configured to send a test packet to the reflector;
3) an identifying unit 2006, configured to identify a response message sent by the reflector in response to the test message, where the response message matches a stream matching rule of a preconfigured transmitter;
4) the obtaining unit 2008 obtains the test result of the current link according to the response message.
Optionally, in this embodiment, the above-mentioned link testing apparatus may be applied, but not limited to, to a link testing system shown in fig. 5, where the system includes: the device where the transmitter is located (such as a control terminal) and the device where the reflector is located (such as a server). Alternatively, in this embodiment, the above apparatus may be, but is not limited to, applied in a session transmitter of a control terminal in the above system.
(1) The session transmitter (i.e., transmitter) in the control terminal is configured to: simulating an input message through a user network interface to obtain a test message, wherein the test message is used for testing a current link by using a test protocol in a two-way active measurement protocol TWAMP; sending a test message to a reflector; identifying a response message sent by the reflector in response to the test message, wherein the response message is matched with a stream matching rule of a pre-configured transmitter; obtaining a test result of the current link according to the response message;
(2) the session reflector (i.e., reflector) in the server is used to perform the following operations: receiving a message through a user network interface; identifying whether the message is a test message sent by a transmitter according to a flow matching rule of a pre-configured reflector, wherein the test message is used for testing a current link by using a test protocol in a two-way active measurement protocol TWAMP; when the test message is identified, responding to the test message to generate a response message; and sending a response message to the transmitter.
Optionally, in this embodiment, the TWAMP used in the test process in the above link test method may be, but is not limited to: a control Protocol in a standard Two-Way active measurement Protocol (TWAMP) is removed, and only a test Protocol is reserved. That is, in the present embodiment, the test flow matching rule is generated in advance in the emitter and reflector configuration according to TWAMP; the TWAMP transmitter simulates a user incoming message through a user side network interface (UNI interface) of the transmitter and sends a test message to the reflector; the reflector identifies the transmitter to send a test message according to the flow matching rule, generates a response message and sends the response message to the transmitter; and the transmitter identifies the response message sent by the reflector according to the flow matching rule and acquires the test result of the current link according to the response message. By using the test protocol in the lightweight TWAMP, the dependence of the TWAMP on a TCP/IP protocol and the limitation of a network scene when the standard TWAMP protocol is deployed are relieved. Therefore, more flexible protocol deployment is realized, and flexible testing of links under different scenes in a network environment is guaranteed, so that the effect of improving the link testing efficiency is achieved.
In addition, in this embodiment, the test packet may be obtained by, but not limited to, simulating a User incoming packet (input packet) through a User Network Interface (UNI), and further, since the packet sent through the UNI includes a real service packet and the test packet obtained through the simulation, in order to accurately distinguish the TWAMP test packet from the service packet, in this embodiment, a stream matching rule is automatically generated at the transmitter, so as to ensure that the test packet is accurately distinguished from the transmitted packet, thereby preventing the TWAMP test packet from being forwarded along with the service traffic, and reducing the influence of the test process on the service traffic.
Specifically, as shown in fig. 4, the access layer adopts L2VPN, and deploys Transport-oriented multi-protocol Label Switching-Transport Profile (MPLS-TP) two-layer Virtual Private Network (Virtual Private Network) service (i.e., L2VPN service); the core layer adopts a three-layer virtual private Network (virtual private Network) service (namely an L3VPN service), the MPLS-TP L3VPN service is deployed, and the L2 service and the L3 service are bridged and communicated through the interior of bridging equipment. In the embodiment of the present invention, it is assumed that the transmitter is disposed in the access device of the access layer, and the reflector is disposed in the ground device of the core layer, but not limited to, the TWAMP message flow matching rules are respectively disposed in the transmitter and the reflector, and are issued to the respective corresponding message forwarding devices, and when receiving a message, the message forwarding devices may identify the message according to the configured flow matching rules, thereby implementing link performance measurement on the identified test message (or response message).
It should be noted that, in this embodiment, by testing the current link using the test protocol in the reserved bidirectional active measurement protocol TWAMP, the standard TWAMP protocol is made lightweight, and not only is the TWAMP test independent of the TCP/IP protocol removed, so as to reduce the limitation of the IP address on the link test using the TWAMP protocol. Moreover, in some devices which do not support the TWAMP control protocol, the network link can be tested by deploying the TWAMP test protocol. Therefore, the testing range of the TWAMP testing on the network link is widened, the universality and the flexibility of the testing are improved, and the efficiency of the TWAMP link testing is improved. Further, when the link test is performed by deploying the TWAMP protocol on a large scale, the TWAMP control protocol and the test protocol can be prevented from running simultaneously. The method and the device avoid that the test protocol is uninterruptedly stopped when the control protocol is abnormal, and are more beneficial to the effective maintenance of the test session.
Optionally, in this embodiment, before the test packet is obtained by simulating an input packet through the user network interface, at least one of the following is further included:
1) configuring transmission parameters of a transmitter, wherein the transmission parameters at least comprise an IP address of an end device used as a virtual source IP address, and the end device comprises at least one of the following: a base station controller, a customer edge router; generating a flow matching rule of the transmitter according to the transmitting parameters;
2) configuring transmission parameters of a transmitter, wherein the transmission parameters at least comprise an IP address of the terminal device used as a virtual destination IP address, and the terminal device comprises at least one of the following: a base station controller, a customer edge router; and generating a flow matching rule of the transmitter according to the transmission parameters.
It should be noted that, because the TWAMP test packet is identified based on the flow matching rule, when the access device has no IP plan or has limited IP address resources, in this embodiment, the access device may borrow, but is not limited to, an IP address of an end device (e.g., a base station controller and/or a Customer Edge router (CE device)) as a virtual IP address of the access device, and simulate an input packet through a UNI interface to obtain the test packet.
When the transmitter is located in an access device (e.g., a layer two convergence network device, i.e., an L2 device), the IP address of the borrowing end device is used as the virtual source IP address in the manner 1); and when the transmitter is located in a floor device (e.g., a three-layer core network device, i.e., an L3 device) or a bridge device, the IP address of the borrowing end device will be the virtual destination IP address in mode 2).
Optionally, in this embodiment, the link testing apparatus may implement not only an online link test, but also an offline link test. In the off-line test process, the transmitter may, but is not limited to, trigger an address resolution protocol ARP through a configured three-layer service Virtual Interface (L3VI (Virtual Interface)), so that the corresponding MAC address may also be acquired in an off-line state.
For example, suppose that the device a is an L2 access device, the device B is a bridging device, and is configured to perform bridging and interworking between an L2 service and an L3 service, the device C is an L3 core network ground device, and the device D is a base station controller, and is connected to the device a. A. The B inter-device deploys L2VPN traffic and the B, C inter-device deploys L3VPN traffic. If a TWAMP test is to be deployed between an access device (a device) and a ground device (C device), if the transmitter is located in the access device a, the access device a initiates the test, and since the test is offline, after receiving a response message, the bridge device may not obtain the MAC address of the access device (a device), so that the response message sent back by the reflector may not reach the access device (a device), and the test may not be successful. Therefore, in this embodiment, gratuitous ARP learning may be triggered by the L3VI interface by configuring the L3VI interface in advance and configuring the IP address of the interface, so that the bridge device can acquire the MAC address of the access device (a device) at the time of offline test.
Optionally, in this embodiment, the obtaining a test result of the current link according to the response packet includes: obtaining the test time delay and/or the packet loss rate obtained by testing the current link according to the response message; and when the test time delay and/or the packet loss rate meet the preset threshold value condition, sending first alarm information.
Optionally, in this embodiment, after sending the test packet to the reflector, the method further includes: if the response message is not received in the preset period, judging that the current link has a communication fault, and sending second alarm information.
It should be noted that, in this embodiment, the TWAMP test performed on the current link by using the test protocol in the TWAMP may be a test on link connectivity, or may be a test on link performance.
The testing of the link connectivity may include, but is not limited to, at least one of the following:
1) judging whether the current link is connected or not by judging whether the response message is received or not in a preset period;
2) and judging whether the current link is connected or not by judging whether the packet loss rate is greater than a preset threshold value or not.
By monitoring the link connectivity in real time, the method and the device can report the connectivity loss alarm information or the packet loss rate out-of-limit alarm information in time at the first time when the link has connectivity failure.
After the A device deploys the TWAMP in a large scale, in order to prevent the performance statistics from influencing the service flow, the time delay performance statistics can be closed according to needs, at the moment, the TWAMP only carries out connectivity test, and when the link has packet loss or the threshold of the link packet loss reaches a certain value, a connectivity loss alarm is reported.
Furthermore, performance tests on the link may include, but are not limited to: according to the test time delay and/or the packet loss rate obtained by testing the current link; and analyzing the fault of the current link to send corresponding alarm information according to the analyzed fault.
Specifically, the description is made with reference to the following example, as shown in fig. 7, where the device a is an L2 access device, the device B is a bridging device and is responsible for bridging and interworking an L2 service and an L3 service, the device C is an L3 core network ground device, and the device D is a base station controller and is connected to the device a. A. The B inter-device deploys L2VPN traffic and the B, C inter-device deploys L3VPN traffic. If TWAMP measurements are to be deployed before the access device a and the bridge floor device C, if the access device a initiates the measurements from L2, the specific implementation is as follows:
s1, configuring a lightweight TWAMP test emitter on the A equipment, appointing optional parameters such as a source IP, a destination IP, a source UDP port number, a destination port number, a source MAC, a destination MAC, a next hop gateway, an access interface, a message DSCP and the like, generating an emitter TWAMP message flow matching rule according to the configured parameters, and sending the emitter TWAMP message flow matching rule to the message forwarding device. Here: during service online test, the source IP address is the IP address of the borrowed base station controller or CE equipment, the destination MAC is the MAC address of the bridging equipment B, and if the destination MAC is not specified, the next hop gateway address needs to be specified. Note that the borrowed virtual IP does not affect the L2 processing flow of the traffic.
S2, configuring a lightweight TWAMP test reflector on the C device, designating optional parameters of a source IP, a destination IP, a source UDP port number, a destination port number, a source MAC, a destination MAC, an access interface, a message DSCP and the like of the reflector, forming a TWAMP message flow matching rule of the reflector according to the configured parameters, and sending the TWAMP message flow matching rule to the message forwarding device. One reflector flow matching rule may match one TWAMP test flow or may match a plurality of TWAMP test flows.
S3, at the emitter (Sender), when the TWAMP needs the service online Test, the TWAMP protocol processing module of the A device borrows the IP address of the base station or the CE device as the virtual IP address of the access device, simulates the incoming message of the user (the message which simulates the incoming of the UNI interface) through the UNI interface, and sends the Test message (Sender-Test Packet) to the C, the message carries the Packet sending timestamp T1 of the A device, and the TWAMP protocol processing module simultaneously carries out the statistics of the Packet sending count (Txc).
S4, in the Reflector (Reflector), after the C device receives the packet through the packet forwarding device of the UNI, the C device performs packet matching according to the previously issued stream matching rule, and if the matching is successful, the C device considers that the packet is a Sender-Test packet of the lightweight TWAMP, and the C device lightweight TWAMP Reflector generates a Reflector-Test packet and sends the Reflector-Test packet to the a device. The Reflector-Test message carries a packet sending timestamp T1 in the Sender-Test message, and simultaneously carries a packet receiving timestamp T2 and a packet sending timestamp T3 of the Reflector-Test message. If the matching is unsuccessful, the message is regarded as a service message, and the message is continuously forwarded according to the forwarding rule.
S5, after the message is received by the transmitter and the A device UNI side message forwarding device, the message is matched according to the previously issued stream matching rule, if the matching is successful, the message is considered to be a Reflector-Test message sent by the lightweight TWAMP Reflector, the TWAMP protocol processing module carries out the statistics of packet receiving counting (RxC), and meanwhile, the packet sending timestamp T1 of the Sender-Test message and the packet receiving timestamp T2 and the packet sending timestamp T3 of the Reflector-Test message are analyzed from the Reflector-Test message, and then the statistics of link performances such as packet loss rate, forward delay, reverse delay, loopback delay and the like are carried out.
And S6, when the A-end equipment needs to perform link connectivity Test, the TWAMP protocol processing module starts connectivity detection, and when the emitter sends a Sender-Test message and does not receive a Reflector-Test message reflected by the Reflector within a period, the TWAMP protocol processing module considers that the link connectivity is faulty and sends a connectivity alarm to the user. And reporting out-of-limit alarm when the link delay or packet loss rate reaches a preset threshold value. And the user performs subsequent processing as required.
By the embodiment provided by the application, the current link is tested by using the test protocol in the reserved two-way active measurement protocol TWAMP, so that the standard TWAMP protocol is light, the dependence of the TWAMP test on the TCP/IP protocol is relieved, and the limitation of an IP address on the link test by using the TWAMP protocol is reduced. Moreover, in some devices which do not support the TWAMP control protocol, the network link can be tested by deploying the TWAMP test protocol. Therefore, the testing range of the TWAMP testing on the network link is widened, the universality and the flexibility of the testing are improved, and the efficiency of the TWAMP link testing is improved. Further, when the link test is performed by deploying the TWAMP protocol on a large scale, the TWAMP control protocol and the test protocol can be prevented from running simultaneously. The method and the device avoid that the test protocol is uninterruptedly stopped when the control protocol is abnormal, and are more beneficial to the effective maintenance of the test session.
As an optional scheme, the method further comprises the following steps:
1) a first configuration unit, configured to configure a transmission parameter of a transmitter before a test message is obtained by simulating an input message through a user network interface, where the transmission parameter at least includes using an IP address of an end device as a virtual source IP address, or using the IP address of the end device as a virtual destination IP address, where the end device includes at least one of: base station controller and customer edge router
2) And the generating unit is used for generating the flow matching rule of the transmitter according to the transmitting parameters.
It should be noted that, because the TWAMP test packet is identified based on the flow matching rule, when the access device has no IP plan or has limited IP address resources, in this embodiment, the access device may borrow, but is not limited to, an IP address of an end device (e.g., a base station controller and/or a Customer Edge router (CE device)) as a virtual IP address of the access device, and simulate an input packet through a UNI interface to obtain the test packet.
When the transmitter is located in the access device, the IP address of the borrowing end device is used as the virtual source IP address in the mode 1); and when the transmitter is located in the floor device or the bridge device, the IP address of the borrowing end device will be the virtual destination IP address in the mode 2).
Optionally, in this embodiment, the generating unit includes: a generating module, configured to generate a flow matching rule of the transmitter according to the message information in the test message, where the flow matching rule of the transmitter includes at least one of the following: source IP address, destination IP address, source UDP port number, destination UDP port number, differentiated services code point DSCP information.
According to the embodiment provided by the application, the IP address of the borrowed end equipment is used as the virtual IP address, so that the test limitation caused by TWAMP test in the prior art under the conditions of no IP planning or limited IP resources is overcome, and the dependence on TCP/IP during TWAMP deployment is eliminated during link test. Thereby achieving the purposes of expanding the test range and improving the test efficiency.
As an alternative, the method comprises the following steps:
1) and the second configuration unit is used for configuring a three-layer service virtual interface on the two-layer equipment where the transmitter is positioned before the test message is obtained by simulating the input message through the user network interface, and configuring a preset IP address for the three-layer service virtual interface, wherein the three-layer service virtual interface is used for triggering an Address Resolution Protocol (ARP) during offline test.
It should be noted that, during the offline test, the bridging device may not be able to obtain the MAC address of the device where the transmitter is located, so that the response message reflected back to the test message may not reach the device where the transmitter is located. Therefore, in this embodiment, it is necessary to configure an L3VI interface and configure an IP address of the interface on the device where the TWAMP transmitter is located, and trigger gratuitous ARP learning by the L3VI interface, so that the bridge device can obtain the MAC address of the device where the transmitter is located.
For example, suppose that the device a is an L2 access device, the device B is a bridging device, and is configured to perform bridging and interworking between an L2 service and an L3 service, the device C is an L3 core network ground device, and the device D is a base station controller, and is connected to the device a. A. The B inter-device deploys L2VPN traffic and the B, C inter-device deploys L3VPN traffic.
If a TWAMP test is to be deployed between an access device (a device) and a ground device (C device), if a transmitter is located in the access device a, the access device a initiates the test, and since the test is offline, the access device (a device) where the transmitter is located triggers gratuitous ARP learning by configuring an L3VI interface in advance and configuring an IP address of the interface, so that the bridge device can learn to acquire the MAC address of the access device (a device) before returning a response message.
By the embodiment provided by the application, the TWAMP test is completed in an off-line state, so that the test efficiency is further ensured.
As an alternative, the receiving unit includes:
1) the receiving module is used for receiving the message;
2) the matching module is used for performing parameter matching on the received message according to the flow matching rule of the transmitter;
3) and the identification module is used for judging that the identified message is a response message sent by the reflector when the parameter matching is successful.
For example, suppose that the device a is an L2 access device, the device B is a bridging device, and is configured to perform bridging and interworking between an L2 service and an L3 service, the device C is an L3 core network ground device, and the device D is a base station controller, and is connected to the device a. A. The B inter-device deploys L2VPN traffic and the B, C inter-device deploys L3VPN traffic.
After the C device receives the message through the UNI message forwarding device, the C device performs message matching according to a previously issued stream matching rule, if the matching is successful, the C device is considered to be a Sender-Test message of the lightweight TWAMP, and the lightweight TWAMP Reflector of the C device generates a response message (Reflector-Test packet) of the Reflector and sends the response message to the a device. The Reflector-Test message carries a packet sending timestamp T1 in the Sender-Test message, and simultaneously carries a packet receiving timestamp T2 and a packet sending timestamp T3 of the Reflector-Test message. If the matching is unsuccessful, the message is regarded as a service message, and the message is continuously forwarded according to the forwarding rule.
According to the embodiment provided by the application, the service message and the test message (and the response message) are accurately distinguished through the pre-configured flow matching rule, so that the influence of the test process on the service flow is reduced.
As an optional solution, the obtaining unit includes:
1) the first acquisition module is used for acquiring the test time delay and/or the packet loss rate obtained by the current link test according to the response message;
2) and the first sending module is used for sending first alarm information when the test time delay and/or the packet loss rate meet the preset threshold condition.
Optionally, in this embodiment, obtaining, according to the response packet, a test delay obtained by testing the current link includes: acquiring the following timestamps carried in the response message: the first time stamp T1 of the test message is sent by the transmitter, the second time stamp T of the test message is received by the reflector, and the third time stamp T3 of the response message is sent by the reflector; acquiring a fourth timestamp T4 of the response message received by the transmitter; and acquiring the forward delay, the reverse delay and the loop delay of the current link test according to the first time stamp, the second time stamp, the third time stamp and the fourth time stamp.
The forward delay may be, but is not limited to, T2-T1, the reverse delay may be, but is not limited to, T4-T3, the reflector processing delay may be, but is not limited to, T3-T2, and the loop delay may be, but is not limited to, (T4-T1) - (T3-T2).
Optionally, in this embodiment, the obtaining, according to the response packet, the packet loss rate obtained by testing the current link includes: acquiring the number TxC of packets sent by the transmitter to the test message and the number RxC of packets received to the response message; and acquiring the packet loss rate according to the difference value of the packet receiving number and the packet sending number.
The packet loss number may be, but is not limited to, TxC-RxC, and the packet loss rate may be determined according to the packet loss number, for example, the packet loss rate is (TxC-RxC)/TxC.
As an optional scheme, the method further comprises the following steps:
1) and the second sending unit is used for judging that the current link has a communication fault and sending second alarm information when the transmitter does not receive a response message in a preset period after sending the test message to the reflector.
By the embodiment provided by the application, after the lightweight TWAMP is deployed in a large scale, in order to prevent performance statistics from influencing service flow, the performance statistics such as time delay can be closed as required, and the individual connectivity test of the link can be realized by judging whether the response message is received.
As an alternative, the device in which the transmitter is located includes at least one of: the device comprises an access device, a landing device and a bridging device, wherein the device where the reflector is located comprises at least one of the following devices: the device comprises an access device, a landing device and a bridging device, wherein the bridging device is used for connecting a two-layer convergence network and a three-layer core network.
For example, suppose that the device a is an L2 access device, the device B is a bridging device, and is configured to perform bridging and interworking between an L2 service and an L3 service, the device C is an L3 core network ground device, and the device D is a base station controller and is connected to the device a. In this example, the above test method may be applied to a process of testing a linear link from an access device end to a floor device end actively initiated by an L2 side to an L3 side, may also be applied to a process of testing a linear link from an L2 side to an L3 side actively initiated segment (i.e., from an access device end to a bridge device end), and may also be applied to a process of testing a linear link from an L2 side to an L3 side actively initiated segment (i.e., from a bridge device end to a floor device end).
For example, in the present example, the above test method may be applied in an end-to-end linear link test process in the L2VPN network.
For example, suppose that the device a is an L2 access device, the device B is a bridging device, and is configured to perform bridging and interworking between an L2 service and an L3 service, the device C is an L3 core network ground device, and the device D is a base station controller and is connected to the device a. In this example, the above test method may be applied to a process of testing a linear link from an access device end to a console device end actively initiated from an L3 side to an L2 side, may also be applied to a process of testing a linear link from an L3 side to an L2 side actively initiated segment (i.e., from a bridge device end to an access device end), and may also be applied to a process of testing a linear link from an L3 side to an L2 side actively initiated segment (i.e., from a console device end to a bridge device end).
For example, in the present example, the above test method may be applied in an end-to-end linear link test process in an L3VPN network.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Example 4
In this embodiment, a link testing apparatus is further provided, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, and the description already made is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 21 is a block diagram of a link test apparatus according to an embodiment of the present invention, as shown in fig. 21, the apparatus being located at a reflector, the apparatus including:
1) a receiving unit 2102 configured to receive a message through a user network interface;
2) an identifying unit 2104 configured to identify, according to a stream matching rule of a preconfigured reflector, whether a message is a test message sent by a transmitter, where the test message is used to test a current link using a test protocol in a bidirectional active measurement protocol TWAMP;
3) a first generating unit 2106, configured to generate a response message in response to the test message when the test message is identified;
4) a sending unit 2108, configured to send the response message to the transmitter.
Optionally, a scheme for implementing a link test based on a lightweight TWAMP test protocol is proposed in the embodiment of the present invention. The link test apparatus can be applied to, but not limited to, the architecture shown in fig. 5, such as a session reflector applied to a server. The specific scheme is as follows: a session transmitter (namely a transmitter) in a control terminal simulates an input message through a user network interface of the transmitter to obtain a test message, wherein the test message is used for testing a current link by using a test protocol in a two-way active measurement protocol TWAMP; and sending a test message to a session reflector (namely a reflector) of the server; the reflector receives the message through a user network interface of the reflector; the reflector identifies whether the message is a test message sent by the transmitter according to a preset flow matching rule of the reflector; when the test message is identified, the reflector responds to the test message to generate a response message and sends the response message to the transmitter; the transmitter identifies a response message sent by the reflector, wherein the response message is matched with a stream matching rule of a pre-configured transmitter; and the transmitter acquires the test result of the current link according to the response message.
Optionally, in this embodiment, the control protocol in the standard TWAMP protocol is removed during the link test, and only the test protocol is reserved, so that the standard TWAMP protocol is light, and thus the TWAMP is not dependent on the TCP/IP protocol. When the TWAMP protocol is deployed in the link test process, the limitation of IP planning or limited IP address resources is avoided, the application scene range of the link test is expanded while the test protocol is deployed more flexibly and rapidly, and the effect of improving the test efficiency of the network link test is further realized.
Optionally, in this embodiment, the TWAMP used in the test process in the above link test method may be, but is not limited to: a control Protocol in a standard Two-Way Active Measurement Protocol (TWAMP) is removed, and only a test Protocol is reserved. That is, by using the test protocol in the TWAMP that is lightweight, the TWAMP is not dependent on the TCP/IP protocol. Therefore, more flexible protocol deployment is realized, and flexible testing of links under different scenes in a network environment is guaranteed, so that the effect of improving the link testing efficiency is achieved.
In addition, in this embodiment, the test packet may be obtained by, but not limited to, simulating a User incoming packet (input packet) through a User Network Interface (UNI), and further, since the packet sent through the UNI includes a real service packet and the test packet obtained through the simulation, in order to accurately distinguish the TWAMP test packet from the service packet, in this embodiment, a flow matching rule is pre-configured in the transmitter to ensure that the test packet is accurately distinguished from the transmitted packet, so that the TWAMP test packet is prevented from being forwarded along with the service traffic, and the influence of the test process on the service traffic is reduced.
Optionally, in this embodiment, the method further includes: a configuration unit, configured to configure a reflection parameter of the reflector before the message is received through the user network interface; a second generating unit, configured to generate a flow matching rule of the reflector according to the reflection parameter, where the flow matching rule of the reflector includes at least one of: source IP address, destination IP address, source UDP port number, destination UDP port number, differentiated services code point DSCP information.
Optionally, in this embodiment, the identification unit includes: the matching module is used for carrying out parameter matching on the received message according to the flow matching rule of the reflector; and the identification module is used for judging that the identified message is a test message sent by the transmitter when the parameter matching is successful.
By the embodiment provided by the application, the current link is tested by using the test protocol in the reserved two-way active measurement protocol TWAMP, so that the standard TWAMP protocol is light, the dependence of the TWAMP test on the TCP/IP protocol is relieved, and the limitation of an IP address on the link test by using the TWAMP protocol is reduced. Moreover, in some devices which do not support the TWAMP control protocol, the network link can be tested by deploying the TWAMP test protocol. Therefore, the testing range of the TWAMP testing on the network link is widened, the universality and the flexibility of the testing are improved, and the efficiency of the TWAMP link testing is improved. Further, when the link test is performed by deploying the TWAMP protocol on a large scale, the TWAMP control protocol and the test protocol can be prevented from running simultaneously. The method and the device avoid that the test protocol is uninterruptedly stopped when the control protocol is abnormal, and are more beneficial to the effective maintenance of the test session.
Example 5
According to an embodiment of the present invention, there is provided a link test system including:
1) a transmitter, wherein the transmitter is configured to: simulating an input message through a user network interface to obtain a test message, wherein the test message is used for testing a current link by using a test protocol in a two-way active measurement protocol TWAMP; sending a test message to a reflector; identifying a response message sent by the reflector in response to the test message, wherein the response message is matched with a stream matching rule of a pre-configured transmitter; obtaining a test result of the current link according to the response message;
2) the reflector is located in the device, wherein the reflector is used for executing the following operations: receiving a message through a user network interface; identifying whether the message is a test message sent by a transmitter according to a flow matching rule of a pre-configured reflector, wherein the test message is used for testing a current link by using a test protocol in a two-way active measurement protocol TWAMP; when the test message is identified, responding to the test message to generate a response message; and sending a response message to the transmitter.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
Example 6
The embodiment of the invention also provides a storage medium. Alternatively, in the present embodiment, the storage medium may be configured to store program codes for performing the following steps:
s1, simulating an input message through a user network interface to obtain a test message, wherein the test message is used for testing a current link by using a test protocol in a two-way active measurement protocol TWAMP;
s2, sending a test message to the reflector;
s3, identifying a response message sent by the reflector response test message, wherein the response message is matched with a flow matching rule of a pre-configured transmitter;
and S4, obtaining the test result of the current link according to the response message.
Optionally, the storage medium is further arranged to store program code for performing the steps of:
s1, before obtaining the test message by simulating the input message through the user network interface, configuring transmission parameters of the transmitter, where the transmission parameters at least include using an IP address of the end device as a virtual source IP address, where the end device includes at least one of: a base station controller, a customer edge router;
s2, generating a flow matching rule of the emitter according to the emission parameters;
optionally, the storage medium is further arranged to store program code for performing the steps of:
s1, before obtaining the test message by simulating the input message through the user network interface, configuring transmission parameters of the transmitter, where the transmission parameters at least include using an IP address of the end device as a virtual destination IP address, where the end device includes at least one of: a base station controller, a customer edge router;
and S2, generating a flow matching rule of the transmitter according to the transmission parameters.
Optionally, the storage medium is further configured to:
s1, receiving the message through the user network interface;
s2, identifying whether the message is a test message sent by the transmitter according to a flow matching rule of a pre-configured reflector, wherein the test message is used for testing the current link by using a test protocol in a two-way active measurement protocol TWAMP;
s3, when the test message is identified, responding the test message to generate a response message;
s4, sending a response message to the transmitter.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (26)

1. A link testing method, comprising:
simulating an input message through a user network interface to obtain a test message, wherein the test message is used for testing a current link by using a test protocol in a two-way active measurement protocol TWAMP;
sending the test message to a reflector;
identifying a response message sent by the reflector in response to the test message, wherein the response message is matched with a flow matching rule of a pre-configured transmitter;
and acquiring a test result of the current link according to the response message.
2. The method of claim 1, prior to said simulating an input message via the user network interface to obtain a test message, further comprising:
configuring transmission parameters of the transmitter, wherein the transmission parameters at least include using an Internet Protocol (IP) address of an end device as a virtual source IP address, wherein the end device includes at least one of: a base station controller, a customer edge router; generating a flow matching rule of the transmitter according to the transmitting parameters; or,
configuring transmission parameters of the transmitter, wherein the transmission parameters at least include an Internet Protocol (IP) address of an end device as a virtual destination IP address, and wherein the end device comprises at least one of: a base station controller, a customer edge router; and generating a flow matching rule of the transmitter according to the transmitting parameters.
3. The method of claim 2, wherein the generating the flow matching rule for the transmitter according to the transmission parameters comprises:
generating a flow matching rule of the transmitter according to message information in the test message, wherein the flow matching rule of the transmitter comprises at least one of the following: the system comprises a source IP address, a destination IP address, a source User Datagram Protocol (UDP) port number, a destination User Datagram Protocol (UDP) port number and Differential Service Code Point (DSCP) information.
4. The method of claim 1, prior to said simulating an input message via the user network interface to obtain a test message, comprising:
and configuring a three-layer service virtual interface on the two-layer equipment where the transmitter is positioned, and configuring a preset IP address for the three-layer service virtual interface, wherein the three-layer service virtual interface is used for triggering an Address Resolution Protocol (ARP) during offline testing.
5. The method of claim 1, wherein identifying the response message sent by the reflector in response to the test message comprises:
receiving a message;
performing parameter matching on the received message according to the flow matching rule of the transmitter;
and when the parameter matching is successful, judging that the message is identified as the response message sent by the reflector.
6. The method according to claim 1, wherein the obtaining the test result of the current link according to the response packet comprises:
obtaining the test time delay and/or the packet loss rate obtained by the current link test according to the response message;
and sending first alarm information when the test time delay and/or the packet loss rate meet a preset threshold condition.
7. The method of claim 6, wherein the obtaining the test delay obtained by testing the current link according to the response packet comprises:
acquiring the following timestamps carried in the response message: the transmitter sends a first timestamp of the test message, the reflector receives a second timestamp of the test message, and the reflector sends a third timestamp of the response message;
acquiring a fourth timestamp of the response message received by the transmitter;
obtaining at least one of the following test delays according to the first time stamp, the second time stamp, the third time stamp and the fourth time stamp: forward delay of the current link, reverse delay of the current link, and loop delay of the current link.
8. The method according to claim 6, wherein the obtaining the packet loss ratio obtained by the current link test according to the response packet includes:
acquiring the packet sending number of the test message sent by the transmitter and the packet receiving number of the response message received by the transmitter;
and acquiring the packet loss rate according to the difference value of the packet receiving number and the packet sending number.
9. The method of claim 1, further comprising, after the transmitter sends the test message to a reflector:
if the response message is not received in the preset period, judging that the current link has a communication fault, and sending second alarm information.
10. The method of any of claims 1 to 9, wherein the device in which the transmitter is located comprises at least one of: the device comprises an access device, a ground device and a bridging device, wherein the device where the reflector is located comprises at least one of the following devices: the device comprises an access device, a landing device and a bridging device, wherein the bridging device is used for connecting a two-layer convergence network and a three-layer core network.
11. A link testing method, comprising:
receiving a message through a user network interface;
identifying whether the message is a test message sent by a transmitter according to a flow matching rule of a pre-configured reflector, wherein the test message is used for testing a current link by using a test protocol in a two-way active measurement protocol TWAMP;
when the test message is identified, responding to the test message to generate a response message;
and sending the response message to the transmitter.
12. The method of claim 11, further comprising, prior to said receiving a message via a user network interface:
configuring reflection parameters of the reflector;
generating a flow matching rule for the reflector based on the reflection parameters, wherein the flow matching rule for the reflector comprises at least one of: a source Internet Protocol (IP) address, a destination IP address, a source User Datagram Protocol (UDP) port number, a destination UDP user datagram protocol port number, and Differential Service Code Point (DSCP) information.
13. The method of claim 11, wherein identifying whether the message is a test message sent by a transmitter according to a pre-configured flow matching rule of a reflector comprises:
performing parameter matching on the received message according to the flow matching rule of the reflector;
and when the parameter matching is successful, judging that the message is identified as the test message sent by the transmitter.
14. A link testing method, comprising:
the method comprises the steps that a transmitter simulates an input message through a user network interface of the transmitter to obtain a test message, wherein the test message is used for testing a current link by using a test protocol in a two-way active measurement protocol TWAMP; and sending the test message to a reflector;
the reflector receives a message through a user network interface of the reflector; the reflector identifies whether the message is a test message sent by the transmitter according to a preset flow matching rule of the reflector; when the test message is identified, the reflector responds to the test message to generate a response message, and sends the response message to the transmitter;
the transmitter identifies a response message sent by the reflector, wherein the response message is matched with a preset flow matching rule of the transmitter; and the transmitter acquires the test result of the current link according to the response message.
15. A link testing apparatus, wherein the apparatus is located at a transmitter, the apparatus comprising:
the system comprises an analog unit, a test unit and a control unit, wherein the analog unit is used for simulating an input message through a user network interface to obtain a test message, and the test message is used for testing a current link by using a test protocol in a two-way active measurement protocol TWAMP;
the first sending unit is used for sending the test message to a reflector;
the identification unit is used for identifying a response message sent by the reflector in response to the test message, wherein the response message is matched with a stream matching rule of a pre-configured transmitter;
and the acquisition unit acquires the test result of the current link according to the response message.
16. The apparatus of claim 15, further comprising:
a first configuration unit, configured to configure a transmission parameter of the transmitter before the test packet is obtained by simulating an input packet through a user network interface, where the transmission parameter at least includes an internet protocol IP address of an end device as a virtual source IP address, or an internet protocol IP address of the end device as a virtual destination IP address, where the end device includes at least one of: a base station controller, a customer edge router;
and the generating unit is used for generating the flow matching rule of the transmitter according to the transmitting parameters.
17. The apparatus of claim 16, wherein the generating unit comprises:
a generating module, configured to generate a flow matching rule of the transmitter according to message information in the test message, where the flow matching rule of the transmitter includes at least one of the following: the system comprises a source IP address, a destination IP address, a source User Datagram Protocol (UDP) port number, a destination User Datagram Protocol (UDP) port number and Differential Service Code Point (DSCP) information.
18. The apparatus of claim 15, comprising:
and the second configuration unit is used for configuring a three-layer service virtual interface on the two-layer equipment where the transmitter is positioned and configuring a preset IP address for the three-layer service virtual interface before the test message is obtained by simulating the input message through the user network interface, wherein the three-layer service virtual interface is used for triggering an Address Resolution Protocol (ARP) during offline test.
19. The apparatus of claim 15, wherein the identification unit comprises:
the receiving module is used for receiving the message;
the matching module is used for carrying out parameter matching on the received message according to the flow matching rule of the transmitter;
and the identification module is used for judging that the message is identified as the response message sent by the reflector when the parameter matching is successful.
20. The apparatus of claim 15, wherein the obtaining unit comprises:
a first obtaining module, configured to obtain, according to the response packet, a test delay and/or a packet loss rate obtained by the current link test;
and the first sending module is used for sending first alarm information when the test time delay and/or the packet loss rate meet a preset threshold condition.
21. The apparatus of claim 15, further comprising:
and the second sending unit is used for judging that the current link has a communication fault and sending second alarm information when the response message is not received in a preset period after the transmitter sends the test message to the reflector.
22. The apparatus of any of claims 15 to 21, wherein the transmitter is located in a device comprising at least one of: the device comprises an access device, a ground device and a bridging device, wherein the device where the reflector is located comprises at least one of the following devices: the device comprises an access device, a landing device and a bridging device, wherein the bridging device is used for connecting a two-layer convergence network and a three-layer core network.
23. A link testing device, wherein the device is located at a reflector, the device comprising:
a receiving unit, configured to receive a message through a user network interface;
the identification unit is used for identifying whether the message is a test message sent by a transmitter according to a flow matching rule of a pre-configured reflector, wherein the test message is used for testing a current link by using a test protocol in a two-way active measurement protocol TWAMP;
the first generating unit is used for responding to the test message to generate a response message when the test message is identified;
and the sending unit is used for sending the response message to the transmitter.
24. The apparatus of claim 23, further comprising:
a configuration unit, configured to configure a reflection parameter of the reflector before the message is received through the user network interface;
a second generating unit, configured to generate a flow matching rule of the reflector according to the reflection parameter, where the flow matching rule of the reflector includes at least one of: a source Internet Protocol (IP) address, a destination IP address, a source User Datagram Protocol (UDP) port number, a destination UDP port number, and Differential Service Code Point (DSCP) information.
25. The apparatus of claim 23, wherein the identification unit comprises:
the matching module is used for carrying out parameter matching on the received message according to the flow matching rule of the reflector;
and the identification module is used for judging that the message is identified as the test message sent by the transmitter when the parameter matching is successful.
26. A link test system, comprising:
the device comprises a transmitter, wherein the transmitter is used for executing the following operations: simulating an input message through a user network interface to obtain a test message, wherein the test message is used for testing a current link by using a test protocol in a two-way active measurement protocol TWAMP; sending the test message to a reflector; identifying a response message sent by the reflector in response to the test message, wherein the response message is matched with a flow matching rule of a pre-configured transmitter; obtaining a test result of the current link according to the response message;
the equipment where the reflector is located, wherein the reflector is used for executing the following operations: receiving a message through a user network interface; identifying whether the message is a test message sent by a transmitter according to a flow matching rule of a pre-configured reflector, wherein the test message is used for testing a current link by using a test protocol in a two-way active measurement protocol TWAMP; when the test message is identified, responding to the test message to generate a response message; and sending the response message to the transmitter.
CN201610398523.5A 2016-06-06 2016-06-06 Link test method and apparatus and system Active CN107465565B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610398523.5A CN107465565B (en) 2016-06-06 2016-06-06 Link test method and apparatus and system
PCT/CN2017/084951 WO2017211169A1 (en) 2016-06-06 2017-05-18 Link testing method, apparatus and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610398523.5A CN107465565B (en) 2016-06-06 2016-06-06 Link test method and apparatus and system

Publications (2)

Publication Number Publication Date
CN107465565A true CN107465565A (en) 2017-12-12
CN107465565B CN107465565B (en) 2019-08-30

Family

ID=60544954

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610398523.5A Active CN107465565B (en) 2016-06-06 2016-06-06 Link test method and apparatus and system

Country Status (2)

Country Link
CN (1) CN107465565B (en)
WO (1) WO2017211169A1 (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110191475A (en) * 2018-02-23 2019-08-30 大唐移动通信设备有限公司 A kind of data processing method and device of base station
CN110324202A (en) * 2019-05-31 2019-10-11 厦门网宿有限公司 A kind of method and apparatus detecting line quality
CN110891285A (en) * 2019-12-03 2020-03-17 锐捷网络股份有限公司 Transmitting equipment, reflecting equipment, network performance testing method and system
CN112737955A (en) * 2020-12-29 2021-04-30 中盈优创资讯科技有限公司 Method and device for regulating and controlling transmission length and time delay of provincial network of operator
CN112822066A (en) * 2020-12-31 2021-05-18 北京浩瀚深度信息技术股份有限公司 Method and system for testing data link of DPI (deep packet inspection) equipment
CN113055240A (en) * 2019-12-27 2021-06-29 中国电信股份有限公司 Message transmission method and device and computer readable storage medium
CN114157586A (en) * 2021-12-15 2022-03-08 苏州盛科通信股份有限公司 Method and device for improving TWAMP detection accuracy and storage device
CN114244739A (en) * 2021-12-21 2022-03-25 苏州盛科通信股份有限公司 Method, device and storage medium for improving message statistical accuracy
CN114726748A (en) * 2019-05-31 2022-07-08 瞻博网络公司 Enhanced two-way active measurement protocol
CN115580558A (en) * 2021-06-17 2023-01-06 中国移动通信集团有限公司 Link time delay measuring method and device based on TWAMP protocol
WO2023093702A1 (en) * 2021-11-25 2023-06-01 华为技术有限公司 Network measurement method and related apparatus

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110233818B (en) * 2018-03-19 2023-05-12 财付通支付科技有限公司 Method, apparatus and computer readable storage medium for testing data message anomaly
EP3614627B1 (en) * 2018-08-20 2021-09-15 EXFO Inc. Telecommunications network and services qoe assessment
US11165677B2 (en) 2018-10-18 2021-11-02 At&T Intellectual Property I, L.P. Packet network performance monitoring
CN114374999B (en) * 2020-10-15 2024-02-06 大唐移动通信设备有限公司 Test method, test device, electronic equipment and storage medium
CN112333044B (en) * 2020-10-29 2022-07-15 北京锐安科技有限公司 Shunting equipment performance test method, device and system, electronic equipment and medium
CN115941537B (en) * 2023-02-16 2023-06-13 信通院(江西)科技创新研究院有限公司 5G terminal consistency test method, system, storage medium and equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102307119A (en) * 2011-08-18 2012-01-04 工业和信息化部电信传输研究所 Method for discovering probe failure in Internet performance measurement system
EP2787687A1 (en) * 2013-04-05 2014-10-08 Telefonaktiebolaget L M Ericsson (PUBL) Packet interception and timestamping for error estimation in active measurement protocols
CN105634840A (en) * 2014-10-29 2016-06-01 中兴通讯股份有限公司 Method and device for measuring packet loss
CN105634937A (en) * 2015-12-31 2016-06-01 华为技术有限公司 Processing method and device of message

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104221326A (en) * 2012-04-04 2014-12-17 瑞典爱立信有限公司 Method for scalable measuring of connectivity between two way active measurement protocol (TWAMP) entities.
US8711708B2 (en) * 2012-07-24 2014-04-29 Accedian Networks Inc. Automatic setup of reflector instances
WO2016043633A1 (en) * 2014-09-15 2016-03-24 Telefonaktiebolaget L M Ericsson (Publ) Methods and arrangements for active measurements

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102307119A (en) * 2011-08-18 2012-01-04 工业和信息化部电信传输研究所 Method for discovering probe failure in Internet performance measurement system
EP2787687A1 (en) * 2013-04-05 2014-10-08 Telefonaktiebolaget L M Ericsson (PUBL) Packet interception and timestamping for error estimation in active measurement protocols
CN105634840A (en) * 2014-10-29 2016-06-01 中兴通讯股份有限公司 Method and device for measuring packet loss
CN105634937A (en) * 2015-12-31 2016-06-01 华为技术有限公司 Processing method and device of message

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110191475A (en) * 2018-02-23 2019-08-30 大唐移动通信设备有限公司 A kind of data processing method and device of base station
CN110191475B (en) * 2018-02-23 2021-04-27 大唐移动通信设备有限公司 Data processing method and device for base station
CN110324202A (en) * 2019-05-31 2019-10-11 厦门网宿有限公司 A kind of method and apparatus detecting line quality
CN114726748A (en) * 2019-05-31 2022-07-08 瞻博网络公司 Enhanced two-way active measurement protocol
CN110891285A (en) * 2019-12-03 2020-03-17 锐捷网络股份有限公司 Transmitting equipment, reflecting equipment, network performance testing method and system
CN110891285B (en) * 2019-12-03 2023-03-21 锐捷网络股份有限公司 Transmitting equipment, reflecting equipment, network performance testing method and system
CN113055240A (en) * 2019-12-27 2021-06-29 中国电信股份有限公司 Message transmission method and device and computer readable storage medium
CN113055240B (en) * 2019-12-27 2022-07-05 中国电信股份有限公司 Message transmission method and device and computer readable storage medium
CN112737955A (en) * 2020-12-29 2021-04-30 中盈优创资讯科技有限公司 Method and device for regulating and controlling transmission length and time delay of provincial network of operator
CN112822066B (en) * 2020-12-31 2022-03-11 北京浩瀚深度信息技术股份有限公司 Method and system for testing data link of DPI (deep packet inspection) equipment
CN112822066A (en) * 2020-12-31 2021-05-18 北京浩瀚深度信息技术股份有限公司 Method and system for testing data link of DPI (deep packet inspection) equipment
CN115580558A (en) * 2021-06-17 2023-01-06 中国移动通信集团有限公司 Link time delay measuring method and device based on TWAMP protocol
WO2023093702A1 (en) * 2021-11-25 2023-06-01 华为技术有限公司 Network measurement method and related apparatus
CN114157586A (en) * 2021-12-15 2022-03-08 苏州盛科通信股份有限公司 Method and device for improving TWAMP detection accuracy and storage device
CN114244739A (en) * 2021-12-21 2022-03-25 苏州盛科通信股份有限公司 Method, device and storage medium for improving message statistical accuracy

Also Published As

Publication number Publication date
CN107465565B (en) 2019-08-30
WO2017211169A1 (en) 2017-12-14

Similar Documents

Publication Publication Date Title
CN107465565B (en) Link test method and apparatus and system
CN113079091B (en) Active stream following detection method, network equipment and communication system
CN100463418C (en) Network performance test method, system and network device
KR101911579B1 (en) Controller driven oam for openflow
CN112311614B (en) System, method and related device for evaluating network node related transmission performance
WO2021093692A1 (en) Network quality measurement method and device, server, and computer readable medium
WO2016058245A1 (en) Processing method and apparatus for operation, administration and maintenance (oam) message
WO2016045098A1 (en) Switch, controller, system and link quality detection method
CN103634139A (en) Multi-hop reflector sessions
CN105515816B (en) Processing method and device for detecting hierarchical information
WO2021093574A1 (en) Network quality detection method and apparatus, network element device, computer device, and computer readable medium
CN104796298A (en) SDN (Software Defined Network) network fault analyzing method and device
CN107579869B (en) Network performance detection method and network equipment
CN112769632A (en) Method and system for detecting network fault of data center
US10999121B2 (en) Service OAM virtualization
US10623278B2 (en) Reactive mechanism for in-situ operation, administration, and maintenance traffic
CN101595686A (en) Trigger the flow analysis at intermediate equipment place
CN106487605B (en) Packet loss rate detection method and device
CN107342809A (en) A kind of service feature monitoring and Fault Locating Method and device
CN110381071A (en) A kind of message transmitting method, device and send method, apparatus
CN108173695B (en) Flow monitoring system and method in cloud environment
CN104734907A (en) Method for actively measuring end-to-end path performance of OpenFlow network and system adopted by the same
CN102224709A (en) Method and apparatus of monitoring on ip bearing net performance
CN106161124B (en) Message test processing method and device
CN113645058A (en) Network link flow monitoring method, device and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant