CN106936661B - Network monitoring method, device and system - Google Patents

Network monitoring method, device and system Download PDF

Info

Publication number
CN106936661B
CN106936661B CN201511030261.9A CN201511030261A CN106936661B CN 106936661 B CN106936661 B CN 106936661B CN 201511030261 A CN201511030261 A CN 201511030261A CN 106936661 B CN106936661 B CN 106936661B
Authority
CN
China
Prior art keywords
twamp
packet
message
address
destination address
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.)
Active
Application number
CN201511030261.9A
Other languages
Chinese (zh)
Other versions
CN106936661A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201511030261.9A priority Critical patent/CN106936661B/en
Publication of CN106936661A publication Critical patent/CN106936661A/en
Application granted granted Critical
Publication of CN106936661B publication Critical patent/CN106936661B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • H04L43/0841Round trip packet 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
    • H04L43/0864Round trip delays

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

本发明公开了一种网络监测方法、装置及系统,用以解决现有技术存在的通过OAM工具进行分段业务性能在线监测,导致获得的网络端到端的性能测量结果误差较大的问题,该方法包括:PTN中的L3PTN设备根据通过L2/L3桥接设备向第二设备发送多个第一TWAMP报文,以及接收的所述第二设备针对接收到的每个第一TWAMP报文返回第二TWAMP报文,确定第一设备与第二设备之间的网络的丢包率和时延。该方法可以精确地确定L3PTN设备与L2PTN设备之间的网络的丢包率和时延,从而L3PTN设备提高了网络端到端的性能监测准确度。

Figure 201511030261

The invention discloses a network monitoring method, device and system, which are used to solve the problem in the prior art that online monitoring of segmented service performance through OAM tools leads to large errors in the obtained end-to-end performance measurement results of the network. The method includes: the L3PTN device in the PTN sends a plurality of first TWAMP messages to the second device according to the L2/L3 bridge device, and the received second device returns a second TWAMP message for each received first TWAMP message The TWAMP message determines the packet loss rate and delay of the network between the first device and the second device. The method can accurately determine the packet loss rate and delay of the network between the L3PTN device and the L2PTN device, so that the L3PTN device improves the end-to-end performance monitoring accuracy of the network.

Figure 201511030261

Description

一种网络监测方法、装置及系统A network monitoring method, device and system

技术领域technical field

本发明涉及通信技术领域,尤其涉及一种网络监测方法、装置及系统。The present invention relates to the field of communication technologies, and in particular, to a network monitoring method, device and system.

背景技术Background technique

在第二代网络(2nd Generation,2G)和第三代网络(3rd Generation,3G)中,分组传送网(Packet Transport Network,PTN)采用操作管理维护(Operation Administrationand Maintenance,OAM)机制进行主动的故障定位和性能监测。In the second generation network (2nd Generation, 2G) and the third generation network (3rd Generation, 3G), the Packet Transport Network (PTN) adopts the Operation Administration and Maintenance (OAM) mechanism to proactively fail Positioning and performance monitoring.

目前,在长期演进(Long Term Evolution,LTE)网络中,PTN采用二层虚拟专用网络(Layer 2Virtual Private Network,L2VPN)与三层虚拟专用网络(Layer 3VirtualPrivate Network,L3VPN)的混合组网技术,因此,实现端到端的通信业务(如基于S1接口实现的业务、基于X2接口实现的业务等)的网络均被分为采用L2VPN的L2 PTN和采用L3VPN的L3 PTN,分别进行配置和运维,L2 PTN和L3 PTN各自运行不同的OAM机制来实现网络故障定位和性能检测。Currently, in a Long Term Evolution (LTE) network, the PTN adopts a hybrid networking technology of a Layer 2 Virtual Private Network (L2VPN) and a Layer 3 Virtual Private Network (L3VPN). , the networks that implement end-to-end communication services (such as services based on S1 interface, services based on X2 interface, etc.) are divided into L2 PTN using L2VPN and L3 PTN using L3VPN, which are configured and operated separately. PTN and L3 PTN each run different OAM mechanisms to implement network fault location and performance detection.

在L2 PTN内部具有OAM功能的设备,通过OAM工具,测量L2 PTN内部的丢包率和时延,实现业务性能在线监测;而在L3 PTN内部具有OAM功能的设备,首先需要通过互联网协议(Internet Protocol,IP)的踪迹查询追踪路由(TraceRoute)工具,获取业务在L3 PTN内的转发路径,然后通过该路径上的性能测量OAM工具,测量L3 PTN内部的丢包率和时延,实现业务性能在线监测。因此,LTE网络端到端的业务性能是通过计算L2 PTN的业务性能测量结果和L3 PTN的业务性能测量结果之和来近似评估。For the equipment with OAM function in the L2 PTN, the OAM tool is used to measure the packet loss rate and delay in the L2 PTN to realize online monitoring of service performance; while the equipment with OAM function in the L3 PTN first needs to pass the Internet Protocol (Internet Protocol). Protocol, IP) trace query TraceRoute tool to obtain the service forwarding path in the L3 PTN, and then use the performance measurement OAM tool on the path to measure the packet loss rate and delay inside the L3 PTN to achieve service performance. Online Monitoring. Therefore, the end-to-end service performance of the LTE network is approximated by calculating the sum of the service performance measurement results of the L2 PTN and the service performance measurement results of the L3 PTN.

然而,采用上述分段测量累加的方式,来近似评估LTE网络端到端的业务性能时,并未考虑到实现L2 PTN和L3 PTN对接的L2/L3 PTN桥接设备的性能,例如,由于未考虑到L2/L3 PTN桥接设备的业务解封装/封装处理时延和转接时延,导致分段测量的时延测量结果累加后,与实际网络端到端的L2PTN+L3 PTN的时延存在较大误差,另外,由于未考虑到L2/L3 PTN桥接设备的内部丢包,且L2 PTN和L3 PTN采用不同的封装/解封装效率,因此,将L2PTN和L3 PTN测量的丢包率进行简单累加,与实际端到端的L2 PTN+L3 PTN的丢包率存在较大误差。However, when approximately evaluating the end-to-end service performance of the LTE network by using the above-mentioned method of measuring and accumulating segments, the performance of the L2/L3 PTN bridging equipment that realizes the interconnection between the L2 PTN and the L3 PTN is not considered. The service decapsulation/encapsulation processing delay and transfer delay of the L2/L3 PTN bridge equipment cause the accumulated delay measurement results of segmental measurement, and there is a large error with the end-to-end L2PTN+L3 PTN delay of the actual network. , in addition, since the internal packet loss of the L2/L3 PTN bridging device is not considered, and L2 PTN and L3 PTN use different encapsulation/decapsulation efficiencies, the packet loss rates measured by L2PTN and L3 PTN are simply accumulated and compared with There is a large error in the packet loss rate of the actual end-to-end L2 PTN+L3 PTN.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供一种网络监测方法、装置及系统,用以解决现有技术中通过OAM工具进行分段业务性能在线监测,导致获得的网络端到端的性能测量结果误差较大的问题。Embodiments of the present invention provide a network monitoring method, device, and system, which are used to solve the problem of large errors in the obtained end-to-end performance measurement results of the network when performing online monitoring of segmented service performance through an OAM tool in the prior art.

第一方面,本申请的实施例提供一种网络监测方法,包括:In a first aspect, the embodiments of the present application provide a network monitoring method, including:

PTN中的任意一个L3 PTN设备通过L2/L3桥接设备向一个L2 PTN设备发送多个第一TWAMP报文,该第一TWAMP报文中的目的地址为基站的IP地址或与所述基站同网段的预留IP地址;由于每个第一TWAMP报文中的目的地址为基站的IP地址或与所述基站同网段的预留IP地址,因此,在L2/L3桥接设备在接收到每个第一TWAMP报文时,可以将该第一TWAMP报文作为需要传输至基站的数据报文,进行转发,从而传输至所述L2 PTN设备;Any L3 PTN device in the PTN sends multiple first TWAMP messages to an L2 PTN device through the L2/L3 bridge device, where the destination address in the first TWAMP message is the IP address of the base station or the same network as the base station The reserved IP address of the segment; since the destination address in each first TWAMP message is the IP address of the base station or the reserved IP address of the same network segment as the base station, the L2/L3 bridging device receives each When there is a first TWAMP message, the first TWAMP message may be used as a data message to be transmitted to the base station, and forwarded, so as to be transmitted to the L2 PTN device;

所述L3 PTN设备在接收到一个报文后,判断该报文是否为所述L2 PTN设备针对一个第一TWAMP报文返回的第二TWAMP报文,若是,则提取所述第二TWAMP报文,并保存,用以所述L3 PTN设备进行网络性能监测;After receiving a message, the L3 PTN device determines whether the message is a second TWAMP message returned by the L2 PTN device for a first TWAMP message, and if so, extracts the second TWAMP message , and save it for monitoring network performance by the L3 PTN device;

所述L3 PTN设备确定在预设时间段内接收的第二TWAMP报文的数目以及发送的第一TWAMP报文的数目,通过这两个数目,确定所述L3 PTN设备与所述L2 PTN设备之间的丢包率;The L3 PTN device determines the number of second TWAMP packets received and the number of first TWAMP packets sent within a preset time period, and through these two numbers, determines the L3 PTN device and the L2 PTN device The packet loss rate between;

由于每个第一TWAMP报文中包括指示所述L3 PTN设备发送该第一TWAMP报文的时间的原始时间戳,而针对一个第一TWAMP报文返回的第二TWAMP报文中包括指示所述L2 PTN设备发送所述第二TWAMP报文的时间的发送时间戳,指示所述L2 PTN设备接收该第一TWAMP报文的时间的接收时间戳,以及该第一TWAMP报文的原始时间戳,因此,所述L3 PTN设备确定在所述预设时间段内接收的第二TWAMP报文,并提取每个第二TWAMP报文中的原始时间戳、接收时间戳和发送时间戳,即可确定所述L3 PTN设备与所述L2 PTN设备之间的时延。Since each first TWAMP packet includes an original timestamp indicating the time when the L3 PTN device sent the first TWAMP packet, the second TWAMP packet returned for a first TWAMP packet includes an original timestamp indicating the time when the L3 PTN device sent the first TWAMP packet The sending time stamp of the time when the L2 PTN device sent the second TWAMP message, the receiving time stamp indicating the time when the L2 PTN device received the first TWAMP message, and the original time stamp of the first TWAMP message, Therefore, the L3 PTN device determines the second TWAMP packet received within the preset time period, and extracts the original timestamp, the reception timestamp and the transmission timestamp in each of the second TWAMP packets, to determine Delay between the L3 PTN device and the L2 PTN device.

采用上述办法,PTN中的L2/L3桥接设备可以将L3 PTN设备发送的第一TWAMP报文作为需要传输至基站的数据报文进行转发,从而可以顺利将第一TWAMP报文传输至所述L2PTN设备,实现TWAMP报文的跨L2 PTN/L3 PTN转发,进而L2 PTN设备收到第一TWAMP报文后可以返回第二TWAMP报文,这样,在所述PTN中的L3 PTN设备可以通过第一TWAMP报文和第二TWAMP报文,精确地确定所述L3 PTN设备和L2 PTN设备之间的网络的丢包率和时延,从而L3PTN设备提高了网络端到端的性能监测的准确度。Using the above method, the L2/L3 bridge device in the PTN can forward the first TWAMP message sent by the L3 PTN device as a data message to be transmitted to the base station, so that the first TWAMP message can be smoothly transmitted to the L2PTN device to realize cross-L2 PTN/L3 PTN forwarding of TWAMP messages, and then the L2 PTN device can return the second TWAMP message after receiving the first TWAMP message, so that the L3 PTN device in the PTN can pass the first TWAMP message. The TWAMP message and the second TWAMP message accurately determine the packet loss rate and delay of the network between the L3 PTN device and the L2 PTN device, so that the L3PTN device improves the accuracy of network end-to-end performance monitoring.

在一个可能的设计中,每个第一TWAMP报文的源地址可以为以下中的任一项:所述L3 PTN设备的IP地址、与所述L3 PTN设备对接的S-GW的IP地址、与所述S-GW同网段的IP地址。当每个第一TWAMP报文的源地址配置为所述L3 PTN设备的IP地址时,为了保证IP地址的路由可达,可能需要在目的地址与源地址之间配置额外的路由;当每个第一TWAMP报文的源地址配置为与所述L3 PTN设备对接的S-GW的IP地址或与所述S-GW同网段的IP地址时,由于所述第一TWAMP报文地目的地址与源地址之间路由可达,这样,可以保证在传输每个第一TWAMP报文时,不需要配置额外的路由。In a possible design, the source address of each first TWAMP packet may be any one of the following: the IP address of the L3 PTN device, the IP address of the S-GW interconnected with the L3 PTN device, The IP address of the same network segment as the S-GW. When the source address of each first TWAMP packet is configured as the IP address of the L3 PTN device, in order to ensure that the route of the IP address is reachable, additional routes may need to be configured between the destination address and the source address; when each When the source address of the first TWAMP packet is configured as the IP address of the S-GW connected to the L3 PTN device or the IP address of the same network segment as the S-GW, because the destination address of the first TWAMP packet is The route to the source address is reachable. In this way, it can be ensured that no additional route needs to be configured when each first TWAMP packet is transmitted.

在一个可能的设计中,每个第一TWAMP报文和每个第二TWAMP报文中包括TWAMP标识。所述TWAMP标识用于指示包括该TWAMP标识的报文是TWAMP报文。In a possible design, each first TWAMP message and each second TWAMP message include a TWAMP identifier. The TWAMP identifier is used to indicate that the packet including the TWAMP identifier is a TWAMP packet.

在一个可能的设计中,每个第一TWAMP报文和每个第二TWAMP报文中包括的TWAMP标识可以为TWAMP的协议标识。In a possible design, the TWAMP identifier included in each first TWAMP message and each second TWAMP message may be a TWAMP protocol identifier.

在一个可能的设计中,所述L3 PTN设备在判断该报文是否为所述L2 PTN设备针对一个第一TWAMP报文返回的第二TWAMP报文时,首先判断该报文中是否包括TWAMP标识,确定包括TWAMP标识时,确定所述报文为TWAMP报文,否则,确定该报文为数据报文。当所述L3PTN设备确定所述报文为数据报文时,正常转发该数据报文;当所述L3 PTN设备确定所述报文为L3 PTN报文时,进一步通过所述TWAMP报文的源地址和目的地址,确定该TWAMP报文是否为第二TWAMP报文。In a possible design, when determining whether the packet is a second TWAMP packet returned by the L2 PTN device for a first TWAMP packet, the L3 PTN device first determines whether the packet includes a TWAMP identifier , when it is determined that the TWAMP identifier is included, determine that the message is a TWAMP message, otherwise, determine that the message is a data message. When the L3PTN device determines that the packet is a data packet, it forwards the data packet normally; when the L3 PTN device determines that the packet is an L3 PTN packet, it further passes the source of the TWAMP packet address and destination address to determine whether the TWAMP message is the second TWAMP message.

在一个可能的设计中,所述L3 PTN设备判断该TWAMP报文是否为第二TWAMP报文时,首先将所述TWAMP报文中的目的地址和源地址作为待识别二元组;并将所述待识别二元组与所述L3 PTN设备中存储的多个识别信息组中进行匹配,当所述多个识别信息组中存在与所述待识别二元组匹配的识别信息组时,确定所述TWAMP报文为所述第二TWAMP报文;In a possible design, when the L3 PTN device determines whether the TWAMP message is the second TWAMP message, it first takes the destination address and the source address in the TWAMP message as the two-tuple to be identified; The to-be-identified binary group is matched with multiple identification information groups stored in the L3 PTN device, and when there is an identification information group matching the to-be-identified binary group in the multiple identification information groups, determine the TWAMP message is the second TWAMP message;

其中,所述多个识别信息组为针对所述L2 PTN设备设置的,与所述待识别二元组匹配的识别信息组为包括所述第一TWAMP报文的源地址和目的地址的二元组;The multiple identification information groups are set for the L2 PTN device, and the identification information group matching the to-be-identified binary group is a binary including the source address and destination address of the first TWAMP packet Group;

当所述多个识别信息组中不存在与所述待识别二元组匹配的识别信息组时,表示该TWAMP报文并非针对所述L3 PTN设备发送的第一TWAMP报文返回的,因此,所述L3 PTN设备不对该TWAMP报文进行处理,而是正常转发该TWAMP报文。When there is no identification information group matching the to-be-identified binary group in the plurality of identification information groups, it indicates that the TWAMP message is not returned for the first TWAMP message sent by the L3 PTN device. Therefore, The L3 PTN device does not process the TWAMP message, but normally forwards the TWAMP message.

在一个可能的设计中,每个第一TWAMP报文中还包括所述L3 PTN设备的发射端口号和所述L2 PTN的反射端口号,用以区分所述L3 PTN设备不同的发射端口号和不同的反射端口号的TWAMP报文,对应的,针对一个第一TWAMP报文的第二TWAMP报文中也还包括所述L3PTN设备的发射端口号和所述L2 PTN的反射端口号。In a possible design, each first TWAMP packet further includes the transmit port number of the L3 PTN device and the reflection port number of the L2 PTN, so as to distinguish different transmit port numbers and For TWAMP packets with different reflection port numbers, correspondingly, the second TWAMP packet for a first TWAMP packet also includes the transmission port number of the L3PTN device and the reflection port number of the L2 PTN.

在一个可能的设计中,若第一TWAMP报文和第二TWAMP报文中还包括上述设计中的所述L3 PTN设备的发射端口号和所述L2 PTN的反射端口号,则所述L3 PTN设备判断该TWAMP报文是否为第二TWAMP报文时,所述L3 PTN设备将所述TWAMP报文中的目的地址、源地址、所述L3 PTN设备的发射端口号和所述L2 PTN设备的反射端口号作为待识别四元组;并将所述待识别四元组与所述L3 PTN设备中存储的多个识别信息组中进行匹配,当所述多个识别信息组中存在与所述待识别四元组匹配的识别信息组时,确定所述TWAMP报文为所述第二TWAMP报文;In a possible design, if the first TWAMP packet and the second TWAMP packet further include the transmit port number of the L3 PTN device and the reflection port number of the L2 PTN in the above design, then the L3 PTN When the device judges whether the TWAMP message is the second TWAMP message, the L3 PTN device converts the destination address, source address, the transmitting port number of the L3 PTN device and the L2 PTN device's data in the TWAMP message. The reflection port number is used as a quadruple to be identified; and the quadruple to be identified is matched with multiple identification information groups stored in the L3 PTN device, when there is a When the identification information group matched by the quadruple is to be identified, it is determined that the TWAMP message is the second TWAMP message;

其中,所述多个识别信息组为针对所述L2 PTN设备设置的,与所述待识别四元组匹配的识别信息组为包括与所述第二TWAMP报文对应的第一TWAMP报文的源地址和目的地址,以及所述L3 PTN设备的发射端口号和所述L2 PTN设备的反射端口号的四元组;The multiple identification information groups are set for the L2 PTN device, and the identification information group matching the to-be-identified quadruple is an identification information group that includes the first TWAMP message corresponding to the second TWAMP message source address and destination address, and a quadruple of the transmit port number of the L3 PTN device and the reflection port number of the L2 PTN device;

当所述多个识别信息组中不存在与所述待识别四元组匹配的识别信息组时,表示该TWAMP报文并非针对所述L3 PTN设备发送的第一TWAMP报文返回的,因此,所述L3 PTN设备不对该TWAMP报文进行处理,而是正常转发该TWAMP报文。When there is no identification information group matching the to-be-identified quadruple in the plurality of identification information groups, it indicates that the TWAMP message is not returned for the first TWAMP message sent by the L3 PTN device. Therefore, The L3 PTN device does not process the TWAMP message, but normally forwards the TWAMP message.

在一个可能的设计中,所述L3 PTN设备确定所述L3 PTN设备与所述L2PTN设备之间的丢包率时,首先确定在所述预设时间段内接收的第二TWAMP报文的数目、在所述预设时间段内发送的第一TWAMP报文的数目;并确定在所述预设时间段内接收的第二TWAMP报文的数目与在所述预设时间段内发送的第一TWAMP报文的数目的差,作为丢包数目;将所述丢包数目与发送的第一TWAMP报文的数目的商,作为所述L3 PTN设备与所述L2 PTN设备之间的网络的丢包率。这样,所述L3 PTN设备可以精确地确定所述L3 PTN设备和L2 PTN设备之间的网络的丢包率。In a possible design, when the L3 PTN device determines the packet loss rate between the L3 PTN device and the L2PTN device, it first determines the number of second TWAMP packets received within the preset time period , the number of the first TWAMP message sent in the preset time period; and determine the number of the second TWAMP message received in the preset time period and the number of the second TWAMP message sent in the preset time period The difference between the number of TWAMP packets is regarded as the number of lost packets; Packet loss rate. In this way, the L3 PTN device can accurately determine the packet loss rate of the network between the L3 PTN device and the L2 PTN device.

在一个可能的设计中,所述L3 PTN设备确定所述L3 PTN设备与所述L2PTN设备之间的时延时,首先,将每个第二TWAMP报文中接收时间戳与原始时间戳的差值,作为在所述L3 PTN设备与所述L2 PTN设备之间的网络传输第一TWAMP报文的时延,即单向传输时延;将获得的单向传输时延取平均值,作为单向传输时延平均值;并将每个第二TWAMP报文中发送时间戳与接收时间戳的差值,作为所述L2 PTN设备处理第一TWAMP报文的处理时延;将获得的处理时延取平均值,作为处理时延平均值。所述L3 PTN设备可以将2倍的单向传输时延平均值与处理时延平均值的和,作为双向传输时延平均值。当所述L3 PTN设备确定单向时延时,所述L3 PTN设备与所述L2 PTN设备之间的时延为单向传输时延平均值;当所述L3 PTN设备确定双向时延时,所述L3PTN设备与所述L2 PTN设备之间的时延为双向传输时延平均值。这样,所述L3 PTN设备可以精确地确定所述L3 PTN设备和L2 PTN设备之间的网络的时延。In a possible design, the L3 PTN device determines the time delay between the L3 PTN device and the L2PTN device. First, the difference between the received timestamp and the original timestamp in each second TWAMP packet is calculated. value, as the delay of transmitting the first TWAMP packet in the network between the L3 PTN device and the L2 PTN device, that is, the one-way transmission delay; The average value of the transmission delay; the difference between the sending timestamp and the receiving timestamp in each second TWAMP message is taken as the processing delay of the L2 PTN device processing the first TWAMP message; the obtained processing delay The average value is taken as the processing delay average value. The L3 PTN device may take the sum of twice the average value of one-way transmission delay and the average value of processing delay as the average value of two-way transmission delay. When the L3 PTN device determines the one-way delay, the delay between the L3 PTN device and the L2 PTN device is the average value of one-way transmission delay; when the L3 PTN device determines the two-way delay, the The delay between the L3PTN device and the L2 PTN device is the average value of the bidirectional transmission delay. In this way, the L3 PTN device can accurately determine the network time delay between the L3 PTN device and the L2 PTN device.

第二方面,本申请的实施例提供一种网络监测方法,包括:In a second aspect, the embodiments of the present application provide a network monitoring method, including:

PTN中的一个L2/L3桥接设备在接收到一个L3 PTN设备发送的第一TWAMP报文时,由于所述TWAMP报文中的目的地址为基站的IP地址或与所述基站同网段的预留IP地址,因此所述L2/L3桥接设备可以将该第一TWAMP报文作为需要传输至基站的数据报文,转发至L2PTN设备;When an L2/L3 bridging device in the PTN receives the first TWAMP packet sent by an L3 PTN device, because the destination address in the TWAMP packet is the IP address of the base station or a preset address on the same network segment as the base station leave the IP address, so the L2/L3 bridge device can forward the first TWAMP message to the L2PTN device as a data message to be transmitted to the base station;

由于L2 PTN设备针对所述第一TWAMP报文返回的第二TWAMP报文目的地址与所述第一TWAMP报文中的源地址相同,所述第二TWAMP报文的源地址与所述第一TWAMP报文的目的地址相同,因此,所述第二TWAMP报文的传输路径与所述第一TWAMP报文的传输路径相同,这样,所述L2/L3桥接设备在接收到该第二TWAMP报文后,转发至所述L3 PTN设备。Since the destination address of the second TWAMP packet returned by the L2 PTN device for the first TWAMP packet is the same as the source address in the first TWAMP packet, the source address of the second TWAMP packet is the same as the source address of the first TWAMP packet. The destination addresses of the TWAMP packets are the same. Therefore, the transmission path of the second TWAMP packet is the same as the transmission path of the first TWAMP packet. In this way, the L2/L3 bridge device receives the second TWAMP packet. After the text, it is forwarded to the L3 PTN device.

在一个可能的设计中,当所述第一TWAMP报文中的目的地址为所述基站的同网段的预留IP地址时,所述L2/L3桥接设备根据存储的IP地址与MAC地址的映射关系,确定所述第一TWAMP报文中的目的地址对应的MAC地址;并通过确定的MAC地址对应的二层子接口,将所述第一TWAMP报文转发至所述L2 PTN设备。In a possible design, when the destination address in the first TWAMP packet is a reserved IP address in the same network segment of the base station, the L2/L3 bridge device may store the IP address and the MAC address according to the stored IP address. The mapping relationship is determined, and the MAC address corresponding to the destination address in the first TWAMP packet is determined; and the first TWAMP packet is forwarded to the L2 PTN device through the Layer 2 sub-interface corresponding to the determined MAC address.

第三方面,本申请的实施例提供一种网络监测方法,包括:In a third aspect, embodiments of the present application provide a network monitoring method, including:

PTN中的L2 PTN设备在接收到一个报文后,判断该报文是否为L3 PTN设备发送的第一TWAMP报文,若是,则针对该第一TWAMP报文生成第二TWAMP报文转发;否则,将所述报文正常转发或丢弃。After receiving a message, the L2 PTN device in the PTN determines whether the message is the first TWAMP message sent by the L3 PTN device, and if so, generates a second TWAMP message for forwarding for the first TWAMP message; otherwise , the packet is normally forwarded or discarded.

由于每个第一TWAMP报文中包括指示所述L3 PTN设备发送该第一TWAMP报文的时间的原始时间戳,而所述L2 PTN设备针对一个第一TWAMP报文返回的第二TWAMP报文中包括指示所述L2 PTN设备发送所述第二TWAMP报文的时间的发送时间戳,指示所述L2 PTN设备接收该第一TWAMP报文的时间的接收时间戳,以及该第一TWAMP报文的原始时间戳,这样,在所述PTN中的L3 PTN设备可以通过第一TWAMP报文和第二TWAMP报文,精确地确定所述L3PTN设备和L2 PTN设备之间的网络的丢包率和时延,从而L3 PTN设备提高了网络端到端的性能监测的准确度。Since each first TWAMP message includes an original timestamp indicating the time when the L3 PTN device sent the first TWAMP message, the L2 PTN device returns a second TWAMP message for a first TWAMP message including a sending time stamp indicating the time when the L2 PTN device sent the second TWAMP message, a receiving time stamp indicating the time when the L2 PTN device received the first TWAMP message, and the first TWAMP message In this way, the L3 PTN device in the PTN can accurately determine the packet loss rate and Delay, so the L3 PTN equipment improves the accuracy of network end-to-end performance monitoring.

在一个可能的设计中,所述第一TWAMP报文中的源地址为以下中的任一项:所述L3PTN设备的IP地址、与所述L3 PTN对接的S-GW的IP地址、与所述S-GW同网段的IP地址。当所述第一TWAMP报文的源地址配置为所述L3 PTN设备的IP地址时,为了保证IP地址的路由可达,可能需要在目的地址与源地址之间配置额外的路由;当所述第一TWAMP报文的源地址配置为与所述L3 PTN设备对接的S-GW的IP地址或与所述S-GW同网段的IP地址时,由于所述第一TWAMP报文地目的地址与源地址之间路由可达,这样,可以保证在传输每个第一TWAMP报文时,不需要配置额外的路由。In a possible design, the source address in the first TWAMP packet is any one of the following: the IP address of the L3PTN device, the IP address of the S-GW interconnected with the L3 PTN, and the IP address of the L3PTN device. The IP address of the same network segment of the S-GW. When the source address of the first TWAMP packet is configured as the IP address of the L3 PTN device, in order to ensure that the route of the IP address is reachable, it may be necessary to configure an additional route between the destination address and the source address; when the When the source address of the first TWAMP packet is configured as the IP address of the S-GW connected to the L3 PTN device or the IP address of the same network segment as the S-GW, because the destination address of the first TWAMP packet is The route to the source address is reachable. In this way, it can be ensured that no additional route needs to be configured when each first TWAMP packet is transmitted.

在一个可能的设计中,每个第一TWAMP报文和每个第二TWAMP报文中包括TWAMP标识。所述TWAMP标识用于指示包括该TWAMP标识的报文是TWAMP报文。In a possible design, each first TWAMP message and each second TWAMP message include a TWAMP identifier. The TWAMP identifier is used to indicate that the packet including the TWAMP identifier is a TWAMP packet.

在一个可能的设计中,每个第一TWAMP报文和每个第二TWAMP报文中包括的TWAMP标识可以为TWAMP的协议标识。In a possible design, the TWAMP identifier included in each first TWAMP message and each second TWAMP message may be a TWAMP protocol identifier.

在一个可能的设计中,所述L2 PTN设备在判断所述报文是否为所述L3PTN设备发送的第一TWAMP报文时,首先判断所述报文中是否包括TWAMP标识,确定包括TWAMP标识时,确定所述报文为TWAMP报文;否则,确定该报文为数据报文。当所述L2 PTN设备确定所述报文为数据报文时,正常转发该数据报文;当所述L2 PTN设备确定所述报文为TWAMP报文时,进一步通过所述TWAMP报文中的源地址和目的地址,确定所述TWAMP报文是否为所述第一TWAMP报文。In a possible design, when determining whether the packet is the first TWAMP packet sent by the L3PTN device, the L2 PTN device first determines whether the packet includes the TWAMP identifier, and when determining whether the packet includes the TWAMP identifier , determine that the message is a TWAMP message; otherwise, determine that the message is a data message. When the L2 PTN device determines that the packet is a data packet, it normally forwards the data packet; when the L2 PTN device determines that the packet is a TWAMP packet, it further transmits the data packet through the TWAMP packet. The source address and the destination address are used to determine whether the TWAMP message is the first TWAMP message.

在一个可能的设计中,所述L2 PTN设备判断所述TWAMP报文是否为所述第一TWAMP报文时,首先,将所述TWAMP报文中的源地址和目的地址作为待识别二元组;并将所述待识别二元组与所述L2 PTN设备中存储的多个识别信息组中进行匹配,当所述多个识别信息组中存在与所述待识别二元组匹配的识别信息组时,确定所述TWAMP报文为所述第一TWAMP报文;In a possible design, when the L2 PTN device determines whether the TWAMP packet is the first TWAMP packet, first, the source address and the destination address in the TWAMP packet are used as the to-be-identified two-tuple ; And match in the multiple identification information groups stored in the two-tuple to be identified and the L2 PTN equipment, when there is identification information matching the two-tuple to be identified in the multiple identification information groups When grouping, it is determined that the TWAMP message is the first TWAMP message;

其中,所述多个识别信息组为预先配置给所述L2 PTN设备的,与所述待识别二元组匹配的识别信息组为包括所述第一TWAMP报文的源地址和目的地址的二元组;The plurality of identification information groups are pre-configured for the L2 PTN device, and the identification information group matching the to-be-identified binary group is a binary group including the source address and destination address of the first TWAMP packet tuple;

当所述多个识别信息组中不存在与所述待识别二元组匹配的识别信息组时,表示该TWAMP报文并非所述L3 PTN设备发送给所述L2 PTN设备的第一TWAMP报文,因此,所述L2PTN设备应当丢弃该TWAMP报文。When there is no identification information group matching the to-be-identified binary group in the multiple identification information groups, it indicates that the TWAMP packet is not the first TWAMP packet sent by the L3 PTN device to the L2 PTN device , therefore, the L2PTN device should discard the TWAMP message.

在一个可能的设计中,每个第一TWAMP报文中还包括所述L3 PTN设备的发射端口号和所述L2 PTN的反射端口号,用以区分所述L3 PTN设备不同的发射端口号和不同的反射端口号的TWAMP报文。In a possible design, each first TWAMP packet further includes the transmit port number of the L3 PTN device and the reflection port number of the L2 PTN, so as to distinguish different transmit port numbers and TWAMP packets with different reflected port numbers.

在一个可能的设计中,若第一TWAMP报文中还包括上述设计中的所述L3 PTN设备的发射端口号和所述L2 PTN的反射端口号,则所述L2 PTN设备判断该TWAMP报文是否为所述第一TWAMP报文时,所述L2 PTN设备将所述TWAMP报文中的源地址、目的地址、所述L3 PTN设备的发射端口号和所述L2 PTN的反射端口号作为待识别四元组;并将所述待识别四元组与所述L2PTN设备中存储的多个识别信息组中进行匹配,当所述多个识别信息组中存在与所述待识别四元组匹配的识别信息组时,确定所述TWAMP报文为所述第一TWAMP报文;In a possible design, if the first TWAMP packet further includes the transmit port number of the L3 PTN device and the reflection port number of the L2 PTN in the above design, the L2 PTN device determines the TWAMP packet When it is the first TWAMP message, the L2 PTN device uses the source address, destination address, the transmission port number of the L3 PTN device and the reflection port number of the L2 PTN in the TWAMP message as the waiting port number. Identify the quadruple; and match the to-be-identified quadruple with multiple identification information groups stored in the L2PTN device, when there is a match with the to-be-identified quadruple in the multiple identification information groups When identifying the information group, determine that the TWAMP message is the first TWAMP message;

其中,所述多个识别信息组为预先配置给所述L2 PTN设备的,与所述待识别四元组匹配的识别信息组为包括所述第一TWAMP报文的源地址、目的地址、所述L3 PTN设备的发射端口号和所述L2 PTN设备的反射端口号的四元组;The multiple identification information groups are pre-configured for the L2 PTN device, and the identification information group matching the to-be-identified quadruple includes the source address, destination address, all A quadruple of the transmit port number of the L3 PTN device and the reflection port number of the L2 PTN device;

当所述多个识别信息组中不存在与所述待识别四元组匹配的识别信息组时,表示该TWAMP报文并非所述L3 PTN设备的反射端口针对所述L2 PTN设备的反射端口发送的第一TWAMP报文,因此,所述L2 PTN设备应当丢弃该TWAMP报文。When there is no identification information group matching the to-be-identified quadruple in the multiple identification information groups, it indicates that the TWAMP packet is not sent by the reflection port of the L3 PTN device for the reflection port of the L2 PTN device The first TWAMP message, therefore, the L2 PTN device should discard the TWAMP message.

第四方面,本申请实施例提供了一种第一设备,该第一设备具有实现上述方法实际中L3 PTN设备行为的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。In a fourth aspect, an embodiment of the present application provides a first device, where the first device has a function of implementing the actual behavior of the L3 PTN device in the above method. The functions can be implemented by hardware, or can be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

在一种可能的设计中,所述第一设备包括:In one possible design, the first device includes:

发送单元,用于通过第三设备向第二设备发送多个第一双向主动测量协议TWAMP报文,所述第一设备为三层分组传送网L3 PTN设备,所述第二设备为二层分组传送网L2PTN设备,所述第三设备为二层/三层L2/L3桥接设备;其中,所述发送的多个第一TWAMP报文中的任意一个包括原始时间戳,所述原始时间戳为所述发送单元发送该第一TWAMP报文的时间,该第一TWAMP报文中的目的地址为基站的互联网协议IP地址,或与所述基站同网段的预留IP地址;A sending unit, configured to send multiple first bidirectional active measurement protocol TWAMP messages to a second device through a third device, where the first device is a Layer 3 packet transport network L3 PTN device, and the second device is a Layer 2 packet Transport network L2PTN device, the third device is a Layer 2/Layer 3 L2/L3 bridging device; wherein, any one of the sent multiple first TWAMP packets includes an original timestamp, and the original timestamp is The time when the sending unit sends the first TWAMP message, the destination address in the first TWAMP message is the Internet Protocol IP address of the base station, or the reserved IP address on the same network segment as the base station;

接收单元,用于接收报文;a receiving unit for receiving messages;

确定单元,用于在所述接收单元接收一报文后,确定所述报文为所述第二设备通过所述第三设备发送的第二TWAMP报文,所述第二TWAMP报文对应所述第一设备发送的一个第一TWAMP报文,所述第二TWAMP报文中包括发送时间戳、接收时间戳和该第一TWAMP报文中的原始时间戳,其中,所述接收时间戳为所述第二设备接收该第一TWAMP报文的时间,所述发送时间戳为所述第二设备发送所述第二TWAMP报文的时间,所述第二TWAMP报文的目的地址与该第一TWAMP报文中的源地址相同,所述第二TWAMP报文的源地址与该第一TWAMP报文的目的地址相同;a determining unit, configured to, after the receiving unit receives a message, determine that the message is a second TWAMP message sent by the second device through the third device, and the second TWAMP message corresponds to the A first TWAMP message sent by the first device, the second TWAMP message includes a sending time stamp, a receiving time stamp and an original time stamp in the first TWAMP message, wherein the receiving time stamp is The time when the second device receives the first TWAMP message, the sending time stamp is the time when the second device sends the second TWAMP message, and the destination address of the second TWAMP message is the same as the second TWAMP message. The source addresses in a TWAMP message are the same, and the source address of the second TWAMP message is the same as the destination address of the first TWAMP message;

处理单元,用于根据预设时间段内接收的第二TWAMP报文的数目以及发送的第一TWAMP报文的数目,确定所述第一设备与所述第二设备之间的网络的丢包率;并a processing unit, configured to determine the packet loss of the network between the first device and the second device according to the number of the second TWAMP packets received and the number of the first TWAMP packets sent within a preset time period rate; and

根据所述预设时间段内接收的第二TWAMP报文中包括的原始时间戳、接收时间戳和发送时间戳,确定所述第一设备与所述第二设备之间的网络的时延。The network delay between the first device and the second device is determined according to the original timestamp, the reception timestamp and the transmission timestamp included in the second TWAMP packet received within the preset time period.

在一种可能的设计中,所述第一设备的结构中包括收发器和处理器,所述处理被配置为支持所述L3 PTN设备执行上述方法中相应的功能,所述收发器用于通过第三设备向第二设备发送第一TWAMP报文,并接收其他设备发送的报文。所述第一设备还可以包括存储器,所述存储器用于与处理器耦合,其保存所述第一设备必要的程序指令和数据。In a possible design, the structure of the first device includes a transceiver and a processor, the processor is configured to support the L3 PTN device to perform the corresponding functions in the above method, and the transceiver is configured to pass the first The third device sends the first TWAMP message to the second device, and receives messages sent by other devices. The first device may also include a memory for coupling with the processor that holds program instructions and data necessary for the first device.

第五方面,本申请实施例提供了一种第三设备,该第三设备具有实现上述方法实际中L2/L3桥接设备行为的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。In a fifth aspect, an embodiment of the present application provides a third device, where the third device has a function of implementing the behavior of the L2/L3 bridge device in practice in the foregoing method. The functions can be implemented by hardware, or can be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

在一种可能的设计中,所述第三设备包括:In one possible design, the third device includes:

接收单元,用于接收第一设备发送的第一双向主动测量协议TWAMP报文,所述第一设备为三层分组传送网L3 PTN设备,所述第二设备为二层分组传送网L2 PTN设备,所述第三设备为二层/三层L2/L3桥接设备;其中,所述第一TWAMP报文中包括原始时间戳,所述原始时间戳为所述第一设备发送该第一TWAMP报文的时间,所述第一TWAMP报文中的目的地址为基站的互联网协议IP地址,或与所述基站同网段的预留IP地址;A receiving unit, configured to receive a first bidirectional active measurement protocol TWAMP message sent by a first device, where the first device is a Layer 3 packet transport network L3 PTN device, and the second device is a Layer 2 packet transport network L2 PTN device , the third device is a Layer 2/Layer 3 L2/L3 bridging device; wherein, the first TWAMP message includes an original time stamp, and the original time stamp is when the first device sends the first TWAMP message The time of the message, the destination address in the first TWAMP message is the Internet Protocol IP address of the base station, or the reserved IP address on the same network segment as the base station;

发送单元,用于将所述第一TWAMP报文转发至第二设备;a sending unit, configured to forward the first TWAMP message to the second device;

所述接收单元,还用于接收所述第二设备发送的第二TWAMP报文,所述第二TWAMP报文对应所述第一设备发送的一个第一TWAMP报文,所述第二TWAMP报文中包括发送时间戳、接收时间戳和该第一TWAMP报文中的原始时间戳,其中,所述接收时间戳为所述第二设备接收该第一TWAMP报文的时间,所述发送时间戳为所述第二设备发送所述第二TWAMP报文的时间,所述第二TWAMP报文的目的地址与所述第一TWAMP报文中的源地址相同,所述第二TWAMP报文的源地址与所述第一TWAMP报文的目的地址相同;The receiving unit is further configured to receive a second TWAMP message sent by the second device, where the second TWAMP message corresponds to a first TWAMP message sent by the first device, and the second TWAMP message The text includes the sending time stamp, the receiving time stamp and the original time stamp in the first TWAMP message, wherein the receiving time stamp is the time when the second device receives the first TWAMP message, and the sending time The stamp is the time when the second device sends the second TWAMP packet, the destination address of the second TWAMP packet is the same as the source address in the first TWAMP packet, and the The source address is the same as the destination address of the first TWAMP message;

所述发送单元,还用于将所述第二TWAMP报文转发至所述第一设备。The sending unit is further configured to forward the second TWAMP message to the first device.

在一种可能的设计中,所述第三设备的结构中包括收发器和处理器,所述处理被配置为支持所述L2/L3桥接设备执行上述方法中相应的功能,所述收发器用于接收第一设备发送的第一TWAMP报文,并转发至第二设备;接收第二设备的第二TWAMP报文,并转发至第一设备。所述第三设备还可以包括存储器,所述存储器用于与处理器耦合,其保存所述第三设备必要的程序指令和数据。In a possible design, the structure of the third device includes a transceiver and a processor, the processor is configured to support the L2/L3 bridge device to perform the corresponding functions in the above method, the transceiver is used for Receive the first TWAMP message sent by the first device, and forward it to the second device; receive the second TWAMP message from the second device, and forward it to the first device. The third device may also include a memory for coupling with the processor that holds program instructions and data necessary for the third device.

第六方面,本申请实施例提供了一种第二设备,该第二设备具有实现上述方法实际中L2 PTN设备行为的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。In a sixth aspect, an embodiment of the present application provides a second device, where the second device has a function of implementing the actual behavior of the L2 PTN device in the above method. The functions can be implemented by hardware, or can be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

在一种可能的设计中,所述第二设备包括:In one possible design, the second device includes:

接收单元,用于接收报文;a receiving unit for receiving messages;

确定单元,用于在所述接收单元接收一报文后,确定所述报文为第一设备通过第三设备发送的第一双向主动测量协议TWAMP报文,所述第一设备为三层分组传送网L3 PTN设备,所述第二设备为二层分组传送网L2 PTN设备,所述第三设备为二层/三层L2/L3桥接设备;其中,所述第一TWAMP报文中包括原始时间戳,所述原始时间戳为所述第一设备发送所述第一TWAMP报文的时间,所述第一TWAMP报文中的目的地址为基站的互联网协议IP地址,或与所述基站同网段的预留IP地址;a determining unit, configured to, after the receiving unit receives a message, determine that the message is a first bidirectional active measurement protocol TWAMP message sent by a first device through a third device, and the first device is a layer 3 packet A transport network L3 PTN device, the second device is a Layer 2 packet transport network L2 PTN device, and the third device is a Layer 2/Layer 3 L2/L3 bridging device; wherein the first TWAMP packet includes the original Timestamp, the original timestamp is the time when the first device sends the first TWAMP packet, and the destination address in the first TWAMP packet is the Internet Protocol IP address of the base station, or the same as the base station. The reserved IP address of the network segment;

发送单元,用于通过所述第三设备向所述第一设备返回第二TWAMP报文,所述第二TWAMP报文对应所述第一设备发送的所述第一TWAMP报文,所述第二TWAMP报文中包括发送时间戳、接收时间戳和所述第一TWAMP报文中的原始时间戳,其中,所述接收时间戳为所述接收单元接收所述第一TWAMP报文的时间,所述发送时间戳为所述发送单元发送所述第二TWAMP报文的时间,所述第二TWAMP报文的目的地址与所述第一TWAMP报文中的源地址相同,所述第二TWAMP报文的源地址与所述第一TWAMP报文的目的地址相同。A sending unit, configured to return a second TWAMP message to the first device through the third device, where the second TWAMP message corresponds to the first TWAMP message sent by the first device, and the first TWAMP message corresponds to the first TWAMP message sent by the first device. The second TWAMP message includes a sending time stamp, a receiving time stamp, and an original time stamp in the first TWAMP message, wherein the receiving time stamp is the time when the receiving unit receives the first TWAMP message, The sending time stamp is the time when the sending unit sends the second TWAMP message, the destination address of the second TWAMP message is the same as the source address in the first TWAMP message, and the second TWAMP message is the same as the source address in the first TWAMP message. The source address of the packet is the same as the destination address of the first TWAMP packet.

在一种可能的设计中,所述第二设备的结构中包括收发器和处理器,所述处理被配置为支持所述L2 PTN设备执行上述方法中相应的功能,所述收发器用于接收第三设备转发的第一TWAMP报文,并通过所述第三设备向所述第一设备返回第二TWAMP报文。所述第二设备还可以包括存储器,所述存储器用于与处理器耦合,其保存所述第二设备必要的程序指令和数据。In a possible design, the structure of the second device includes a transceiver and a processor, and the processor is configured to support the L2 PTN device to perform the corresponding function in the above method, and the transceiver is configured to receive the first The first TWAMP packet forwarded by the third device, and the second TWAMP packet is returned to the first device through the third device. The second device may also include a memory for coupling with the processor that holds program instructions and data necessary for the second device.

第七方面,本申请实施例提供了一种网络监测系统,该系统包括上述方面所述的L3 PTN设备、L2 PTN设备以及L2/L3桥接设备。In a seventh aspect, an embodiment of the present application provides a network monitoring system, where the system includes the L3 PTN device, the L2 PTN device, and the L2/L3 bridge device described in the above aspects.

可选地,上述实施例可以用于LTE网络,上述第一设备、第二设备、第三设备可以是LTE网络中的设备。Optionally, the foregoing embodiment may be applied to an LTE network, and the foregoing first device, second device, and third device may be devices in an LTE network.

采用本发明提供的网络监测方法,PTN中的L2/L3桥接设备可以将L3PTN设备发送的第一TWAMP报文作为需要传输至基站的数据报文进行转发,从而可以顺利将第一TWAMP报文传输至所述L2 PTN设备,实现TWAMP报文的跨L2 PTN/L3 PTN转发,进而L2 PTN设备收到第一TWAMP报文后可以返回第二TWAMP报文,这样,在所述PTN中的L3 PTN设备可以通过第一TWAMP报文和第二TWAMP报文,精确地确定所述L3 PTN设备和L2 PTN设备之间的网络的丢包率和时延,从而L3 PTN设备提高了网络端到端的性能监测的准确度。By using the network monitoring method provided by the present invention, the L2/L3 bridge device in the PTN can forward the first TWAMP message sent by the L3PTN device as a data message to be transmitted to the base station, so that the first TWAMP message can be smoothly transmitted To the L2 PTN device, the cross-L2 PTN/L3 PTN forwarding of the TWAMP message is realized, and then the L2 PTN device can return the second TWAMP message after receiving the first TWAMP message. In this way, the L3 PTN in the PTN The device can accurately determine the packet loss rate and delay of the network between the L3 PTN device and the L2 PTN device through the first TWAMP message and the second TWAMP message, so that the L3 PTN device improves the end-to-end performance of the network Monitoring accuracy.

附图说明Description of drawings

图1为本发明实施例提供的一种PTN网络架构示意图;1 is a schematic diagram of a PTN network architecture according to an embodiment of the present invention;

图2为本发明实施例提供的在第一设备侧的一种网络监测方法的流程图;FIG. 2 is a flowchart of a network monitoring method on a first device side provided by an embodiment of the present invention;

图3为本发明实施例提供的在第三设备侧的一种网络监测方法的流程图;3 is a flowchart of a network monitoring method on a third device side provided by an embodiment of the present invention;

图4为本发明实施例提供的在第二设备侧的一种网络监测方法的流程图;4 is a flowchart of a network monitoring method on a second device side provided by an embodiment of the present invention;

图5为本发明实施例提供的第一设备的结构示意图;5 is a schematic structural diagram of a first device provided by an embodiment of the present invention;

图6为本发明实施例提供的第三设备的结构示意图;6 is a schematic structural diagram of a third device according to an embodiment of the present invention;

图7为本发明实施例提供的第二设备的结构示意图;7 is a schematic structural diagram of a second device provided by an embodiment of the present invention;

图8为本发明实施例提供的一种网络监测系统的示意图;8 is a schematic diagram of a network monitoring system according to an embodiment of the present invention;

图9为本发明实施例提供的第一设备的结构示意图;9 is a schematic structural diagram of a first device provided by an embodiment of the present invention;

图10为本发明实施例提供的第三设备的结构示意图;10 is a schematic structural diagram of a third device according to an embodiment of the present invention;

图11为本发明实施例提供的第二设备的结构示意图。FIG. 11 is a schematic structural diagram of a second device according to an embodiment of the present invention.

具体实施方式Detailed ways

为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明作进一步地详细描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

本发明实施例提供一种网络监测方法、装置及系统,可以解决现有技术中在LTE网络中,通过OAM工具进行分段业务性能在线监测,导致获得的网络端到端的性能测量结果误差较大的问题,也可以用于其他穿越二层、三层网络进行OAM测量的场景。其中,方法与装置是基于同一发明构思的,由于方法与装置解决问题的原理相似,因此装置与方法的实施可以相互参见,重复之处不再赘述。The embodiments of the present invention provide a network monitoring method, device, and system, which can solve the problem that in the prior art, in the LTE network, online monitoring of segmented service performance is performed through an OAM tool, resulting in a large error in the obtained end-to-end performance measurement results of the network. It can also be used in other scenarios for OAM measurement across Layer 2 and Layer 3 networks. Among them, the method and the device are based on the same inventive concept. Since the principle of the method and the device for solving problems is similar, the implementation of the device and the method can be referred to each other, and repeated descriptions will not be repeated.

根据本发明实施例的技术方案,PTN中的第一设备通过第三设备向第二设备发送多个第一双向主动测量协议(Two Way Active Measurement Protocol,TWAMP)报文,每个第一TWAMP报文中包括指示所述第一设备发送该第一TWAMP报文的时间的原始时间戳;所述第二设备在接收到每个第一TWAMP报文后,均通过所述第三设备向所述第一设备返回一个第二TWAMP报文,所述第二TWAMP报文对应该第一TWAMP报文。所述第二TWAMP报文中包括该第一TWAMP报文中的原始时间戳、接收时间戳以及发送时间戳。其中,所述第一设备为L3PTN设备,所述第二设备为L2 PTN设备,所述第三设备为L2/L3桥接设备,由于所述第一TWAMP报文中的目的地址为基站的IP地址或与所述基站同网段的预留IP地址,这样,所述第三设备可以将第一TWAMP报文作为需要传输至基站的数据报文,直接传输至所述第二设备,进而,所述第二设备可以针对接收的第一TWAMP报文回复第二TWAMP报文,最终,所述第一设备确定在预设时间段内接收的第二TWAMP报文的数目与发送的第一TWAMP报文的数目的差,作为丢包数目,并将所述丢包数目与发送的第一TWAMP报文的数目的商,作为所述第一设备与所述第二设备之间的网络的丢包率;并根据所述预设时间段内接收的第二TWAMP报文中包括的接收时间戳与原始时间戳的差值,以及所述发送时间戳与接收时间戳的差值,确定所述第一设备与所述第二设备之间的网络的时延。这样,在所述PTN中的L3PTN设备可以通过第一TWAMP报文和第二TWAMP报文,精确地确定所述L3 PTN设备和L2 PTN设备之间的网络的丢包率和时延,从而L3 PTN设备提高了网络端到端的性能监测的准确度。According to the technical solution of the embodiment of the present invention, the first device in the PTN sends a plurality of first two-way active measurement protocol (Two Way Active Measurement Protocol, TWAMP) messages to the second device through the third device, and each first TWAMP message The text includes an original timestamp indicating the time when the first device sent the first TWAMP message; the second device, after receiving each first TWAMP message, sends the message to the The first device returns a second TWAMP message, where the second TWAMP message corresponds to the first TWAMP message. The second TWAMP message includes the original timestamp, the receiving timestamp and the sending timestamp in the first TWAMP message. The first device is an L3PTN device, the second device is an L2 PTN device, and the third device is an L2/L3 bridge device, because the destination address in the first TWAMP packet is the IP address of the base station Or a reserved IP address on the same network segment as the base station, so that the third device can directly transmit the first TWAMP message to the second device as a data message that needs to be transmitted to the base station, and further, the The second device can reply to the second TWAMP message for the received first TWAMP message, and finally, the first device determines the number of the second TWAMP message received within the preset time period and the first TWAMP message sent. The difference of the number of packets is taken as the number of lost packets, and the quotient of the number of lost packets and the number of the first TWAMP packets sent is taken as the packet loss of the network between the first device and the second device and according to the difference between the receiving timestamp and the original timestamp included in the second TWAMP message received within the preset time period, and the difference between the sending timestamp and the receiving timestamp, determine the first timestamp. Latency of the network between a device and the second device. In this way, the L3PTN device in the PTN can accurately determine the packet loss rate and delay of the network between the L3 PTN device and the L2 PTN device through the first TWAMP message and the second TWAMP message, so that the L3 PTN equipment improves the accuracy of network end-to-end performance monitoring.

本发明实施例提供的网络监测方法,可以适用于任何PTN网络架构中,例如实现端到端的S1业务的网络架构、实现端到端的X2业务的网络架构,以及其他复杂的省域城域网、市级城域网等。本发明对此不做限定。下面本发明实施例仅以实现端到端的S1业务的网络架构进行举例说明。The network monitoring method provided by the embodiment of the present invention can be applied to any PTN network architecture, such as the network architecture for realizing end-to-end S1 service, the network architecture for realizing end-to-end X2 service, and other complex provincial metropolitan area networks, City-level metropolitan area network, etc. The present invention does not limit this. In the following embodiments of the present invention, only a network architecture for implementing an end-to-end S1 service is used for illustration.

本发明实施例提供的网络监测方法,可以适用于如图1所示的PTN网络架构中,该网络架构可以实现端到端的S1业务。该网络架构中包括:基站、L2 PTN设备、L2/L3桥接设备、L3 PTN设备,以及核心网设备,如业务网关(Service-Gateway,S-GW)、移动性管理实体(Mobility Management Entity,MME)和核心网控制设备等。其中,所述L2 PTN设备为具有与交换机相同功能的网络设备,而所述L3 PTN设备为具有与路由器相同功能的网络设备。基站依次经由L2 PTN设备、L2/L3桥接设备、L3 PTN设备与核心网设备通信。在所述PTN网络架构中,如图1所示的PTN网络分为L2 PTN和L3 PTN,在L2 PTN中部署L2VPN的设备即为L2PTN设备,而在L3 PTN设备中部署L3VPN的设备即为L3 PTN设备。The network monitoring method provided by the embodiment of the present invention can be applied to the PTN network architecture as shown in FIG. 1 , and the network architecture can realize the end-to-end S1 service. The network architecture includes: base stations, L2 PTN equipment, L2/L3 bridging equipment, L3 PTN equipment, and core network equipment, such as Service-Gateway (S-GW), Mobility Management Entity (MME, MME) ) and core network control equipment, etc. Wherein, the L2 PTN device is a network device having the same function as a switch, and the L3 PTN device is a network device having the same function as a router. The base station communicates with the core network equipment via the L2 PTN equipment, the L2/L3 bridge equipment, and the L3 PTN equipment in sequence. In the PTN network architecture, the PTN network shown in FIG. 1 is divided into L2 PTN and L3 PTN, the equipment that deploys L2VPN in L2 PTN is L2PTN equipment, and the equipment that deploys L3VPN in L3 PTN equipment is L3 PTN equipment.

在该网络架构中,任意一个L3 PTN设备,实现网络监测时,可以向该网络架构中的任意一个与基站对接的所述PTN末端的L2 PTN设备发送多个第一TWAMP报文,由于所述第一TWAMP报文中的目的地址为基站的IP地址或与所述基站同网段的预留IP地址,这样,所述PTN中的L2/L3桥接设备可以将第一TWAMP报文作为需要传输至基站的数据报文进行转发,传输至所述L2 PTN设备,这样当接收方接收到所述L2/L3桥接设备转发的一个第一TWAMP报文后,通过所述L2/L3桥接设备向所述L2/L3桥接设备返回对应该第一TWAMP报文的第二TWAMP报文。由于该第一TWAMP报文中包括第一设备发送该第一TWAMP报文的原始时间戳,针对该第一TWAMP报文返回的第二TWAMP报文中也包括该第一TWAMP报文中的原始时间戳、接收时间戳和发送时间戳。这样,所述L3 PTN设备根据在预设时间段内接收的第二TWAMP报文的数目与发送的第一TWAMP报文的数目,确定所述L3 PTN设备与所述L2 PTN设备之间的网络的丢包率;所述L3 PTN设备根据接收的第二TWAMP报文中包括的发送时间戳与原始时间戳的差值,以及所述发送时间戳与接收时间戳的差值,确定所述L3 PTN设备与所述L2 PTN设备之间的网络的时延。In this network architecture, when implementing network monitoring, any L3 PTN device can send multiple first TWAMP messages to any L2 PTN device at the end of the PTN that is connected to the base station in the network architecture. The destination address in the first TWAMP message is the IP address of the base station or a reserved IP address on the same network segment as the base station, so that the L2/L3 bridge device in the PTN can use the first TWAMP message as the need to transmit The data packet to the base station is forwarded and transmitted to the L2 PTN device, so that when the receiver receives a first TWAMP packet forwarded by the L2/L3 bridge The L2/L3 bridge device returns a second TWAMP message corresponding to the first TWAMP message. Since the first TWAMP packet includes the original timestamp of the first TWAMP packet sent by the first device, the second TWAMP packet returned for the first TWAMP packet also includes the original timestamp in the first TWAMP packet Timestamp, Receive Timestamp, and Send Timestamp. In this way, the L3 PTN device determines the network between the L3 PTN device and the L2 PTN device according to the number of the second TWAMP packets received and the number of the first TWAMP packets sent within the preset time period the packet loss rate; the L3 PTN device determines the L3 The network delay between the PTN device and the L2 PTN device.

在如图1所示的PTN网络架构中,任意一个L3 PTN设备可以通过第一TWAMP报文和第二TWAMP报文,精确地确定所述L3 PTN设备和任意一个L2 PTN设备之间的网络的丢包率和时延,从而L3 PTN设备提高了网络端到端的性能监测的准确度。In the PTN network architecture shown in Figure 1, any L3 PTN device can accurately determine the network connection between the L3 PTN device and any L2 PTN device through the first TWAMP message and the second TWAMP message. Packet loss rate and delay, so L3 PTN equipment improves the accuracy of network end-to-end performance monitoring.

参阅图2所示,本发明实施例提供的一种网络监测方法,应用于任何PTN网络中的L3 PTN设备中,如路由器、具有与路由器相同功能的其他网络设备等等。比如,该方法可以应用于图1所示的网络架构中。该方法包括:Referring to FIG. 2 , a network monitoring method provided by an embodiment of the present invention is applied to any L3 PTN device in a PTN network, such as a router, other network devices having the same function as a router, and so on. For example, the method can be applied to the network architecture shown in FIG. 1 . The method includes:

S201:PTN中的第一设备通过第三设备向第二设备发送多个第一TWAMP报文,所述第一设备为L3 PTN设备,所述第二设备为L2 PTN设备,所述第三设备为L2/L3桥接设备;其中,所述发送的多个第一TWAMP报文中的任意一个第一TWAMP报文包括原始时间戳,所述原始时间戳为所述第一设备发送该第一TWAMP报文的时间,该第一TWAMP报文的目的地址为基站的IP地址或与所述基站同网段的预留IP地址。S201: A first device in the PTN sends multiple first TWAMP packets to a second device through a third device, where the first device is an L3 PTN device, the second device is an L2 PTN device, and the third device is an L2/L3 bridging device; wherein, any first TWAMP message in the sent multiple first TWAMP messages includes an original time stamp, and the original time stamp is the first TWAMP sent by the first device The time of the message, and the destination address of the first TWAMP message is the IP address of the base station or a reserved IP address on the same network segment as the base station.

可选的,所述第二设备为与所述基站对接的L2 PTN设备。Optionally, the second device is an L2 PTN device interconnected with the base station.

可选的,所述第一设备在发送多个第一TWAMP报文时,发送两个第一TWAMP报文之间的时间间隔为毫秒(ms)级,并可以达到0.1ms,这样,第一设备可以在一个监测周期中发送较多数目的第一TWAMP报文,因为第一设备发送第一TWAMP报文的数目基数增加,所以第一设备在后续接收所述第二设备返回的第二TWAMP报文的数目基数增加,这样,根据接收的第二TWAMP报文的数目以及发送的第一TWAMP报文的数目,获得的所述第一设备与所述第二设备之间的网络的丢包率的精度更高,保证获得的丢包率的精确度。Optionally, when the first device sends multiple first TWAMP packets, the time interval between sending two first TWAMP packets is milliseconds (ms), and can reach 0.1 ms. The device may send a larger number of first TWAMP packets in one monitoring period. Because the number of first TWAMP packets sent by the first device increases, the first device subsequently receives the second TWAMP packet returned by the second device. In this way, according to the number of received second TWAMP packets and the number of sent first TWAMP packets, the packet loss rate of the network between the first device and the second device is obtained. The accuracy is higher, and the accuracy of the obtained packet loss rate is guaranteed.

可选的,所述第一设备在距离上次网络监测间隔第一时长后,再开始向所述第二设备发送多个第一TWAMP报文,并在满足以下条件中的至少一个时,停止向所述第二设备发送第一TWAMP报文:Optionally, the first device starts to send a plurality of first TWAMP messages to the second device after a first time interval from the last network monitoring interval, and stops when at least one of the following conditions is satisfied: Send the first TWAMP message to the second device:

(1)在持续发送设定数目个第一TWAMP报文后;(1) After continuously sending a set number of first TWAMP messages;

(2)持续发送设定第二时长后;(2) After continuing to send the set second duration;

(3)接收到管理设备发送的停止发送第一TWAMP报文指示后。所述管理设备可以为网管系统或其他控制设备。(3) After receiving the instruction to stop sending the first TWAMP message sent by the management device. The management device may be a network management system or other control devices.

可选的,所述第一设备还可以在设定周期内的某个指定时间段内向所述第二设备发送多个第一TWAMP报文。所述设定周期也可以为所述管理设备配置的,所述设定周期可以为一天,一周等,本申请对此不做限定。Optionally, the first device may also send multiple first TWAMP packets to the second device within a specified time period within a set period. The set period may also be configured by the management device, and the set period may be one day, one week, etc., which is not limited in this application.

传统的,由于只有L3 PTN内部网元才能识别TWAMP报文,PTN网络中的L2/L3桥接设备无法将TWAMP报文跨L2 PTN/L3 PTN转发,因此,在PTN网络中L3 PTN设备通过TWAMP会话监测网络性能时,只能监测IP网络(即L3 PTN)中任意两个网元之间的网络性能,无法直接监测L2 PTN中的一个网元与L3 PTN中的一个网元之间的网络性能。Traditionally, because only the internal network elements of the L3 PTN can identify TWAMP packets, the L2/L3 bridge device in the PTN network cannot forward the TWAMP packets across the L2 PTN/L3 PTN. Therefore, the L3 PTN device in the PTN network passes the TWAMP session. When monitoring network performance, you can only monitor the network performance between any two NEs in the IP network (ie, L3 PTN), but cannot directly monitor the network performance between one NE in the L2 PTN and one NE in the L3 PTN .

在S201中,虽然所述第一设备将所述第一TWAMP报文发送给第二设备,但所述第一TWAMP报文的目的地址为基站的IP地址或与所述基站同网段的预留IP地址,这样,所述第一TWAMP报文在传输过程中,所述第一设备与所述第二设备之间的L2/L3桥接设备可以将所述第一TWAMP报文作为需要传输至基站的数据报文进行转发,从而可以顺利将所述第一TWAMP报文传输至所述第二设备,实现TWAMP报文的跨L2 PTN/L3 PTN转发。In S201, although the first device sends the first TWAMP message to the second device, the destination address of the first TWAMP message is the IP address of the base station or a preset address on the same network segment as the base station. In this way, during the transmission process of the first TWAMP packet, the L2/L3 bridge device between the first device and the second device can use the first TWAMP packet as the need to transmit the first TWAMP packet to The data message of the base station is forwarded, so that the first TWAMP message can be smoothly transmitted to the second device, and the TWAMP message can be forwarded across L2 PTN/L3 PTN.

可选的,所述发送的多个第一TWAMP报文中的任意一个第一TWAMP报文中的源地址可以为以下中的任一项:Optionally, the source address in any one of the first TWAMP messages in the sent multiple first TWAMP messages may be any of the following:

所述第一设备的IP地址、与所述第一设备对接的S-GW的IP地址、与所述S-GW同网段的IP地址。The IP address of the first device, the IP address of the S-GW interconnected with the first device, and the IP address of the same network segment as the S-GW.

在S201中,每个第一TWAMP报文的源地址可以配置为第一设备的IP地址,也可以配置为非第一设备的IP地址,但需要保证IP地址的路由可达。可选地,将每个第一TWAMP报文的源地址配置为所述第一设备的IP地址,这可能需要在目的地址与源地址之间配置额外的路由。可选的,每个第一TWAMP报文的源地址可以配置为与所述第一设备对接的S-GW的IP地址或所述S-GW同网段的IP地址,由于所述第一TWAMP报文地目的地址与源地址之间路由可达,这样,可以保证在传输每个第一TWAMP报文时,不需要配置额外的路由。In S201, the source address of each first TWAMP packet may be configured as the IP address of the first device, or may be configured as the IP address of the non-first device, but it is necessary to ensure that the route of the IP address is reachable. Optionally, configure the source address of each first TWAMP packet as the IP address of the first device, which may require configuring an additional route between the destination address and the source address. Optionally, the source address of each first TWAMP packet can be configured as the IP address of the S-GW connected to the first device or the IP address of the same network segment of the S-GW, because the first TWAMP The route between the destination address and the source address of the packet is reachable. In this way, it can be ensured that no additional route needs to be configured when each first TWAMP packet is transmitted.

可选的,所述发送的多个第一TWAMP报文中的任意一个第一TWAMP报文中还包括所述第一设备的发射端口号、所述第二设备的反射端口号,用于指示所述第一TWAMP报文是通过所述第一设备的发射端口号对应的端口发送的,并通过所述第二设备的反射端口号对应的端口返回。Optionally, any one of the multiple first TWAMP messages sent further includes the transmission port number of the first device and the reflection port number of the second device, which are used to indicate The first TWAMP packet is sent through the port corresponding to the transmission port number of the first device, and returned through the port corresponding to the reflection port number of the second device.

S202:所述第一设备接收一报文后,确定所述报文为所述第二设备通过所述第三设备发送的第二TWAMP报文,所述第二TWAMP报文对应所述第一设备发送的一个第一TWAMP报文,所述第一TWAMP报文中包括发送时间戳、接收时间戳和该第一TWAMP报文中的原始时间戳,其中,所述接收时间戳为所述第二设备接收该第一TWAMP报文的时间,所述发送时间戳为所述第二设备发送所述第二TWAMP报文的时间,所述第二TWAMP报文的目的地址与该第一TWAMP报文中的源地址相同,所述第二TWAMP报文的源地址与该第一TWAMP报文的目的地址相同。S202: After receiving a packet, the first device determines that the packet is a second TWAMP packet sent by the second device through the third device, and the second TWAMP packet corresponds to the first A first TWAMP packet sent by a device, the first TWAMP packet includes a sending timestamp, a receiving timestamp, and an original timestamp in the first TWAMP packet, where the receiving timestamp is the first TWAMP packet. The time when the second device receives the first TWAMP message, the sending time stamp is the time when the second device sends the second TWAMP message, and the destination address of the second TWAMP message is the same as the first TWAMP message. The source addresses in the text are the same, and the source address of the second TWAMP packet is the same as the destination address of the first TWAMP packet.

所述第二设备支持响应第一TWAMP报文,针对接收的一个第一TWAMP报文返回第二TWAMP报文,其中,所述第二设备返回的所述第一TWAMP报文可以确定是针对哪个第一TWAMP报文回复的。The second device supports responding to the first TWAMP message, and returns a second TWAMP message for a received first TWAMP message, wherein the first TWAMP message returned by the second device can determine for which The first TWAMP message is replied.

其中,针对一个第一TWAMP报文返回的第二TWAMP报文中的源地址为该第一TWAMP报文中的目的地址;针对一个第一TWAMP报文返回的第二TWAMP报文中的目的地址为该第一TWAMP报文中的源地址。这样,可以保证针对一个第一TWAMP报文返回的第二TWAMP报文可以按照所述第一TWAMP报文的传输路径返回至所述第一设备。Wherein, the source address in the second TWAMP message returned for a first TWAMP message is the destination address in the first TWAMP message; the destination address in the second TWAMP message returned for a first TWAMP message is the source address in the first TWAMP packet. In this way, it can be ensured that the second TWAMP message returned for a first TWAMP message can be returned to the first device according to the transmission path of the first TWAMP message.

可选的,在S202中,所述第一设备确定所述报文为所述第二设备发送的第二TWAMP报文,包括:Optionally, in S202, the first device determines that the message is the second TWAMP message sent by the second device, including:

在所述第一设备确定所述报文包括TWAMP标识时,确定所述报文为TWAMP报文;When the first device determines that the message includes a TWAMP identifier, determining that the message is a TWAMP message;

所述第一设备根据所述TWAMP报文中的源地址和目的地址,确定所述TWAMP报文为所述第二TWAMP报文。The first device determines that the TWAMP message is the second TWAMP message according to the source address and the destination address in the TWAMP message.

可选的,所述TWAMP标识可以为TWAMP的协议标识。第一TWAMP报文包括TWAMP标识。所述第二TWAMP报文包括TWAMP标识。TWAMP标识用于指示包括该TWAMP标识的报文是TWAMP报文。因此,所述第一设备在所述报文中未检测到TWAMP标识时,则正常转发报文。Optionally, the TWAMP identifier may be a TWAMP protocol identifier. The first TWAMP message includes a TWAMP identifier. The second TWAMP message includes a TWAMP identifier. The TWAMP identifier is used to indicate that the packet including the TWAMP identifier is a TWAMP packet. Therefore, when the first device does not detect the TWAMP identifier in the message, it normally forwards the message.

可选的,所述第一设备根据所述TWAMP报文中的源地址和目的地址,确定所述TWAMP报文为所述第二TWAMP报文,包括:Optionally, the first device determines that the TWAMP message is the second TWAMP message according to the source address and destination address in the TWAMP message, including:

所述第一设备将所述TWAMP报文中的目的地址和源地址作为待识别二元组;The first device uses the destination address and the source address in the TWAMP message as the two-tuple to be identified;

当存储的多个识别信息组中存在与所述待识别二元组匹配的识别信息组时,确定所述TWAMP报文为所述第二TWAMP报文;When there is an identification information group matching the to-be-identified binary group in the stored identification information groups, determine that the TWAMP message is the second TWAMP message;

其中,所述多个识别信息组为针对所述第二设备设置的,与所述待识别二元组匹配的识别信息组为包括所述第一TWAMP报文的源地址和目的地址的二元组;The multiple identification information groups are set for the second device, and the identification information group matching the to-be-identified binary group is a binary including the source address and destination address of the first TWAMP message Group;

当存储的多个识别信息组中不存在与所述待识别二元组匹配的识别信息组时,所述第一设备正常转发所述TWAMP报文。When there is no identification information group matching the to-be-identified binary group in the stored identification information groups, the first device normally forwards the TWAMP message.

可选的,当所述发送的多个第一TWAMP报文中的任意一个第一TWAMP报文中还包括所述第一设备的发射端口号、所述第二设备的反射端口号时,相应的,所述第二TWAMP报文中也还包括所述第一设备的发射端口号、所述第二设备的反射端口号;Optionally, when any one of the multiple first TWAMP messages sent further includes the transmission port number of the first device and the reflection port number of the second device, the corresponding The second TWAMP message also includes the transmission port number of the first device and the reflection port number of the second device;

所述第一设备根据所述TWAMP报文中的源地址和目的地址,确定所述TWAMP报文为所述第二TWAMP报文,包括:The first device determines that the TWAMP message is the second TWAMP message according to the source address and destination address in the TWAMP message, including:

所述第一设备将所述TWAMP报文中的目的地址、源地址、所述第一设备的发射端口号和所述第二设备的反射端口号作为待识别四元组;The first device uses the destination address, the source address, the transmission port number of the first device and the reflection port number of the second device in the TWAMP message as a quadruple to be identified;

当存储的多个识别信息组中存在与所述待识别四元组匹配的识别信息组时,确定所述TWAMP报文为所述第二TWAMP报文;When there is an identification information group matching the to-be-identified quadruple in the stored identification information groups, determine that the TWAMP message is the second TWAMP message;

其中,所述多个识别信息组为针对所述第二设备设置的,与所述待识别四元组匹配的识别信息组为包括与所述第二TWAMP报文对应的第一TWAMP报文的源地址和目的地址,以及所述第一设备的发射端口号和所述第二设备的反射端口号的四元组;The plurality of identification information groups are set for the second device, and the identification information group matching the to-be-identified quadruple is an identification information group including a first TWAMP message corresponding to the second TWAMP message source address and destination address, and a quadruple of the transmit port number of the first device and the reflection port number of the second device;

当存储的多个识别信息组中不存在与所述待识别四元组匹配的识别信息组时,所述第一设备正常转发所述TWAMP报文。When no identification information group matching the to-be-identified quadruple exists in the stored identification information groups, the first device normally forwards the TWAMP message.

可选的,所述多个识别信息组是所述管理设备下发配置到所述第一设备的。Optionally, the multiple identification information groups are delivered and configured by the management device to the first device.

当一个第一TWAMP报文包括所述第一设备的发射端口号、所述第二设备的反射端口号时,相应的,该第一TWAMP报文对应的第二TWAMP报文也包括所述第一设备的发射端口号、所述第二设备的反射端口号。这样,在所述第一设备接收到TWAMP报文时,可以根据该第一TWAMP报文的源地址和目的地址,以及所述第一设备的发射端口号和所述第二设备的反射端口号的四元组进行匹配,可以将包括相同的源地址和目的地址,但发射端口号和反射端口号不同的TWAMP报文进行区分,避免了针对所述第一设备的其他发射端口或者其他L3PTN设备发射的TWAMP报文返回的TWAMP报文,被所述第一设备误判定为所述第二TWAMP报文,进而导致所述第一设备确定的所述第一设备和所述第二设备之间的网络的丢包率和时延误差较大的问题。When a first TWAMP packet includes the transmission port number of the first device and the reflection port number of the second device, correspondingly, the second TWAMP packet corresponding to the first TWAMP packet also includes the first TWAMP packet. The transmit port number of one device and the reflection port number of the second device. In this way, when the first device receives the TWAMP message, it can use the source address and destination address of the first TWAMP message, as well as the transmission port number of the first device and the reflection port number of the second device. By matching the four tuples, the TWAMP packets including the same source address and destination address but with different transmission port numbers and reflection port numbers can be distinguished, avoiding other transmission ports of the first device or other L3PTN devices. The TWAMP message returned by the transmitted TWAMP message is mistakenly determined by the first device to be the second TWAMP message, which in turn leads to a relationship between the first device and the second device determined by the first device. The packet loss rate and delay error of the network are relatively large.

S203:所述第一设备根据预设时间段内接收的第二TWAMP报文的数目以及发送的第一TWAMP报文的数目,确定所述第一设备与所述第二设备之间的网络的丢包率;并根据所述预设时间段内接收的第二TWAMP报文中包括的原始时间戳、接收时间戳和发送时间戳,确定所述第一设备与所述第二设备之间的网络的时延。S203: The first device determines, according to the number of second TWAMP packets received and the number of first TWAMP packets sent within a preset time period, the network connection between the first device and the second device. packet loss rate; and according to the original timestamp, the receiving timestamp and the sending timestamp included in the second TWAMP message received within the preset time period, determine the difference between the first device and the second device. network delay.

可选的,所述第一设备确定所述第一设备与所述第二设备之间的网络的丢包率,包括:Optionally, the first device determines the packet loss rate of the network between the first device and the second device, including:

所述第一设备按照设置的第一监测周期,确定所述第一设备与所述第二设备之间的网络的丢包率。The first device determines the packet loss rate of the network between the first device and the second device according to the set first monitoring period.

可选的,所述预设时间段可以为所述第一监测周期,或者根据具体应用场景设置的指定时间段。所述第一设备确定在所述预设时间段内接收的第二TWAMP报文的数目、在所述预设时间段内发送的第一TWAMP报文的数目,并确定在所述预设时间段内接收的第二TWAMP报文的数目与在所述预设时间段内发送的第一TWAMP报文的数目的差,作为丢包数目,并将所述丢包数目与发送的第一TWAMP报文的数目的商,作为所述第一设备与所述第二设备之间的网络的丢包率。Optionally, the preset time period may be the first monitoring period, or a specified time period set according to a specific application scenario. The first device determines the number of second TWAMP messages received within the preset time period, the number of first TWAMP messages sent within the preset time period, and determines the preset time period The difference between the number of second TWAMP packets received in the segment and the number of first TWAMP packets sent within the preset time period is taken as the number of lost packets, and the number of lost packets is compared with the number of first TWAMP packets sent The quotient of the number of packets is used as the packet loss rate of the network between the first device and the second device.

可选的,所述第一设备确定所述第一设备与所述第二设备之间的网络的时延,包括:Optionally, the first device determines the network delay between the first device and the second device, including:

所述第一设备按照设置的第二监测周期,确定所述第一设备与所述第二设备之间的网络的时延。The first device determines the network delay between the first device and the second device according to the set second monitoring period.

可选的,所述预设时间段还可以为所述第二监测周期。所述第一设备确定在所述预设时间段内接收的所有第二TWAMP报文。可选的,将每个第二TWAMP报文中接收时间戳与原始时间戳的差值,作为在所述第一设备与所述第二设备之间的网络传输第一TWAMP报文的时延,即单向传输时延;将获得的单向传输时延取平均值,作为单向传输时延平均值;并将每个第二TWAMP报文中发送时间戳与接收时间戳的差值,作为所述第二设备处理第一TWAMP报文的处理时延;将获得的处理时延取平均值,作为处理时延平均值。可选的,所述第一设备还可以将2倍的单向传输时延平均值与处理时延平均值的和,作为双向传输时延平均值。Optionally, the preset time period may also be the second monitoring period. The first device determines all second TWAMP messages received within the preset time period. Optionally, the difference between the received timestamp and the original timestamp in each second TWAMP packet is used as the delay in transmitting the first TWAMP packet on the network between the first device and the second device , that is, the one-way transmission delay; take the average of the obtained one-way transmission delays as the average one-way transmission delay; and take the difference between the sending timestamp and the receiving timestamp in each second TWAMP message as The second device processes the processing delay of the first TWAMP packet; the obtained processing delay is averaged as the average processing delay. Optionally, the first device may also use the sum of twice the average value of the one-way transmission delay and the average value of the processing delay as the average value of the two-way transmission delay.

所述第一设备与所述第二设备之间的网络的时延可以为所述第一设备确定的单向传输时延平均值或所述双向传输时延平均值等。The delay of the network between the first device and the second device may be the average value of one-way transmission delay determined by the first device or the average value of the two-way transmission delay, or the like.

显然,所述第一监测周期和所述第二监测周期均大于两个第一TWAMP报文之间的时间间隔,且所述第一监测周期与所述时间间隔的商越大,所述第一设备确定的丢包率的精度越高,同理,所述第二监测周期与所述时间间隔的商越大,所述第一设备确定的时延的精度也越高。其中,所述第一监测周期和所述第二监测周期可以取相同的数值。所述第一监测周期和所述第二监测周期可以为所述管理设备配置的。Obviously, both the first monitoring period and the second monitoring period are greater than the time interval between two first TWAMP messages, and the greater the quotient of the first monitoring period and the time interval, the greater the quotient of the first monitoring period and the time interval. The higher the accuracy of the packet loss rate determined by a device, and similarly, the greater the quotient of the second monitoring period and the time interval, the higher the accuracy of the delay determined by the first device. Wherein, the first monitoring period and the second monitoring period may take the same value. The first monitoring period and the second monitoring period may be configured for the management device.

可选的,在S203之后,还包括:Optionally, after S203, it also includes:

所述第一设备将确定的所述第一设备与所述第二设备之间的网络的丢包率、所述第一设备与所述第二设备之间的网络的时延,上报至所述管理设备。The first device reports the determined packet loss rate of the network between the first device and the second device and the delay of the network between the first device and the second device to the management equipment.

所述管理设备可以根据所述第一设备上报的丢包率和时延,进行统计,生成连通性检测报告和丢包率、时延以及抖动等性能的在线监测报告,并在丢包率或时延出现异常时,进行告警,并指出告警的问题,以及对应的第二设备。The management device may perform statistics according to the packet loss rate and delay reported by the first device, and generate a connectivity detection report and an online monitoring report of performance such as packet loss rate, delay, and jitter, and report on the packet loss rate or delay. When the delay is abnormal, an alarm is issued, and the problem of the alarm and the corresponding second device are pointed out.

在以上实施例中,所述第一设备和所述第二设备之间包括第三设备——L2/L3桥接设备。即所述第一设备和所述第二设备之间传输的第一TWAMP报文、第二TWAMP报文需要通过所述第三设备转发,即所述第一设备在向所述第二设备发送第一TWAMP报文时,需要通过所述第三设备向所述第二设备转发,所述第一设备在接收所述第二设备返回的第二TWAMP报文时,是通过所述第三设备转发的。In the above embodiment, a third device, an L2/L3 bridge device, is included between the first device and the second device. That is, the first TWAMP packet and the second TWAMP packet transmitted between the first device and the second device need to be forwarded by the third device, that is, the first device is sending to the second device. The first TWAMP message needs to be forwarded to the second device through the third device. When the first device receives the second TWAMP message returned by the second device, it needs to be forwarded through the third device. forwarded.

所述第三设备,用于接收所述第一设备发送的第一TWAMP报文,并将接收的所述第一TWAMP报文转发至所述第二设备;还用于接收所述第二设备发送的第二TWAMP报文,并将所述第二TWAMP报文转发给所述第一设备。the third device, configured to receive the first TWAMP packet sent by the first device, and forward the received first TWAMP packet to the second device; and configured to receive the second device send the second TWAMP message, and forward the second TWAMP message to the first device.

所述第三设备将接收的所述第一TWAMP报文转发至所述第二设备,当所述第一TWAMP报文中的目的地址为基站的IP地址时,所述第三设备可以直接将所述第一TWAMP报文转发;The third device forwards the received first TWAMP message to the second device. When the destination address in the first TWAMP message is the IP address of the base station, the third device can directly forward the received first TWAMP message to the second device. forwarding the first TWAMP message;

当所述第一TWAMP报文中的目的地址为所述基站的同网段的预留IP地址时,所述第三设备将所述第一TWAMP报文转发至所述第二设备,包括:When the destination address in the first TWAMP packet is the reserved IP address of the same network segment of the base station, the third device forwards the first TWAMP packet to the second device, including:

所述第三设备根据存储的IP地址与媒体访问控制(Media Access Control,MAC)地址的映射关系,确定所述第一TWAMP报文中的目的地址对应的MAC地址;并通过确定的MAC地址对应的二层子接口,将所述第一TWAMP报文转发至所述第二设备。The third device determines the MAC address corresponding to the destination address in the first TWAMP message according to the mapping relationship between the stored IP address and the media access control (Media Access Control, MAC) address; and corresponds to the determined MAC address. The Layer 2 sub-interface forwards the first TWAMP packet to the second device.

其中,所述第三设备中存储的IP地址与MAC地址的映射关系,可以为所述管理设备针对所述第三设备预先配置的。The mapping relationship between the IP address and the MAC address stored in the third device may be pre-configured by the management device for the third device.

所述第三设备将接收的所述第二TWAMP报文转发至所述第一设备时,无论所述第二TWAMP报文中的源地址为基站的IP地址或所述基站的同网段的预留IP地址,所述第三设备可以直接将所述第二TWAMP报文进行转发。When the third device forwards the received second TWAMP packet to the first device, regardless of whether the source address in the second TWAMP packet is the IP address of the base station or the IP address of the base station on the same network segment The IP address is reserved, and the third device can directly forward the second TWAMP message.

综上所述,采用本发明上述实施例中的网络监测方法,PTN中的L3 PTN设备通过发送包括原始时间戳的第一TWAMP报文,以及接收包括原始时间戳、接收时间戳、发送时间戳的第二TWAMP报文,可以准确地获取所述L3 PTN设备与L2 PTN设备之间的网络的时延和丢包率,最终实现PTN中端到端的时延和丢包率高精度在线监测,提高了网络端到端的性能检测的准确度。To sum up, using the network monitoring method in the above-mentioned embodiments of the present invention, the L3 PTN device in the PTN sends the first TWAMP message including the original timestamp, and receives the The second TWAMP message of the L3 PTN device can accurately obtain the network delay and packet loss rate between the L3 PTN device and the L2 PTN device, and finally realize the high-precision online monitoring of the end-to-end delay and packet loss rate in the PTN. Improves the accuracy of network end-to-end performance detection.

参阅图3所示,本发明实施例提供的一种网络监测方法,应用于与任何PTN网络架构中的L2/L3桥接设备中。比如,该方法可以应用于图1所示的网络架构中的L2/L3桥接设备中。该方法的处理流程包括:Referring to FIG. 3 , a network monitoring method provided by an embodiment of the present invention is applied to an L2/L3 bridging device in any PTN network architecture. For example, the method can be applied to the L2/L3 bridge device in the network architecture shown in FIG. 1 . The processing flow of this method includes:

S301:PTN中的第三设备接收第一设备发送的第一TWAMP报文,并将所述第一TWAMP报文转发至第二设备,所述第一设备为L3 PTN设备,所述第二设备为L2 PTN设备,所述第三设备为L2/L3桥接设备;其中,所述第一TWAMP报文中包括原始时间戳,其中,所述原始时间戳为所述第一设备发送该第一TWAMP报文的时间,所述第一TWAMP报文中的目的地址为基站的IP地址或与所述基站同网段的预留IP地址。S301: A third device in the PTN receives a first TWAMP packet sent by a first device, and forwards the first TWAMP packet to a second device, where the first device is an L3 PTN device, and the second device is an L2 PTN device, and the third device is an L2/L3 bridge device; wherein, the first TWAMP message includes an original timestamp, where the original timestamp is the first TWAMP sent by the first device The time of the message, and the destination address in the first TWAMP message is the IP address of the base station or a reserved IP address on the same network segment as the base station.

其中,所述第二设备为与基站对接的L2 PTN设备。Wherein, the second device is an L2 PTN device connected to the base station.

可选的,当所述第一TWAMP报文中的目的地址为所述基站的同网段的预留IP地址时,所述第三设备将所述第一TWAMP报文转发至所述第二设备,包括:Optionally, when the destination address in the first TWAMP packet is a reserved IP address of the same network segment of the base station, the third device forwards the first TWAMP packet to the second equipment, including:

所述第三设备根据存储的IP地址与MAC地址的映射关系,确定所述第一TWAMP报文中包括的目的地址对应的MAC地址;并The third device determines the MAC address corresponding to the destination address included in the first TWAMP message according to the stored mapping relationship between the IP address and the MAC address; and

通过确定的MAC地址对应的二层子接口,将所述第一TWAMP报文转发至所述第二设备。The first TWAMP packet is forwarded to the second device through the Layer 2 sub-interface corresponding to the determined MAC address.

其中,所述第三设备中存储的IP地址与MAC地址的映射关系,可以为所述管理设备针对所述第三设备预先配置的。The mapping relationship between the IP address and the MAC address stored in the third device may be pre-configured by the management device for the third device.

S302:所述第三设备接收所述第二设备发送的第二TWAMP报文,并将所述第二TWAMP报文转发至所述第一设备,所述第二TWAMP报文对应所述第一设备发送的一个第一TWAMP报文,所述第二TWAMP报文中包括发送时间戳、接收时间戳和该第一TWAMP报文中的原始时间戳,其中,所述接收时间戳为所述第二设备接收该第一TWAMP报文的时间,所述发送时间戳为所述第二设备发送所述第二TWAMP报文的时间,所述第二TWAMP报文的目的地址与所述第一TWAMP报文中的源地址相同,所述第二TWAMP报文的源地址与所述第一TWAMP报文的目的地址相同。S302: The third device receives the second TWAMP packet sent by the second device, and forwards the second TWAMP packet to the first device, where the second TWAMP packet corresponds to the first device A first TWAMP packet sent by a device, the second TWAMP packet includes a sending timestamp, a receiving timestamp, and an original timestamp in the first TWAMP packet, where the receiving timestamp is the first TWAMP packet. The time when the second device receives the first TWAMP message, the sending time stamp is the time when the second device sends the second TWAMP message, and the destination address of the second TWAMP message is the same as the first TWAMP message The source addresses in the packets are the same, and the source address of the second TWAMP packet is the same as the destination address of the first TWAMP packet.

由于所述第一TWAMP报文中的目的地址为基站的IP地址,或与所述基站同网段的预留IP地址,因此,在S301中,所述第三设备可以将所述第一TWAMP报文作为需要传输至基站的数据报文进行转发,由于所述TWAMP报文与所述第一TWAMP报文的目的地址和源地址互换,所以,所述第三设备在转发所述第二TWAMP报文时,也将所述第二TWAMP报文作为基站需要传输的上行方向的数据报文,进行转发。Since the destination address in the first TWAMP packet is the IP address of the base station, or a reserved IP address on the same network segment as the base station, in S301, the third device may send the first TWAMP The message is forwarded as a data message to be transmitted to the base station. Since the destination address and source address of the TWAMP message and the first TWAMP message are exchanged, the third device is forwarding the second TWAMP message. In the case of a TWAMP message, the second TWAMP message is also used as a data message in the uplink direction to be transmitted by the base station, and forwarded.

由于传统的PTN在线监测方法中,L2 PTN和L3 PTN内部通过OAM工具,各自测量自身内部的时延和丢包率,因此,整个端到端的PTN的业务性能是通过计算L2 PTN的LSP性能测量结果和L3 PTN的LSP性能测量结果之和来近似评估。这样,由于测量得到的业务性能未考虑到L2/L3桥接设备导致的时延和丢包,测量得到的业务性能与实际的业务性能存在较大误差,而在本申请实施中,L2/L3桥接设备用于转发第一设备和第二设备之间网络的第一TWAMP报文和第二TWAMP报文,使所述第一设备可以根据第一TWAMP报文和第二TWAMP报文,准确地获取所述第一设备与所述第二设备之间的网络的时延和丢包率,进而提高网络端到端的性能检测的准确度。In the traditional PTN online monitoring method, the L2 PTN and L3 PTN use OAM tools to measure their own internal delay and packet loss rate respectively. Therefore, the service performance of the entire end-to-end PTN is measured by calculating the LSP performance of the L2 PTN. The results are approximated by the sum of the L3 PTN performance measurements. In this way, since the measured service performance does not take into account the delay and packet loss caused by the L2/L3 bridging device, there is a large error between the measured service performance and the actual service performance. In the implementation of this application, the L2/L3 bridge The device is used to forward the first TWAMP message and the second TWAMP message of the network between the first device and the second device, so that the first device can accurately obtain the first TWAMP message and the second TWAMP message according to the The delay and packet loss rate of the network between the first device and the second device, thereby improving the accuracy of end-to-end performance detection of the network.

参阅图4所示,本发明实施例提供的一种网络监测方法,应用于任何PTN网络中的与基站对接的L2 PTN设备。比如,该方法可以应用于图1所示的网络架构中的与基站对接的L2 PTN设备中。该方法包括:Referring to FIG. 4 , a network monitoring method provided by an embodiment of the present invention is applied to an L2 PTN device connected to a base station in any PTN network. For example, the method can be applied to the L2 PTN device docked with the base station in the network architecture shown in FIG. 1 . The method includes:

S401:PTN中的第二设备在接收一报文后,确定所述报文为第一设备通过第三设备发送的第一TWAMP报文,所述第一设备为L3 PTN设备,所述第二设备为L2 PTN设备,所述第三设备为L2/L3桥接设备,其中,所述第一TWAMP报文中包括原始时间戳,所述原始时间戳为所述第一设备发送该第一TWAMP报文的时间,所述第一TWAMP报文中的目的地址为基站的互联网协议IP地址或与所述基站同网段的预留IP地址。S401: After receiving a packet, the second device in the PTN determines that the packet is a first TWAMP packet sent by the first device through a third device, the first device is an L3 PTN device, and the second device is an L3 PTN device. The device is an L2 PTN device, and the third device is an L2/L3 bridge device, wherein the first TWAMP packet includes an original timestamp, and the original timestamp is when the first device sends the first TWAMP packet the time of the message, the destination address in the first TWAMP message is the Internet Protocol IP address of the base station or a reserved IP address on the same network segment as the base station.

可选的,所述第一TWAMP报文中的源地址为以下中的任一项:Optionally, the source address in the first TWAMP packet is any of the following:

所述第一设备的IP地址、与所述第一设备对接的服务网关S-GW的IP地址、与所述S-GW同网段的IP地址。The IP address of the first device, the IP address of the serving gateway S-GW interconnected with the first device, and the IP address of the same network segment as the S-GW.

可选的,所述第二设备确定所述报文为所述第一设备发送的第一TWAMP报文,包括:Optionally, the second device determines that the message is the first TWAMP message sent by the first device, including:

在所述第二设备确定所述报文包括TWAMP标识时,确定所述报文为TWAMP报文;When the second device determines that the message includes a TWAMP identifier, determining that the message is a TWAMP message;

所述第二设备根据所述TWAMP报文中的源地址和目的地址,确定所述TWAMP报文为所述第一TWAMP报文。The second device determines that the TWAMP message is the first TWAMP message according to the source address and the destination address in the TWAMP message.

可选的,所述TWAMP标识可以为TWAMP的协议标识,用于通知所述第二设备接收到的报文为TWAMP报文。因此,所述第二设备在所述报文中未检测到TWAMP标识时,则正常转发报文。Optionally, the TWAMP identifier may be a TWAMP protocol identifier, which is used to notify the second device that the received message is a TWAMP message. Therefore, when the second device does not detect the TWAMP identifier in the packet, it normally forwards the packet.

可选的,所述第二设备根据所述TWAMP报文中的源地址和目的地址,确定所述TWAMP报文为所述第一TWAMP报文,包括:Optionally, the second device determines that the TWAMP message is the first TWAMP message according to the source address and destination address in the TWAMP message, including:

所述第二设备将所述TWAMP报文中的源地址和目的地址作为待识别二元组;The second device uses the source address and the destination address in the TWAMP message as the two-tuple to be identified;

当存储的多个识别信息组中存在与所述待识别二元组匹配的识别信息组时,确定所述TWAMP报文为所述第一TWAMP报文;When there is an identification information group matching the to-be-identified binary group in the stored identification information groups, determine that the TWAMP message is the first TWAMP message;

其中,所述多个识别信息组为预先配置给所述第二设备的,与所述待识别二元组匹配的识别信息组为包括所述第一TWAMP报文的源地址和目的地址的二元组;The plurality of identification information groups are pre-configured for the second device, and the identification information group matching the to-be-identified binary group is a binary group including the source address and destination address of the first TWAMP message tuple;

当存储的多个识别信息组中不存在与所述待识别二元组匹配的识别信息组时,所述第二设备丢弃所述TWAMP报文。When there is no identification information group matching the to-be-identified binary group in the stored identification information groups, the second device discards the TWAMP message.

可选的,当所述第一TWAMP报文中还包括所述第一设备的发射端口号、所述第二设备的反射端口号时,所述第二设备根据所述TWAMP报文中的源地址和目的地址,确定所述TWAMP报文为所述第一TWAMP报文,包括:Optionally, when the first TWAMP packet further includes the transmission port number of the first device and the reflection port number of the second device, the second device can address and destination address, and determine that the TWAMP message is the first TWAMP message, including:

所述第二设备将所述TWAMP报文中的源地址、目的地址、所述第一设备的发射端口号和所述第二设备的反射端口号作为待识别四元组;The second device uses the source address, the destination address, the transmission port number of the first device and the reflection port number of the second device in the TWAMP message as a quadruple to be identified;

当存储的多个识别信息组中存在与所述待识别四元组匹配的识别信息组时,确定所述TWAMP报文为所述第一TWAMP报文;When there is an identification information group matching the to-be-identified quadruple in the stored identification information groups, determine that the TWAMP message is the first TWAMP message;

其中,所述多个识别信息组为预先配置给所述第二设备的,与所述待识别四元组匹配的识别信息组为包括所述第一TWAMP报文的源地址、目的地址、所述第一设备的发射端口号和所述第二设备的反射端口号的四元组;The multiple identification information groups are pre-configured for the second device, and the identification information group matching the to-be-identified quadruple includes the source address, destination address, all A quadruple of the transmit port number of the first device and the reflection port number of the second device;

当存储的多个识别信息组中不存在与所述待识别四元组匹配的识别信息组时,所述第二设备丢弃所述TWAMP报文。When there is no identification information group matching the to-be-identified quadruple among the stored identification information groups, the second device discards the TWAMP message.

可选的,所述多个识别信息组是所述管理设备下发配置到所述第二设备的用户网络侧接口(User Networks Interface,UNI)端口的。Optionally, the multiple identification information groups are delivered and configured by the management device to a User Networks Interface (UNI) port of the second device.

S402:所述第二设备通过所述第三设备向所述第一设备返回第二TWAMP报文,所述第二TWAMP报文对应所述第一设备发送的所述第一TWAMP报文,所述第二TWAMP报文中包括发送时间戳、接收时间戳和所述第一TWAMP报文中的原始时间戳,其中,所述接收时间戳为所述第二设备接收所述第一TWAMP报文的时间,所述发送时间戳为所述第二设备发送所述第二TWAMP报文的时间,所述第二TWAMP报文的目的地址与所述第一TWAMP报文中的源地址相同,所述第二TWAMP报文的源地址与所述第一TWAMP报文的目的地址相同。S402: The second device returns a second TWAMP packet to the first device through the third device, where the second TWAMP packet corresponds to the first TWAMP packet sent by the first device, and the The second TWAMP message includes a sending time stamp, a receiving time stamp, and an original time stamp in the first TWAMP message, where the receiving time stamp is when the second device receives the first TWAMP message time, the sending time stamp is the time when the second device sends the second TWAMP message, the destination address of the second TWAMP message is the same as the source address in the first TWAMP message, so The source address of the second TWAMP message is the same as the destination address of the first TWAMP message.

通过上述方式,在第二设备每接收一个第一设备发送的第一TWAMP报文,均针对该第一TWAMP报文向所述第一设备返回一个对应的第二TWAMP报文,这样,第一设备可以通过第一TWAMP报文和第二TWAMP报文,精确地确定所述第一设备和所述第二设备之间的网络的丢包率和时延,进而提高网络端到端的性能检测的准确度。In the above manner, each time the second device receives a first TWAMP message sent by the first device, it returns a corresponding second TWAMP message to the first device for the first TWAMP message. The device can accurately determine the packet loss rate and delay of the network between the first device and the second device through the first TWAMP packet and the second TWAMP packet, thereby improving the end-to-end performance detection of the network. Accuracy.

基于以上实施例,本发明还提供了一种第一设备,所述第一设备可以是图2所述的第一设备,也可以执行图2对应的实施例中第一设备执行的方法,所述第一设备应用于PTN中。比如,该第一设备可以是图1所示的L3 PTN设备。参阅图5所示,该第一设备500包括:发送单元501、接收单元502,确定单元503以及处理单元504,其中,Based on the above embodiment, the present invention further provides a first device, the first device may be the first device described in FIG. 2 , or may execute the method performed by the first device in the embodiment corresponding to FIG. 2 , so The first device described above is applied in the PTN. For example, the first device may be the L3 PTN device shown in FIG. 1 . Referring to FIG. 5, the first device 500 includes: a sending unit 501, a receiving unit 502, a determining unit 503 and a processing unit 504, wherein,

发送单元501,用于通过第三设备向第二设备发送多个第一TWAMP报文,所述第一设备500为L3 PTN设备,所述第二设备为L2 PTN设备,比如图1的L2 PTN设备;所述第三设备为L2/L3桥接设备,比如图1所示的L2/L3桥接设备;其中,所述多个第一TWAMP报文中的任意一个第一TWAMP报文中包括原始时间戳,所述原始时间戳为所述发送单元501发送该第一TWAMP报文的时间,该第一TWAMP报文中的目的地址为基站的IP地址或与所述基站同网段的预留IP地址;A sending unit 501 is configured to send multiple first TWAMP messages to a second device through a third device, where the first device 500 is an L3 PTN device, and the second device is an L2 PTN device, such as the L2 PTN in FIG. 1 device; the third device is an L2/L3 bridging device, such as the L2/L3 bridging device shown in FIG. 1 ; wherein, any first TWAMP message in the plurality of first TWAMP messages includes the original time The original timestamp is the time when the sending unit 501 sends the first TWAMP message, and the destination address in the first TWAMP message is the IP address of the base station or the reserved IP address on the same network segment as the base station address;

接收单元502,用于接收报文;a receiving unit 502, configured to receive a message;

确定单元503,用于在所述接收单元502接收一报文后,确定所述报文为所述第二设备通过所述第三设备发送的第二TWAMP报文,所述第二TWAMP报文对应所述第一设备500发送的一个第一TWAMP报文,所述第二TWAMP报文中包括发送时间戳、接收时间戳和该第一TWAMP报文中的原始时间戳,其中,所述接收时间戳为所述第二设备接收该第一TWAMP报文的时间,所述发送时间戳为所述第二设备发送所述第二TWAMP报文的时间,所述第二TWAMP报文的目的地址与该第一TWAMP报文中的源地址相同,所述第二TWAMP报文的源地址与该第一TWAMP报文的目的地址相同;The determining unit 503 is configured to, after the receiving unit 502 receives a message, determine that the message is a second TWAMP message sent by the second device through the third device, the second TWAMP message Corresponding to a first TWAMP message sent by the first device 500, the second TWAMP message includes a sending time stamp, a receiving time stamp, and an original time stamp in the first TWAMP message, wherein the receiving time stamp The timestamp is the time when the second device receives the first TWAMP packet, the sending timestamp is the time when the second device sends the second TWAMP packet, and the destination address of the second TWAMP packet Same as the source address in the first TWAMP message, the source address of the second TWAMP message is the same as the destination address of the first TWAMP message;

处理单元504,用于根据预设时间段内接收的第二TWAMP报文的数目以及发送的第一TWAMP报文的数目,确定所述第一设备500与所述第二设备之间的网络的丢包率;并The processing unit 504 is configured to determine the network between the first device 500 and the second device according to the number of the second TWAMP packets received and the number of the first TWAMP packets sent within the preset time period. packet loss rate; and

根据所述预设时间段内接收的第二TWAMP报文中包括的原始时间戳、接收时间戳和发送时间戳,确定所述第一设备500与所述第二设备之间的网络的时延。Determine the network delay between the first device 500 and the second device according to the original timestamp, the receiving timestamp and the sending timestamp included in the second TWAMP packet received within the preset time period .

可选的,所述发送的多个第一TWAMP报文中的任意一个第一TWAMP报文中的源地址为以下中的任一项:Optionally, the source address in any one of the first TWAMP messages in the sent multiple first TWAMP messages is any of the following:

所述第一设备500的IP地址、与所述第一设备500对接的S-GW的IP地址、与所述S-GW同网段的IP地址。The IP address of the first device 500, the IP address of the S-GW interconnected with the first device 500, and the IP address of the same network segment as the S-GW.

可选的,所述确定单元503,具体用于:Optionally, the determining unit 503 is specifically configured to:

在确定所述报文包括TWAMP标识时,确定所述报文为TWAMP报文;When determining that the message includes a TWAMP identifier, determining that the message is a TWAMP message;

根据所述TWAMP报文中的源地址和目的地址,确定所述TWAMP报文为所述第二TWAMP报文。According to the source address and the destination address in the TWAMP message, it is determined that the TWAMP message is the second TWAMP message.

可选的,所述确定单元503,在根据所述TWAMP报文中的源地址和目的地址,确定所述TWAMP报文为所述第二TWAMP报文时,具体用于:Optionally, when determining that the TWAMP message is the second TWAMP message according to the source address and the destination address in the TWAMP message, the determining unit 503 is specifically configured to:

将所述TWAMP报文中的目的地址和源地址作为待识别二元组;Taking the destination address and source address in the TWAMP message as the two-tuple to be identified;

当存储的多个识别信息组中存在与所述待识别二元组匹配的识别信息组时,确定所述TWAMP报文为所述第二TWAMP报文;When there is an identification information group matching the to-be-identified binary group in the stored identification information groups, determine that the TWAMP message is the second TWAMP message;

其中,所述多个识别信息组为针对所述第二设备设置的,与所述待识别二元组匹配的识别信息组为包括所述第一TWAMP报文的源地址和目的地址的二元组。The multiple identification information groups are set for the second device, and the identification information group matching the to-be-identified binary group is a binary including the source address and destination address of the first TWAMP message Group.

可选的,所述发送的多个第一TWAMP报文中的任意一个第一TWAMP报文中还包括所述第一设备500的发射端口号、所述第二设备的反射端口号;Optionally, any one of the first TWAMP messages in the sent multiple first TWAMP messages also includes the transmission port number of the first device 500 and the reflection port number of the second device;

所述第二TWAMP报文中还包括所述第一设备500的发射端口号、所述第二设备的反射端口号;The second TWAMP message further includes the transmission port number of the first device 500 and the reflection port number of the second device;

所述确定单元503,在根据所述TWAMP报文中的源地址和目的地址,确定所述TWAMP报文为所述第二TWAMP报文时,具体用于:The determining unit 503, when determining that the TWAMP message is the second TWAMP message according to the source address and the destination address in the TWAMP message, is specifically configured to:

将所述TWAMP报文中的目的地址、源地址、所述第一设备500的发射端口号和所述第二设备的反射端口号作为待识别四元组;Taking the destination address, source address, the transmission port number of the first device 500 and the reflection port number of the second device in the TWAMP message as a quadruple to be identified;

当存储的多个识别信息组中存在与所述待识别四元组匹配的识别信息组时,确定所述TWAMP报文为所述第二TWAMP报文;When there is an identification information group matching the to-be-identified quadruple in the stored identification information groups, determine that the TWAMP message is the second TWAMP message;

其中,所述多个识别信息组为针对所述第二设备设置的,与所述待识别四元组匹配的识别信息组为包括与所述第二TWAMP报文对应的第一TWAMP报文的源地址和目的地址,以及所述第一设备500的发射端口号和所述第二设备的反射端口号的四元组。The plurality of identification information groups are set for the second device, and the identification information group matching the to-be-identified quadruple is an identification information group including a first TWAMP message corresponding to the second TWAMP message The source address and the destination address, and a quadruple of the transmit port number of the first device 500 and the reflection port number of the second device.

基于以上实施例,本发明还提供了一种第三设备,所述第三设备可以采用图3对应的实施例提供的方法,所述第三设备应用于PTN中。该第三设备可以是图1所示的L2/L3桥接设备。参阅图6所示,该第三设备600包括:接收单元601,发送单元602,其中,Based on the above embodiment, the present invention further provides a third device, which may adopt the method provided by the embodiment corresponding to FIG. 3 , and the third device is applied in the PTN. The third device may be the L2/L3 bridge device shown in FIG. 1 . Referring to Fig. 6, the third device 600 includes: a receiving unit 601, and a sending unit 602, wherein,

接收单元601,用于接收第一设备发送的第一TWAMP报文,所述第一设备为L3 PTN设备,比如图1的L3 PTN设备,所述第二设备为L2 PTN设备,比如图1的L2 PTN设备,所述第三设备600为L2/L3桥接设备;其中,所述第一TWAMP报文中包括原始时间戳,所述原始时间戳为所述第一设备发送该第一TWAMP报文的时间,所述第一TWAMP报文中的目的地址为基站的IP地址或与所述基站同网段的预留IP地址;A receiving unit 601, configured to receive a first TWAMP message sent by a first device, where the first device is an L3 PTN device, such as the L3 PTN device in FIG. 1 , and the second device is an L2 PTN device, such as the L3 PTN device in FIG. 1 . L2 PTN device, the third device 600 is an L2/L3 bridge device; wherein, the first TWAMP packet includes an original timestamp, and the original timestamp is when the first device sends the first TWAMP packet time, the destination address in the first TWAMP message is the IP address of the base station or the reserved IP address on the same network segment as the base station;

发送单元602,用于将所述第一TWAMP报文转发至第二设备;a sending unit 602, configured to forward the first TWAMP message to a second device;

所述接收单元601,还用于接收所述第二设备发送的第二TWAMP报文,所述第二TWAMP报文对应所述第一设备发送的一个第一TWAMP报文,所述第二TWAMP报文中包括发送时间戳、接收时间戳和该第一TWAMP报文中的原始时间戳,其中,所述接收时间戳为所述第二设备接收该第一TWAMP报文的时间,所述发送时间戳为所述第二设备发送所述第二TWAMP报文的时间,所述第二TWAMP报文的目的地址与所述第一TWAMP报文中的源地址相同,所述第二TWAMP报文的源地址与所述第一TWAMP报文的目的地址相同;The receiving unit 601 is further configured to receive a second TWAMP message sent by the second device, where the second TWAMP message corresponds to a first TWAMP message sent by the first device, and the second TWAMP message corresponds to a first TWAMP message sent by the first device. The message includes a sending time stamp, a receiving time stamp, and an original time stamp in the first TWAMP message, where the receiving time stamp is the time when the second device receives the first TWAMP message, and the sending time stamp is the time when the second device receives the first TWAMP message. The timestamp is the time when the second device sends the second TWAMP packet, the destination address of the second TWAMP packet is the same as the source address in the first TWAMP packet, and the second TWAMP packet The source address is the same as the destination address of the first TWAMP message;

所述发送单元602,还用于将所述第二TWAMP报文转发至所述第一设备。The sending unit 602 is further configured to forward the second TWAMP packet to the first device.

可选的,当所述第一TWAMP报文中的目的地址为所述基站的同网段的预留IP地址时,所述第三设备600还包括:Optionally, when the destination address in the first TWAMP message is a reserved IP address of the same network segment of the base station, the third device 600 further includes:

确定单元603,用于根据存储的IP地址与媒体访问控制MAC地址的映射关系,确定所述第一TWAMP报文中的目的地址对应的MAC地址;Determining unit 603, configured to determine the MAC address corresponding to the destination address in the first TWAMP message according to the mapping relationship between the stored IP address and the media access control MAC address;

所述发送单元602,具体用于通过确定的MAC地址对应的二层子接口,将所述第一TWAMP报文转发至所述第二设备。The sending unit 602 is specifically configured to forward the first TWAMP packet to the second device through the Layer 2 sub-interface corresponding to the determined MAC address.

基于以上实施例,本发明还提供了一种第二设备,所述第二设备可以采用图4对应的实施例提供的方法,参阅图7所示,该第二设备700包括:接收单元701、确定单元702,以及发送单元703,其中,Based on the above embodiment, the present invention also provides a second device, which can adopt the method provided by the embodiment corresponding to FIG. 4 . Referring to FIG. 7 , the second device 700 includes: a receiving unit 701, Determining unit 702, and sending unit 703, wherein,

接收单元701,用于接收报文;a receiving unit 701, configured to receive a message;

确定单元702,用于在所述接收单元701接收一报文后,确定所述报文为第一设备通过第三设备发送的第一TWAMP报文,所述第一设备为L3 PTN设备,所述第二设备700为L2PTN设备,所述第三设备为L2/L3桥接设备;其中,所述第一TWAMP报文中包括原始时间戳,所述原始时间戳为所述第一设备发送所述第一TWAMP报文的时间,所述第一TWAMP报文中的目的地址为基站的IP地址,或与所述基站同网段的预留IP地址;The determining unit 702 is configured to, after the receiving unit 701 receives a message, determine that the message is the first TWAMP message sent by the first device through the third device, where the first device is an L3 PTN device, so The second device 700 is an L2PTN device, and the third device is an L2/L3 bridging device; wherein, the first TWAMP packet includes an original timestamp, and the original timestamp is when the first device sends the The time of the first TWAMP message, the destination address in the first TWAMP message is the IP address of the base station, or the reserved IP address on the same network segment as the base station;

发送单元703,用于通过所述第三设备向所述第一设备返回第二TWAMP报文,所述第二TWAMP报文对应所述第一设备发送的所述第一TWAMP报文,所述第二TWAMP报文中包括发送时间戳、接收时间戳和所述第一TWAMP报文中的原始时间戳,其中,所述接收时间戳为所述接收单元701接收所述第一TWAMP报文的时间,所述发送时间戳为所述发送单元703发送所述第二TWAMP报文的时间,所述第二TWAMP报文的目的地址与所述第一TWAMP报文中的源地址相同,所述第二TWAMP报文的源地址与所述第一TWAMP报文的目的地址相同。A sending unit 703, configured to return a second TWAMP message to the first device through the third device, where the second TWAMP message corresponds to the first TWAMP message sent by the first device, the The second TWAMP message includes a sending time stamp, a receiving time stamp, and an original time stamp in the first TWAMP message, where the receiving time stamp is the time when the receiving unit 701 receives the first TWAMP message. time, the sending time stamp is the time when the sending unit 703 sends the second TWAMP message, the destination address of the second TWAMP message is the same as the source address in the first TWAMP message, the The source address of the second TWAMP packet is the same as the destination address of the first TWAMP packet.

可选的,所述第一TWAMP报文中的源地址为以下中的任一项:Optionally, the source address in the first TWAMP packet is any of the following:

所述第一设备的IP地址、与所述第一设备对接的服务网关S-GW的IP地址、与所述S-GW同网段的IP地址。The IP address of the first device, the IP address of the serving gateway S-GW interconnected with the first device, and the IP address of the same network segment as the S-GW.

可选的,所述确定单元702,具体用于:Optionally, the determining unit 702 is specifically configured to:

在确定所述报文包括TWAMP标识时,确定所述报文为TWAMP报文;When determining that the message includes a TWAMP identifier, determining that the message is a TWAMP message;

根据所述TWAMP报文中的源地址和目的地址,确定所述TWAMP报文为所述第一TWAMP报文。According to the source address and the destination address in the TWAMP message, it is determined that the TWAMP message is the first TWAMP message.

可选的,所述确定单元702,在根据所述TWAMP报文中的源地址和目的地址,确定所述TWAMP报文为所述第一TWAMP报文时,具体用于:Optionally, when determining that the TWAMP message is the first TWAMP message according to the source address and destination address in the TWAMP message, the determining unit 702 is specifically configured to:

将所述TWAMP报文中的源地址和目的地址作为待识别二元组;Taking the source address and destination address in the TWAMP message as the two-tuple to be identified;

当存储的多个识别信息组中存在与所述待识别二元组匹配的识别信息组时,确定所述TWAMP报文为所述第一TWAMP报文;When there is an identification information group matching the to-be-identified binary group in the stored identification information groups, determine that the TWAMP message is the first TWAMP message;

其中,所述多个识别信息组为预先配置给所述第二设备700的,与所述待识别二元组匹配的识别信息组为包括所述第一TWAMP报文的源地址和目的地址的二元组。The plurality of identification information groups are pre-configured for the second device 700, and the identification information group matching the to-be-identified binary group includes the source address and destination address of the first TWAMP packet 2-tuple.

可选的,所述第一TWAMP报文中还包括所述第一设备的发射端口号、所述第二设备700的反射端口号;Optionally, the first TWAMP message further includes the transmission port number of the first device and the reflection port number of the second device 700;

所述确定单元702,在所述第二设备700根据所述TWAMP报文中的源地址和目的地址,确定所述TWAMP报文为所述第一TWAMP报文时,具体用于:The determining unit 702, when the second device 700 determines that the TWAMP message is the first TWAMP message according to the source address and the destination address in the TWAMP message, is specifically configured to:

将所述TWAMP报文中的源地址、目的地址、所述第一设备的发射端口号和所述第二设备700的反射端口号作为待识别四元组;The source address, the destination address, the transmission port number of the first device and the reflection port number of the second device 700 in the TWAMP message are used as the quadruple to be identified;

当存储的多个识别信息组中存在与所述待识别四元组匹配的识别信息组时,确定所述TWAMP报文为所述第一TWAMP报文;When there is an identification information group matching the to-be-identified quadruple in the stored identification information groups, determine that the TWAMP message is the first TWAMP message;

其中,所述多个识别信息组为预先配置给所述第二设备700的,与所述待识别四元组匹配的识别信息组为包括所述第一TWAMP报文的源地址、目的地址、所述第一设备的发射端口号和所述第二设备700的反射端口号的四元组。The multiple identification information groups are pre-configured for the second device 700, and the identification information group matching the to-be-identified quadruple includes the source address, destination address, A quadruple of the transmit port number of the first device and the reflection port number of the second device 700 .

需要说明的是,本发明以上各个实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如第一确定单元和第二确定单元可以是同一确定单元或者不同的确定单元,或一些特征可以忽略,或不执行。另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。It should be noted that the division of units in the above embodiments of the present invention is schematic, and is only a logical function division. In actual implementation, there may be other division methods. For example, the first determination unit and the second determination unit may be It is the same determination unit or a different determination unit, or some features can be ignored or not implemented. In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.

所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .

基于以上实施例,本申请还提供了一种网络监测系统,该系统应用于PTN中,参阅图8所示,该系统包括:第一设备801、第二设备802,以及第三设备803,其中,Based on the above embodiments, the present application also provides a network monitoring system, which is applied in PTN. Referring to FIG. 8 , the system includes: a first device 801 , a second device 802 , and a third device 803 , wherein ,

第一设备801,用于通过第三设备803向第二设备802发送多个第一双向主动测量协议TWAMP报文,所述第一设备801为L3 PTN设备,所述第二设备802为L2 PTN设备,所述第三设备803为L2/L3桥接设备;其中,所述发送的多个第一TWAMP报文中的任意一个第一TWAMP报文中包括原始时间戳,所述原始时间戳为所述第一设备801发送该第一TWAMP报文的时间,该第一TWAMP报文中的目的地址为基站的IP地址或与所述基站同网段的预留IP地址;The first device 801 is configured to send multiple first bidirectional active measurement protocol TWAMP messages to the second device 802 through the third device 803, where the first device 801 is an L3 PTN device, and the second device 802 is an L2 PTN device, the third device 803 is an L2/L3 bridge device; wherein, any first TWAMP message in the sent multiple first TWAMP messages includes an original time stamp, and the original time stamp is the Describe the time when the first device 801 sends the first TWAMP message, and the destination address in the first TWAMP message is the IP address of the base station or the reserved IP address on the same network segment as the base station;

所述第二设备802,用于在接收一报文后,确定该报文为第一设备801通过所述第三设备803发送的第一TWAMP报文,针对接收的该第一TWAMP报文,生成第二TWAMP报文,并将生成的所述第二TWAMP报文通过所述第三设备803返回给所述第一设备801,所述第二TWAMP报文中包括发送时间戳、接收时间戳和所述第一TWAMP报文中的原始时间戳,其中,所述接收时间戳为所述第二设备802接收所述第一TWAMP报文的时间,所述发送时间戳为所述第二设备802发送所述第二TWAMP报文的时间,所述第二TWAMP报文的目的地址与所述第一TWAMP报文中的源地址相同,所述第二TWAMP报文的源地址与所述第一TWAMP报文的目的地址相同;The second device 802 is configured to, after receiving a message, determine that the message is the first TWAMP message sent by the first device 801 through the third device 803, and for the received first TWAMP message, Generate a second TWAMP message, and return the generated second TWAMP message to the first device 801 through the third device 803, where the second TWAMP message includes a sending timestamp and a receiving timestamp and the original timestamp in the first TWAMP packet, where the receiving timestamp is the time when the second device 802 received the first TWAMP packet, and the sending timestamp is the second device 802 The time when the second TWAMP packet is sent, the destination address of the second TWAMP packet is the same as the source address in the first TWAMP packet, and the source address of the second TWAMP packet is the same as the source address of the second TWAMP packet. The destination address of a TWAMP message is the same;

所述第三设备803,用于接收所述第一设备801发送的第一TWAMP报文,并将该第一TWAMP报文转发给所述第二设备802;The third device 803 is configured to receive the first TWAMP packet sent by the first device 801, and forward the first TWAMP packet to the second device 802;

所述第三设备803还用于接收所述第二设备802发送的第二TWAMP报文,并将所述第二TWAMP报文转发给所述第一设备801;The third device 803 is further configured to receive the second TWAMP packet sent by the second device 802, and forward the second TWAMP packet to the first device 801;

所述第一设备801,还用于在接收一报文后,确定该报文为所述第二设备802通过所述第三设备803发送的第二TWAMP报文;根据预设时间段内接收的第二TWAMP报文的数目以及发送的第一TWAMP报文的数目,确定所述第一设备801与所述第二设备802之间的网络的丢包率;并根据所述预设时间段内接收的第二TWAMP报文中包括的原始时间戳、接收时间戳和发送时间戳,确定所述第一设备801与所述第二设备802之间的网络的时延。The first device 801 is further configured to, after receiving a message, determine that the message is the second TWAMP message sent by the second device 802 through the third device 803; The number of the second TWAMP packets and the number of the first TWAMP packets sent, determine the packet loss rate of the network between the first device 801 and the second device 802; and according to the preset time period The original time stamp, the reception time stamp and the transmission time stamp included in the second TWAMP packet received in the TWAMP packet are used to determine the network delay between the first device 801 and the second device 802 .

可选地,该系统中第一设备801可以是图1的L3 PTN设备,第二设备802可以是图1的L2 PTN设备,第三设备803可以是图1的L2/L3桥接设备。Optionally, in the system, the first device 801 may be the L3 PTN device in FIG. 1 , the second device 802 may be the L2 PTN device in FIG. 1 , and the third device 803 may be the L2/L3 bridge device in FIG. 1 .

可选地,第一设备801可以是图5及其对应的实施例部分所述的第一设备。Optionally, the first device 801 may be the first device described in FIG. 5 and its corresponding embodiment section.

可选地,第二设备802可以是图7及其对应的实施例部分所述的第二设备。Optionally, the second device 802 may be the second device described in FIG. 7 and its corresponding embodiment section.

可选地,第三设备803可以是图6及其对应的实施例部分所述的第三设备。Optionally, the third device 803 may be the third device described in FIG. 6 and its corresponding embodiment section.

基于以上实施例,本申请还提供了一种第一设备,所述第一设备可采用图2对应的实施例提供的方法,可以是与图5所示的第一设备相同的设备。该第一设备可以是L3 PTN设备。该第一设备可以是图1的L3 PTN设备,该第一设备也可以是图8所述的第一设备801或图5所示的第一设备500。参阅图9所示,该第一设备900包括:收发器901、处理器902、总线903以及存储器904,其中:Based on the above embodiments, the present application further provides a first device, the first device may adopt the method provided in the embodiment corresponding to FIG. 2 , and may be the same device as the first device shown in FIG. 5 . The first device may be an L3 PTN device. The first device may be the L3 PTN device in FIG. 1 , and the first device may also be the first device 801 shown in FIG. 8 or the first device 500 shown in FIG. 5 . Referring to FIG. 9, the first device 900 includes: a transceiver 901, a processor 902, a bus 903 and a memory 904, wherein:

收发器901、处理器902以及存储器904通过总线903相互连接;总线903可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图9中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The transceiver 901, the processor 902 and the memory 904 are connected to each other through a bus 903; the bus 903 may be a peripheral component interconnect (PCI for short) bus or an extended industry standard architecture (EISA for short) bus Wait. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, only one thick line is used in FIG. 9, but it does not mean that there is only one bus or one type of bus.

收发器901用于通过第三设备向第二设备发送第一TWAMP报文,并接收其他设备发送的报文等,如所述第三设备转发的第二TWAMP报文。The transceiver 901 is configured to send the first TWAMP message to the second device through the third device, and receive messages sent by other devices, such as the second TWAMP message forwarded by the third device.

处理器902用于实现本发明实施例图2所示的网络监测方法,包括:The processor 902 is configured to implement the network monitoring method shown in FIG. 2 according to the embodiment of the present invention, including:

通过第三设备向第二设备发送多个第一TWAMP报文,所述第一设备900为L3 PTN设备,所述第二设备为L2 PTN设备,所述第三设备为L2/L3桥接设备;其中,所述发送的多个第一TWAMP报文中的任意一个第一TWAMP报文中包括原始时间戳,所述原始时间戳为所述处理器902发送该第一TWAMP报文的时间,该第一TWAMP报文中的目的地址为基站的IP地址,或与所述基站同网段的预留IP地址;Send a plurality of first TWAMP messages to a second device through a third device, the first device 900 is an L3 PTN device, the second device is an L2 PTN device, and the third device is an L2/L3 bridge device; Wherein, any one of the sent multiple first TWAMP messages includes an original time stamp, and the original time stamp is the time when the processor 902 sends the first TWAMP message, and the The destination address in the first TWAMP message is the IP address of the base station, or a reserved IP address on the same network segment as the base station;

在接收一报文后,确定所述报文为所述第二设备通过所述第三设备发送的第二TWAMP报文,所述第二TWAMP报文对应所述处理器902发送的一个第一TWAMP报文,所述第二TWAMP报文中包括发送时间戳、接收时间戳和该第一TWAMP报文中的原始时间戳,其中,所述接收时间戳为所述第二设备接收该第一TWAMP报文的时间,所述发送时间戳为所述第二设备发送所述第二TWAMP报文的时间,所述第二TWAMP报文的目的地址与该第一TWAMP报文中的源地址相同,所述第二TWAMP报文的源地址与该第一TWAMP报文的目的地址相同;After receiving a packet, determine that the packet is a second TWAMP packet sent by the second device through the third device, and the second TWAMP packet corresponds to a first TWAMP packet sent by the processor 902 TWAMP message, the second TWAMP message includes a sending time stamp, a receiving time stamp, and an original time stamp in the first TWAMP message, wherein the receiving time stamp is when the second device receives the first time stamp The time of the TWAMP message, the sending time stamp is the time when the second device sends the second TWAMP message, and the destination address of the second TWAMP message is the same as the source address in the first TWAMP message , the source address of the second TWAMP message is the same as the destination address of the first TWAMP message;

根据预设时间段内接收的第二TWAMP报文的数目以及发送的第一TWAMP报文的数目,确定所述第一设备900与所述第二设备之间的网络的丢包率;并Determine the packet loss rate of the network between the first device 900 and the second device according to the number of the second TWAMP packets received and the number of the first TWAMP packets sent within the preset time period; and

根据所述预设时间段内接收的第二TWAMP报文中包括的原始时间戳、接收时间戳和发送时间戳,确定所述第一设备900与所述第二设备之间的网络的时延。Determine the network delay between the first device 900 and the second device according to the original timestamp, the receiving timestamp and the sending timestamp included in the second TWAMP packet received within the preset time period .

可选的,所述发送的多个第一TWAMP报文中的任意一个第一TWAMP报文中的源地址为以下中的任一项:Optionally, the source address in any one of the first TWAMP messages in the sent multiple first TWAMP messages is any of the following:

所述第一设备900的IP地址、与所述第一设备900对接的服务网关S-GW的IP地址、与所述S-GW同网段的IP地址。The IP address of the first device 900, the IP address of the serving gateway S-GW interconnected with the first device 900, and the IP address of the same network segment as the S-GW.

可选的,确定所述报文为所述第二设备发送的第二TWAMP报文,包括:Optionally, determining that the message is the second TWAMP message sent by the second device, including:

在确定所述报文包括TWAMP标识时,确定所述报文为TWAMP报文;When determining that the message includes a TWAMP identifier, determining that the message is a TWAMP message;

根据所述TWAMP报文中的源地址和目的地址,确定所述TWAMP报文为所述第二TWAMP报文。According to the source address and the destination address in the TWAMP message, it is determined that the TWAMP message is the second TWAMP message.

可选的,根据所述TWAMP报文中的源地址和目的地址,确定所述TWAMP报文为所述第二TWAMP报文,包括:Optionally, according to the source address and destination address in the TWAMP message, determine that the TWAMP message is the second TWAMP message, including:

将所述TWAMP报文中的目的地址和源地址作为待识别二元组;Taking the destination address and source address in the TWAMP message as the two-tuple to be identified;

当存储的多个识别信息组中存在与所述待识别二元组匹配的识别信息组时,确定所述TWAMP报文为所述第二TWAMP报文;When there is an identification information group matching the to-be-identified binary group in the stored identification information groups, determine that the TWAMP message is the second TWAMP message;

其中,所述多个识别信息组为针对所述第二设备设置的,与所述待识别二元组匹配的识别信息组为包括所述第一TWAMP报文的源地址和目的地址的二元组。The multiple identification information groups are set for the second device, and the identification information group matching the to-be-identified binary group is a binary including the source address and destination address of the first TWAMP message Group.

可选的,所述发送的多个第一TWAMP报文中的任意一个第一TWAMP报文中还包括所述第一设备900的发射端口号、所述第二设备的反射端口号;Optionally, any one of the first TWAMP messages in the sent multiple first TWAMP messages also includes the transmission port number of the first device 900 and the reflection port number of the second device;

所述第二TWAMP报文中还包括所述第一设备900的发射端口号、所述第二设备的反射端口号;The second TWAMP message further includes the transmission port number of the first device 900 and the reflection port number of the second device;

根据所述TWAMP报文中的源地址和目的地址,确定所述TWAMP报文为所述第二TWAMP报文,包括:According to the source address and destination address in the TWAMP message, it is determined that the TWAMP message is the second TWAMP message, including:

将所述TWAMP报文中的目的地址、源地址、所述第一设备900的发射端口号和所述第二设备的反射端口号作为待识别四元组;Taking the destination address, source address, the transmit port number of the first device 900 and the reflection port number of the second device in the TWAMP message as the quadruple to be identified;

当存储的多个识别信息组中存在与所述待识别四元组匹配的识别信息组时,确定所述TWAMP报文为所述第二TWAMP报文;When there is an identification information group matching the to-be-identified quadruple in the stored identification information groups, determine that the TWAMP message is the second TWAMP message;

其中,所述多个识别信息组为针对所述第二设备设置的,与所述待识别四元组匹配的识别信息组为包括与所述第二TWAMP报文对应的第一TWAMP报文的源地址和目的地址,以及所述第一设备900的发射端口号和所述第二设备的反射端口号的四元组。The plurality of identification information groups are set for the second device, and the identification information group matching the to-be-identified quadruple is an identification information group including a first TWAMP message corresponding to the second TWAMP message A source address and a destination address, and a quadruple of the transmit port number of the first device 900 and the reflection port number of the second device.

该第一设备900还包括存储器904,用于存放程序,以及针对所述第二设备设置的多个识别信息组等。具体地,程序可以包括程序代码,该程序代码包括计算机操作指令。存储器904可能包括随机存取存储器(random access memory,RAM),也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。处理器902执行存储器904所存放的应用程序,实现如上网络监测方法。The first device 900 further includes a memory 904 for storing programs, and a plurality of identification information groups and the like set for the second device. Specifically, the program may include program code, the program code including computer operation instructions. The memory 904 may include random access memory (RAM), and may also include non-volatile memory (non-volatile memory), such as at least one disk storage. The processor 902 executes the application program stored in the memory 904 to implement the above network monitoring method.

基于以上实施例,本申请还提供了一种第三设备,所述第三设备可采用图3对应的实施例提供的方法,可以是与图6所示的第三设备相同的设备。该第三设备可以是L2/L3桥接设备。该第三设备可以是图1所示的网络系统中的L2/L3桥接设备,该第三设备也可以是图8所示的网络系统中的第三设备803或图6所示的第三设备600。参阅图10所示,该第三设备1000包括:收发器1001、处理器1002、总线1003以及存储器1004,其中:Based on the above embodiments, the present application further provides a third device, which may adopt the method provided by the embodiment corresponding to FIG. 3 , and may be the same device as the third device shown in FIG. 6 . The third device may be an L2/L3 bridge device. The third device may be an L2/L3 bridge device in the network system shown in FIG. 1 , and the third device may also be the third device 803 in the network system shown in FIG. 8 or the third device shown in FIG. 6 600. Referring to FIG. 10, the third device 1000 includes: a transceiver 1001, a processor 1002, a bus 1003 and a memory 1004, wherein:

收发器1001、处理器1002以及存储器1004通过总线1003相互连接;总线1003可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图10中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The transceiver 1001, the processor 1002 and the memory 1004 are connected to each other through a bus 1003; the bus 1003 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus Wait. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, only one thick line is used in FIG. 10, but it does not mean that there is only one bus or one type of bus.

收发器1001用于与所述第三设备1000相连的第一设备和第二设备进行通信,如接收第一设备发送的第一TWAMP报文,并转发至第二设备;接收第二设备的第二TWAMP报文,并转发至第一设备等。The transceiver 1001 is configured to communicate with the first device and the second device connected to the third device 1000, such as receiving the first TWAMP message sent by the first device and forwarding it to the second device; receiving the first TWAMP message from the second device. Two TWAMP messages are forwarded to the first device and so on.

处理器1002用于实现本发明实施例图3所示的网络监测的方法,包括:The processor 1002 is configured to implement the network monitoring method shown in FIG. 3 according to the embodiment of the present invention, including:

接收第一设备发送的第一TWAMP报文,并将所述第一TWAMP报文转发至第二设备,所述第一设备为L3 P TN设备,所述第二设备为L2 PTN设备,所述第三设备为L2/L3桥接设备;其中,所述第一TWAMP报文中包括原始时间戳,所述原始时间戳为所述第二设备发送该第一TWAMP报文的时间,所述第一TWAMP报文中的目的地址为基站的IP地址,或与所述基站同网段的预留IP地址;Receive a first TWAMP message sent by a first device, and forward the first TWAMP message to a second device, where the first device is an L3 PTN device, the second device is an L2 PTN device, and the The third device is an L2/L3 bridge device; wherein the first TWAMP packet includes an original timestamp, and the original timestamp is the time when the second device sent the first TWAMP packet, and the first The destination address in the TWAMP message is the IP address of the base station, or a reserved IP address on the same network segment as the base station;

所述第三设备接收所述第二设备发送的第二TWAMP报文,并将所述第二TWAMP报文转发至所述第一设备,所述第二TWAMP报文对应所述第一设备发送的一个第一TWAMP报文,所述第二TWAMP报文中包括发送时间戳、接收时间戳和该第一TWAMP报文中的原始时间戳,其中,所述接收时间戳为所述第二设备接收该第一TWAMP报文的时间,所述发送时间戳为所述第二设备发送所述第二TWAMP报文的时间,所述第二TWAMP报文的目的地址与所述第一TWAMP报文中的源地址相同,所述第二TWAMP报文的源地址与所述第一TWAMP报文的目的地址相同。The third device receives the second TWAMP packet sent by the second device, and forwards the second TWAMP packet to the first device, where the second TWAMP packet is sent corresponding to the first device A first TWAMP message, the second TWAMP message includes a sending time stamp, a receiving time stamp and an original time stamp in the first TWAMP message, wherein the receiving time stamp is the second device The time at which the first TWAMP message was received, the sending timestamp is the time when the second device sent the second TWAMP message, and the destination address of the second TWAMP message is the same as the first TWAMP message The source address of the second TWAMP packet is the same as the destination address of the first TWAMP packet.

可选的,当所述第一TWAMP报文中的目的地址为所述基站的同网段的预留IP地址时,将所述第一TWAMP报文转发至所述第二设备,包括:Optionally, when the destination address in the first TWAMP message is the reserved IP address of the same network segment of the base station, forwarding the first TWAMP message to the second device includes:

根据存储的IP地址与MAC地址的映射关系,确定所述第一TWAMP报文中的目的地址对应的MAC地址;并Determine the MAC address corresponding to the destination address in the first TWAMP message according to the stored mapping relationship between the IP address and the MAC address; and

通过确定的MAC地址对应的二层子接口,将所述第一TWAMP报文转发至所述第二设备。The first TWAMP packet is forwarded to the second device through the Layer 2 sub-interface corresponding to the determined MAC address.

该第三设备1000还包括存储器1004,用于存放程序,以及IP地址与MAC地址的映射关系等。具体地,程序可以包括程序代码,该程序代码包括计算机操作指令。存储器1004可能包括随机存取存储器(random access memory,RAM),也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。处理器1002执行存储器1004所存放的应用程序,实现如上网络监测方法。The third device 1000 further includes a memory 1004 for storing the program, the mapping relationship between the IP address and the MAC address, and the like. Specifically, the program may include program code, the program code including computer operation instructions. The memory 1004 may include random access memory (RAM), and may also include non-volatile memory (non-volatile memory), such as at least one disk storage. The processor 1002 executes the application program stored in the memory 1004 to implement the above network monitoring method.

基于以上实施例,本申请还提供了一种第二设备,该第二设备可以是L2PTN设备。该第二设备可以是图1的L2 PTN设备,该第二设备也可以是图8所述的第二设备802,该第二设备也可以是图7所示的第二设备700。参阅图11所示,该第二设备1100包括:收发器1101、处理器1102、总线1103以及存储器1104,其中:Based on the above embodiments, the present application further provides a second device, where the second device may be an L2PTN device. The second device may be the L2 PTN device in FIG. 1 , the second device may also be the second device 802 shown in FIG. 8 , and the second device may also be the second device 700 shown in FIG. 7 . Referring to FIG. 11 , the second device 1100 includes: a transceiver 1101, a processor 1102, a bus 1103, and a memory 1104, wherein:

收发器1101、处理器1102以及存储器1104通过总线1103相互连接;总线1103可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图11中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The transceiver 1101, the processor 1102 and the memory 1104 are connected to each other through a bus 1103; the bus 1103 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus Wait. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, only one thick line is used in FIG. 11, but it does not mean that there is only one bus or one type of bus.

收发器1101用于与所述第二设备1100相连的设备进行通信,如接收第三设备转发的第一TWAMP报文,并通过所述第三设备向所述第一设备返回第二TWAMP报文等。The transceiver 1101 is configured to communicate with a device connected to the second device 1100, such as receiving a first TWAMP packet forwarded by a third device, and returning a second TWAMP packet to the first device through the third device Wait.

处理器1102用于实现本发明实施例图4所示的网络监测方法,包括:The processor 1102 is configured to implement the network monitoring method shown in FIG. 4 according to the embodiment of the present invention, including:

在接收一报文后,确定所述报文为第一设备通过第三设备发送的第一双向主动测量协议TWAMP报文,所述第一设备为L3 PTN设备,所述第二设备1100为L2 PTN设备,所述第三设备为L2/L3桥接设备;其中,所述第一TWAMP报文中包括原始时间戳,所述原始时间戳为所述第一设备发送所述第一TWAMP报文的时间,所述第一TWAMP报文中的目的地址为基站的IP地址,或与所述基站同网段的预留IP地址;After receiving a packet, it is determined that the packet is a first bidirectional active measurement protocol TWAMP packet sent by the first device through a third device, the first device is an L3 PTN device, and the second device 1100 is an L2 device PTN device, the third device is an L2/L3 bridge device; wherein, the first TWAMP packet includes an original timestamp, and the original timestamp is the time when the first device sends the first TWAMP packet time, the destination address in the first TWAMP message is the IP address of the base station, or the reserved IP address on the same network segment as the base station;

通过所述第三设备向所述第一设备返回第二TWAMP报文,所述第二TWAMP报文对应所述第一设备发送的所述第一TWAMP报文,所述第二TWAMP报文中包括发送时间戳、接收时间戳和所述第一TWAMP报文中的原始时间戳,其中,所述接收时间戳为所述处理器1102接收所述第一TWAMP报文的时间,所述发送时间戳为所述处理器1102发送所述第二TWAMP报文的时间,所述第二TWAMP报文的目的地址与所述第一TWAMP报文中的源地址相同,所述第二TWAMP报文的源地址与所述第一TWAMP报文的目的地址相同。Return a second TWAMP packet to the first device through the third device, the second TWAMP packet corresponds to the first TWAMP packet sent by the first device, and the second TWAMP packet contains It includes a sending time stamp, a receiving time stamp, and the original time stamp in the first TWAMP message, where the receiving time stamp is the time when the processor 1102 receives the first TWAMP message, and the sending time The stamp is the time when the processor 1102 sends the second TWAMP packet, the destination address of the second TWAMP packet is the same as the source address in the first TWAMP packet, and the The source address is the same as the destination address of the first TWAMP message.

可选的,所述第一TWAMP报文中的源地址为以下中的任一项:Optionally, the source address in the first TWAMP packet is any of the following:

所述第一设备的IP地址、与所述第一设备对接的S-GW的IP地址、与所述S-GW同网段的IP地址。The IP address of the first device, the IP address of the S-GW interconnected with the first device, and the IP address of the same network segment as the S-GW.

可选的,确定所述报文为所述第一设备发送的第一TWAMP报文,包括:Optionally, determining that the message is the first TWAMP message sent by the first device, including:

在确定所述报文包括TWAMP标识时,确定所述报文为TWAMP报文;When determining that the message includes a TWAMP identifier, determining that the message is a TWAMP message;

根据所述TWAMP报文中的源地址和目的地址,确定所述TWAMP报文为所述第一TWAMP报文。According to the source address and the destination address in the TWAMP message, it is determined that the TWAMP message is the first TWAMP message.

可选的,根据所述TWAMP报文中的源地址和目的地址,确定所述TWAMP报文为所述第一TWAMP报文,包括:Optionally, according to the source address and destination address in the TWAMP message, it is determined that the TWAMP message is the first TWAMP message, including:

将所述TWAMP报文中的源地址和目的地址作为待识别二元组;Taking the source address and destination address in the TWAMP message as the two-tuple to be identified;

当存储的多个识别信息组中存在与所述待识别二元组匹配的识别信息组时,确定所述TWAMP报文为所述第一TWAMP报文;When there is an identification information group matching the to-be-identified binary group in the stored identification information groups, determine that the TWAMP message is the first TWAMP message;

其中,所述多个识别信息组为预先配置给所述第二设备1100的,与所述待识别二元组匹配的识别信息组为包括所述第一TWAMP报文的源地址和目的地址的二元组。The plurality of identification information groups are pre-configured for the second device 1100, and the identification information group matching the to-be-identified binary group includes the source address and destination address of the first TWAMP message 2-tuple.

可选的,所述第一TWAMP报文中还包括所述第一设备的发射端口号、所述第二设备1100的反射端口号;Optionally, the first TWAMP message further includes the transmission port number of the first device and the reflection port number of the second device 1100;

根据所述TWAMP报文中的源地址和目的地址,确定所述TWAMP报文为所述第一TWAMP报文,包括:According to the source address and destination address in the TWAMP message, it is determined that the TWAMP message is the first TWAMP message, including:

将所述TWAMP报文中的源地址、目的地址、所述第一设备的发射端口号和所述第二设备1100的反射端口号作为待识别四元组;Taking the source address, destination address, the transmission port number of the first device and the reflection port number of the second device 1100 in the TWAMP message as the quadruple to be identified;

当存储的多个识别信息组中存在与所述待识别四元组匹配的识别信息组时,确定所述TWAMP报文为所述第一TWAMP报文;When there is an identification information group matching the to-be-identified quadruple in the stored identification information groups, determine that the TWAMP message is the first TWAMP message;

其中,所述多个识别信息组为预先配置给所述第二设备1100的,与所述待识别四元组匹配的识别信息组为包括所述第一TWAMP报文的源地址、目的地址、所述第一设备的发射端口号和所述第二设备1100的反射端口号的四元组。The multiple identification information groups are pre-configured for the second device 1100, and the identification information group matching the to-be-identified quadruple includes the source address, destination address, A quadruple of the transmit port number of the first device and the reflection port number of the second device 1100.

该第二设备1100还包括存储器1104,用于存放程序,以及预先配置给所述第二设备的多个识别信息组等。具体地,程序可以包括程序代码,该程序代码包括计算机操作指令。存储器1104可能包括随机存取存储器(random access memory,RAM),也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。处理器1102执行存储器1104所存放的应用程序,实现如上网络监测方法。The second device 1100 further includes a memory 1104 for storing programs, a plurality of identification information groups pre-configured for the second device, and the like. Specifically, the program may include program code, the program code including computer operation instructions. The memory 1104 may include random access memory (RAM), and may also include non-volatile memory (non-volatile memory), such as at least one disk storage. The processor 1102 executes the application program stored in the memory 1104 to implement the above network monitoring method.

根据本发明实施例提供的网络监测方法、装置及系统,PTN中的L3 PTN设备通过L2/L3桥接设备向L2 PTN设备发送多个第一TWAMP报文,每个第一TWAMP报文中包括指示所述第一设备发送该第一TWAMP报文的时间的原始时间戳;所述L2 PTN设备在接收到每个第一TWAMP报文后,均通过所述L2/L3设备向所述L3 PTN设备返回一个第二TWAMP报文,所述第二TWAMP报文对应该第一TWAMP报文。所述第二TWAMP报文中包括该第一TWAMP报文中的原始时间戳、接收时间戳以及发送时间戳。由于所述第一TWAMP报文中的目的地址为基站的IP地址或与所述基站同网段的预留IP地址,这样,所述L3 PTN设备可以将第一TWAMP报文作为需要传输至基站的数据报文,直接传输至所述L2 PTN设备,进而,所述L2 PTN设备可以针对接收的第一TWAMP报文回复第二TWAMP报文,最终,所述L3 PTN设备根据在预设时间段内接收的第二TWAMP报文的数目与发送的第一TWAMP报文的数目,确定所述L3 PTN设备与所述L2PTN设备之间的网络的丢包率;并根据所述预设时间段内接收的第二TWAMP报文中包括的接收时间戳与原始时间戳的差值,以及所述发送时间戳与接收时间戳的差值,确定所述第一设备与所述第二设备之间的网络的时延。这样,在所述PTN中的L3 PTN设备可以通过第一TWAMP报文和第二TWAMP报文,精确地确定所述L3 PTN设备和L2 PTN设备之间的网络的丢包率和时延,从而L3 PTN设备提高了网络端到端的性能监测的准确度。According to the network monitoring method, device, and system provided by the embodiments of the present invention, the L3 PTN device in the PTN sends a plurality of first TWAMP messages to the L2 PTN device through the L2/L3 bridge device, and each first TWAMP message includes an indication The original timestamp of the time when the first device sent the first TWAMP message; the L2 PTN device sends each first TWAMP message to the L3 PTN device through the L2/L3 device after receiving each first TWAMP message A second TWAMP message is returned, where the second TWAMP message corresponds to the first TWAMP message. The second TWAMP message includes the original timestamp, the receiving timestamp and the sending timestamp in the first TWAMP message. Since the destination address in the first TWAMP packet is the IP address of the base station or a reserved IP address on the same network segment as the base station, the L3 PTN device can take the first TWAMP packet as the need to transmit to the base station The data packet is directly transmitted to the L2 PTN device, and further, the L2 PTN device can reply to the second TWAMP packet for the received first TWAMP packet, and finally, the L3 PTN device according to the preset time period The number of the second TWAMP message received and the number of the first TWAMP message sent, determine the packet loss rate of the network between the L3 PTN device and the L2PTN device; and according to the preset time period The difference between the receiving timestamp and the original timestamp included in the second received TWAMP packet, and the difference between the sending timestamp and the receiving timestamp, determine the difference between the first device and the second device. network delay. In this way, the L3 PTN device in the PTN can accurately determine the packet loss rate and delay of the network between the L3 PTN device and the L2 PTN device through the first TWAMP message and the second TWAMP message, thereby L3 PTN equipment improves the accuracy of network end-to-end performance monitoring.

尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。Although the preferred embodiments of the present invention have been described, additional changes and modifications to these embodiments may occur to those skilled in the art once the basic inventive concepts are known. Therefore, the appended claims are intended to be construed to include the preferred embodiment and all changes and modifications that fall within the scope of the present invention.

显然,本领域的技术人员可以对本发明实施例进行各种改动和变型而不脱离本发明实施例的精神和范围。这样,倘若本发明实施例的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包括这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present invention without departing from the spirit and scope of the embodiments of the present invention. Thus, provided that these modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and technical equivalents thereof, the present invention is also intended to include such modifications and variations.

Claims (25)

1. A method of network monitoring, comprising:
a first device in a Packet Transport Network (PTN) sends a plurality of first bidirectional active measurement protocol (TWAMP) messages to a second device through a third device, wherein the first device is a three-layer packet transport network (L3 PTN) device, the second device is a two-layer packet transport network (L2 PTN) device, and the third device is a two-layer/three-layer L2/L3 bridging device; any one of the sent first TWAMP messages includes an original timestamp, the original timestamp is the time when the first device sends the first TWAMP message, and a destination address in the first TWAMP message is an internet protocol IP address of a base station or a reserved IP address in the same network segment as the base station;
after the first device receives a packet, determining that the received packet is a second TWAMP packet sent by the second device through the third device, where the second TWAMP packet corresponds to a first TWAMP packet sent by the first device, and the second TWAMP packet includes a sending timestamp, a receiving timestamp, and an original timestamp in the first TWAMP packet, where the receiving timestamp is a time when the second device receives the first TWAMP packet, the sending timestamp is a time when the second device sends the second TWAMP packet, a destination address of the second TWAMP packet is the same as a source address in the first TWAMP packet, and a source address of the second TWAMP packet is the same as a destination address of the first TWAMP packet;
the first device determines the packet loss rate of a network between the first device and the second device according to the number of received second TWAMP messages and the number of sent first TWAMP messages within a preset time period; and are
And determining the network delay between the first device and the second device according to the original timestamp, the receiving timestamp and the sending timestamp included in the second TWAMP message received in the preset time period.
2. The method of claim 1, wherein a source address in any one of the sent plurality of first TWAMP messages is any one of:
the IP address of the first device, the IP address of a service gateway S-GW butted with the first device and the IP address of the same network segment with the S-GW.
3. The method according to claim 1 or 2, wherein the determining, by the first device, that the received packet is a second TWAMP packet sent by the second device, includes:
the first device determines that the received message comprises a TWAMP (two way radio Access protocol) identifier, and determines that the received message is a TWAMP message;
and the first equipment determines the TWAMP message as the second TWAMP message according to the source address and the destination address in the TWAMP message.
4. The method of claim 3, wherein the determining, by the first device, the TWAMP packet as the second TWAMP packet according to a source address and a destination address in the TWAMP packet comprises:
the first equipment takes the destination address and the source address in the TWAMP message as a binary group to be identified;
when an identification information group matched with the binary group to be identified exists in the stored identification information groups, determining the TWAMP message as the second TWAMP message;
the identification information groups are set for the second device, and the identification information group matched with the to-be-identified binary group is a binary group including a source address and a destination address of the first TWAMP message.
5. The method of claim 3, wherein any one of the sent plurality of first TWAMP messages further includes a transmission port number of the first device and a reflection port number of the second device;
the second TWAMP message further includes a transmission port number of the first device and a reflection port number of the second device;
the determining, by the first device, that the TWAMP packet is the second TWAMP packet according to the source address and the destination address in the TWAMP packet includes:
the first device takes a destination address, a source address, a transmitting port number of the first device and a reflecting port number of the second device in the TWAMP message as a quadruple to be identified;
when an identification information group matched with the quadruple to be identified exists in the stored identification information groups, determining the TWAMP message as the second TWAMP message;
the identification information groups are set for the second device, and the identification information group matched with the to-be-identified quadruple is a quadruple including a source address and a destination address of a first TWAMP message corresponding to the second TWAMP message, a transmission port number of the first device and a reflection port number of the second device.
6. A method of network monitoring, comprising:
a third device in a Packet Transport Network (PTN) receives a first bidirectional active measurement protocol (TWAMP) message sent by a first device and forwards the first TWAMP message to a second device, wherein the first device is a three-layer packet transport network (L3) PTN device, the second device is a two-layer packet transport network (L2) PTN device, and the third device is a two-layer/three-layer L2/L3 bridging device; the first TWAMP message comprises an original timestamp, the original timestamp is the time when the first equipment sends the first TWAMP message, and a destination address in the first TWAMP message is an Internet Protocol (IP) address of a base station or a reserved IP address of the same network segment as the base station;
the third device receives a second TWAMP packet sent by the second device, and forwards the second TWAMP packet to the first device, where the second TWAMP packet corresponds to a first TWAMP packet sent by the first device, and the second TWAMP packet includes a sending timestamp, a receiving timestamp, and an original timestamp in the first TWAMP packet, where the receiving timestamp is a time when the second device receives the first TWAMP packet, the sending timestamp is a time when the second device sends the second TWAMP packet, a destination address of the second TWAMP packet is the same as a source address in the first TWAMP packet, and a source address of the second TWAMP packet is the same as a destination address of the first TWAMP packet.
7. The method of claim 6, wherein when a destination address in the first TWAMP message is a reserved IP address of a same network segment of the base station, the third device forwards the first TWAMP message to the second device, comprising:
the third device determines an MAC address corresponding to a destination address in the first TWAMP message according to a mapping relation between a stored IP address and a Media Access Control (MAC) address; and are
And forwarding the first TWAMP message to the second device through a two-layer subinterface corresponding to the determined MAC address.
8. A method of network monitoring, comprising:
after receiving a message, a second device in the packet transport network PTN determines that the received message is a first bidirectional active measurement protocol TWAMP message sent by the first device through a third device, where the first device is a three-layer packet transport network L3PTN device, the second device is a two-layer packet transport network L2PTN device, and the third device is a two-layer/three-layer L2/L3 bridging device; the first TWAMP message comprises an original timestamp, the original timestamp is the time when the first equipment sends the first TWAMP message, and a destination address in the first TWAMP message is an Internet Protocol (IP) address of a base station or a reserved IP address of the same network segment as the base station;
the second device returns a second TWAMP message to the first device through the third device, where the second TWAMP message corresponds to the first TWAMP message sent by the first device, and the second TWAMP message includes a sending timestamp, a receiving timestamp, and an original timestamp in the first TWAMP message, where the receiving timestamp is a time when the second device receives the first TWAMP message, the sending timestamp is a time when the second device sends the second TWAMP message, a destination address of the second TWAMP message is the same as a source address in the first TWAMP message, and a source address of the second TWAMP message is the same as a destination address of the first TWAMP message.
9. The method of claim 8, wherein a source address in the first TWAMP message is any one of:
the IP address of the first device, the IP address of a service gateway S-GW butted with the first device and the IP address of the same network segment with the S-GW.
10. The method according to claim 8 or 9, wherein the determining, by the second device, that the received packet is the first TWAMP packet sent by the first device, includes:
when the second device determines that the received message includes the TWAMP identifier, determining that the received message is the TWAMP message;
and the second equipment determines the TWAMP message as the first TWAMP message according to the source address and the destination address in the TWAMP message.
11. The method of claim 10, wherein the determining, by the second device, the TWAMP packet as the first TWAMP packet according to a source address and a destination address in the TWAMP packet, comprises:
the second equipment takes a source address and a destination address in the TWAMP message as a binary group to be identified;
when an identification information group matched with the binary group to be identified exists in the stored identification information groups, determining the TWAMP message as the first TWAMP message;
the identification information groups are pre-configured to the second device, and the identification information group matched with the to-be-identified binary group is a binary group including a source address and a destination address of the first TWAMP packet.
12. The method of claim 10, wherein the first TWAMP message further includes a transmit port number of the first device, a reflected port number of the second device;
the second device determines, according to the source address and the destination address in the TWAMP message, that the TWAMP message is the first TWAMP message, including:
the second device takes a source address and a destination address in the TWAMP message, a transmitting port number of the first device and a reflecting port number of the second device as a quadruple to be identified;
when an identification information group matched with the quadruple to be identified exists in the stored identification information groups, determining the TWAMP message as the first TWAMP message;
the plurality of identification information groups are pre-configured to the second device, and the identification information group matched with the to-be-identified quadruple is a quadruple including a source address and a destination address of the first TWAMP packet, a transmission port number of the first device, and a reflection port number of the second device.
13. A first device, for use in a packet transport network, PTN, the first device comprising:
a sending unit, configured to send a plurality of first bidirectional active measurement protocol TWAMP messages to a second device through a third device, where the first device is a triple-layer packet transport network L3PTN device, the second device is a double-layer packet transport network L2PTN device, and the third device is a double-layer/triple-layer L2/L3 bridging device; any one of the sent first TWAMP messages comprises an original timestamp, the original timestamp is the time when the sending unit sends the first TWAMP message, and a destination address in the first TWAMP message is an internet protocol IP address of a base station or a reserved IP address in the same network segment with the base station;
a receiving unit, configured to receive a packet;
a determining unit, configured to determine, after the receiving unit receives a packet, that the received packet is a second TWAMP packet sent by the second device through the third device, where the second TWAMP packet corresponds to a first TWAMP packet sent by the first device, and the second TWAMP packet includes a sending timestamp, a receiving timestamp, and an original timestamp in the first TWAMP packet, where the receiving timestamp is a time when the second device receives the first TWAMP packet, the sending timestamp is a time when the second device sends the second TWAMP packet, a destination address of the second TWAMP packet is the same as a source address in the first TWAMP packet, and a source address of the second TWAMP packet is the same as a destination address of the first TWAMP packet;
the processing unit is configured to determine a packet loss rate of a network between the first device and the second device according to the number of received second TWAMP messages and the number of sent first TWAMP messages in a preset time period; and are
And determining the network delay between the first device and the second device according to the original timestamp, the receiving timestamp and the sending timestamp included in the second TWAMP message received in the preset time period.
14. The first device of claim 13, wherein a source address in any one of the sent plurality of first TWAMP messages is any one of:
the IP address of the first device, the IP address of a service gateway S-GW butted with the first device and the IP address of the same network segment with the S-GW.
15. The first device according to claim 13 or 14, wherein the determining unit is specifically configured to:
when the received message is determined to include the TWAMP mark, determining that the received message is the TWAMP message;
and determining the TWAMP message as the second TWAMP message according to the source address and the destination address in the TWAMP message.
16. The first device of claim 15, wherein, when determining that the TWAMP packet is the second TWAMP packet according to a source address and a destination address in the TWAMP packet, the determining unit is specifically configured to:
taking the destination address and the source address in the TWAMP message as a binary group to be identified;
when an identification information group matched with the binary group to be identified exists in the stored identification information groups, determining the TWAMP message as the second TWAMP message;
the identification information groups are set for the second device, and the identification information group matched with the to-be-identified binary group is a binary group including a source address and a destination address of the first TWAMP message.
17. The first device of claim 15, wherein any one of the transmitted plurality of first TWAMP messages further comprises a transmit port number of the first device, a reflected port number of the second device;
the second TWAMP message further includes a transmission port number of the first device and a reflection port number of the second device;
the determining unit, when determining that the TWAMP packet is the second TWAMP packet according to the source address and the destination address in the TWAMP packet, is specifically configured to:
taking a destination address, a source address, a transmitting port number of the first device and a reflecting port number of the second device in the TWAMP message as a quadruple to be identified;
when an identification information group matched with the quadruple to be identified exists in the stored identification information groups, determining the TWAMP message as the second TWAMP message;
the identification information groups are set for the second device, and the identification information group matched with the to-be-identified quadruple is a quadruple including a source address and a destination address of a first TWAMP message corresponding to the second TWAMP message, a transmission port number of the first device and a reflection port number of the second device.
18. A third device, for use in a packet transport network, PTN, the third device comprising:
a receiving unit, configured to receive a first bidirectional active measurement protocol TWAMP packet sent by a first device, where the first device is a three-layer packet transport network L3PTN device, and the third device is a two-layer/three-layer L2/L3 bridging device; the first TWAMP message comprises an original timestamp, the original timestamp is the time when the first equipment sends the first TWAMP message, and a destination address in the first TWAMP message is an Internet Protocol (IP) address of a base station or a reserved IP address of the same network segment as the base station;
a sending unit, configured to forward the first TWAMP packet to a second device, where the second device is a layer two packet transport network L2PTN device;
the receiving unit is further configured to receive a second TWAMP packet sent by the second device, where the second TWAMP packet corresponds to a first TWAMP packet sent by the first device, and the second TWAMP packet includes a sending timestamp, a receiving timestamp, and an original timestamp in the first TWAMP packet, where the receiving timestamp is a time when the second device receives the first TWAMP packet, the sending timestamp is a time when the second device sends the second TWAMP packet, a destination address of the second TWAMP packet is the same as a source address in the first TWAMP packet, and a source address of the second TWAMP packet is the same as a destination address of the first TWAMP packet;
the sending unit is further configured to forward the second TWAMP packet to the first device.
19. The third device of claim 18, wherein when the destination address in the first TWAMP message is a reserved IP address of the same segment of the base station, the third device further comprises:
a determining unit, configured to determine, according to a mapping relationship between a stored IP address and a media access control MAC address, a MAC address corresponding to a destination address in the first TWAMP message;
the sending unit is specifically configured to forward the first TWAMP packet to the second device through a two-layer subinterface corresponding to the determined MAC address.
20. Second device, for use in a packet transport network, PTN, the second device comprising:
a receiving unit, configured to receive a packet;
a determining unit, configured to determine, after the receiving unit receives a packet, that the received packet is a first bidirectional active measurement protocol TWAMP packet sent by a first device through a third device, where the first device is a three-layer packet transport network L3PTN device, the second device is a two-layer packet transport network L2PTN device, and the third device is a two-layer/three-layer L2/L3 bridging device; the first TWAMP message comprises an original timestamp, the original timestamp is the time when the first equipment sends the first TWAMP message, and a destination address in the first TWAMP message is an Internet Protocol (IP) address of a base station or a reserved IP address of the same network segment as the base station;
a sending unit, configured to return a second TWAMP packet to the first device through the third device, where the second TWAMP packet corresponds to the first TWAMP packet sent by the first device, and the second TWAMP packet includes a sending timestamp, a receiving timestamp, and an original timestamp in the first TWAMP packet, where the receiving timestamp is a time when the receiving unit receives the first TWAMP packet, the sending timestamp is a time when the sending unit sends the second TWAMP packet, a destination address of the second TWAMP packet is the same as a source address in the first TWAMP packet, and a source address of the second TWAMP packet is the same as a destination address of the first TWAMP packet.
21. The second device of claim 20, wherein a source address in the first TWAMP message is any one of:
the IP address of the first device, the IP address of a service gateway S-GW butted with the first device and the IP address of the same network segment with the S-GW.
22. The second device according to claim 20 or 21, wherein the determining unit is specifically configured to:
when the received message is determined to include the TWAMP mark, determining that the received message is the TWAMP message;
and determining the TWAMP message as the first TWAMP message according to the source address and the destination address in the TWAMP message.
23. The second device of claim 22, wherein, when determining that the TWAMP packet is the first TWAMP packet according to a source address and a destination address in the TWAMP packet, the determining unit is specifically configured to:
taking a source address and a destination address in the TWAMP message as a binary group to be identified;
when an identification information group matched with the binary group to be identified exists in the stored identification information groups, determining the TWAMP message as the first TWAMP message;
the identification information groups are pre-configured to the second device, and the identification information group matched with the to-be-identified binary group is a binary group including a source address and a destination address of the first TWAMP packet.
24. The second device of claim 22, wherein the first TWAMP message further includes a transmit port number of the first device, a reflected port number of the second device;
the determining unit, when the second device determines that the TWAMP packet is the first TWAMP packet according to the source address and the destination address in the TWAMP packet, is specifically configured to:
taking a source address and a destination address in the TWAMP message, a transmitting port number of the first device and a reflecting port number of the second device as a quadruple to be identified;
when an identification information group matched with the quadruple to be identified exists in the stored identification information groups, determining the TWAMP message as the first TWAMP message;
the plurality of identification information groups are pre-configured to the second device, and the identification information group matched with the to-be-identified quadruple is a quadruple including a source address and a destination address of the first TWAMP packet, a transmission port number of the first device, and a reflection port number of the second device.
25. A network monitoring system, applied in a packet transport network, PTN, the system comprising:
a first device, configured to send a plurality of first bidirectional active measurement protocol TWAMP messages to a second device through a third device, where the first device is a three-layer packet transport network L3PTN device, the second device is a two-layer packet transport network L2PTN device, and the third device is a two-layer/three-layer L2/L3 bridging device; any one of the sent first TWAMP messages includes an original timestamp, where the original timestamp is time when the first device sends the first TWAMP message, and a destination address in the first TWAMP message is an internet protocol IP address of a base station or a reserved IP address in the same network segment as the base station;
the second device is configured to, after receiving a packet, determine that the packet is a first TWAMP packet sent by the first device through the third device, generate a second TWAMP packet for the received first TWAMP packet, and return the generated second TWAMP packet to the first device through the third device, where the second TWAMP packet includes a sending timestamp, a receiving timestamp, and an original timestamp in the first TWAMP packet, where the receiving timestamp is a time when the second device receives the first TWAMP packet, the sending timestamp is a time when the second device sends the second TWAMP packet, a destination address of the second TWAMP packet is the same as a source address in the first TWAMP packet, and a source address of the second TWAMP packet is the same as a destination address of the first TWAMP packet;
the third device is configured to receive the first TWAMP packet sent by the first device, and forward the first TWAMP packet to the second device;
the third device is further configured to receive a second TWAMP packet sent by the second device, and forward the second TWAMP packet to the first device;
the first device is further configured to determine, after receiving a packet, that the packet is a second TWAMP packet sent by the second device through the third device; determining the packet loss rate of a network between the first device and the second device according to the number of received second TWAMP messages and the number of sent first TWAMP messages within a preset time period; and determining the network delay between the first device and the second device according to the original timestamp, the receiving timestamp and the sending timestamp included in the second TWAMP message received in the preset time period.
CN201511030261.9A 2015-12-31 2015-12-31 Network monitoring method, device and system Active CN106936661B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201511030261.9A CN106936661B (en) 2015-12-31 2015-12-31 Network monitoring method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201511030261.9A CN106936661B (en) 2015-12-31 2015-12-31 Network monitoring method, device and system

Publications (2)

Publication Number Publication Date
CN106936661A CN106936661A (en) 2017-07-07
CN106936661B true CN106936661B (en) 2020-01-03

Family

ID=59444776

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201511030261.9A Active CN106936661B (en) 2015-12-31 2015-12-31 Network monitoring method, device and system

Country Status (1)

Country Link
CN (1) CN106936661B (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109412881B (en) * 2017-08-18 2020-09-08 中国移动通信有限公司研究院 Segmented time delay monitoring method, intermediate node and synthesis analysis equipment
CN108199925B (en) 2018-01-30 2021-06-04 网宿科技股份有限公司 A data transmission method, reception method and device
CN110166311B (en) * 2018-02-14 2022-09-23 华为技术有限公司 Method, equipment and network system for measuring network performance
CN110191475B (en) * 2018-02-23 2021-04-27 大唐移动通信设备有限公司 Data processing method and device for base station
US10708161B2 (en) * 2018-09-21 2020-07-07 Juniper Networks, Inc. Network performance monitoring using an active measurement protocol and relay mechanism
CN109067625B (en) * 2018-10-19 2020-07-28 瑞斯康达科技发展股份有限公司 Method, device and system for detecting performance of service channel
CN111385822B (en) 2018-12-29 2021-11-09 华为技术有限公司 Configuration method and controller
CN111435918B (en) * 2019-01-15 2021-11-09 华为技术有限公司 Network performance detection method and network performance detection device
CN111988193A (en) * 2019-05-24 2020-11-24 中兴通讯股份有限公司 A TWAMP-based detection method and related equipment
CN112217686B (en) 2019-07-12 2022-12-27 华为技术有限公司 System, method and device for evaluating round trip delay
CN112398557B (en) * 2019-08-16 2022-06-28 华为技术有限公司 Time delay statistics method, device, storage medium and system
CN110971445B (en) * 2019-09-24 2021-06-01 华为技术有限公司 A kind of network OAM method and device
CN114301811B (en) * 2020-09-23 2024-11-15 中国移动通信有限公司研究院 Information processing method, device and tunnel endpoint network element
CN116938767A (en) * 2022-03-29 2023-10-24 中兴通讯股份有限公司 Method and device for monitoring multipath end-to-end time delay, electronic equipment and medium
CN116192997B (en) * 2023-02-21 2023-12-01 兴容(上海)信息技术股份有限公司 Event detection method and system based on network flow

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103109501A (en) * 2012-09-29 2013-05-15 华为技术有限公司 Network time delay measuring method, device and system
WO2013151471A1 (en) * 2012-04-04 2013-10-10 Telefonaktiebolaget L M Ericsson (Publ) Method for scalable measuring of connectivity between two way active measurement protocol (twamp) entities.
CN103516508A (en) * 2013-09-17 2014-01-15 中国科学院计算技术研究所 Method and system for correcting clock drift in one-way and two-way delay variation measurement
CN103595553A (en) * 2012-07-24 2014-02-19 埃克斯帝网络有限公司 Automatic setup of reflector instances
CN103875213A (en) * 2013-11-26 2014-06-18 华为技术有限公司 Network device performance testing method, terminals, management device and system
CN104683187A (en) * 2015-03-12 2015-06-03 烽火通信科技股份有限公司 A method for realizing the end-to-end measurement of the router's Layer 2 VPN service physical interface

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9628358B2 (en) * 2012-10-05 2017-04-18 Telefonaktiebolaget Lm Ericsson (Publ) Method and system for piggybacking radio data in IP measurements

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013151471A1 (en) * 2012-04-04 2013-10-10 Telefonaktiebolaget L M Ericsson (Publ) Method for scalable measuring of connectivity between two way active measurement protocol (twamp) entities.
CN103595553A (en) * 2012-07-24 2014-02-19 埃克斯帝网络有限公司 Automatic setup of reflector instances
CN103109501A (en) * 2012-09-29 2013-05-15 华为技术有限公司 Network time delay measuring method, device and system
CN103516508A (en) * 2013-09-17 2014-01-15 中国科学院计算技术研究所 Method and system for correcting clock drift in one-way and two-way delay variation measurement
CN103875213A (en) * 2013-11-26 2014-06-18 华为技术有限公司 Network device performance testing method, terminals, management device and system
CN104683187A (en) * 2015-03-12 2015-06-03 烽火通信科技股份有限公司 A method for realizing the end-to-end measurement of the router's Layer 2 VPN service physical interface

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于TWAMP的协议分析与网络测量研究.;张超.;《中国优秀硕士学位论文全文数据库信息科技辑2012年》;20120815(第8期);全文 *

Also Published As

Publication number Publication date
CN106936661A (en) 2017-07-07

Similar Documents

Publication Publication Date Title
CN106936661B (en) Network monitoring method, device and system
JP5462954B2 (en) Packet loss detection method and apparatus, and router
US10348591B2 (en) Method and apparatus for detecting user network interface connectivity of virtual private network
US20050099955A1 (en) Ethernet OAM fault isolation
CN103580894B (en) Method, equipment and the system of Operations, Administration and Maintenance OAM configurations
CN106411625A (en) Link message packet loss measurement method and system, target node and initiator node
CN102984018B (en) Ethernet loss packet test method, equipment and system
WO2013071801A1 (en) Method, device and system for detecting multi-protocol label switching ring network
WO2016184245A1 (en) Tunnel packet loss detecting method, apparatus and network communication device
WO2016150105A1 (en) Fault location method, device and system for ethernet link
CN104852828B (en) A kind of network delay detection method, apparatus and system
CN101471821B (en) Method and apparatus for detecting failure of operator backbone network transmission network
EP4250609B1 (en) Packet processing method and device
CN101984587A (en) Method, system and device for detecting connectivity of two points of multicast forwarding tree
WO2020173424A1 (en) Message processing method, and gateway device
CN114124753B (en) Message sending method and device
CN103546303A (en) Lost frame measuring method and system
CN110519103A (en) A kind of Fault Locating Method of heterogeneous network, device and terminal
WO2011124184A2 (en) Method, destination network node apparatus and mobile transmission network system for processing packet loss
CN106161124B (en) Test processing method and device for message
EP3962000A1 (en) Bit error notification method and related device
EP2854339B1 (en) Transmission monitoring method and device
CN101989937B (en) A kind of method, Apparatus and system sending data flow
CN111435948A (en) Method for transmitting message in network and network equipment
CN114866414A (en) Virtual network state determination method, device and equipment

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