CN107547291B - Performance monitoring method and device and router - Google Patents

Performance monitoring method and device and router Download PDF

Info

Publication number
CN107547291B
CN107547291B CN201610486103.2A CN201610486103A CN107547291B CN 107547291 B CN107547291 B CN 107547291B CN 201610486103 A CN201610486103 A CN 201610486103A CN 107547291 B CN107547291 B CN 107547291B
Authority
CN
China
Prior art keywords
monitoring
lsp
packet
parameter
physical interface
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
CN201610486103.2A
Other languages
Chinese (zh)
Other versions
CN107547291A (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.)
XFusion Digital 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 CN201610486103.2A priority Critical patent/CN107547291B/en
Publication of CN107547291A publication Critical patent/CN107547291A/en
Application granted granted Critical
Publication of CN107547291B publication Critical patent/CN107547291B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

A performance monitoring method, a device and a router belong to the technical field of communication. The method comprises the following steps: before a first physical interface of a router sends a first monitoring packet, the router determines a path of the first monitoring packet according to a forwarding table, wherein the path comprises a first LSP and a first PW overlapped on the first LSP; generating a first monitoring packet according to the path, wherein the first monitoring packet is an MPLS packet, an MPLS label of the first monitoring packet is generated according to a first LSP, a PW label of the first monitoring packet is generated according to a first PW, and the PW label comprises a first monitoring parameter of a first physical link connecting a first physical interface, a second monitoring parameter of the first LSP and a third monitoring parameter of the first PW; and the router can simultaneously determine the network performance of the first physical link, the first LSP and the first PW through one first monitoring packet, so that the occupation of the network performance monitoring on the bandwidth can be reduced.

Description

Performance monitoring method and device and router
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a performance monitoring method, apparatus, and router.
Background
The network performance is a measurement index of the network quality, wherein the network performance includes parameters such as packet loss rate and transmission delay of packets. Many networks currently require monitoring of network performance.
Taking a multi-protocol Label Switching (MPLS) Virtual Private Network (VPN) as an example, there are multiple routers in the MPLS VPN, and the multiple routers may establish multiple paths, where each Path includes multiple physical links, a Label Switched Path (LSP) overlapping (over) the physical links, and a Pseudo Wire (PW) overlapping the LSP. When monitoring the network performance of MPLS VPN, a router needs to monitor the network performance of each physical link, LSP and PW of each path.
When monitoring the network performance of one of the physical links, the router at one end of the physical link generates a link monitoring packet carrying the monitoring parameters of the physical link, and sends the link monitoring packet to the router at the other end of the physical link. The link supervision packet is a link layer packet. For example, if the physical link is an ethernet link, the link monitor packet is an ethernet packet. The router receiving the link monitoring packet determines the network performance of the physical link according to the link monitoring packet. The router pairs at both ends of each of the plurality of physical links each so determine the network performance of each physical link. When monitoring the network performance of the LSP, a router at one end of the LSP generates an LSP monitoring packet carrying monitoring parameters of the LSP and sends the LSP monitoring packet to a router at the other end of the LSP. The LSP monitoring packet is an MPLS packet. And the router receiving the LSP monitoring packet determines the network performance of the LSP according to the LSP monitoring packet. When monitoring the network performance of the PW, a router at one end of the PW generates a PW monitoring packet carrying the monitoring parameters of the PW, and sends the PW monitoring packet to a router at the other end of the PW. And the router receiving the PW monitoring packet determines the network performance of the PW according to the PW monitoring packet.
Because the router needs to transmit the link monitoring packet on the physical link to monitor the network performance of the physical link, transmit the LSP monitoring packet on the LSP to monitor the network performance of the LSP, and transmit the PW monitoring packet on the PW to monitor the network performance of the PW, the occupied network resources are large, thereby reducing the effective bandwidth allocated to the user.
Disclosure of Invention
In order to solve the problem that a router needs to transmit monitoring packets on a physical link, an LSP and a PW respectively to monitor the network performance of the router and occupy effective bandwidth allocated to a user, the application provides a performance monitoring method and device and the router. The technical scheme is as follows:
in a first aspect, a performance monitoring method is provided, which includes:
before a first physical interface of a router sends a first monitoring packet, the router determines a path of the first monitoring packet according to a forwarding table, wherein the path comprises a first LSP and a first PW overlapped on the first LSP; generating a first monitoring packet according to the path, wherein the first monitoring packet is an MPLS packet, an MPLS label of the first monitoring packet is generated according to a first LSP, a PW label of the first monitoring packet is generated according to a first PW, and the PW label comprises a first monitoring parameter of a first physical link connecting a first physical interface, a second monitoring parameter of the first LSP and a third monitoring parameter of the first PW; transmitting a first monitoring packet from a first physical interface; the first monitoring parameter is used for determining the network performance of the first physical link, the second monitoring parameter is used for determining the network performance of the first LSP, and the third monitoring function parameter is used for determining the network performance of the first PW.
Because the first PW is overlapped on the first LSP, and the first LSP is overlapped on the multiple first physical links, the first monitoring packet transmitted on the first PW also needs to pass through the multiple first physical links and the first LSP, so that the router can determine the network performance of the first physical link according to the first monitoring parameter in the first monitoring packet, determine the network performance of the first LSP according to the second monitoring parameter, and determine the network performance of the first PW according to the third monitoring parameter, thereby determining the network performance of the first physical link, the first LSP, and the first PW simultaneously by using one first monitoring packet, and reducing the bandwidth occupation of network performance monitoring.
In a first implementation of the first aspect, a first physical interface sends a plurality of monitoring packets, where a first monitoring packet is a current monitoring packet to be sent in the plurality of monitoring packets, and a router determines a path of the first monitoring packet according to a forwarding table, where the determining includes:
the router determines a path, which is different from any one path in at least one path of at least one monitoring packet sent in the plurality of monitoring packets, in all paths related to the first physical interface in the forwarding table; wherein all paths associated with the first physical interface include at least one LSP overlaid on top of the first physical link and PWs overlaid on top of respective LSPs of the at least one LSP.
Since the path determined by the router is different from any one of the at least one path of the at least one monitoring packet transmitted in the plurality of monitoring packets, the router may transmit the monitoring packets from all the paths associated with the first physical interface, and thus, may monitor the network performance of the first physical link, the network performance of the at least one LSP overlaid on the first physical link, the network performance of the PWs overlaid on each of the at least one LSP, and expand the range of use of network performance monitoring.
With reference to the first aspect or the first implementation of the first aspect, in a second implementation of the first aspect, the method further includes:
the router receives a second monitoring packet by using a second physical interface, and acquires physical interface recording parameters corresponding to the second physical interface, which are determined when the second monitoring packet is received, wherein the second monitoring packet is an MPLS packet, an MPLS label of the second monitoring packet is generated according to a second LSP, a PW label of the second monitoring packet is generated according to a second PW, and the PW label comprises a fourth monitoring parameter of a second physical link connecting the second physical interface, a fifth monitoring parameter of the second LSP and a sixth monitoring parameter of the second PW; reading the fourth monitoring parameter according to the forwarding table, and determining the network performance of the second physical link according to the physical interface recording parameter and the fourth monitoring parameter; the fifth monitoring parameter is used to determine the network performance of the second LSP, and the sixth monitoring function parameter is used to determine the network performance of the second PW.
With reference to the second implementation of the first aspect, in a third implementation of the first aspect, after determining the network performance of the second physical link according to the physical interface recording parameter and the fourth monitoring parameter, the method further includes:
the router determines a third physical interface according to the forwarding table and the MPLS label of the second monitoring packet, wherein the third physical interface is a physical interface for forwarding the second monitoring packet; modifying the fourth monitoring parameter into a seventh monitoring parameter of a third physical link connected with the third physical interface, and sending a second monitoring packet from the third physical interface; wherein the seventh monitoring parameter is used to determine the network performance of the third physical link.
With reference to the second implementation of the first aspect, in a fourth implementation of the first aspect, after determining the network performance of the second physical link according to the physical interface recording parameter and the fourth monitoring parameter, the method further includes:
the router acquires LSP recording parameters corresponding to the second LSP determined when receiving the second monitoring packet, reads fifth monitoring parameters according to the forwarding table and the MPLS label of the second monitoring packet, and determines the network performance of the second LSP according to the LSP recording parameters and the fifth monitoring parameters; determining a fourth physical interface connected with a fourth physical link overlapped by a third LPS and the third LSP according to the forwarding table and the MPLS label of the second monitoring packet, wherein the third LSP and the second LSP are adhered, and the adhesion of the third LSP and the second LSP means that the second PW is overlapped on the third LSP and the second LSP; modifying the fourth monitoring parameter into an eighth monitoring parameter of the fourth physical link, modifying the fifth monitoring parameter into a ninth monitoring parameter of the third LSP, and sending a second monitoring packet from the fourth physical interface; the eighth monitoring parameter is used to determine the network performance of the fourth physical link, and the ninth monitoring parameter is used to determine the network performance of the third LSP.
With reference to the third implementation of the first aspect, in a fifth implementation of the first aspect, after determining the network performance of the second physical link according to the physical interface recording parameter and the fourth monitoring parameter, the method further includes:
the router acquires LSP recording parameters corresponding to the second LSP determined when receiving the second monitoring packet, reads fifth monitoring parameters according to the forwarding table and the MPLS label of the second monitoring packet, and determines the network performance of the second LSP according to the LSP recording parameters and the fifth monitoring parameters;
and acquiring PW recording parameters corresponding to the second PW, which are determined when the second monitoring packet is received, reading sixth monitoring parameters according to the forwarding table and the PW label of the second monitoring packet, and determining the network performance of the second PW according to the PW recording parameters and the sixth monitoring parameters.
In a second aspect, a performance monitoring apparatus is provided, which includes at least one unit configured to implement the performance monitoring method provided in the first aspect or at least one implementation of the first aspect.
In a third aspect, a router is provided, where the apparatus includes a processor, and a physical interface connected to the processor; the physical interface is configured to be controlled by a processor for implementing the performance monitoring method provided in the first aspect or at least one implementation of the first aspect.
In a fourth aspect, a computer-readable medium is provided that stores instructions for implementing the performance monitoring method provided in the first aspect or at least one implementation of the first aspect.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a router according to an exemplary embodiment of the present invention;
FIG. 2 is a schematic diagram of a path provided by an exemplary embodiment of the present invention;
FIG. 3 is a schematic diagram of paths under a load sharing scenario provided by an exemplary embodiment of the present invention;
FIG. 4 is a diagram illustrating a structure of a monitoring packet according to an exemplary embodiment of the present invention;
FIG. 5 is a flow chart of a performance monitoring method provided by an exemplary embodiment of the present invention;
fig. 6 is a flowchart of a monitoring packet generation method according to an exemplary embodiment of the present invention;
FIG. 7 is a flow chart of a method of performance determination provided by an exemplary embodiment of the present invention;
fig. 8 is a block diagram of a performance monitoring apparatus according to an exemplary embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Reference herein to "a unit" is to a logically partitioned functional structure, and the "unit" may be implemented by pure hardware or a combination of hardware and software.
Referring to fig. 1, a schematic structural diagram of a router 100 according to an exemplary embodiment of the present invention is shown. The router 100 includes: a processor 120, and a physical interface 140 coupled to the processor 120.
The physical interface 140 may connect physical interfaces of other devices to form one or more physical links. Router 100 is capable of sending or receiving packets using physical links. The packet may be a monitoring packet or a data packet.
For example, the processor 120 may include a Central Processing Unit (CPU) and a Network Processor (NP). The CPU negotiates with other routers to obtain a forwarding table and sends the forwarding table to the NP. Wherein the negotiation process is used to determine the forwarding path of the packet. The processor 120 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
The memory 160 is connected to the processor 120 by a bus or other means, and the memory 160 may be a volatile memory (or a nonvolatile memory), a non-volatile memory (or a combination thereof). The volatile memory may be a Random Access Memory (RAM), such as a Static Random Access Memory (SRAM) or a Dynamic Random Access Memory (DRAM). The nonvolatile memory may be a read-only memory (ROM), such as a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), and an electrically erasable programmable read-only memory (EEPROM). The non-volatile memory may also be a flash memory, a magnetic memory, such as a magnetic tape, a floppy disk, or a hard disk. The non-volatile memory may also be an optical disc.
A forwarding table may be stored in memory 160. The forwarding table is used for recording a path for sending data. Referring to fig. 2, a schematic diagram of a path is shown, in which 6 routers are included, and router 1, router 2, router 3, and router 4 establish a first path, which is shown by a solid line in the figure; router 1, router 5, router 6, and router 4 establish a second path, shown in dashed lines. The first path includes a first physical link formed by connecting physical interface 1 and physical interface 2, a second physical link formed by connecting physical interface 3 and physical interface 4, a third physical link formed by connecting physical interface 5 and physical interface 6, LSP1 overlapped on the first physical link, the second physical link, and the third physical link, and a PW overlapped on LSP 1. The second path includes a fourth physical link formed by connecting physical interfaces 7 and 8, a fifth physical link formed by connecting physical interfaces 9 and 10, a sixth physical link formed by connecting physical interfaces 11 and 12, LSP2 overlapping the fourth physical link, the fifth physical link, and the sixth physical link, and a PW overlapping LSP 2.
In fig. 2, the PW is overlapped on LSP1 and LSP2, and at this time, both LSP1 and LSP2 can transmit data of the PW, thereby achieving load sharing of the PW. In this case, router 4 may monitor the network performance of the PW via the first path and the second path, respectively.
Referring to the schematic diagram of a path in the load sharing scenario shown in fig. 3, PW1 and PW2 are overlapped on LSP1, and LSP1 is overlapped on a physical link formed by connecting physical interface 1 and physical interface 2; PW3 and PW4 overlap on LSP2, and LSP2 overlaps on the physical link formed by the connection of physical interface 1 and physical interface 2. An LSP generally overlaps a path in which multiple physical links are connected, so that an LSP overlapping over one physical link means that the LSP overlaps a path including the one physical link.
Please refer to the schematic diagram of the structure of the monitoring packet shown in fig. 4, the structure of the monitoring packet is related to the path. The monitoring packet comprises a plurality of fields which are sequentially a type indication bit, an LSP label, a PW label, a first monitoring parameter, a second monitoring parameter and a third monitoring parameter. The type indication bit is used to define the packet type as a monitoring packet, for example, when the value of the type indication bit is the first value, the packet type is the monitoring packet. The first monitoring parameter is used for determining the network performance of a physical link connected with the physical interface, the second monitoring parameter is used for determining the network performance of the LSP, and the third monitoring parameter is used for determining the network performance of the PW. When the network performance comprises network time delay, the monitoring parameter comprises a timestamp for sending the monitoring packet; when the network performance includes a packet loss rate, the monitoring parameter includes a packet number of a data packet transmitted when the monitoring packet is transmitted.
The forwarding table is further used for storing an index entry so that the router processes the monitoring packet according to the index entry. Each index entry comprises a label, an offset of a position of a monitoring parameter corresponding to the label in the monitoring packet from a position of a label at the bottom of the stack, and an operation corresponding to the label. The bottom label is an innermost label in the monitoring packet, and when the monitoring packet is implemented, the router may set a predetermined flag bit in the innermost label to a second value to indicate that the label is the bottom label. For example, in the monitor packet shown in fig. 4, a predetermined flag bit in the PW label is set to a second value to indicate that the bottom label of the stack is a PW label. The offset of the first monitoring parameter from the position of the bottom label is offset1, the start position of offset1 is the position of the bottom label, and the end position is the start position of the first monitoring parameter; the offset of the second monitoring parameter from the position of the bottom label is offset2, the start position of offset2 is the position of the bottom label, and the end position is the start position of the second monitoring parameter; the offset amount of the third monitoring parameter from the position of the bottom label of the stack is offset3, the start position of offset3 is the position of the bottom label of the stack, and the end position is the start position of the third monitoring parameter.
The operations corresponding to the tags in this embodiment include POP (POP) operation, SWAP GO (SWAP GO) operation, and SWAP (SWAP) operation. The SWAP GO operation is an operation corresponding to the label of the LSP when the LSP is adhered, and the SWAP operation is an operation corresponding to the physical interface and the label of the LSP when the LSP is not adhered. LSP-sticky means that two LSPs are connected end to end, i.e. the egress port of one LSP and the ingress port of the other LSP are located in the same router. The pop operation is used to instruct the router to pop the label. The switching operation is used to instruct the router to switch the current label of the packet to the next label.
Referring to fig. 5, a flowchart of a performance monitoring method according to an exemplary embodiment of the invention is shown. The performance monitoring method comprises the following steps:
step 501, before a first physical interface of a router sends a first monitoring packet, the router determines a path of the first monitoring packet according to a forwarding table, where the path includes a first LSP and a first PW overlapped on the first LSP.
Since the router sends the first monitoring packet from the first physical interface, the path determined by the router includes the first physical link connecting the first physical interface, and the path may further include the first LSP overlapping the first physical link and the first PW overlapping the first LSP.
Specifically, the forwarding table stores a plurality of paths associated with the first physical interface, and the router may select one path from the plurality of paths. Wherein all paths associated with the first physical interface include at least one LSP overlaid on top of the first physical link and PWs overlaid on top of respective LSPs of the at least one LSP.
In this embodiment, a first physical interface sends a plurality of monitoring packets, where a first monitoring packet is a current monitoring packet to be sent in the plurality of monitoring packets, and a router determines a path of the first monitoring packet according to a forwarding table, including: the router determines a path in the forwarding table that is different from any of at least one path of at least one monitoring packet transmitted in the plurality of monitoring packets among all paths associated with the first physical interface.
For example, all paths related to the first physical interface in the forwarding table include path 1, path 2, path 3, and path 4, and the router has sent the monitoring packet on path 1 and path 2, and has not sent the monitoring packet on path 3 and path 4, the router selects one path from path 3 and path 4 as the path of the first monitoring packet. Taking fig. 3 as an example, the paths 1 to 4 may be PW1/LSP 1/physical interface 1, PW2/LSP 1/physical interface 1, PW3/LSP 2/physical interface 1, and PW4/LSP 2/physical interface 1, respectively. Where "/" indicates overlap.
When a plurality of monitoring packets are transmitted, the transmission intervals of the plurality of monitoring packets may be the same or different.
Specifically, the router determines, in a forwarding table, a path that is different from any one of at least one path of at least one monitoring packet that has been sent in a plurality of monitoring packets, in all paths related to the first physical interface, and includes: when the first physical interface determines a path for the first time, the router selects a first LSP with the top sequence from all first LSPs included in all paths, and selects a first PW with the top sequence from all first PWs overlapped on the selected first LSP to obtain a path formed by the first physical interface, the first LSP and the first PW; when the first physical link does not determine a path for the first time, the router acquires a previous first LSP and a previous first PW in the path determined in the previous period, selects one first PW which is overlapped on the previous first LSP and sequenced after the previous first PW from all the first PWs included in all the paths, and obtains a path formed by the first physical link, the previous first LSP and the first PW; when the first PW is the last sequenced first PW in all first PWs overlapped on the previous first LSP, selecting a first LSP ordered after the previous first LSP from all first LSPs included in all paths, determining the first PW with the highest sequencing in all the first PWs overlapped on the selected first LSP, and obtaining a path formed by the first physical link, the first LSP and the first PW; when the previous first PW is the last sequenced first PW of all the first PWs overlapped on the previous first LSP, and the previous first LSP is the last sequenced first LSP of all the first LSPs included in all the paths, the first LSP with the top sequence is selected from the first LSPs included in all the paths, and the first PW with the top sequence is selected from all the first PWs overlapped on the selected first LSP, so that a path formed by the first physical link, the first LSP, and the first PW is obtained.
Taking fig. 3 as an example, if physical interface 1 is a first physical interface, the ordering of the first LSP is LSP1 and LSP2, and the ordering of the first PW is PW1, PW2, PW3 and PW4, then the sequentially determined path of the first physical interface is: the path formed by the physical link, LSP1 and PW1, the path formed by the physical link, LSP1 and PW2, the path formed by the physical link, LSP2 and PW3, the path formed by the physical link, LSP2 and PW4, at the end of a cycle, the path subsequently determined by the first physical interface is still: a path formed by physical link, LSP1 and PW1, a path formed by physical link, LSP1 and PW2, a path formed by physical link, LSP2 and PW3, a path formed by physical link, LSP2 and PW 4.
Assuming that the time interval for sending the monitoring packets by the physical interface 1 is T, the physical link is monitored at the time interval of T, the LSP1 and the LSP2 are monitored at the average time interval of 2T, and the PW1, PW2, PW3 and PW4 are monitored at the average time interval of 4T. The time interval for which the upper layer objects are monitored is greater than the time interval for which the lower layer objects are monitored, which is consistent with the requirement that the upper layer objects do not perceive a failure of the lower layer objects.
Step 502, a first monitoring packet is generated according to the path, the first monitoring packet is an MPLS packet, an MPLS label of the first monitoring packet is generated according to the first LSP, a PW label of the first monitoring packet is generated according to the first PW, and the PW label includes a first monitoring parameter of the first physical link connecting the first physical interface, a second monitoring parameter of the first LSP, and a third monitoring parameter of the first PW.
The format of the first monitoring packet generated by the router is shown in fig. 4, where the first monitoring parameter is used to determine the network performance of the first physical link, the second monitoring parameter is used to determine the network performance of the first LSP, and the third monitoring function parameter is used to determine the network performance of the first PW.
When the network performance includes network latency, the first monitoring parameter is a timestamp generated by the first physical interface when the first monitoring packet is sent, the second monitoring parameter is a timestamp generated by a port of the first LSP when the first monitoring packet is sent, and the third monitoring parameter is a timestamp generated by a port of the first PW when the first monitoring packet is sent. When the network performance includes a packet loss rate, the first monitoring parameter is the packet number of a data packet sent on a first physical link between a first monitoring packet sent by a first physical interface and the first monitoring packet, the second monitoring parameter is the packet number of a data packet sent on a first LSP between the first monitoring packet sent by the first LSP and the first monitoring packet, and the third monitoring parameter is the packet number of a data packet sent on the first PW between the first monitoring packet sent by the first PW and the first monitoring packet. The previous monitoring packet sent by the first physical interface, the previous monitoring packet sent by the first LSP, and the previous monitoring packet sent by the first PW are not related to each other, and may be the same monitoring packet or different monitoring packets. For example, at time 0, T, 2T, 3T, 4T, the monitoring packets are sent on PW1/LSP 1/physical interface 1, PW2/LSP 1/physical interface 1, PW3/LSP 2/physical interface 1, PW4/LSP 2/physical interface 1, and PW1/LSP 1/physical interface 1, respectively. If the first monitoring packet is a PW1/LSP 1/physical interface 1 monitoring packet sent at the time of 4T, the first physical interface is physical interface 1, the first LSP is LSP1, and the first PW is PW 1. The previous monitoring packet sent by the first physical interface is a PW4/LSP 2/physical interface 1 monitoring packet sent at the time of 3T. The previous monitoring packet sent by the first LSP is a PW2/LSP 1/physical interface 1 monitoring packet sent at time T. The previous monitoring packet sent by the first PW is a PW1/LSP 1/physical interface 1 monitoring packet sent at time 0.
Step 503, a first monitoring packet is sent from the first physical interface.
In this embodiment, the router not only has a capability of sending the monitoring packet, but also has a capability of receiving the monitoring packet, and at this time, the performance monitoring method provided in this embodiment further includes: the router receives a second monitoring packet by using a second physical interface, and acquires physical interface recording parameters corresponding to the second physical interface, which are determined when the second monitoring packet is received, wherein the second monitoring packet is an MPLS packet, an MPLS label of the second monitoring packet is generated according to a second LSP, a PW label of the second monitoring packet is generated according to a second PW, and the PW label comprises a fourth monitoring parameter of a second physical link connecting the second physical interface, a fifth monitoring parameter of the second LSP and a sixth monitoring parameter of the second PW; reading the fourth monitoring parameter according to the forwarding table, and determining the network performance of the second physical link according to the physical interface recording parameter and the fourth monitoring parameter; the fifth monitoring parameter is used to determine the network performance of the second LSP, and the sixth monitoring function parameter is used to determine the network performance of the second PW.
When the network performance includes network time delay, the fourth monitoring parameter is a first timestamp generated by another physical interface in the second physical link when the second monitoring packet is sent, the physical interface recording parameter is a second timestamp recorded when the second physical interface receives the second monitoring packet, the router reads the first timestamp from the fourth monitoring parameter according to an index entry in the forwarding table, and a difference value obtained by subtracting the first timestamp from the second timestamp is used as the network time delay of the second physical link.
When the network performance includes a packet loss rate, the fourth monitoring parameter is a first packet number of a data packet transmitted on the second physical link by another physical interface in the second physical link between the previous monitoring packet and the second monitoring packet. In the first implementation, the physical interface recording parameter includes a second packet number of a data packet received by the second physical interface on the second physical link, which is recorded when the second physical interface receives the second monitoring packet, and a third packet number of a data packet received by the second physical interface on the second physical link, which is recorded when the second physical interface receives the previous monitoring packet, the router reads the first packet number from the fourth monitoring parameter according to the index entry of the forwarding table, subtracts the second packet number from the third packet number to obtain a first difference value, and divides the second difference value obtained by subtracting the first difference value from the first packet number by the first packet number to obtain the packet loss rate. In a second implementation, the router calculates the packet loss rate of the second physical link and then clears the packet count of the data packet, so that the physical interface recording parameter is a fourth packet count of the data packet received by the second physical link at the second physical interface, which is recorded when the second physical interface receives the second monitoring packet, the router reads the first packet count from the fourth monitoring parameter according to the index entry of the forwarding table, and divides a third difference obtained by subtracting the fourth packet count from the first packet count by the first packet count to obtain the packet loss rate.
After the network performance of the second physical link is obtained, if the router is not the last router in the path and the LSPs in the router are not sticky, the router determines a third physical interface according to the forwarding table and the MPLS label of the second monitoring packet, where the third physical interface is a physical interface for forwarding the second monitoring packet; modifying the fourth monitoring parameter into a seventh monitoring parameter of a third physical link connected with the third physical interface, and sending a second monitoring packet from the third physical interface; wherein the seventh monitoring parameter is used to determine the network performance of the third physical link.
When the network performance includes network time delay, the router acquires a timestamp generated by the second physical interface when the second monitoring packet is sent, and replaces the timestamp with the first timestamp in the fourth monitoring parameter, where the modified fourth monitoring parameter is referred to as a seventh monitoring parameter in this embodiment. When the network performance includes the packet loss rate, the router obtains the packet number of the data packet sent on the second physical link by the second physical interface between the first monitoring packet and the second monitoring packet, and replaces the first packet number in the fourth monitoring parameter with the packet number, where this embodiment refers to the modified fourth monitoring parameter as the seventh monitoring parameter.
After the network performance of the second physical link is obtained, if the router is not the last router in the path and the LSPs in the router are adhered, the router acquires LSP recording parameters corresponding to the second LSP, which are determined when the second monitoring packet is received, reads fifth monitoring parameters according to the forwarding table and the MPLS label of the second monitoring packet, and determines the network performance of the second LSP according to the LSP recording parameters and the fifth monitoring parameters; determining a fourth physical interface connected with a fourth physical link overlapped by a third LPS and the third LSP according to the forwarding table and the MPLS label of the second monitoring packet, wherein the third LSP and the second LSP are adhered, and the adhesion of the third LSP and the second LSP means that the second PW is overlapped on the third LSP and the second LSP; modifying the fourth monitoring parameter into an eighth monitoring parameter of the fourth physical link, modifying the fifth monitoring parameter into a ninth monitoring parameter of the third LSP, and sending a second monitoring packet from the fourth physical interface; the eighth monitoring parameter is used to determine the network performance of the fourth physical link, and the ninth monitoring parameter is used to determine the network performance of the third LSP.
When the network performance includes network time delay, the fifth monitoring parameter is a third timestamp generated by a port 1 in the second LSP when the second monitoring packet is sent, the LSP recording parameter is a fourth timestamp recorded when the port 2 of the second LSP receives the second monitoring packet, the router reads the third timestamp from the fifth monitoring parameter according to an index entry in the forwarding table, and a difference obtained by subtracting the third timestamp from the fourth timestamp is used as the network time delay of the second LSP.
The router acquires a timestamp generated by a port of the third LSP when the second monitoring packet is sent, and replaces the timestamp with a third timestamp in the fifth monitoring parameter, where this embodiment refers to the modified fifth monitoring parameter as an eighth monitoring parameter.
When the network performance includes a packet loss rate, the fifth monitoring parameter is a fifth packet number of data packets sent on the second LSP by port 1 in the second LSP between sending the previous monitoring packet and the second monitoring packet. In the first implementation, the LSP recording parameter includes a sixth packet number of a data packet received by the port 2 on the second LSP, which is recorded when the port 2 on the second LSP receives the second monitoring packet, and a seventh packet number of a data packet received by the port 2 on the second LSP, which is recorded when the port 2 receives the previous monitoring packet, and the router reads the fifth packet number from the fifth monitoring parameter according to the index entry of the forwarding table, subtracts the sixth packet number from the seventh packet number to obtain a fourth difference value, and divides the fifth difference value obtained by subtracting the fourth difference value from the fifth packet number by the fifth packet number to obtain the packet loss ratio of the second LSP. In the second implementation, the router clears the packet count of the data packet after calculating the packet loss rate of the second LSP, so that the LSP recording parameter is the eighth packet count of the data packet received by the port 2 on the second LSP, which is recorded when the port 2 on the second LSP receives the second monitoring packet, the router reads the fifth packet count from the fifth monitoring parameter according to the index entry of the forwarding table, and divides a sixth difference obtained by subtracting the eighth packet count from the fifth packet count by the fifth packet count to obtain the packet loss rate of the second LSP.
The router obtains the packet number of the data packet sent on the second LSP by the port of the second LSP between the previous monitoring packet and the second monitoring packet, and replaces the fifth packet number in the fifth monitoring parameter with the packet number, where this embodiment refers to the modified fifth monitoring parameter as the eighth monitoring parameter.
After the network performance of the second physical link is obtained, if the router is the last router in the path, the router obtains an LSP recording parameter corresponding to the second LSP determined when the second monitoring packet is received, reads a fifth monitoring parameter according to the forwarding table and the MPLS label of the second monitoring packet, and determines the network performance of the second LSP according to the LSP recording parameter and the fifth monitoring parameter; and acquiring PW recording parameters corresponding to the second PW, which are determined when the second monitoring packet is received, reading sixth monitoring parameters according to the forwarding table and the PW label of the second monitoring packet, and determining the network performance of the second PW according to the PW recording parameters and the sixth monitoring parameters.
The process of determining the network performance of the second LSP by the router is described in the above steps, and is not described herein again.
When the network performance includes network time delay, the sixth monitoring parameter is a fifth timestamp generated by a port 1 in the second PW when the second monitoring packet is sent, the PW recording parameter is a sixth timestamp recorded when a port 2 of the second PW receives the second monitoring packet, the router reads the fifth timestamp from the fifth monitoring parameter according to an index entry in the forwarding table, and a difference value obtained by subtracting the fifth timestamp from the sixth timestamp is used as the network time delay of the second PW.
When the network performance includes the packet loss rate, the sixth monitoring parameter is a ninth packet number of the data packet sent by the port 1 in the second PW on the second PW between sending the previous monitoring packet and the second monitoring packet. In the first implementation, the PW recording parameter includes a tenth packet number of a data packet received by the port 2 on the second PW, which is recorded when the port 2 of the second PW receives the second monitor packet, and an eleventh packet number of a data packet received by the port 2 on the second PW, which is recorded when the port 2 receives the previous monitor packet, and the router reads the ninth packet number from the sixth monitor parameter according to the index entry of the forwarding table, subtracts the tenth packet number from the eleventh packet number to obtain a seventh difference value, and divides an eighth difference value obtained by subtracting the seventh difference value from the ninth packet number by the ninth packet number to obtain the packet loss ratio of the second PW. In a second implementation, the router clears the packet count of the data packet after calculating the packet loss rate of the second PW, so that the PW recording parameter is the twelfth packet number of the data packet received by the port 2 on the second PW, which is recorded when the port 2 of the second PW receives the second monitor packet, the router reads the twelfth packet number from the sixth monitor parameter according to the index entry of the forwarding table, and divides a ninth difference value obtained by subtracting the twelfth packet number from the ninth packet number by the ninth packet number to obtain the packet loss rate of the second PW.
In summary, in the performance monitoring method provided in the embodiment of the present invention, because the first PW is overlapped on the first LSP, and the first LSP is overlapped on the plurality of first physical links, the first monitoring packet transmitted on the first PW also needs to pass through the plurality of first physical links and the first LSP, so that the router can determine the network performance of the first physical link according to the first monitoring parameter in the first monitoring packet, determine the network performance of the first LSP according to the second monitoring parameter, and determine the network performance of the first PW according to the third monitoring parameter, thereby determining the network performance of the first physical link, the first LSP, and the first PW simultaneously by using one first monitoring packet, and reducing the occupation of the network performance monitoring on the bandwidth.
Since the path determined by the router is different from any one of the at least one path of the at least one monitoring packet transmitted in the plurality of monitoring packets, the router may transmit the monitoring packets from all the paths associated with the first physical interface, and thus, may monitor the network performance of the first physical link, the network performance of the at least one LSP overlaid on the first physical link, the network performance of the PWs overlaid on each of the at least one LSP, and expand the range of use of network performance monitoring.
The generation process of the first supervision packet inside the router will be described in detail below. Referring to fig. 6, a flowchart of a packet generation method according to an exemplary embodiment of the present invention is shown. The packet generation method comprises the following steps:
step 601, the router acquires the first monitoring parameter, the second monitoring parameter and the third monitoring parameter, and generates a first monitoring packet including the LSP label, the PW label, the first monitoring parameter, the second monitoring parameter and the third monitoring parameter.
The first monitoring parameter is used for determining the network performance of a first physical link, the first physical link is a physical link connected with a first physical interface, and the first physical interface is a physical interface for sending a first monitoring packet; the second monitoring parameter is used for determining the network performance of the first LSP; the third monitoring function parameter is used to determine network performance of the first PW.
Specifically, the router generates a first monitoring packet, including: setting the value of the type indicator bit to a first value; adding the first LSP label and the first PW label to the first monitoring packet in sequence; after the first monitoring parameter, the second monitoring parameter, and the third monitoring parameter are sequentially added to the first PW label, a first monitoring packet is obtained, and the obtained first monitoring packet is as shown in fig. 4.
When acquiring the monitoring parameter, in a first implementation, the router determines the first PW/first LSP/first physical interface, sequentially acquires a third monitoring parameter generated by the first PW, a second monitoring parameter generated by the first LSP, and a first monitoring parameter generated by the first physical interface, and respectively encapsulates the third monitoring parameter, the second monitoring parameter, and the first monitoring parameter into the first monitoring packet. For example, when the network performance includes network latency, the monitoring parameter includes a timestamp, the router acquires a timestamp 3 generated by a port of the first PW, acquires a timestamp 2 generated by a port of the first LSP, acquires a timestamp 1 generated by the first physical interface, and encapsulates the timestamp 3 as the third monitoring parameter, the timestamp 2 as the second monitoring parameter, and the timestamp 1 as the first monitoring parameter in the first monitoring packet, respectively.
When acquiring the monitoring parameter, in a second implementation, the router determines the first PW/first LSP/first physical interface, sequentially acquires a first monitoring parameter generated by the first physical interface, a second monitoring parameter generated by the first LSP, and a third monitoring parameter generated by the first PW, and respectively encapsulates the first monitoring parameter, the second monitoring parameter, and the third monitoring parameter into the first monitoring packet. For example, when the network performance includes network latency, the monitoring parameter includes a timestamp, the router acquires a timestamp 1 generated by the first physical interface, acquires a timestamp 2 generated by a port of the first LSP, acquires a timestamp 3 generated by a port of the first PW, and encapsulates the timestamp 1 as the first monitoring parameter, the timestamp 2 as the second monitoring parameter, and the timestamp 3 as the third monitoring parameter in the first monitoring packet respectively.
When the router in this embodiment is the first router in the path, the router may generate the first monitoring packet according to the above two implementations. When the router in this embodiment is not the first router in the path and the LSPs in the router are stuck, the router may modify the received first monitoring packet to obtain a new first monitoring packet.
Specifically, if the received first monitoring packet includes a tenth monitoring parameter, an eleventh monitoring parameter, and a third monitoring parameter, where the tenth monitoring parameter is used to determine the network performance of a fifth physical link, the fifth physical link is a physical link connected to a fifth physical interface that receives the first monitoring packet, the eleventh monitoring parameter is used to determine the network performance of a fourth LSP that overlaps the fifth physical link, and the third monitoring parameter is used to determine the network performance of the first PW, the router acquires the first monitoring parameter and the second monitoring parameter, modifies the tenth monitoring parameter into the first monitoring parameter, and modifies the eleventh monitoring parameter into the second monitoring parameter, so as to obtain a new monitoring packet. The two ways of obtaining the first monitoring parameter and the second monitoring parameter are described in detail in the above two implementations.
Before modifying the received first monitoring packet, the router determines the network performance of a fifth physical link according to a tenth monitoring parameter, determines the network performance of a fourth LSP according to an eleventh monitoring parameter when a fifth physical interface corresponds to a POP operation, and determines to modify the first monitoring packet when a port of the fourth LSP corresponds to a SWAP operation or a SWAP GO operation.
The packet generation method provided by this embodiment further includes: and negotiating a forwarding table with a router receiving the first monitoring packet, wherein each index entry in the forwarding table comprises a label, an offset of a position of a monitoring parameter corresponding to the label in the first monitoring packet from a position of a label at the bottom of a stack, and an operation corresponding to the label.
The CPU in the router negotiates the path of the first monitoring packet with each router receiving the first monitoring packet, acquires the offset between the position of the monitoring parameter and the position of the bottom label of the stack by a protocol negotiation path or a static configuration path or a mode that a user directly configures the offset, and generates a forwarding table.
The value of the tag in the first supervision packet is the same as the value of the tag in the index entry. For example, if the first LSP label is 1028, the label of the corresponding index entry in the forwarding table is 1028.
The operation corresponding to the label is determined according to the path in the router table. For example, when the first physical interface needs to send the first monitoring packet to the port of the first LSP, the operation corresponding to the first physical interface is a POP operation; when the first physical interface needs to send the monitoring packet to the physical interfaces in other routers, the operation corresponding to the first physical interface is the SWAP operation; when the port of the first LSP needs to send the first monitoring packet to the port of the first PW, the operation corresponding to the port of the first LSP is a POP operation; when the port of the first LSP needs to send the first monitoring packet to the port of the second LSP, the operation corresponding to the port of the first LSP is SWAP GO operation.
It should be noted that, since the field in the first monitoring packet does not include the tag of the physical interface, after receiving the first monitoring packet through the first physical interface, the first physical interface may directly search the forwarding table for the default index entry.
In step 602, the router sends a first monitoring packet from a first physical interface.
Optionally, before the router generates the first monitoring packet, the method further includes: enabling the port of the first LSP to enable the port of the first LSP to have the monitoring capability of network performance; and enabling the port of the first PW to enable the port of the first PW to have the monitoring capability of the network performance.
Wherein enabling the port of the first LSP comprises: reading attribute information of the first physical interface, detecting whether the attribute information indicates that the first physical interface has monitoring capability of network performance, and enabling a port of the first LSP when the attribute information indicates that the first physical interface has monitoring capability.
After the router enables the port of the first LSP, the attribute information of the port of the first LSP also needs to be modified, so that the modified attribute information indicates that the port of the first LSP has monitoring capability.
Specifically, when the first physical interface is enabled, if the router has not deployed the first LSP, after the router has deployed the first LSP, the port of the first LSP is enabled, and the attribute information of the first LSP is modified to indicate that the first LSP has monitoring capability; when the attribute information indicates that the first physical interface does not have monitoring capability, the port of the first LSP is not enabled. If the router deploys the first LSP when the first physical interface is enabled, the port of the first LSP reads the attribute information of the first physical interface at regular time, and when the attribute information indicates that the first physical interface has monitoring capability, the port of the first LSP is enabled, and the attribute information of the first LSP is modified to indicate that the first LSP has monitoring capability; when the attribute information indicates that the first physical interface does not have monitoring capability, the port of the first LSP is not enabled.
Similarly, the procedure for enabling the port of the first PW is the same as the procedure for enabling the port of the first LSP, and is not described here again.
In summary, in the performance monitoring method provided in the embodiment of the present invention, when the port of the first LSP detects that the first physical interface has the monitoring capability of network performance, the port of the first LSP is automatically enabled, and a monitoring person does not need to manually enable the port of the first LSP, which not only saves manpower, but also improves the enabling efficiency of the port of the first LSP; when the port of the first PW detects that the port of the first LSP has the monitoring capability of the network performance, the port of the first PW is enabled automatically, and monitoring personnel do not need to enable the port of the first PW manually, so that the labor can be saved, and the enabling efficiency of the first PW can be improved.
The following describes the processing procedure of the second control packet inside the router in detail. Referring to fig. 7, a flowchart of a performance determination method according to an exemplary embodiment of the present invention is shown. The performance determination method comprises the following steps:
in step 701, the router receives a second monitoring packet.
The second monitoring packet comprises a plurality of fields which are sequentially an LSP label, a PW label, a fourth monitoring parameter, a fifth monitoring parameter and a sixth monitoring parameter, wherein the fourth monitoring parameter is used for determining the network performance of a second physical link, the second physical link is a physical link connected with a second physical interface, and the second physical interface is a physical interface for receiving the second monitoring packet; the fifth monitoring parameter is used for determining the network performance of the second LSP; the sixth monitoring parameter is used to determine network performance of the second PW.
In step 702, the router reads the fourth monitoring parameter in the second monitoring packet, and determines the network performance of the second physical link according to the fourth monitoring parameter.
When reading the fourth monitoring parameter, the router analyzes the second monitoring packet to obtain the position of the bottom label of the stack, reads the default index entry from the forwarding table, reads the offset1 from the default index entry, and reads the fourth monitoring parameter according to the position of the bottom label of the stack and the offset 1. The process of the router determining the network performance of the second physical link according to the fourth monitoring parameter is described in detail in the embodiment shown in fig. 5.
After obtaining the network performance of the second physical link, the router determines the operation corresponding to the second physical interface according to the default index entry, and if the operation corresponding to the second physical interface is a POP operation, the step 703 is executed; when the operation corresponding to the second physical interface is the SWAP operation, the router determines a third physical interface according to the forwarding table and the MPLS label of the second monitoring packet, wherein the third physical interface is a physical interface for forwarding the second monitoring packet; modifying the fourth monitoring parameter into a seventh monitoring parameter of a third physical link connected with the third physical interface, and sending a second monitoring packet from the third physical interface; wherein the seventh monitoring parameter is used to determine the network performance of the third physical link.
In step 703, the router reads a fifth monitoring parameter according to the second LSP label in the second monitoring packet, and determines the network performance of the second LSP according to the fifth monitoring parameter.
When the fifth monitoring parameter is read, the router reads the second LSP label from the second monitoring packet, searches the forwarding table for an index entry including the second LSP label, reads offset2 from the searched index entry, and reads the fifth monitoring parameter according to the position of the bottom-of-stack label and offset 2. The process of the router determining the network performance of the second LSP according to the fifth monitoring parameter is described in detail in the embodiment shown in fig. 5.
After obtaining the network performance of the second LSP, the router determines, according to the found index entry, an operation corresponding to the port of the second LSP, and if the operation corresponding to the port of the second LSP is a POP operation, performs step 704; when the operation corresponding to the port of the second LSP is SWAP GO operation, the router determines a fourth physical interface connected with a fourth physical link overlapped by a third LPS and the third LSP according to the forwarding table and the MPLS label of the second monitoring packet, wherein the third LSP and the second LSP are adhered, and the adhesion of the third LSP and the second LSP means that the second PW is overlapped on the third LSP and the second LSP; modifying the fourth monitoring parameter into an eighth monitoring parameter of the fourth physical link, modifying the fifth monitoring parameter into a ninth monitoring parameter of the third LSP, and sending a second monitoring packet from the fourth physical interface; the eighth monitoring parameter is used to determine the network performance of the fourth physical link, and the ninth monitoring parameter is used to determine the network performance of the third LSP.
Step 704, the router reads a sixth monitoring parameter according to the second PW label in the second monitoring packet, and determines the network performance of the second PW according to the sixth monitoring parameter.
When reading the sixth monitoring parameter, the router reads the second PW label from the second monitoring packet, searches the index entry including the second PW label in the forwarding table, reads offset3 from the searched index entry, and reads the sixth monitoring parameter according to the position of the bottom-of-stack label and offset 3. The process of the router determining the network performance of the second PW based on the sixth monitoring parameter is described in detail in the embodiment shown in fig. 5.
Referring to fig. 8, a block diagram of a performance monitoring apparatus according to an exemplary embodiment of the present invention is shown. The performance monitoring device may be implemented as all or part of a router in software, hardware, or a combination of both. The performance monitoring apparatus may include: determination unit 810, generation unit 820, and transmission unit 830.
A determining unit 810, configured to implement the functions of step 501.
A generating unit 820, configured to implement the function of step 502 described above.
A sending unit 830, configured to implement the function of step 503.
The relevant details may be combined with the method embodiment described with reference to fig. 5.
It should be noted that the determining unit 810 and the generating unit 820 may be implemented by a processor in a router; the transmitting unit 830 may determine a transmitting timing by a processor in the router, and be implemented by the transceiver.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the apparatuses and units described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units may be merely a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (15)

1. A method of performance monitoring, the method comprising:
before a first monitoring packet is sent by a first physical interface of a router, the router determines the path of the first monitoring packet according to a forwarding table, wherein a path of the first monitoring packet is a path different from any one of at least one path of at least one monitoring packet transmitted among a plurality of monitoring packets among all paths related to the first physical interface in the forwarding table, the first physical interface transmits the plurality of monitoring packets, the first monitoring packet is a monitoring packet to be transmitted currently in the plurality of monitoring packets, all paths associated with the first physical interface include at least one Label Switched Path (LSP) that overlaps onto the first physical link and Pseudowires (PWs) that overlap onto individual ones of the at least one LSP, a path of the first supervision packet includes a first LSP and a first PW overlapping over the first LSP;
generating the first monitoring packet according to the path of the first monitoring packet, where the first monitoring packet is a multiprotocol label switching (MPLS) packet, an MPLS label of the first monitoring packet is generated according to the first LSP, a Pseudo Wire (PW) label of the first monitoring packet is generated according to the first PW, and a first monitoring parameter of a first physical link connecting the first physical interface, a second monitoring parameter of the first LSP, and a third monitoring parameter of the first PW are included behind the PW label;
transmitting the first monitoring packet from the first physical interface;
wherein the first monitoring parameter is used to determine the network performance of the first physical link, the second monitoring parameter is used to determine the network performance of the first LSP, and the third monitoring parameter is used to determine the network performance of the first PW.
2. The method of claim 1, further comprising:
the router receives a second monitoring packet by using a second physical interface, and acquires physical interface recording parameters corresponding to the second physical interface, which are determined when the second monitoring packet is received, wherein the second monitoring packet is an MPLS packet, an MPLS label of the second monitoring packet is generated according to a second LSP, a PW label of the second monitoring packet is generated according to a second PW, and the PW label comprises a fourth monitoring parameter of a second physical link connecting the second physical interface, a fifth monitoring parameter of the second LSP and a sixth monitoring parameter of the second PW;
reading the fourth monitoring parameter according to the forwarding table, and determining the network performance of the second physical link according to the physical interface recording parameter and the fourth monitoring parameter;
wherein the fifth monitoring parameter is used to determine the network performance of the second LSP, and the sixth monitoring parameter is used to determine the network performance of the second PW.
3. The method of claim 2, further comprising, after said determining the network performance of the second physical link according to the physical interface recording parameter and the fourth monitoring parameter:
the router determines a third physical interface according to the forwarding table and the MPLS label of the second monitoring packet, where the third physical interface is a physical interface for forwarding the second monitoring packet;
modifying the fourth monitoring parameter into a seventh monitoring parameter of a third physical link connected with the third physical interface, and sending the second monitoring packet from the third physical interface;
wherein the seventh monitoring parameter is used to determine the network performance of the third physical link.
4. The method of claim 2, further comprising, after said determining the network performance of the second physical link according to the physical interface recording parameter and the fourth monitoring parameter:
the router acquires LSP recording parameters corresponding to the second LSP determined when receiving the second monitoring packet, reads the fifth monitoring parameters according to the forwarding table and the MPLS label of the second monitoring packet, and determines the network performance of the second LSP according to the LSP recording parameters and the fifth monitoring parameters;
determining a fourth physical interface connected to a fourth physical link overlapped by a third LSP and the third LSP according to the forwarding table and an MPLS label of the second monitoring packet, wherein the third LSP and the second LSP are adhered, and the adhesion of the third LSP and the second LSP means that the second PW is overlapped on the third LSP and the second LSP;
modifying the fourth monitoring parameter to an eighth monitoring parameter of the fourth physical link, modifying the fifth monitoring parameter to a ninth monitoring parameter of the third LSP, and sending the second monitoring packet from the fourth physical interface;
wherein the eighth monitoring parameter is used to determine the network performance of the fourth physical link, and the ninth monitoring parameter is used to determine the network performance of the third LSP.
5. The method of claim 2, further comprising, after said determining the network performance of the second physical link according to the physical interface recording parameter and the fourth monitoring parameter:
the router acquires LSP recording parameters corresponding to the second LSP determined when receiving the second monitoring packet, reads the fifth monitoring parameters according to the forwarding table and the MPLS label of the second monitoring packet, and determines the network performance of the second LSP according to the LSP recording parameters and the fifth monitoring parameters;
obtaining PW recording parameters corresponding to the second PW, which are determined when the second monitoring packet is received, reading the sixth monitoring parameters according to the forwarding table and the PW label of the second monitoring packet, and determining the network performance of the second PW according to the PW recording parameters and the sixth monitoring parameters.
6. A performance monitoring apparatus, the apparatus comprising:
a determining unit, configured to determine a path of a first monitoring packet according to a forwarding table before the first monitoring packet is sent by a first physical interface of a router, wherein a path of the first monitoring packet is a path different from any one of at least one path of at least one monitoring packet transmitted among a plurality of monitoring packets among all paths related to the first physical interface in the forwarding table, the first physical interface transmits the plurality of monitoring packets, the first monitoring packet is a monitoring packet to be transmitted currently in the plurality of monitoring packets, all paths associated with the first physical interface include at least one Label Switched Path (LSP) that overlaps onto the first physical link and Pseudowires (PWs) that overlap onto individual ones of the at least one LSP, a path of the first supervision packet includes a first LSP and a first PW overlapping over the first LSP;
a generating unit, configured to generate the first monitoring packet according to the path of the first monitoring packet determined by the determining unit, where the first monitoring packet is a multi-protocol label switching (MPLS) packet, an MPLS label of the first monitoring packet is generated according to the first LSP, a PW label of the first monitoring packet is generated according to the first PW, and a first monitoring parameter of a first physical link connecting the first physical interface, a second monitoring parameter of the first LSP, and a third monitoring parameter of the first PW are included behind the PW label;
a transmitting unit, configured to transmit the first monitoring packet generated by the generating unit from the first physical interface;
wherein the first monitoring parameter is used to determine the network performance of the first physical link, the second monitoring parameter is used to determine the network performance of the first LSP, and the third monitoring parameter is used to determine the network performance of the first PW.
7. The apparatus of claim 6, further comprising:
a receiving unit, configured to receive a second monitoring packet through a second physical interface, and obtain a physical interface recording parameter corresponding to the second physical interface, where the physical interface recording parameter is determined when the second monitoring packet is received, the second monitoring packet is an MPLS packet, an MPLS label of the second monitoring packet is generated according to a second LSP, a PW label of the second monitoring packet is generated according to a second PW, and the PW label includes a fourth monitoring parameter of a second physical link connecting the second physical interface, a fifth monitoring parameter of the second LSP, and a sixth monitoring parameter of the second PW;
the determining unit is further configured to read the fourth monitoring parameter according to the forwarding table, and determine the network performance of the second physical link according to the physical interface recording parameter and the fourth monitoring parameter;
wherein the fifth monitoring parameter is used to determine the network performance of the second LSP, and the sixth monitoring parameter is used to determine the network performance of the second PW.
8. The apparatus of claim 7,
the determining unit is further configured to determine, after determining the network performance of the second physical link according to the physical interface recording parameter and the fourth monitoring parameter, a third physical interface according to the forwarding table and the MPLS label of the second monitoring packet, where the third physical interface is a physical interface for forwarding the second monitoring packet;
the sending unit is further configured to modify the fourth monitoring parameter into a seventh monitoring parameter of a third physical link connected to the third physical interface, and send the second monitoring packet from the third physical interface;
wherein the seventh monitoring parameter is used to determine the network performance of the third physical link.
9. The apparatus of claim 7,
the determining unit is further configured to, after determining the network performance of the second physical link according to the physical interface recording parameter and the fourth monitoring parameter, obtain an LSP recording parameter corresponding to the second LSP, which is determined when the second monitoring packet is received, read the fifth monitoring parameter according to the forwarding table and the MPLS label of the second monitoring packet, and determine the network performance of the second LSP according to the LSP recording parameter and the fifth monitoring parameter;
the determining unit is further configured to determine, according to the forwarding table and the MPLS label of the second monitoring packet, a fourth physical interface connected to a fourth physical link where a third LSP and the third LSP are overlapped, where the third LSP and the second LSP are stuck, and the sticking of the third LSP and the second LSP means that the second PW is overlapped on the third LSP and the second LSP;
the sending unit is further configured to modify the fourth monitoring parameter into an eighth monitoring parameter of the fourth physical link, modify the fifth monitoring parameter into a ninth monitoring parameter of the third LSP, and send the second monitoring packet from the fourth physical interface;
wherein the eighth monitoring parameter is used to determine the network performance of the fourth physical link, and the ninth monitoring parameter is used to determine the network performance of the third LSP.
10. The apparatus of claim 7,
the determining unit is further configured to, after determining the network performance of the second physical link according to the physical interface recording parameter and the fourth monitoring parameter, obtain an LSP recording parameter corresponding to the second LSP, which is determined when the second monitoring packet is received, read the fifth monitoring parameter according to the forwarding table and the MPLS label of the second monitoring packet, and determine the network performance of the second LSP according to the LSP recording parameter and the fifth monitoring parameter;
the determining unit is further configured to acquire a PW recording parameter corresponding to the second PW determined when the second monitoring packet is received, read the sixth monitoring parameter according to the forwarding table and the PW label of the second monitoring packet, and determine the network performance of the second PW according to the PW recording parameter and the sixth monitoring parameter.
11. A router, the router comprising: the monitoring system comprises a processor and a first physical interface connected with the processor, wherein the first physical interface sends a plurality of monitoring packets, and the monitoring packet to be sent currently in the plurality of monitoring packets is a first monitoring packet;
the processor is configured to determine, before the first monitoring packet is sent by the first physical interface, a path of the first monitoring packet according to a forwarding table, where the path of the first monitoring packet is a path that is different from any one of all paths related to the first physical interface in the forwarding table and at least one path of at least one monitoring packet that has been sent in a plurality of monitoring packets, all paths related to the first physical interface include at least one label switched path LSP that overlaps on a first physical link and a pseudowire PW that overlaps on each LSP in the at least one LSP, and the path of the first monitoring packet includes a first LSP and a first PW that overlaps on the first LSP;
the processor is further configured to generate the first monitoring packet according to a path of the first monitoring packet, where the first monitoring packet is a multiprotocol label switching (MPLS) packet, an MPLS label of the first monitoring packet is generated according to the first LSP, a PW label of the first monitoring packet is generated according to the first PW, and the PW label includes a first monitoring parameter of a first physical link connecting the first physical interface, a second monitoring parameter of the first LSP, and a third monitoring parameter of the first PW;
the first physical interface is used for sending the first monitoring packet generated by the processor;
wherein the first monitoring parameter is used to determine the network performance of the first physical link, the second monitoring parameter is used to determine the network performance of the first LSP, and the third monitoring parameter is used to determine the network performance of the first PW.
12. The router of claim 11, further comprising a second physical interface;
the second physical interface is also used for receiving a second monitoring packet;
the processor is further configured to acquire a physical interface recording parameter corresponding to the second physical interface, which is determined when the second monitoring packet is received, where the second monitoring packet is an MPLS packet, an MPLS label of the second monitoring packet is generated according to a second LSP, a PW label of the second monitoring packet is generated according to a second PW, and a fourth monitoring parameter of a second physical link connecting the second physical interface, a fifth monitoring parameter of the second LSP, and a sixth monitoring parameter of the second PW are included behind the PW label;
the processor is further configured to read the fourth monitoring parameter according to the forwarding table, and determine the network performance of the second physical link according to the physical interface recording parameter and the fourth monitoring parameter;
wherein the fifth monitoring parameter is used to determine the network performance of the second LSP, and the sixth monitoring parameter is used to determine the network performance of the second PW.
13. The router of claim 12, further comprising a third physical interface;
the processor is further configured to determine, after determining the network performance of the second physical link according to the physical interface recording parameter and the fourth monitoring parameter, a third physical interface according to the forwarding table and an MPLS label of the second monitoring packet, where the third physical interface is a physical interface for forwarding the second monitoring packet;
the processor is further configured to modify the fourth monitoring parameter into a seventh monitoring parameter of a third physical link connected to the third physical interface;
the third physical interface is further configured to send the second monitoring packet;
wherein the seventh monitoring parameter is used to determine the network performance of the third physical link.
14. The router of claim 12, further comprising a fourth physical interface;
the processor is further configured to, after determining the network performance of the second physical link according to the physical interface recording parameter and the fourth monitoring parameter, acquire an LSP recording parameter corresponding to the second LSP, which is determined when the second monitoring packet is received, read the fifth monitoring parameter according to the forwarding table and the MPLS label of the second monitoring packet, and determine the network performance of the second LSP according to the LSP recording parameter and the fifth monitoring parameter;
the processor is further configured to determine, according to the forwarding table and an MPLS label of the second monitoring packet, a fourth physical interface connected to a fourth physical link where a third LSP and the third LSP are overlapped, where the third LSP and the second LSP are stuck, and the sticking of the third LSP and the second LSP means that the second PW is overlapped on the third LSP and the second LSP;
the processor is further configured to modify the fourth monitoring parameter to an eighth monitoring parameter of the fourth physical link, and modify the fifth monitoring parameter to a ninth monitoring parameter of the third LSP;
the fourth physical interface is further configured to send the second monitoring packet;
wherein the eighth monitoring parameter is used to determine the network performance of the fourth physical link, and the ninth monitoring parameter is used to determine the network performance of the third LSP.
15. The router according to claim 12,
the processor is further configured to, after determining the network performance of the second physical link according to the physical interface recording parameter and the fourth monitoring parameter, acquire an LSP recording parameter corresponding to the second LSP, which is determined when the second monitoring packet is received, read the fifth monitoring parameter according to the forwarding table and the MPLS label of the second monitoring packet, and determine the network performance of the second LSP according to the LSP recording parameter and the fifth monitoring parameter;
the processor is further configured to acquire a PW recording parameter determined when the second monitoring packet is received, read the sixth monitoring parameter according to the forwarding table and the PW label of the second monitoring packet, and determine the network performance of the second PW according to the PW recording parameter and the sixth monitoring parameter.
CN201610486103.2A 2016-06-28 2016-06-28 Performance monitoring method and device and router Active CN107547291B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610486103.2A CN107547291B (en) 2016-06-28 2016-06-28 Performance monitoring method and device and router

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610486103.2A CN107547291B (en) 2016-06-28 2016-06-28 Performance monitoring method and device and router

Publications (2)

Publication Number Publication Date
CN107547291A CN107547291A (en) 2018-01-05
CN107547291B true CN107547291B (en) 2021-02-12

Family

ID=60962295

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610486103.2A Active CN107547291B (en) 2016-06-28 2016-06-28 Performance monitoring method and device and router

Country Status (1)

Country Link
CN (1) CN107547291B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108600105B (en) * 2018-03-15 2020-10-16 新华三技术有限公司 Forwarding hardware resource allocation method and device and communication equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102377677A (en) * 2011-11-21 2012-03-14 盛科网络(苏州)有限公司 Method and system for quickly switching protection paths in multi-protocol label switching (MPLS) network
CN103731288A (en) * 2012-10-16 2014-04-16 杭州华三通信技术有限公司 Message forwarding method and device
CN104618233A (en) * 2013-11-05 2015-05-13 中兴通讯股份有限公司 VPLS cross-domain redundancy protection method and system
WO2015172493A1 (en) * 2014-05-16 2015-11-19 中兴通讯股份有限公司 Data processing method and apparatus and network device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102377677A (en) * 2011-11-21 2012-03-14 盛科网络(苏州)有限公司 Method and system for quickly switching protection paths in multi-protocol label switching (MPLS) network
CN103731288A (en) * 2012-10-16 2014-04-16 杭州华三通信技术有限公司 Message forwarding method and device
CN104618233A (en) * 2013-11-05 2015-05-13 中兴通讯股份有限公司 VPLS cross-domain redundancy protection method and system
WO2015172493A1 (en) * 2014-05-16 2015-11-19 中兴通讯股份有限公司 Data processing method and apparatus and network device

Also Published As

Publication number Publication date
CN107547291A (en) 2018-01-05

Similar Documents

Publication Publication Date Title
JP7479490B2 (en) Packet processing method and apparatus, network device, and storage medium
JP6447839B2 (en) Method, apparatus and system for implementing delay measurement
CN112262553B (en) Apparatus and method for tracking packets in a packet processing pipeline of a software defined network switch
US20170373966A1 (en) Packet Transmission Method, Node, Path Management Server and Storage Medium
CN108809759A (en) Detect the method, apparatus and router of link state
EP4080835A1 (en) Packet processing method, apparatus and system
CN106936656B (en) Method, device and system for realizing packet loss detection
CN109587059B (en) SR-BE inner layer tunnel label configuration method, device and communication system
CN112262549A (en) Robust node failure detection mechanism for SDN controller cluster
US11606288B2 (en) Network communication method and apparatus
US10972381B2 (en) Network operations reactive to operations data included in seamless bidirectional forwarding detection (S-BFD) packets
WO2017000802A1 (en) Service fault location method and device
CN112868214A (en) Coordinated load transfer, OAM, recording within packets
CN105656776A (en) Pseudo-wire dual-homing protection switching system, method and device
CN110290017B (en) Fault node positioning method and PE equipment
CN107547291B (en) Performance monitoring method and device and router
CN104506369A (en) Packet loss position detecting method and device
CN109150707B (en) Routing path analysis method and device
US9444728B2 (en) Packet switching device including cascaded aggregation nodes
CN114629843A (en) Message processing method and device
CN104378245A (en) Method and device for implementing OAM (operation, administration and maintenance) on AC (attachment circuit) port of L2VPN (layer 2 virtual private network) architecture
CN111726287B (en) Ring network protection method and device
US20230261977A1 (en) Method for Selecting Packet Sending Path, Device, and Medium
US20230379246A1 (en) Method and Apparatus for Performing Protection Switching in Segment Routing SR Network
EP4246897A1 (en) Method, apparatus, and system for managing tunnel

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
TR01 Transfer of patent right

Effective date of registration: 20211228

Address after: 450046 Floor 9, building 1, Zhengshang Boya Plaza, Longzihu wisdom Island, Zhengdong New Area, Zhengzhou City, Henan Province

Patentee after: Super fusion Digital Technology Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right