WO2022062931A1 - 网络异常确定方法及装置 - Google Patents

网络异常确定方法及装置 Download PDF

Info

Publication number
WO2022062931A1
WO2022062931A1 PCT/CN2021/117865 CN2021117865W WO2022062931A1 WO 2022062931 A1 WO2022062931 A1 WO 2022062931A1 CN 2021117865 W CN2021117865 W CN 2021117865W WO 2022062931 A1 WO2022062931 A1 WO 2022062931A1
Authority
WO
WIPO (PCT)
Prior art keywords
packets
packet
measurement
path
response
Prior art date
Application number
PCT/CN2021/117865
Other languages
English (en)
French (fr)
Inventor
高红亮
李洪峰
路小刚
李东锋
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022062931A1 publication Critical patent/WO2022062931A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0677Localisation of faults
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss

Definitions

  • the present application relates to the field of communication technologies, and in particular, to a method and apparatus for determining network anomalies.
  • Network anomalies refer to transmission delays or packet loss problems in the transmission network due to equipment or link problems, including link anomalies such as flickering, light attenuation, physical anomalies such as equipment or chip processing, or due to excessive network traffic.
  • data will be transmitted from the source end to the sink end along one of the links.
  • the link includes the source end, the sink end, the transmission line and the intermediate nodes that pass through, which is an end-to-end transmission path.
  • the source end There may be multiple transmission paths to the sink.
  • BFD bidirectional forwarding detection
  • the embodiments of the present application provide a network abnormality determination method and device, which can realize fast and accurate network abnormality determination without requiring additional software deployment and hardware support.
  • a first aspect provides a method for determining network anomalies, the method comprising: a source end sending N1 first measurement packets and M1 second measurement packets to a sink end through a first path, wherein the first measurement packets The message is a high-priority message, the second measurement message is a normal priority message, and the high-priority message is a message that is not affected by congestion; the source end receives the N2 One response packet and M2 second response packets, the first response packet is generated according to the first measurement packet, the second response packet is generated according to the second measurement packet, and the first response packet is generated according to the second measurement packet.
  • the first response packet and the second response packet are high-priority packets; the source determines whether the first path is abnormal in the network according to the first response packet and the second response packet.
  • the source end sends a first measurement packet with a high priority and a measurement packet with a normal priority, so that the source end determines the measurement packet according to the response packets of the two transmission packets with different priorities.
  • This process does not require additional software deployment and hardware support, and measurement packets can be sent in any packet sending period to determine network anomalies in this period, reducing resource consumption for determining network anomalies. The range and accuracy of network abnormality determination are guaranteed.
  • the source end sends N1 first measurement packets in the first period, and/or sends M1 second measurement packets in the second period.
  • the sending period of the first measurement packet and the second measurement packet may be the same or different, and the same sending period may help the source end determine the abnormal situation of the network according to the response packets of the two measurement packets , to improve the efficiency and accuracy of determination; in some cases, some network abnormalities can also be obtained according to one measurement packet, and sending the first measurement packet and the second measurement packet according to different periods can reduce one of the measurements. The number of packets sent to reduce the resource overhead of data processing.
  • setting the time interval between the first measurement packet and the second measurement packet with the corresponding relationship is smaller than the first preset time interval, so that the source end can make the first measurement packet and the second measurement packet based on the first measurement packet and the second measurement packet.
  • the waiting time is shorter, which improves the efficiency of network anomaly determination.
  • determining whether the first path is abnormal according to the first response packet and the second response packet includes: obtaining the first time when the source end sends N1 first measurement packets, and the source end The second time at which M1 second measurement packets are sent; the third time at which the sink terminal receives N1 first measurement packets is determined according to the N2 first response packets, and the M1 first measurement packet received by the sink terminal is determined according to the M2 response packets. 2.
  • the fourth time of the measurement packet the first transmission delay of the first measurement packet is determined according to the first time and the third time, and the second transmission delay of the second measurement packet is determined according to the second time and the fourth time ; Determine whether there is link congestion on the first path according to the difference between the first transmission delay and the second transmission delay.
  • determining whether the first path is abnormal in the network according to the first response packet and the second response packet includes: determining the number of packets sent before the source end sends N1 first measurement packets. 1. The number of sent packets; determine the number of received packets before the sink receives the N1 first measurement packets according to the N2 first response packets, as the number of first received packets; Whether a path has a physical path abnormality, the packet difference value of the first channel is the difference value of the first number of sent packets and the first number of received packets.
  • determining whether the first path is abnormal according to the first response packet and the second response packet further includes: determining according to the number of packets sent before the source end sends M1 second measurement packets The second number of sent packets; the number of sent packets before the sink receives M1 second measurement packets is determined according to the M2 second response packets, as the second number of received packets; according to the second channel packet difference, Combining whether there is link congestion on the first path and whether the physical path on the first link is abnormal, determine whether there is congestion and packet loss on the first path, and the packet difference on the second path is the second number of sent packets and the second number of received packets. difference value.
  • the first number of sent packets and the first number of received packets are the number of packets of the same priority and/or higher priority as the first measurement packet.
  • the second number of sent packets and the second number of received packets are the number of packets of all priorities.
  • the method further includes: adding a first timestamp and a second timestamp to the first measurement packet and the second measurement packet, respectively, where the first timestamp is used to determine the first time, The second timestamp is used to determine the second time; and/or
  • the third timestamp and the fourth timestamp in the first response packet and the second response packet are acquired, where the third timestamp is used to determine the third time, and the fourth timestamp is used to determine the fourth time.
  • the method further includes: adding a packet count or packet occupied bytes to the first measurement packet to determine the first number of sent packets; and/or acquiring a first response packet The packet count or the bytes occupied by the packet are used to determine the number of first received packets.
  • the method further includes: adding a packet count or packet occupied bytes to the second measurement packet, so as to determine the number of the second sent packets; and/or acquiring a second response packet The packet count or the bytes occupied by the packet are used to determine the number of second received packets.
  • the difference between the first transmission delay and the second transmission delay is less than or equal to the first preset threshold, it is determined that there is no link congestion on the first path; If the difference between the delay and the second transmission delay is greater than the first preset threshold, it is determined that there is link congestion on the first path.
  • the packet difference value of the first path is greater than the second preset threshold, it is determined that there is a physical path abnormality on the first path; if the packet difference value of the first path is less than or equal to the second preset threshold If the threshold is set, it is determined that the physical path on the first path is normal.
  • the packet difference value of the second path is less than or equal to a third preset threshold, it is determined that the first path
  • the abnormality of the physical path existing on one path is light attenuation or flashing; if the difference between the packets of the second path is greater than the third preset threshold, it is determined that the abnormality of the physical path existing on the first path is the link interruption.
  • the source end determines whether the first path is abnormal in the network according to the path abnormality response sent by the sink end.
  • the first path does not include repeated intermediate nodes.
  • the method further includes: if it is determined that there is no link congestion in the first path and no physical path abnormality, the second period is greater than or equal to the first period.
  • a second aspect provides a method for determining network anomalies, the method comprising:
  • the sink receives N1 first measurement packets and M1 second measurement packets sent by the source through the first path, where the first measurement packets are high-priority packets and the second measurement packets are common-priority packets.
  • the high-priority packet is a packet that is not affected by congestion; the sink generates N2 first response packets according to the first measurement packet, and generates M2 second response packets according to the second measurement packet.
  • the response packet and the second response packet are high-priority packets; the sink end sends N2 first response packets and M2 second response packets to the source end.
  • generating N2 first response packets according to the first measurement packet, and generating M2 second response packets according to the second measurement packet includes: according to the received N2 first measurement packets The message generates N2 first response messages; and generates M2 second response messages according to the received M2 second measurement messages.
  • the method further includes: adding a third timestamp in the first response packet according to the time of receiving the first measurement packet; adding a second timestamp according to the time of receiving the second measurement packet Fourth timestamp in the response message.
  • the method further includes: adding a packet count or packet occupied bytes in the first response packet according to the number of received packets before receiving the first measurement packet; The number of received packets before the packet is added to the packet count in the second response packet or the bytes occupied by the packet.
  • the number of received packets before receiving the first measurement packet is the same priority and/or higher priority as the first measurement packet received by the sink before receiving the first measurement packet number of packets.
  • the number of received packets before receiving the second measurement packet is the number of packets of all priorities received by the sink before receiving the second measurement packet.
  • the sink determines the network abnormality in the first path, and generates an abnormality carrying the network abnormality The response is sent to the origin.
  • N2 is greater than or equal to the first preset number of times, and M2 is less than the second preset number of times, it is determined that there is link congestion with packet loss in the first path, and there is no physical path abnormality.
  • N2 is less than the first preset number of times and M2 is less than the second preset number of times, it is determined that there is a physical path abnormality in the first path.
  • a communication device comprising:
  • a sending module configured to send N1 first measurement packets and M1 second measurement packets to the sink through the first path, wherein the first measurement packets are high-priority packets, and the second measurement packets are normal-priority packets high-priority packets are those that are not affected by congestion;
  • a receiving module configured to receive N2 first response packets and M2 second response packets sent by the sink, the first response packets are generated according to the first measurement packets, and the second response packets are generated according to the second measurement packets generating, the first response message and the second response message are high-priority messages;
  • the processing module is configured to determine whether the first path is abnormal in the network according to the first response message and the second response message.
  • the sending module sends N1 first measurement packets in the first period, and/or sends M1 second measurement packets in the second period.
  • the processing module is specifically configured to: obtain the first time when the source end sends N1 first measurement packets, and the second time when the source end sends M1 second measurement packets;
  • the first response message determines the third time at which the sink terminal receives N1 first measurement packets, and determines the fourth time at which the sink terminal receives M1 second measurement packets according to the M2 response packets;
  • the time determines the first transmission delay of the first measurement packet, and the second transmission delay of the second measurement packet is determined according to the second time and the fourth time; according to the difference between the first transmission delay and the second transmission delay It is determined whether there is link congestion on the first path.
  • the processing module is specifically configured to: determine the number of first sent packets according to the number of sent packets before the source sends the N1 first measurement packets; determine the sink according to the N2 first response packets The number of received packets before the end receives the N1 first measurement packets, as the number of first received packets; whether there is a physical path abnormality on the first path is determined according to the packet difference value of the first path, and the packet difference value of the first path is The difference between the first number of sent packets and the first number of received packets.
  • the processing module is further specifically configured to: determine the number of second sent packets according to the number of sent packets before the source end sends M1 second measurement packets; determine the number of second sent packets according to M2 second response packets The number of sent packets before the sink receives M1 second measurement packets, as the number of second received packets; according to the packet difference value of the second path, combined with whether there is link congestion on the first path and whether the first link exists If the physical path is abnormal, it is determined whether there is congestion and packet loss on the first path, and the packet difference value of the second path is the difference value of the second number of sent packets and the second number of received packets.
  • the first number of sent packets and the first number of received packets are the number of packets of the same priority and/or higher priority as the first measurement packet.
  • the second number of sent packets and the second number of received packets are the number of packets of all priorities.
  • the processing module is further configured to: add a first timestamp and a second timestamp to the first measurement packet and the second measurement packet, respectively, where the first timestamp is used to determine the first time , the second time stamp is used to determine the second time; and/or the third time stamp and the fourth time stamp in the first response message and the second response message are obtained, and the third time stamp is used to determine the third time, The fourth timestamp is used to determine the fourth time.
  • the processing module is further configured to: add a packet count or packet occupied bytes to the first measurement packet, so as to determine the first number of sent packets; and/or obtain a first response packet The packet count in the text or the bytes occupied by the packet are used to determine the number of first received packets.
  • the processing module is further configured to: add a packet count or packet occupied bytes to the second measurement packet, so as to determine the number of the second sent packets; and/or obtain a second response packet The packet count in the text or the bytes occupied by the packet are used to determine the number of the second received packets.
  • the processing module is further configured to: if the difference between the first transmission delay and the second transmission delay is less than or equal to the first preset threshold, determine that there is no link congestion on the first path ; if the difference between the first transmission delay and the second transmission delay is greater than the first preset threshold, it is determined that there is link congestion on the first path.
  • the processing module is further configured to: if the packet difference value of the first path is greater than the second preset threshold, determine that there is a physical path abnormality on the first path; if the packet difference value of the first path is less than the second preset threshold or equal to the second preset threshold, it is determined that the physical path on the first path is normal.
  • the processing module is further configured to: in the case where it is determined that there is link congestion on the first path and no physical path abnormality exists, if the packet difference value of the second path is less than or equal to the third prediction If the threshold is set, it is determined that there is link congestion without packet loss on the first path; if the packet difference on the second path is greater than the third preset threshold, it is determined that there is link congestion with packet loss on the first path.
  • the processing module is further configured to: in the case where it is determined that there is no link congestion on the first path and the physical path is abnormal, if the packet difference value of the second path is less than or equal to the third prediction If the threshold is set, the abnormality of the physical path existing on the first path is determined to be optical decay or flickering; if the packet difference value of the second path is greater than the third preset threshold, it is determined that the abnormal physical path existing on the first path is a link interrupt.
  • the processing module is further configured to: determine whether the first path is abnormal in the network according to the path abnormality response sent by the sink end.
  • the first path does not include repeated intermediate nodes.
  • the processing module is further configured to set the first period to be greater than or equal to the second period if it is determined that there is no link congestion in the first path and no physical path abnormality.
  • a communication device comprising:
  • a receiving module configured to receive N1 first measurement packets and M1 second measurement packets sent by the source through the first path, wherein the first measurement packets are high-priority packets, and the second measurement packets are ordinary Priority packets, high-priority packets are packets that are not affected by congestion;
  • a processing module configured to generate N2 first response packets according to the first measurement packet, and generate M2 second response packets according to the second measurement packet, where the first response packet and the second response packet are of high priority message;
  • the sending module is configured to send N2 first response packets and M2 second response packets to the source end.
  • the processing module is specifically configured to: generate N2 first response packets according to the received N2 first measurement packets; generate M2 first response packets according to the received M2 second measurement packets Two response messages.
  • the processing module is further configured to: add a third timestamp in the first response packet according to the time when the first measurement packet is received; add the third timestamp according to the time when the second measurement packet is received 2. The fourth timestamp in the response message.
  • the processing module is further configured to: add the packet count or packet occupied bytes in the first response packet according to the number of received packets before receiving the first measurement packet; The number of received packets before the measurement packet is added to the packet count in the second response packet or the bytes occupied by the packet.
  • the number of received packets before receiving the first measurement packet is the same priority and/or higher priority as the first measurement packet received by the sink before receiving the first measurement packet number of packets.
  • the number of received packets before receiving the second measurement packet is the number of packets of all priorities received by the sink before receiving the second measurement packet.
  • the processing module is further configured to determine a network abnormality in the first path, and generate a carrying network Abnormal exception response; the sending module is also used to send the exception response to the source.
  • the processing module is specifically configured to determine that there is link congestion with packet loss in the first path, and there is no link congestion in the first path.
  • the physical path is abnormal.
  • the processing module is specifically configured to determine that there is a physical path abnormality in the first path.
  • an embodiment of the present application provides an apparatus, where the apparatus includes a communication interface and a processor, where the communication interface is used for the apparatus to communicate with other devices, such as sending and receiving data or signals.
  • the communication interface may be a transceiver, circuit, bus, module or other type of communication interface, and other devices may be network devices.
  • the processor is configured to invoke a set of programs, instructions or data to execute the method described in the first aspect.
  • the apparatus may also include a memory for storing programs, instructions or data invoked by the processor. The memory is coupled to the processor, and when the processor executes the instructions or data stored in the memory, the method described in the first aspect above can be implemented.
  • an embodiment of the present application provides an apparatus, where the apparatus includes a communication interface and a processor, where the communication interface is used for the apparatus to communicate with other devices, such as sending and receiving data or signals.
  • the communication interface may be a transceiver, circuit, bus, module or other type of communication interface, and other devices may be terminals.
  • the processor is configured to invoke a set of programs, instructions or data to execute the method described in the second aspect above.
  • the apparatus may also include a memory for storing programs, instructions or data invoked by the processor. The memory is coupled to the processor, and when the processor executes the instructions or data stored in the memory, the method described in the second aspect above can be implemented.
  • an embodiment of the present application also provides a communication device, characterized in that the communication device includes a processor, a transceiver, a memory, and a computer-executable instruction stored in the memory and executable on the processor, The computer-executable instructions, when executed, cause the communication apparatus to perform a method as in the first aspect or any of the possible implementations of the first aspect.
  • an embodiment of the present application further provides a communication device, characterized in that the communication device includes a processor, a transceiver, a memory, and a computer-executable instruction stored on the memory and executable on the processor, The computer-executable instructions, when executed, cause the communication apparatus to perform a method as in the second aspect or any of the possible implementations of the second aspect.
  • the embodiments of the present application also provide a computer-readable storage medium, where computer-readable instructions are stored in the computer-readable storage medium, and when the computer-readable instructions are run on a computer, the computer is made to execute the A method in an aspect or any possible implementation of the first aspect.
  • the embodiments of the present application further provide a computer-readable storage medium, where computer-readable instructions are stored in the computer-readable storage medium, and when the computer-readable instructions are executed on a computer, the computer can execute the The method in the second aspect or any possible implementation manner of the second aspect.
  • an embodiment of the present application provides a chip system, where the chip system includes a processor and may also include a memory, for implementing the method in the first aspect or any possible implementation manner of the first aspect .
  • the chip system can be composed of chips, and can also include chips and other discrete devices.
  • the chip system further includes a transceiver.
  • an embodiment of the present application provides a chip system, where the chip system includes a processor and may further include a memory, for implementing the method in the second aspect or any possible implementation manner of the second aspect .
  • the chip system can be composed of chips, and can also include chips and other discrete devices.
  • the chip system further includes a transceiver.
  • the embodiments of the present application further provide a computer program product, including instructions, which when run on a computer, cause the computer to execute the first aspect or any one of the possible implementations of the first aspect. method, or perform a method as in the second aspect or any of the possible implementations of the second aspect.
  • an embodiment of the present application provides a system, where the system includes the apparatus provided in the third aspect or the fifth aspect, and the apparatus provided in the fourth aspect or the sixth aspect.
  • FIG. 1 is a schematic diagram of a communication network provided by an embodiment of the present application.
  • FIG. 2A is a schematic flowchart of a BFD session establishment provided by an embodiment of the present application.
  • FIG. 2B is a flowchart of BFD fault discovery processing provided by an embodiment of the present application.
  • 3A is a schematic diagram of packet loss detection in a flow-with-flow detection provided by an embodiment of the present application.
  • FIG. 3B is a schematic diagram of delay detection in a flow-with-flow detection provided by an embodiment of the present application.
  • 4A is a flowchart of a method for determining a network abnormality provided by an embodiment of the present application
  • 4B is a schematic diagram of periodically sending measurement packets according to an embodiment of the present application.
  • 4C is a schematic diagram of determining link congestion in a network abnormality provided by an embodiment of the present application.
  • 4D is a schematic diagram of a measurement packet loss according to an embodiment of the present application.
  • 4E is a schematic diagram of a message format provided by an embodiment of the present application.
  • FIG. 4F is a schematic diagram of a network architecture provided by an embodiment of the present application.
  • FIG. 5 is a communication device provided by an embodiment of the present application.
  • FIG. 6 is another communication device provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a communication apparatus according to an embodiment of the present application.
  • "Plural” means two or more. "And/or”, which describes the association relationship of the associated objects, means that there can be three kinds of relationships, for example, A and/or B, which can mean that A exists alone, A and B exist at the same time, and B exists alone. The character “/" generally indicates that the associated objects are an "or" relationship.
  • FIG. 1 is a schematic diagram of a communication network provided by an embodiment of the present application. As shown in FIG. 1, node A, node B, node C, ...
  • node F form a communication network, including node A, node E, the first communication path composed of node F and node D, and the second communication path composed of node A, node B, node C and node D, where the starting node A in the first communication path is the source
  • the end node is the sink end
  • the node E and the node F are the intermediate nodes; the second communication path also has the same components.
  • a node in a communication network can be a terminal, a network device, or a router, and so on.
  • the transmission link between the intermediate nodes may be faulty, or the intermediate node may be faulty.
  • FIG. 2A is a schematic diagram of a BFD session establishment process provided by an embodiment of the present application.
  • the session establishment process may specifically include: an open shortest path first (open shortest path first, OSPF) protocol through its own Hello
  • OSPF open shortest path first
  • the mechanism discovers neighbors and establishes connections; after OSPF establishes a new neighbor relationship, it advertises neighbor information (including destination address and source address, etc.) to BFD; BFD establishes a session based on the received neighbor information.
  • FIG. 2B is a BFD fault discovery processing flow chart provided by an embodiment of the application.
  • the fault discovery processing flow specifically includes: a detected link A fault occurs; BFD detects a link failure and removes the BFD neighbor session; BFD notifies the local OSPF process that the BFD neighbor is unreachable; the local OSPF process interrupts the OSPF neighbor relationship.
  • BFD control packets are encapsulated in user datagram protocol (UDP) packets for transmission.
  • UDP user datagram protocol
  • the two systems negotiate the parameters carried in the control packets (session identifier, expected minimum time interval for sending and receiving packets, local BFD session state, etc.). After the negotiation is successful, BFD control packets are periodically sent on the path between them according to the negotiated packet sending and receiving time.
  • BFD is mainly on-off detection, and the sent BFD control packets are usually the highest priority packets, which cannot be used to identify abnormalities caused by congestion and packet loss;
  • BFD Continuous detection of packet failures will only report faults. For systems such as high-speed routing and forwarding, abnormal detection and service convergence are slow;
  • BFD is used at the port level. If link-level or end-to-end detection is performed, the deployment volume will decrease. bigger.
  • FIG. 3A is a schematic diagram of packet loss detection in flow detection according to an embodiment of the present application.
  • the packet loss detection and positioning process includes: network, SPN) and other intermediate networks to communicate, the head node marks the packets in different cycles as 0 or 1 (the same in each cycle), and the network processor (net processor, NP) of each hop marks the packets in this cycle.
  • FIG. 3B is a schematic diagram of delay detection in a flow-following detection provided by an embodiment of the present application.
  • network elements NEs
  • SPNs network elements
  • the delay detection process includes: the head node selects only one packet coloring mark in each cycle to measure the delay; the NP of each hop records the incoming timestamp and the outgoing timestamp of the packet to be measured, and uploads it to To the centralized control system, the centralized control system analyzes and obtains the delay of each hop according to the information.
  • Flow detection requires the device to detect and identify the packets of each measurement flow, and use hardware to count the number of packets and time stamps.
  • the flow detection requires the support of hardware devices, and most devices on the existing network do not support it.
  • FIG. 4A is a flowchart of a method for determining a network abnormality provided by an embodiment of the present application. As shown in FIG. 4A , the method includes the following steps:
  • the source sends N1 first measurement packets and M1 second measurement packets to the sink through the first path, where the first measurement packet is a high-priority packet, and the second measurement packet is a normal-priority packet packets, high-priority packets are packets that are not affected by congestion.
  • the source end sends N1 first measurement packets and M1 second measurement packets to the sink through the first path, where N1 and M1 may be equal or unequal.
  • N1 first measurement packets may be continuously sent first, and then M1 second measurement packets may be sent, or one or more (more than N1) first measurement packets may be sent, Then, one or more second measurement packets are sent, and then the remaining first measurement packets or second measurement packets are continued to be sent.
  • FIG. 4B is a schematic diagram of periodically sending measurement packets according to an embodiment of the present application.
  • the source end may send the first measurement packet msg1 according to the first cycle T1, and the N1th A measurement packet is sent through N1 first cycles.
  • the source end may send the second measurement packet msg2 according to the second period T2, and the sending of M1 second measurement packets is completed in M1 periods.
  • the source end may also send msg1 and msg2 in the same period T1, and a fixed time interval ⁇ t is included between msg1 and msg2.
  • the source end can determine to send msg1 according to T1, and at the same time, the source end determines that the first measurement packet and the second measurement packet have a corresponding relationship, that is, one msg1 is sent, and one msg2 corresponding to msg1 is sent, and the The time interval between msg2 and its corresponding msg1 is a fixed time interval ⁇ t, then in the case of determining the number and time of sending the first measurement message, the number and time of sending the second measurement message can also be determined at the same time. time.
  • the time interval ⁇ t for sending msg1 and msg2 can be a microsecond value or even a smaller value, which can ensure that the network abnormality determined according to the first measurement packet and the response packet of the second measurement packet is the network at the same time. abnormal.
  • the period for sending msg1 and msg2 can be a microsecond value or even a smaller value, so that the source can determine according to the first measurement packet and/or the second measurement packet and the first response packet and/or the second response packet.
  • the network When the network is abnormal, it can realize the rapid detection in milliseconds, which greatly improves the response speed to abnormal faults.
  • the first measurement packet and the second measurement packet may also have a one-to-many correspondence, including one first measurement packet corresponding to multiple second measurement packets, or multiple first measurement packets Corresponds to a second measurement packet.
  • a one-to-many correspondence including one first measurement packet corresponding to multiple second measurement packets, or multiple first measurement packets Corresponds to a second measurement packet.
  • the times for sending the first measurement message and the second measurement message are respectively: msg2: ⁇ t 11 , t 11 +T2, t 11 +2T2 ⁇ , msg1: t11+2T2+ ⁇ t1.
  • the first measurement packet is a high-priority packet, for example, a highest-priority packet, or a second-highest-priority packet, a third-highest-priority packet, and the like.
  • High-priority packets are packets that are not affected by congestion, such as those used for signaling. They have high priority and are few in number, and will not be affected by link congestion due to packet queuing, resulting in redundant packets. delay or packet loss due to congestion.
  • the second measurement packet is a normal priority packet, eg, the same priority as the service packet, which will be affected by link congestion.
  • the sink receives N1 first measurement packets and M1 second measurement packets sent by the source through the first path, generates N2 first response packets according to the first measurement packets, and generates N2 first response packets according to the second measurement packets. generating M2 second response packets, the first response packet and the second response packet are high-priority packets;
  • the sink end sends N2 first response packets and M2 second response packets to the source end.
  • the sink receives N1 measurement packets and M1 measurement packets sent by the source through the first path.
  • the physical link is abnormal, etc., resulting in The source cannot receive the measurement packet sent by the source at the appointed time, or the sink cannot receive the packet sent by the source due to packet loss.
  • the sink generates a response packet according to the received measurement packets. If the sink only receives N2 (N2 ⁇ N1) first measurement packets and M2 second measurement packets within the specified time range, the sink For each received measurement packet, a corresponding response packet is generated, and the sink generates N2 first response packets for the N2 first measurement packets, and M2 for the M2 second measurement packets. The second response message.
  • the sink terminal may also generate a first response packet for multiple first measurement packets, and/or generate a second response packet for multiple second measurement packets, then, the first response packet received at the sink terminal
  • the sink may also generate N2 first response packets and M2 second response packets.
  • first response packet and the second response packet may be high-priority packets, so that when the first response packet and the second response packet are sent to the source end, they may not be affected by congestion in the transmission path, The sink end can more quickly determine the network abnormality in the first path according to the received response message.
  • the path through which the sink end sends the response message may be a reverse path of the first path, or may be a path composed of the source end, the sink end, and other intermediate nodes that are not identical to the first path.
  • the source end receives N2 first response packets and M2 second response packets sent by the sink end; and determines whether the first path is abnormal in the network according to the first response packets and the second response packets.
  • the sink sends the generated N2 first response packets and M2 second response packets to the source. It can generate a response packet every time it receives a measurement packet and send it to the source, or it can receive the preset. After the number of measurement packets, the corresponding response packet is generated and sent to the source, or the sink generates a corresponding response packet after receiving the measurement packet, but only sends the response packet to the source after a predetermined time. Arts. This embodiment of the present application does not limit the time for generating the response message and sending the response message.
  • the source receives N2 first response packets and M2 second response packets sent by the sink. Similarly, the response packets may be lost in the transmission path, so the number of response packets received by the source may be the sink. The number of response packets sent may also be smaller than the number of response packets sent by the sink.
  • the source end After receiving the first response packet and the second response packet, the source end can determine that the network in the first path is abnormal.
  • the source sends a first measurement packet and a second measurement packet in sequence with a first period T1, and the sending time interval between the first measurement packet and the second measurement packet is shorter than the first predetermined interval.
  • the sink Assuming the time interval ⁇ t1, the sink generates a response message according to each received measurement message and sends it to the source as an example to illustrate in detail.
  • the source end determines whether the first path is abnormal according to the first response packet and the second response packet, including: obtaining the first time when the source end sends N1 first measurement packets, and the source end sends M1 The second time of the second measurement packet is determined according to the N2 first response packets; the third time at which the sink terminal receives N1 first measurement packets is determined according to the N2 first response packets, and the sink terminal receives M1 second measurement packets according to the M2 response packets.
  • the fourth time of the message determines the first transmission delay of the first measurement message according to the first time and the third time, and determine the second transmission delay of the second measurement message according to the second time and the fourth time; The difference between the first transmission delay and the second transmission delay determines whether there is link congestion on the first path.
  • the source end sends N1 first measurement packets through N1 first cycles T1, and sends M1 second measurement packets through M1 first cycles.
  • the source end may acquire and record the time of sending the first measurement packet or the second measurement packet when sending each first measurement packet or the second measurement packet. Then, the time when the sink end receives the measurement packet is determined according to the time when the source end receives the response packet corresponding to the first measurement packet or the second measurement packet, and the transmission rate of the response packet.
  • the transmission rate of the response packet and the time when the source end receives the response packet can be deduced to be sent by the sink end.
  • the time of the response message is determined, and then the time when the sink end receives the measurement message is determined (it is assumed that the sink end sends a response message as soon as it receives the measurement message).
  • the transmission delay of the first response packet or the second response packet is also different.
  • the intermediate node that the response packet passes through can be fed back to the source end, so that the source end can further calculate the transmission delay of the response packet.
  • the source end adds a first timestamp and a second timestamp to the first measurement packet and the second measurement packet, respectively, where the first timestamp is used to determine the first time, and the second timestamp is used to determine second time; and/or obtaining a third timestamp and a fourth timestamp in the first response packet and the second response packet, where the third timestamp is used to determine the third time, and the fourth timestamp is used to determine the third timestamp.
  • the source When sending the first measurement packet, the source adds a first timestamp to the first measurement packet to mark the first time when the source sends the first measurement packet; when the source sends the second measurement packet, A second timestamp is added to the second measurement packet to mark the second time when the source sends the second measurement packet; similarly, the sink can record the receiving time after receiving the first measurement packet , and generate a first response message, add a third time stamp to the first response message to mark the reception time of the first measurement message, or the sink can also record the time after receiving the second measurement message The receiving time is recorded, a second response packet is generated, and a fourth time stamp is added to the second response packet to mark the receiving time of the second measurement packet.
  • the source end After receiving the first response packet and the second response packet, the source end obtains the first transmission delay and the second transmission delay according to these timestamps, or obtains the sending/receiving time of the packets according to some timestamps in combination with other methods. , to obtain the first transmission delay and the second transmission delay.
  • FIG. 4C is a schematic diagram of determining link congestion in a network abnormality provided by an embodiment of the present application.
  • the source sends a first
  • the measurement message msg1 sends a second measurement message msg2
  • the sink sends a first response message res1 every time it receives one msg1, and sends a second response message res2 every time it receives one msg2.
  • the source determines the first transmission delay of the first measurement packets according to the first time at which the N1 first measurement packets are sent and the third time at which the sink terminal receives the N1 first measurement packets, which specifically includes: assuming that the first The times are: t 01 , t 02 , t 03 , and the third times of the N1 first measurement packets received by the sink are t 01 ', t 02 ', and t 03 ' respectively.
  • a difference between a first time and a third time obtains a first transmission delay, and then three first cycles can correspondingly obtain three first transmission delays.
  • determining the second transmission delay D2 of the second measurement packet according to the second time and the fourth time may be determined according to the maximum difference between the second time and the fourth time, or according to the difference between the second time and the fourth time The average value of the difference is determined, and a second transmission delay may also be determined according to the difference between each second time and the fourth time.
  • the difference between the first transmission delay and the second transmission delay is less than or equal to the first preset threshold, it is determined that there is no link congestion on the first path; If the difference between the transmission delays is greater than the first preset threshold, it is determined that there is link congestion on the first path.
  • the first preset threshold may be a minimum value close to 0, or directly 0. Assuming that the first preset threshold is 0, when ⁇ D ⁇ 0, it means that the first transmission delay is equal to the second transmission delay, and the second measurement packet is a normal packet, and there is no additional transmission time during the transmission process. delay, it means that there is no congestion in the first path.
  • determining whether the first path is abnormal according to the first response message and the second response message includes: determining the first sent message according to the number of sent messages before the source end sends the N1 first measurement messages The number of received packets before the sink receives N1 first measurement packets is determined according to the N2 first response packets, as the number of first received packets; whether the first path exists is determined according to the difference of the first path packets The physical path is abnormal, and the packet difference on the first path is the difference between the first number of sent packets and the first number of received packets.
  • the source end can count the number of all packets sent by itself, and can also obtain the number of packets sent within a certain period of time. The number of received packets. Therefore, the source end can obtain the number of first sent packets before sending N1 first measurement packets, including separately obtaining the number of first sent packets before sending each first measurement packet, for example, for ⁇ 1, 2, ...,N1 ⁇ measurement packets, the corresponding number of first sent packets are ⁇ s1,s2,...,sn1 ⁇ ; or the total number of sent packets before sending N1 first measurement packets is obtained as the first The number of sent packets, that is, the number of first sent packets is s1+s2+...+sn1; or the number of packets sent before the last measurement packet in the N1 first measurement packets can be used as the number of first sent packets , that is, the number of the first sent packets is sn1.
  • the sink end may add the number of the first received packets in the first response packet and send it to the source end, and the source end may determine, according to the N2 first response packets, the number of packets before the sink end receives the N1 first measurement packets. The number of first received packets.
  • the source Before sending the first measurement packet, the source adds the packet count or packet occupied bytes to the first measurement packet. According to the packet count, the number of first sent packets can be directly determined, and according to the total occupied bytes of the packet section and the size of a single packet can also determine the number of first sent packets. Similarly, after receiving the first measurement packet, the sink can also record the packet before receiving the first measurement packet in the first response packet by means of packet count or packet occupied bytes. So that the sink end determines the number of the first received packets according to the first response packet.
  • the packet difference value LM1 of the first path the first number of sent packets - the first number of received packets > the second preset threshold, it means that when the signal is transmitted in the first path, there are packets lost.
  • Both the sent packet and the first received packet are high-priority packets and are not affected by network congestion. It can be determined that the packet loss is caused by a physical abnormality.
  • the first number of sent packets may include the number of first measurement packets sent by the source end, or may not include the number of first measurement packets; the first number of received packets may include the number of first measurement packets sent by the sink end. The number of received first measurement packets may not include the number of first measurement packets. Determined according to the actual situation.
  • a first measurement packet with a high priority is sent in the first path, and then the number of first sent packets is determined according to the number of packets sent before the source sends the first measurement packet, and the number of first sent packets is determined according to the number of sent packets before the source sends the first measurement packet.
  • the number of received packets before the sink receives the first measurement packet determines the number of first received packets. Because both the first measurement packet and the first response packet are high-priority packets, they are not affected by link congestion. According to the difference between the first number of sent packets and the first number of received packets, it may be determined that there is a physical path abnormality in the first path. This process does not require additional hardware support and protocol deployment, reducing the resource overhead of abnormal determination of physical paths.
  • determining whether the first path is abnormal according to the first response packet and the second response packet further includes: determining the second transmission packet according to the number of packets sent before the source end sends M1 second measurement packets. number of packets; according to the M2 second response packets, determine the number of packets sent by the sink before receiving the M1 second measurement packets, as the number of second received packets; Whether there is link congestion and whether there is an abnormal physical path on the first link determines whether there is congestion and packet loss on the first path.
  • the source end can count the number of all the messages sent by itself, and can also obtain the number of messages sent within a certain period of time.
  • the number of all packets received by itself can be counted, and the number of received packets within a certain period of time can also be obtained. Therefore, the source end can obtain the number of second sent packets before sending M1 second measurement packets, including respectively obtaining the number of second sent packets before sending each second measurement packet, or obtaining and sending M1 second measurement packets.
  • the total number of packets sent before the packets is used as the number of second packets to be sent, or the number of packets sent before the last measurement packet in the M1 second measurement packets can be used as the number of second packets to be sent.
  • the sink end may add the number of the second received packets in the second response packet and send it to the source end, and the source end may determine, according to the M2 second response packets, the number of packets before the sink end receives the M1 second measurement packets. The second number of received packets.
  • the second number of sent packets and the second number of received packets are the number of packets of all priorities.
  • the signal sent by the source end to the sink end includes packets of various priorities, high-priority packets, such as signaling packets, which are not affected by congestion, and ordinary priority packets, such as service packets. If other packets are transmitted on the link, they need to wait in line.
  • the second number of sent packets is the statistical number of packets of all priorities sent by the source before sending the second measurement packet, including the number of high-priority packets and normal-priority packets.
  • the second received packet The number is the statistical number of packets of all priorities received before the sink receives the second measurement packet.
  • the difference between the second number of received packets and the second number of sent packets may include packets of all priorities.
  • the second measurement packet of the normal priority is sent in the first path, and then the number of the second transmission packet is determined according to the number of packets sent before the source end sends the second measurement packet, and the number of the second measurement packet is determined according to the The number of received packets before the sink receives the second measurement packet determines the number of second received packets.
  • the transmission process is affected by link congestion. Therefore, in determining the first path In the case of whether there is link congestion and whether there is an abnormality in the physical path, it can be determined whether there is congestion and packet loss in the first path according to the difference between the second number of sent packets and the second number of received packets.
  • the second number of sent packets and the second number of received packets are the number of packets of all priorities, and the number of all lost packets in the second measurement packet transmission process can be determined according to the difference between the two. No additional hardware support and protocol deployment are required, reducing the resource overhead of abnormal determination of physical paths.
  • the network abnormality determined according to the above method can include several possible situations, as shown in Table 1:
  • the difference ⁇ D between the second transmission delay corresponding to the second measurement packet and the first transmission delay corresponding to the first measurement packet is less than or equal to the first preset threshold
  • the first channel packet difference LM1 corresponding to the difference between the first sent packet and the first received packet is less than or equal to the second preset threshold
  • the difference between the second sent packet and the second received packet corresponds to
  • the packet difference value LM2 of the second channel is less than or equal to the third preset threshold.
  • the first preset threshold can be a very small time value or 0.
  • the first preset threshold is a very small time value greater than 0, it means that a certain time difference is allowed between the second transmission delay and the first transmission delay, and this time difference may be caused by slight link congestion or measurement errors is not used as the basis for judging link congestion. Only when the time difference is greater than the first preset threshold value, it is considered that the link congestion has reached a level that affects the communication effect, and it is determined that there is link congestion.
  • the second preset threshold may be a very small value, or may be 0.
  • the second preset threshold is a very small value greater than 0, it indicates that a certain packet difference is allowed between the first number of sent packets and the first number of received packets, and this packet difference may be a statistical error or It is caused by fiber attenuation and is not used as the basis for judging the abnormality of the physical path. Only when the packet difference is greater than the second preset threshold, it is considered that the packet difference has reached a level that affects the communication effect, and it is determined that there is an abnormality in the physical path.
  • the third preset threshold may be a very small value greater than 0, or may be 0. If it is 0, it means that when there is any packet difference between the second number of sent packets and the second number of received packets, it is considered that congestion packet loss or packet loss caused by an abnormal physical path has occurred; the third preset threshold is a value greater than When it is a very small value of 0, it means that there is a small amount of packet difference between the number of allowed second packets to be sent and the number of second received packets. Only when the packet difference is greater than the third preset threshold, it is considered that the packet difference has reached the limit. The degree of communication effect can further judge whether there is congestion or abnormal physical path.
  • LM1 is less than or equal to the second preset threshold
  • LM2 is less than or equal to the third preset threshold
  • ⁇ D is greater than the first preset threshold
  • LM2 is less than or equal to the third preset threshold, it may be that packets have accumulated and the maximum buffer has not been reached, so the congestion has not yet resulted in packet loss; LM1 If it is less than or equal to the second preset threshold, and LM2 is less than or equal to the third preset threshold, it indicates that there is no packet loss (or a small number of packet losses) in the first path, and it is determined that the physical path is normal.
  • LM1 is less than or equal to the second preset threshold
  • LM2 is greater than the third preset threshold
  • ⁇ D is greater than the first preset threshold
  • LM1 is greater than the second preset threshold
  • LM2 is greater than the third preset threshold
  • ⁇ D is less than or equal to the first preset threshold
  • ⁇ D being less than or equal to the first preset threshold
  • LM1 is greater than the second preset threshold
  • LM2 is greater than the third preset threshold, indicating that the first measurement packet is transmitted and the first measurement packet is transmitted.
  • packet losses there are packet losses, and it can be determined that these packet losses are caused by abnormal physical paths.
  • LM1 is greater than the second preset threshold
  • LM2 is greater than the third preset threshold
  • ⁇ D is greater than the first preset threshold
  • ⁇ D is greater than the first preset threshold
  • LM1 is greater than the second preset threshold
  • LM2 is greater than the third preset threshold, indicating that there is packet loss during the transmission of the second measurement packet, which may be caused by the abnormal physical path or congestion. Therefore, it cannot be determined whether there is packet loss due to congestion.
  • the method in this embodiment of the present application further includes: N2 is less than a first preset number, M2 is less than a second preset number, and the source end determines whether the first path is abnormal in the network according to the path abnormality response sent by the sink end. .
  • N2 is the number of first response packets sent by the sink
  • M2 is the number of second response packets sent by the sink.
  • the source sends N1 first measurement packets and M1 first measurement packets to the sink. If there are two measurement packets, the corresponding number of response packets can be received.
  • FIG. 4D is a schematic diagram of a measurement packet loss provided by an embodiment of the present application.
  • the sink will not generate its corresponding If the first response packet and the second measurement packet are lost, the sink will not generate the corresponding second response packet. If both the first measurement packet and the second measurement packet are lost, neither the first response packet nor the second response packet is generated.
  • the sink can directly determine the network abnormality, generate a network abnormality response, and sent to the source.
  • the sink generates N2 first response packets and M2 second response packets according to the received first measurement packet and second measurement packet, where N2 is less than the first preset number, or M2 is less than the second The preset number, or when N2 is less than the first preset number and M2 is less than the second preset number at the same time, the sink can directly determine the network abnormality, generate a network abnormality response and send it to the source.
  • the network abnormality determined by the sink end specifically includes: if N2 is greater than or equal to the first preset number of times, and M2 is less than the second preset number of times, it is determined that there is link congestion with packet loss in the first path; If the number of times is set, and M2 is less than the second preset number of times, it is determined that there is a physical path abnormality in the first path.
  • N2 ⁇ the first preset number of times and M2 ⁇ the second preset number of times it means that both the first measurement packet and the second measurement packet are lost during the transmission process, which can cause the first measurement packet and the second measurement packet at the same time. If packets are lost, it can be judged that the physical path is abnormal.
  • the method further includes: if it is determined that there is no link congestion in the first path and no physical path abnormality, the first period is greater than or equal to the second period.
  • the first cycle is the cycle of sending the first measurement packet
  • the second cycle is the cycle of sending the second measurement packet.
  • FIG. 4E is a schematic diagram of a message format provided by an embodiment of the present application. As shown in (a) in FIG. 4E, it is a message of the second measurement message. Format, the second measurement packet is a normal priority packet, which may include the sending time stamp of the second measurement packet, and before sending the second measurement packet, the source's sent packet count or the bytes occupied by the sent packet . As shown in (b) of FIG.
  • the first measurement packet is a high-priority packet, which may include the sending time stamp of the first measurement packet, and the Before the first measurement packet, the sent packet count of the source end or the bytes occupied by the sent packet.
  • the high-priority measurement packet can also carry information on the nodes that the path passes through, such as source identifier, source egress port, intermediate node identifier, intermediate node egress port, sink identifier, sink egress port, where sink terminal The egress port may not be added to the measurement packet information.
  • the intermediate node identifier and the egress port of the intermediate node are used to indicate the next hop information. If the egress port fails, the fault response information can be sent to the source immediately.
  • the faulty node in the path can be determined according to the identification of the intermediate node, so that the physical fault can be reported at the fastest speed.
  • (c) in FIG. 4E is a schematic diagram of the message format of the response message (the first response message or the second response message).
  • the response message is a high-priority message, which can carry the sending time of the corresponding measurement message. and the receiving timestamp of the measurement packet received by the sink, so that the source can determine the transmission delay of the measurement packet corresponding to the response packet according to the sending timestamp and the receiving timestamp in the response packet.
  • the response packet can also carry the sent packet count (or the bytes occupied by the sent packet) and the received packet count (or the bytes occupied by the received packet), so that after the source receives the response packet, according to the sent packet count and the received packet count to determine whether any packets are lost during the transmission of measurement packets from the source to the sink. If you want to further determine the congestion location, you can take the source end in the first path as the previous node and the sink end as the latter node, gradually set the intermediate node as the sink end from the back to the front, resend a new measurement message, measure the The process is the same as before, so that the specific fault point can be judged.
  • the first path in this embodiment of the present application does not include duplicate intermediate nodes.
  • FIG. 4F is a schematic diagram of a network architecture provided by an embodiment of the application.
  • the network architecture includes end nodes (source or sink nodes), intermediate nodes, and the intermediate nodes may be core routers (core router, CR), or border router (border router, BR), end nodes can be access routers (access router, AR), etc.
  • the links between nodes form a path
  • repeated nodes mean non-shortest communication Therefore, the first path may be a path composed of nodes connected by a curve as shown in FIG. 4F , so that the communication path between the source end and the sink end is the shortest, and the communication efficiency is improved.
  • FIG. 5 is a communication apparatus 500 provided by an embodiment of the present application, which can be used to execute the network abnormality determination method and specific embodiment applied to the source end in FIGS. 4A to 4F .
  • the communication apparatus includes a receiving module 501 and a processing module 502 and sending module 503 .
  • the receiving module 501 is configured to receive N1 first measurement packets and M1 second measurement packets sent by the source through the first path, wherein the first measurement packets are high-priority packets, and the second measurement packets are Normal priority packets, high priority packets are not affected by congestion;
  • the processing module 502 is configured to generate N2 first response packets according to the first measurement packet, and generate M2 second response packets according to the second measurement packet, and the first response packet and the second response packet are of high priority level message;
  • the sending module 503 is configured to send N2 first response packets and M2 second response packets to the source end.
  • the processing module 502 is specifically configured to: obtain the first time when the source end sends N1 first measurement packets, and the second time when the source end sends M1 second measurement packets; according to N2
  • the first response packets determine the third time at which the sink receives N1 first measurement packets, and the fourth time at which the sink receives M1 second measurement packets is determined according to the M2 response packets; Three times determine the first transmission delay of the first measurement packet, determine the second transmission delay of the second measurement packet according to the second time and the fourth time; and determine the difference between the first transmission delay and the second transmission delay
  • the value determines whether there is link congestion on the first path.
  • the processing module 502 is specifically configured to: determine the number of first sent packets according to the number of sent packets before the source end sends N1 first measurement packets; determine the number of first sent packets according to N2 first response packets The number of received packets before the sink receives the N1 first measurement packets, as the number of first received packets; whether there is a physical path abnormality on the first path is determined according to the packet difference value of the first path, and the packet difference value of the first path is the difference between the first number of sent packets and the first number of received packets.
  • the processing module 502 is further specifically configured to: determine the number of second sent packets according to the number of sent packets before the source end sends M1 second measurement packets; according to M2 second response packets Determine the number of sent packets before the sink receives M1 second measurement packets, as the number of second received packets; according to the packet difference value of the second path, combined with whether there is link congestion on the first path and whether the first link is not congested If the physical path is abnormal, it is determined whether there is congestion and packet loss on the first path, and the packet difference value of the second path is the difference between the second number of sent packets and the second number of received packets.
  • the processing module 502 is further configured to: add a first timestamp and a second timestamp to the first measurement packet and the second measurement packet, respectively, where the first timestamp is used to determine the first timestamp time, the second time stamp is used to determine the second time; and/or the third time stamp and the fourth time stamp in the first response message and the second response message are obtained, and the third time stamp is used to determine the third time , and the fourth timestamp is used to determine the fourth time.
  • the processing module 502 is further configured to: add a packet count or packet occupied bytes to the first measurement packet, so as to determine the first number of sent packets; and/or obtain a first response The packet count in the packet or the bytes occupied by the packet are used to determine the number of first received packets.
  • the processing module 502 is further configured to: add a packet count or packet occupied bytes to the second measurement packet, so as to determine the second number of sent packets; and/or obtain a second response The packet count in the packet or the bytes occupied by the packet are used to determine the number of the second received packets.
  • the processing module 502 is further configured to: if the difference between the first transmission delay and the second transmission delay is less than or equal to the first preset threshold, determine that there is no link on the first path Congestion; if the difference between the first transmission delay and the second transmission delay is greater than the first preset threshold, it is determined that there is link congestion on the first path.
  • the processing module 502 is further configured to: if the packet difference value of the first path is greater than the second preset threshold, determine that there is a physical path abnormality on the first path; If it is less than or equal to the second preset threshold, it is determined that the physical path on the first path is normal.
  • the processing module 502 is further configured to: in the case where it is determined that there is link congestion on the first path and no physical path abnormality exists, if the packet difference value of the second path is less than or equal to the third path If the preset threshold is set, it is determined that there is link congestion with no packet loss on the first path; if the packet difference value of the second path is greater than the third preset threshold, it is determined that there is link congestion with packet loss on the first path.
  • the processing module 502 is further configured to: in the case that it is determined that there is no link congestion on the first path and that the physical path is abnormal, if the packet difference value of the second path is less than or equal to the third path If the preset threshold value is set, the abnormality of the physical path existing on the first path is determined to be optical decay or flickering; if the packet difference value of the second path is greater than the third preset threshold value, it is determined that the abnormality of the physical path existing on the first path is a chain link. Road interrupted.
  • the processing module 502 is further configured to: determine whether the first path is abnormal in the network according to the path abnormality response sent by the sink end.
  • the processing module 502 is further configured to set the first period to be greater than or equal to the second period if it is determined that there is no link congestion in the first path and no physical path abnormality.
  • the above-mentioned processing module 502 may be a chip, an encoder, an encoding circuit or other integrated circuits that can implement the method of the present application.
  • the receiving module 501 and the sending module 503 may be interface circuits or transceivers.
  • the receiving module 501 and the sending module 503 may be independent modules, or may be integrated into a transceiver module (not shown in the figure), and the transceiver module may implement the functions of the aforementioned receiving module 501 and the sending module 503 .
  • the apparatus 500 is used to execute the network abnormality determination method corresponding to the source end. Therefore, for the specific description related to the method, reference may be made to the relevant part of the corresponding embodiment, which will not be repeated here. .
  • the apparatus 500 may further include a storage module (not shown in the figure), the storage module may be used for storing data and/or signaling, the storage module may be coupled with the processing module 502, and may also be connected with the receiving module 501 or the sending module. Module 503 is coupled.
  • the processing module 502 may be configured to read data and/or signaling in the storage module, so that the key acquisition method in the foregoing method embodiments is executed.
  • FIG. 6 is another communication apparatus 600 provided by an embodiment of the present application, which may be configured to execute the method and specific embodiments of the network abnormality determination applied to the sink in the above-mentioned FIGS. 4A to 4F .
  • the communication apparatus 600 includes a sending module 601 , a receiving module 602 and a processing module 603 .
  • a receiving module 602 configured to receive N1 first measurement packets and M1 second measurement packets sent by the source through the first path, wherein the first measurement packets are high-priority packets, and the second measurement packets are Normal priority packets, high priority packets are not affected by congestion;
  • the processing module 603 is configured to generate N2 first response packets according to the first measurement packet, and generate M2 second response packets according to the second measurement packet, where the first response packet and the second response packet are of high priority level message;
  • the sending module 601 is configured to send N2 first response packets and M2 second response packets to the source end.
  • the processing module 603 is specifically configured to: generate N2 first response packets according to the received N2 first measurement packets; generate M2 first response packets according to the received M2 second measurement packets The second response message.
  • the processing module 603 is further configured to: add a third timestamp in the first response packet according to the time when the first measurement packet is received; add a third timestamp according to the time when the second measurement packet is received The fourth timestamp in the second response packet.
  • the processing module 603 is further configured to: add the packet count or packet occupied bytes in the first response packet according to the number of received packets before receiving the first measurement packet; 2. Add the packet count or the bytes occupied by the packet in the second response packet to the number of received packets before the measurement packet.
  • the processing module 603 is further configured to determine a network abnormality in the first path, and generate a Exception response to network exception; the sending module is also used to send the exception response to the source.
  • the processing module 603 is specifically configured to determine that there is link congestion with packet loss in the first path, and not There is a physical path exception.
  • the processing module 603 is specifically configured to determine that there is a physical path abnormality in the first path.
  • the above-mentioned processing module 603 may be a chip, an encoder, an encoding circuit or other integrated circuits that can implement the method of the present application.
  • the receiving module 602 and the sending module 601 may be interface circuits or transceivers.
  • the receiving module 602 and the sending module 601 may be independent modules, or may be integrated into a transceiver module (not shown in the figure), and the transceiver module may implement the functions of the aforementioned receiving module 602 and the sending module 601 .
  • the apparatus 600 is used to execute the network abnormality determination method corresponding to the sink terminal. Therefore, for the specific description related to the method, reference may be made to the relevant part of the corresponding embodiment, which will not be repeated here. .
  • the apparatus 600 may further include a storage module (not shown in the figure), the storage module may be used for storing data and/or signaling, the storage module may be coupled with the processing module 603, and may also be coupled with the receiving module 602 or sending Module 601 is coupled.
  • the processing module 603 may be configured to read data and/or signaling in the storage module, so that the key acquisition method in the foregoing method embodiments is executed.
  • FIG. 7 shows a schematic structural diagram of a communication apparatus in an embodiment of the present application.
  • the communication device 900 includes: a processor 111 and a communication transceiver 112, the processor 111 and the transceiver 112 are electrically coupled;
  • the processor 111 is configured to execute part or all of the computer program instructions in the memory, and when the part or all of the computer program instructions are executed, the apparatus executes the method described in any of the foregoing embodiments.
  • the transceiver 112 is configured to communicate with other devices; for example, send a sounding reference signal SRS to the network device through the first resource, where the SRS is used to locate the terminal.
  • the memory 113 for storing computer program instructions.
  • the memory 113 (memory #1) is located in the device, and the memory 113 (memory #2) is integrated with the processor 111. together, or the memory 113 (memory #3) is located outside the device.
  • the communication device 900 shown in FIG. 7 may be a chip or a circuit.
  • a chip or circuit may be provided in a terminal device or a communication device.
  • the transceiver 112 described above may also be a communication interface.
  • Transceivers include receivers and transmitters.
  • the communication device 900 may also include a bus system.
  • the processor 111, the memory 113, and the transceiver 112 are connected through a bus system, and the processor 111 is used to execute the instructions stored in the memory 113 to control the transceiver to receive and send signals, and complete the first implementation method involved in this application. device or step of the second device.
  • the memory 113 may be integrated in the processor 111 , or may be provided separately from the processor 111 .
  • the function of the transceiver 112 can be considered to be implemented by a transceiver circuit or a dedicated transceiver chip.
  • the processor 111 can be considered to be implemented by a dedicated processing chip, a processing circuit, a processor or a general-purpose chip.
  • the processor can be a central processing unit (CPU), a network processor (NP), or a combination of CPU and NP.
  • the processor may further include hardware chips or other general purpose processors.
  • the above-mentioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof.
  • ASIC application-specific integrated circuit
  • PLD programmable logic device
  • the above-mentioned PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a general-purpose array logic (generic array logic, GAL) and other programmable logic devices. , discrete gate or transistor logic devices, discrete hardware components, etc., or any combination thereof.
  • CPLD complex programmable logic device
  • FPGA field-programmable gate array
  • GAL general-purpose array logic
  • GAL general-purpose array logic
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the memory mentioned in the embodiments of the present application may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically programmable Erase programmable read-only memory (electrically EPROM, EEPROM) or flash memory.
  • Volatile memory may be Random Access Memory (RAM), which acts as an external cache.
  • RAM random access memory
  • SRAM Static RAM
  • DRAM Dynamic RAM
  • SDRAM Synchronous DRAM
  • SDRAM double data rate synchronous dynamic random access memory
  • Enhanced SDRAM Enhanced SDRAM, ESDRAM
  • synchronous link dynamic random access memory synchronous link dynamic random access memory
  • direct rambus RAM direct rambus RAM
  • Embodiments of the present application provide a computer-readable storage medium storing a computer program, where the computer program is used to execute the method corresponding to the source end in the foregoing embodiments.
  • Embodiments of the present application provide a computer-readable storage medium storing a computer program, where the computer program is used to execute the method corresponding to the sink in the foregoing embodiments.
  • the embodiments of the present application provide a computer program product including instructions, which, when run on a computer, enables the computer to execute the method corresponding to the source end in the foregoing embodiments.
  • the embodiments of the present application provide a computer program product including instructions, which, when run on a computer, cause the computer to execute the method corresponding to the sink in the above-mentioned embodiments.
  • the size of the sequence numbers of the above-mentioned processes does not mean the sequence of execution, and the execution sequence of each process should be determined by its functions and internal logic, and should not be dealt with in the embodiments of the present application. implementation constitutes any limitation.
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the device embodiments described above are only illustrative.
  • the division of modules is only a logical function division.
  • there may be other division methods for example, multiple modules or components may be combined or integrated. to another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or modules, and may be in electrical, mechanical or other forms.
  • Modules described as separate components may or may not be physically separated, and components shown as modules may or may not be physical modules, that is, they may be located in one place, or may be distributed to multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically alone, or two or more modules may be integrated into one module.
  • the functions are implemented in the form of software function modules and sold or used as independent products, they may be stored in a computer-readable storage medium.
  • the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution, and the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .

Abstract

本申请公开了一种网络异常确定方法及装置,其中方法包括:源端通过第一路径向宿端发送N1个第一测量报文和M1个第二测量报文,第二测量报文为普通优先级报文;宿端接收源端通过第一路径发送的N1个第一测量报文和M1个第二测量报文,根据第一测量报文生成N2个第一响应报文,根据第二测量报文生成M2个第二响应报文;宿端向源端发送N2个第一响应报文和M2个第二响应报文。源端接收宿端发送的N2个第一响应报文和M2个第二响应报文;根据第一响应报文和第二响应报文确定第一路径是否网络异常。采用本申请实施例的方法,在不需要额外软件部署和硬件支持的情况下,实现了快速准确的网络异常确定。

Description

网络异常确定方法及装置
本申请要求于2020年09月25日提交中国知识产权局、申请号为202011024469.0、申请名称为“网络异常确定方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种网络异常确定方法及装置。
背景技术
网络异常指在传输网络中由于设备或链路等问题出现的传输延迟或丢包的问题,包括闪断、光衰等链路异常、设备或芯片处理等物理异常,或由于网络流量过大导致拥塞丢包的输入或输出(I/O)传输异常等。另外,数据从源端到宿端都会沿其中的某一条链路进行传输,该链路包括源端、宿端、传输线路及所经的中间节点,即为一条端到端的传输路径,源端到宿端之间可存在多条传输路径。
信息技术的快速发展使得网络传输规模越来越大,对于网络运营维护的要求也越来越高,网络中某节点或线路出现故障或异常时,很可能会带来重大的损失和影响。现有技术中,通过双向转发检测(bidirectional forwarding detection,BFD)检测传输路径中每条链路上的故障,进而确定传输路径异常,或者通过对传输路径中的报文染色监控传输路径异常,前者存在无法识别拥塞丢包导致的异常,检测部署大等问题,后者不能面向所有数据流,只能针对选取的数据流进行检测,并且该过程需要提供额外的硬件设备支持。如何设计不需要额外硬件支持和大量检测部署,同时能够起到很好的路径异常检测效果的检测方法,是亟待解决的问题。
发明内容
本申请实施例提供了一种网络异常确定方法及装置,在不需要额外软件部署和硬件支持的情况下,实现快速准确的网络异常确定。
第一方面,提供了一种网络异常确定方法,该方法包括:源端通过第一路径向宿端发送N1个第一测量报文和M1个第二测量报文,其中所述第一测量报文为高优先级报文,所述第二测量报文为普通优先级报文,所述高优先级报文为不受拥塞影响的报文;所述源端接收宿端发送的N2个第一响应报文和M2个第二响应报文,所述第一响应报文根据所述第一测量报文生成,所述第二响应报文根据所述第二测量报文生成,所述第一响应报文和所述第二响应报文为高优先级报文;所述源端根据所述第一响应报文和所述第二响应报文确定所述第一路径是否网络异常。
在本申请实施例中,通过源端发送高优先级的第一测量报文和普通优先级的测量报文,使得源端根据这两种不同优先级的传输报文的响应报文确定测量报文传输路径中的网络异常,该过程不需要额外的软件部署和硬件支持,且可以在任意报文发送时段发送测量报文以便确定该时段的网络异常,降低了确定网络异常的资源消耗,同时保证了网络异常确定的范围和准确性。
在一种可能的实现方式中,源端通过第一周期发送N1个第一测量报文,和/或通过第二 周期发送M1个第二测量报文。
本申请实施例中,第一测量报文和第二测量报文的发送周期可以相同,也可以不同,发送周期相同可以有助于源端根据两种测量报文的响应报文确定网络异常情况,提升确定效率和准确性;在一些情况下,根据一种测量报文也可以获得一些网络异常情况,而根据不同周期发送第一测量报文和第二测量报文,可以减少其中一种测量报文的发送数量,减少数据处理的资源开销。
在一种可能的实现方式中,N1个第一测量报文和M2个第二测量报文之间具有对应关系,具有对应关系的第一测量报文和第二测量报文之间的发送间隔小于第一预设时间间隔。
本申请实施例中,设置具有对应关系的第一测量报文和第二测量报文之间的时间间隔小于第一预设时间间隔,可以使得源端根据第一测量报文和第二测量报文的相关参数或数据进行网络异常确定时,需要等待的时间更短,提升网络异常确定效率。
在一种可能的实现方式中,根据第一响应报文和第二响应报文确定第一路径是否网络异常,包括:获取源端发送N1个第一测量报文的第一时间,以及源端发送M1个第二测量报文的第二时间;根据N2个第一响应报文确定宿端接收N1个第一测量报文的第三时间,根据M2个响应报文确定宿端接收M1个第二测量报文的第四时间;根据第一时间和第三时间确定第一测量报文的第一传输时延,根据第二时间和第四时间确定第二测量报文的第二传输时延;根据第一传输时延和第二传输时延的差值确定第一路径是否存在链路拥塞。
在一种可能的实现方式中,根据第一响应报文和第二响应报文确定第一路径是否网络异常,包括:根据源端发送N1个第一测量报文前的发送报文数确定第一发送报文数;根据N2个第一响应报文确定宿端接收N1个第一测量报文前的接收报文数,作为第一接收报文数;根据第一通路报文差值确定第一路径是否存在物理路径异常,第一通路报文差值为第一发送报文数和第一接收报文数的差值。
在一种可能的实现方式中,根据第一响应报文和第二响应报文确定第一路径是否网络异常,还包括:根据源端发送M1个第二测量报文前的发送报文数确定第二发送报文数;根据M2个第二响应报文确定宿端接收M1个第二测量报文前的发送报文数,作为第二接收报文数;根据第二通路报文差值,结合第一路径是否存在链路拥塞和第一链路是否存在物理路径异常确定第一路径是否存在拥塞丢包,第二通路报文差值为第二发送报文数和第二接收报文数的差值。
在一种可能的实现方式中,第一发送报文数和第一接收报文数为与第一测量报文同优先级和/或更高优先级的报文数量。
在一种可能的实现方式中,第二发送报文数和第二接收报文数为所有优先级的报文数量。
在一种可能的实现方式中,该方法还包括:在第一测量报文和第二测量报文中分别添加第一时间戳和第二时间戳,第一时间戳用于确定第一时间,第二时间戳用于确定第二时间;和/或
获取第一响应报文和第二响应报文中的第三时间戳和第四时间戳,第三时间戳用于确定第三时间,第四时间戳用于确定第四时间。
在一种可能的实现方式中,该方法还包括:在第一测量报文添加报文计数或报文占用字节,用于确定第一发送报文数;和/或获取第一响应报文中的报文计数或报文占用字节,用于确定第一接收报文数。
在一种可能的实现方式中,该方法还包括:在第二测量报文添加报文计数或报文占用字节,用于确定第二发送报文数;和/或获取第二响应报文中的报文计数或报文占用字节,用于 确定第二接收报文数。
在一种可能的实现方式中,若第一传输时延与第二传输时延的差值小于或等于第一预设阈值,则确定第一路径上不存在链路拥塞;若第一传输时延与第二传输时延的差值大于第一预设阈值,则确定第一路径上存在链路拥塞。
在一种可能的实现方式中,若第一通路报文差值大于第二预设阈值,则确定第一路径上存在物理路径异常;若第一通路报文差值小于或等于第二预设阈值,则确定第一路径上物理路径正常。
在一种可能的实现方式中,在确定第一路径上存在链路拥塞,且不存在物理路径异常的情况下,若第二通路报文差值小于或等于第三预设阈值,则确定第一路径上存在未丢包的链路拥塞;若第二通路报文差值大于第三预设阈值,则确定第一路径上存在丢包的链路拥塞。
在一种可能的实现方式中,在确定第一路径上不存在链路拥塞,且存在物理路径异常的情况下,若第二通路报文差值小于或等于第三预设阈值,则确定第一路径上存在的物理路径异常为光衰或闪断;若第二通路报文差值大于第三预设阈值,则确定第一路径上存在的物理路径异常为链路中断。
在一种可能的实现方式中,源端根据宿端发送的路径异常响应确定第一路径是否网络异常。
在一种可能的实现方式中,第一路径中不包括重复的中间节点。
在一种可能的实现方式中,该方法还包括:若确定第一路径中不存在链路拥塞,也不存在物理路径异常,则第二周期大于或等于第一周期。
第二方面,提供一种网络异常确定方法,该方法包括:
宿端接收源端通过第一路径发送的N1个第一测量报文和M1个第二测量报文,其中第一测量报文为高优先级报文,第二测量报文为普通优先级报文,高优先级报文为不受拥塞影响的报文;宿端根据第一测量报文生成N2个第一响应报文,根据第二测量报文生成M2个第二响应报文,第一响应报文和第二响应报文为高优先级报文;宿端将N2个第一响应报文和M2个第二响应报文发送给源端。
在一种可能的实现方式中,根据第一测量报文生成N2个第一响应报文,根据第二测量报文生成M2个第二响应报文,包括:根据接收到的N2个第一测量报文生成N2个第一响应报文;根据接收到的M2个第二测量报文生成M2个第二响应报文。
在一种可能的实现方式中,该方法还包括:根据接收到第一测量报文的时间添加第一响应报文中的第三时间戳;根据接收到第二测量报文的时间添加第二响应报文中的第四时间戳。
在一种可能的实现方式中,该方法还包括:根据接收第一测量报文前的接收报文数添加第一响应报文中的报文计数或报文占用字节;根据接收第二测量报文前的接收报文数添加第二响应报文中的报文计数或报文占用字节。
在一种可能的实现方式中,接收第一测量报文前的接收报文数为接收第一测量报文前宿端接收到的与第一测量报文同优先级和/或更高优先级的报文数量。
在一种可能的实现方式中,接收第二测量报文前的接收报文数为接收第二测量报文前宿端接收到的所有优先级的报文数量。
在一种可能的实现方式中,若N2小于第一预设个数,和/或M2小于第二预设个数,则宿端确定第一路径中的网络异常,并生成携带网络异常的异常响应发送给源端。
在一种可能的实现方式中,若N2大于或等于第一预设次数,且M2小于第二预设次数,则确定第一路径中存在丢包的链路拥塞,不存在物理路径异常。
在一种可能的实现方式中,若N2小于第一预设次数,且M2小于第二预设次数,则确定第一路径中存在物理路径异常。
第三方面,提供一种通信装置,该通信装置包括:
发送模块,用于通过第一路径向宿端发送N1个第一测量报文和M1个第二测量报文,其中第一测量报文为高优先级报文,第二测量报文为普通优先级报文,高优先级报文为不受拥塞影响的报文;
接收模块,用于接收宿端发送的N2个第一响应报文和M2个第二响应报文,第一响应报文根据第一测量报文生成,第二响应报文根据第二测量报文生成,第一响应报文和第二响应报文为高优先级报文;
处理模块,用于根据第一响应报文和第二响应报文确定第一路径是否网络异常。
在一种可能的实现方式中,发送模块通过第一周期发送N1个第一测量报文,和/或通过第二周期发送M1个第二测量报文。
在一种可能的实现方式中,N1个第一测量报文和M2个第二测量报文之间具有对应关系,具有对应关系的第一测量报文和第二测量报文之间的发送间隔小于第一预设时间间隔。
在一种可能的实现方式中,处理模块具体用于:获取源端发送N1个第一测量报文的第一时间,以及源端发送M1个第二测量报文的第二时间;根据N2个第一响应报文确定宿端接收N1个第一测量报文的第三时间,根据M2个响应报文确定宿端接收M1个第二测量报文的第四时间;根据第一时间和第三时间确定第一测量报文的第一传输时延,根据第二时间和第四时间确定第二测量报文的第二传输时延;根据第一传输时延和第二传输时延的差值确定第一路径是否存在链路拥塞。
在一种可能的实现方式中,处理模块具体用于:根据源端发送N1个第一测量报文前的发送报文数确定第一发送报文数;根据N2个第一响应报文确定宿端接收N1个第一测量报文前的接收报文数,作为第一接收报文数;根据第一通路报文差值确定第一路径是否存在物理路径异常,第一通路报文差值为第一发送报文数和第一接收报文数的差值。
在一种可能的实现方式中,处理模块还具体用于:根据源端发送M1个第二测量报文前的发送报文数确定第二发送报文数;根据M2个第二响应报文确定宿端接收M1个第二测量报文前的发送报文数,作为第二接收报文数;根据第二通路报文差值,结合第一路径是否存在链路拥塞和第一链路是否存在物理路径异常确定第一路径是否存在拥塞丢包,第二通路报文差值为第二发送报文数和第二接收报文数的差值。
在一种可能的实现方式中,第一发送报文数和第一接收报文数为与第一测量报文同优先级和/或更高优先级的报文数量。
在一种可能的实现方式中,第二发送报文数和第二接收报文数为所有优先级的报文数量。
在一种可能的实现方式中,处理模块还用于:在第一测量报文和第二测量报文中分别添加第一时间戳和第二时间戳,第一时间戳用于确定第一时间,第二时间戳用于确定第二时间;和/或获取第一响应报文和第二响应报文中的第三时间戳和第四时间戳,第三时间戳用于确定第三时间,第四时间戳用于确定第四时间。
在一种可能的实现方式中,处理模块还用于:在第一测量报文添加报文计数或报文占用字节,用于确定第一发送报文数;和/或获取第一响应报文中的报文计数或报文占用字节,用于确定第一接收报文数。
在一种可能的实现方式中,处理模块还用于:在第二测量报文添加报文计数或报文占用字节,用于确定第二发送报文数;和/或获取第二响应报文中的报文计数或报文占用字节,用 于确定第二接收报文数。
在一种可能的实现方式中,处理模块还用于:若第一传输时延与第二传输时延的差值小于或等于第一预设阈值,则确定第一路径上不存在链路拥塞;若第一传输时延与第二传输时延的差值大于第一预设阈值,则确定第一路径上存在链路拥塞。
在一种可能的实现方式中,处理模块还用于:若第一通路报文差值大于第二预设阈值,则确定第一路径上存在物理路径异常;若第一通路报文差值小于或等于第二预设阈值,则确定第一路径上物理路径正常。
在一种可能的实现方式中,处理模块还用于:在确定第一路径上存在链路拥塞,且不存在物理路径异常的情况下,若第二通路报文差值小于或等于第三预设阈值,则确定第一路径上存在未丢包的链路拥塞;若第二通路报文差值大于第三预设阈值,则确定第一路径上存在丢包的链路拥塞。
在一种可能的实现方式中,处理模块还用于:在确定第一路径上不存在链路拥塞,且存在物理路径异常的情况下,若第二通路报文差值小于或等于第三预设阈值,则确定第一路径上存在的物理路径异常为光衰或闪断;若第二通路报文差值大于第三预设阈值,则确定第一路径上存在的物理路径异常为链路中断。
在一种可能的实现方式中,处理模块还用于:根据宿端发送的路径异常响应确定第一路径是否网络异常。
在一种可能的实现方式中,第一路径中不包括重复的中间节点。
在一种可能的实现方式中,处理模块还用于:若确定第一路径中不存在链路拥塞,也不存在物理路径异常,则设置第一周期大于或等于第二周期。
第四方面,提供一种通信装置,该通信装置包括:
接收模块,用于接收源端通过第一路径发送的N1个第一测量报文和M1个第二测量报文,其中第一测量报文为高优先级报文,第二测量报文为普通优先级报文,高优先级报文为不受拥塞影响的报文;
处理模块,用于根据第一测量报文生成N2个第一响应报文,根据第二测量报文生成M2个第二响应报文,第一响应报文和第二响应报文为高优先级报文;
发送模块,用于将N2个第一响应报文和M2个第二响应报文发送给源端。
在一种可能的实现方式中,处理模块具体用于:根据接收到的N2个第一测量报文生成N2个第一响应报文;根据接收到的M2个第二测量报文生成M2个第二响应报文。
在一种可能的实现方式中,处理模块还用于:根据接收到第一测量报文的时间添加第一响应报文中的第三时间戳;根据接收到第二测量报文的时间添加第二响应报文中的第四时间戳。
在一种可能的实现方式中,处理模块还用于:根据接收第一测量报文前的接收报文数添加第一响应报文中的报文计数或报文占用字节;根据接收第二测量报文前的接收报文数添加第二响应报文中的报文计数或报文占用字节。
在一种可能的实现方式中,接收第一测量报文前的接收报文数为接收第一测量报文前宿端接收到的与第一测量报文同优先级和/或更高优先级的报文数量。
在一种可能的实现方式中,接收第二测量报文前的接收报文数为接收第二测量报文前宿端接收到的所有优先级的报文数量。
在一种可能的实现方式中,若N2小于第一预设个数,和/或M2小于第二预设个数,则处理模块还用于确定第一路径中的网络异常,并生成携带网络异常的异常响应;发送模块还 用于将异常响应发送给源端。
在一种可能的实现方式中,若N2大于或等于第一预设次数,且M2小于第二预设次数,则处理模块具体用于确定第一路径中存在丢包的链路拥塞,不存在物理路径异常。
在一种可能的实现方式中,若N2小于第一预设次数,且M2小于第二预设次数,则处理模块具体用于确定第一路径中存在物理路径异常。
第五方面,本申请实施例提供一种装置,该装置包括通信接口和处理器,该通信接口用于该装置与其它设备进行通信,例如数据或信号的收发。示例性的,通信接口可以是收发器、电路、总线、模块或其它类型的通信接口,其它设备可以为网络设备。处理器用于调用一组程序、指令或数据,执行上述第一方面描述的方法。该装置还可以包括存储器,用于存储处理器调用的程序、指令或数据。存储器与处理器耦合,该处理器执行该存储器中存储的、指令或数据时,可以实现上述第一方面描述的方法。
第六方面,本申请实施例提供一种装置,该装置包括通信接口和处理器,该通信接口用于该装置与其它设备进行通信,例如数据或信号的收发。示例性的,通信接口可以是收发器、电路、总线、模块或其它类型的通信接口,其它设备可以为终端。处理器用于调用一组程序、指令或数据,执行上述第二方面描述的方法。该装置还可以包括存储器,用于存储处理器调用的程序、指令或数据。存储器与处理器耦合,该处理器执行该存储器中存储的、指令或数据时,可以实现上述第二方面描述的方法。
第七方面,本申请实施例中还提供一种通信装置,其特征在于,该通信装置包括处理器、收发器、存储器以及存储在该存储器上并可在该处理器上运行的计算机执行指令,当计算机执行指令被运行时,使得该通信装置执行如第一方面或第一方面中任一种可能的实现方式中的方法。
第八方面,本申请实施例中还提供一种通信装置,其特征在于,该通信装置包括处理器、收发器、存储器以及存储在该存储器上并可在该处理器上运行的计算机执行指令,当计算机执行指令被运行时,使得该通信装置执行如第二方面或第二方面中任一种可能的实现方式中的方法。
第九方面,本申请实施例中还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机可读指令,当该计算机可读指令在计算机上运行时,使得计算机执行如第一方面或第一方面中任一种可能的实现方式中的方法。
第十方面,本申请实施例中还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机可读指令,当该计算机可读指令在计算机上运行时,使得计算机执行如第二方面或第二方面中任一种可能的实现方式中的方法。
第十一方面,本申请实施例提供了一种芯片系统,该芯片系统包括处理器,还可以包括存储器,用于实现上述第一方面或第一方面中任一种可能的实现方式中的方法。该芯片系统可以由芯片构成,也可以包含芯片和其他分立器件。
可选的,该芯片系统还包括收发器。
第十二方面,本申请实施例提供了一种芯片系统,该芯片系统包括处理器,还可以包括存储器,用于实现上述第二方面或第二方面中任一种可能的实现方式中的方法。该芯片系统可以由芯片构成,也可以包含芯片和其他分立器件。
可选的,该芯片系统还包括收发器。
第十三方面,本申请实施例中还提供一种计算机程序产品,包括指令,当其在计算机上运行时,使得计算机执行如第一方面或第一方面中任一种可能的实现方式中的方法,或者执 行如第二方面或第二方面中任一种可能的实现方式中的方法。
第十四方面,本申请实施例提供了一种系统,该系统包括第三方面或者第五方面提供的装置、和第四方面或第六方面提供的装置。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍。
图1为本申请实施例提供的一种通信网络示意图;
图2A为本申请实施例提供的一种BFD会话建立流程示意图;
图2B为本申请实施例提供的一种BFD故障发现处理流程图;
图3A为本申请实施例提供的一种随流检测中的丢包检测示意图;
图3B为本申请实施例提供的一种随流检测中的时延检测示意图;
图4A为本申请实施例提供的一种网络异常确定方法流程图;
图4B为本申请实施例提供的一种周期性发送测量报文的示意图;
图4C为本申请实施例提供的一种确定网络异常中的链路拥塞示意图;
图4D为本申请实施例提供的一种测量报文丢失的示意图;
图4E为本申请实施例提供的一种报文格式示意图;
图4F为本申请实施例提供的一种网络架构示意图;
图5为本申请实施例提供的一种通信装置;
图6是本申请实施例提供的另一种通信装置;
图7为本申请实施例提供的一种通信装置的结构示意图。
具体实施方式
本申请的说明书和权利要求书及所述附图中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或模块的过程、方法、系统、产品或设备没有限定于已列出的步骤或模块,而是可选地还包括没有列出的步骤或模块,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或模块。
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。
节点与节点之间通过通信链路连接,组成通信网络,而其中源端与宿端两个节点之间通过多个中间节点和通信链路进行连接,构成一条通信路径。请参阅图1,图1为本申请实施例提供的一种通信网络示意图,如图1所示,节点A,节点B,节点C,……节点F组成一个通信网络,其中包括节点A,节点E,节点F和节点D组成的第一条通信路径,以及节点A,节点B,节点C和节点D组成的第二条通信路径,其中,第一条通信路径中的起始节点 A为源端,结束节点为宿端,节点E和节点F为中间节点;第二条通信路径也有同样的组成部分。通信网络中的节点可以为终端,网络设备,或者路由器等。在网络传输路径中,可能是中间节点之间的传输链路出现故障,也可能是中间节点出现故障,这些故障都可能带来重大的损失和影响,因此我们需要快速的网络异常检测机制,能够对异常点进行快速发现和问题定位,找到故障原因,以尽可能快的速度将问题解决。
BFD是用于检测两个转发点之间故障的网络协议,其检测机制是两个系统建立BFD会话,并沿它们之间的路径周期性发送BFD控制报文,如果一方在既定的时间内没有收到BFD控制报文,则认为路径上发生了故障。图2A为本申请实施例提供的一种BFD会话建立流程示意图,如图2A所示,该会话建立流程具体可以包括:由开放式最短路径优先(open shortest path first,OSPF)协议通过自己的Hello机制发现邻居并建立连接;OSPF在建立了新的邻居关系后,将邻居信息(包括目的地址和源地址等)通告给BFD;BFD根据收到的邻居信息建立会话。BFD两端的路由器通过周期性发送BFD测量报文,根据是否能够收到对端BFD报文来检测会话状态。BFD故障发现处理流程和检测故障,可参阅图2B,图2B为本申请实施例提供的一种BFD故障发现处理流程图,如图2B所示,该故障发现处理流程具体包括:被检测链路出现故障;BFD检测到链路故障,拆除BFD邻居会话;BFD通知本地OSPF进程BFD邻居不可达;本地OSPF进程中断OSPF邻居关系。BFD控制报文封装在用户数据报协议(user datagram protocol,UDP)报文中传送。会话开始阶段,双方系统通过控制报文中携带的参数(会话标识符、期望的收发报文最小时间间隔、本端BFD会话状态等)进行协商。协商成功后,以协商的报文收发时间在彼此之间的路径上定时发送BFD控制报文。
采用BFD协议检测网络异常存在几个缺点:(1)BFD主要是通断检测,发送的BFD控制报文通常为最高优先级报文,不能用于识别拥塞丢包导致的异常;(2)BFD连续检测报文失效才会上报故障,对于高速路由转发等系统其异常检测和业务收敛慢;(3)BFD使用于端口级,如果做链路(Link)级或端到端的检测,部署量会比较大。
或者,也可以通过随流检测测量网络异常,通过对报文染色识别业务,实现端到端逐跳质量测量,能够提供更高精度的业务级质量检测方案。其测量方式主要有两种,分别为丢包检测和时延检测。请参阅图3A,图3A为本申请实施例提供的一种随流检测中的丢包检测示意图,如图3A所示,丢包检测定位过程包括:节点之间通过服务供应商网络(service provider network,SPN)等中间网络进行通信,首节点对不同周期内的报文标记0或者1(每个周期内相同),每一跳的网络处理器(net processor,NP)对这个周期的报文计数,所有设备将NP获取的信息上送到集中控制系统,如果发现周期内同一标记的报文计数变少,则知道丢包点。或者,请参阅图3B,图3B为本申请实施例提供的一种随流检测中的时延检测示意图,如图3B所示,网元(network element,NE)之间通过SPN连接,每个NE上可进行节点的输入和输出。时延检测过程包括:首节点在每个周期内只选择一个报文染色标记,用于测量时延;每一跳的NP对待测的报文记录进入时戳,离开时戳,且上送到到集中控制系统,集中控制系统根据这些信息分析得到每一跳的时延。
随流检测需要设备对每个测量流的报文进行检测识别,用硬件统计报文数量和时间戳,并不能面向所有流量,只能选取某些流进行测量。此外,随流检测需要硬件设备提供支持,现网大部分设备还不支持。
基于上述描述,本申请实施例提供一种网络异常确定方法已解决前述提出的问题。图4A为本申请实施例提供的一种网络异常确定方法流程图,如图4A所示,该方法包括如下步骤:
101、源端通过第一路径向宿端发送N1个第一测量报文和M1个第二测量报文,其中第 一测量报文为高优先级报文,第二测量报文为普通优先级报文,高优先级报文为不受拥塞影响的报文。
源端通过第一路径向宿端发送N1个第一测量报文和M1个第二测量报文,N1和M1可以相等,也可以不相等。在N1与M1相等的情况下,可以先连续发送N1个第一测量报文,再发送M1个第二测量报文,或者发送一个或多个(多个小于N1个)第一测量报文,然后发送一个或多个第二测量报文,再继续发送剩余的第一测量报文或第二测量报文。
在可能的情况下,源端通过第一周期发送N1个第一测量报文,和/或通过第二周期发送M1个第二测量报文。请参阅图4B,图4B为本申请实施例提供的一种周期性发送测量报文的示意图,如图4B所示,源端可以按照第一周期T1发送第一测量报文msg1,N1个第一测量报文通过N1个第一周期发送完毕。或者,源端可以按照第二周期T2发送第二测量报文msg2,M1个第二测量报文通过M1个周期发送完毕。可选地,源端也可以以相同的周期T1发送msg1和msg2,且msg1和msg2之间包含固定的时间间隔△t。
在可能的情况下,源端可以确定按照T1发送msg1,同时源端确定第一测量报文和第二测量报文具有对应关系,即发送一个msg1,并发送一个与msg1对应的msg2,并且该msg2与其对应的msg1之间的时间间隔为固定时间间隔△t,那么在确定第一测量报文发送个数和发送时间的情况下,也能够同时确定第二测量报文的发送个数和发送时间。对应地,可选情况下,源端可以确定按照T2发送msg2,同时源端确定第一测量报文和第二测量报文具有对应关系,即每发送一个msg2,将发送一个与msg2对应的msg1,并且该msg1与其对应的msg2之间的时间间隔为固定时间间隔△t,在确定第二测量报文发送个数和发送时间的情况下,也能够同时确定第一测量报文的发送个数和发送时间。
发送msg1和msg2的时间间隔△t可以为一个微秒级数值甚至更小值,这样可以保证根据第一测量报文和第二测量报文的响应报文确定的网络异常为同一个时刻的网络异常。
发送msg1和msg2的周期可以为微秒级数值甚至更小值,这样源端在根据第一测量报文和/或第二测量报文以及第一响应报文和/或第二响应报文确定网络异常情况时,能够实现毫秒级的快速检测,大大提高了对异常故障的响应速度。
在一些情况下,第一测量报文和第二测量报文也可以是一对多的对应关系,包括一个第一测量报文对应多个第二测量报文,或者多个第一测量报文对应一个第二测量报文。以多个第二测量报文对应一个第一测量报文为例,假设在t 11时刻开始,以第二周期T2发送msg2,确定每发送3个第二测量报文,则发送一个第一测量报文,且第一测量报文与第三个第二测量报文的时间间隔为△t1,那么可以确定发送第一测量报文和第二测量报文的时间分别为:msg2:{t 11,t 11+T2,t 11+2T2},msg1:t11+2T2+△t1。
第一测量报文为高优先级报文,例如为最高优先级报文,或者为次高优先级报文,第三高优先级报文等。高优先级报文为不受拥塞影响的报文,例如用于发送信令的报文,优先级高,且数量少,不会因为报文排队导致报文受链路拥塞影响,进而产生多余的时延或拥塞丢包等。第二测量报文为普通优先级报文,例如与业务报文同优先级,会受到链路拥塞的影响。
102、宿端接收源端通过第一路径发送的N1个第一测量报文和M1个第二测量报文,根据第一测量报文生成N2个第一响应报文,根据第二测量报文生成M2个第二响应报文,第一响应报文和第二响应报文为高优先级报文;
103、宿端向源端发送N2个第一响应报文和M2个第二响应报文。
宿端接收源端通过第一路径发送的N1个测量报文和M1个测量报文,但是在实际接收的过程中,由于第一路径中可能存在的拥塞丢包,链路物理异常等,导致源端不能在约定时间 接收到源端发送的测量报文,或者由于报文丢失,宿端无法接收到源端发送的报文。
宿端根据接收到的测量报文生成响应报文,如果在规定时间范围内,宿端只接收到N2(N2<N1)个第一测量报文,以及M2个第二测量报文,宿端针对接收到的每一个测量报文生成相对应的响应报文,则宿端生成针对N2个第一测量报文的N2个第一响应报文,以及针对M2个第二测量报文的M2个第二响应报文。或者,宿端也可以针对多个第一测量报文生成一个第一响应报文,和/或针对多个第二测量报文生成一个第二响应报文,那么,在宿端接收到的第一测量报文个数大于N2,接收到的第二测量报文个数大于M2的情况下,宿端也可以生成N2个第一响应报文,和M2个第二响应报文。
另外,第一响应报文和第二响应报文可以为高优先级报文,这样第一响应报文和第二响应报文在向源端发送时,可以不受到传输路径中的拥塞影响,宿端能够更快速地根据接收到的响应报文进行第一路径中的网络异常判断。宿端发送响应报文的路径可以为第一路径的反向路径,也可以为源端、宿端以及其他与第一路径不完全相同的中间节点组成的路径。
104、源端接收宿端发送的N2个第一响应报文和M2个第二响应报文;根据第一响应报文和第二响应报文确定第一路径是否网络异常。
宿端向源端发送生成的N2个第一响应报文和M2个第二响应报文,可以每接收到一个测量报文则生成一个响应报文并向源端发送,也可以接收完预设个数的测量报文后,生成对应的响应报文并向源端发送,或者,宿端在接收到测量报文后生成对应的响应报文,但是在预定时间后才向源端发送响应报文。本申请实施例对生成响应报文和发送响应报文的时间不做限定。
源端接收宿端发送的N2个第一响应报文和M2个第二响应报文,同样的,响应报文可能在传输路径中丢失,那么源端接收到的响应报文数可能为宿端发送的响应报文数,也可能小于宿端发送的响应报文数。
源端接收到第一响应报文和第二响应报文后,则可以确定第一路径中的网路异常。
以下确定网络异常的场景中,以源端以第一周期T1依次发送一个第一测量报文和第二测量报文,第一测量报文和第二测量报文的发送时间间隔小于第一预设时间间隔△t1,宿端根据接收到的每一个测量报文生成一个响应报文并向源端发送为例,进行具体说明。
可选情况下,源端根据第一响应报文和第二响应报文确定第一路径是否网络异常,包括:获取源端发送N1个第一测量报文的第一时间,以及源端发送M1个第二测量报文的第二时间;根据N2个第一响应报文确定宿端接收N1个第一测量报文的第三时间,根据M2个响应报文确定宿端接收M1个第二测量报文的第四时间;根据第一时间和第三时间确定第一测量报文的第一传输时延,根据第二时间和第四时间确定第二测量报文的第二传输时延;根据第一传输时延和第二传输时延的差值确定第一路径是否存在链路拥塞。
源端通过N1个第一周期T1发送N1个第一测量报文,通过M1个第一周期发送M1个第二测量报文。假设宿端接收到的N1个第一测量报文和M1个第二测量报文,并根据每个测量报文生成响应报文,即宿端向源端发送N2=N1个第一响应报文,M2=M1个第二响应报文。源端可以在发送每个第一测量报文或第二测量报文的时候获取以及记录发送第一测量报文或第二测量报文的时间。然后根据源端接收到第一测量报文或第二测量报文对应的响应报文的时间,以及响应报文的传输速率确定宿端接收到测量报文的时间。因为第一响应报文和第二响应报文为高优先级报文,不受链路拥塞影响,因此可以根据响应报文的传输速率以及源端接收到响应报文的时间推导出宿端发送响应报文的时间,进而确定宿端接收到测量报文的时间(假设宿端一接收到测量报文则发送响应报文)。另外,由于宿端向源端发送第一响应报文 或第二响应报文所经过的路径不同,也会导致第一响应报文或第二响应报文的传输时延不同,因此宿端还可以向源端反馈响应报文途经的中间节点,以便源端进一步推算响应报文的传输时延。
可选情况下,源端在第一测量报文和第二测量报文中分别添加第一时间戳和第二时间戳,第一时间戳用于确定第一时间,第二时间戳用于确定第二时间;和/或获取第一响应报文和第二响应报文中的第三时间戳和第四时间戳,第三时间戳用于确定第三时间,第四时间戳用于确定第四时间。
源端在发送第一测量报文时,在第一测量报文中添加第一时间戳,用于标记源端发送第一测量报文的第一时间;源端发送第二测量报文时,在第二测量报文中添加第二时间戳,用于标记源端发送第二测量报文的第二时间;同样的,宿端可以在接收到第一测量报文后,记录下该接收时间,并生成第一响应报文,在第一响应报文中添加第三时间戳,用于标记第一测量报文的接收时间,或者宿端还可以在接收到第二测量报文后,记录下该接收时间,并生成第二响应报文,在第二响应报文中添加第四时间戳,用于标记第二测量报文的接收时间。
源端接收到第一响应报文和第二响应报文后,根据这些时间戳获得第一传输时延和第二传输时延,或者根据部分时间戳结合其他获得报文发送/接收时间的方式,获得第一传输时延和第二传输时延。
请参阅图4C,图4C为本申请实施例提供的一种确定网络异常中的链路拥塞示意图,如图4C所示,假设N1=M1=N2=M2=3,源端每发送一个第一测量报文msg1则发送一个第二测量报文msg2,宿端每接收到一个msg1则发送一个第一响应报文res1,每接收到一个msg2则发送一个第二响应报文res2。源端根据发送N1个第一测量报文的第一时间,以及宿端接收N1个第一测量报文的第三时间确定第一测量报文的第一传输时延,具体包括:假设第一时间分别为:t 01,t 02,t 03,宿端接收到的N1个第一测量报文的第三时间分别为t 01’,t 02’,t 03’,可以根据第一时间和第三时间的最大差值确定第一传输时延,即D1=max(t 01’-t 01,t 02’-t 02,t 03’-t 03);或者根据第一时间和第三时间的差值平均值确定第一传输时延,即D1=[(t 01’-t 01)+(t 02’-t 02)+(t 03’-t 03)]/3;或者也可以根据每一个第一时间和第三时间的差值得到一个第一传输时延,则3个第一周期可以对应获得3个第一传输时延。
同样的,根据第二时间和第四时间确定第二测量报文的第二传输时延D2,可以根据第二时间和第四时间的最大差值确定,或根据第二时间和第四时间的差值平均值确定,也可以根据每个第二时间和第四时间的差值确定一个第二传输时延。
在确定第一传输时延和第二传输时延之后,由于第一测量报文为高优先级报文,在传途中不受拥塞影响;而第二测量报文为普通优先级报文,会受到拥塞影响,那么第一测量报文对应的第一传输时延与第二测量报文对应的第二传输时延之间的时差,则可能为拥塞造成的。因此,确定第一传输时延和第二传输时延的差值△D=D2-D1。
可选情况下,若第一传输时延与第二传输时延的差值小于或等于第一预设阈值,则确定第一路径上不存在链路拥塞;若第一传输时延与第二传输时延的差值大于第一预设阈值,则确定第一路径上存在链路拥塞。
即,若△D≤第一预设阈值,则确定第一路径上不存在链路拥塞,若△D>第一预设阈值,则第一路径上存在链路拥塞。第一预设阈值可以为一个接近0的极小值,或者直接为0。假设第一预设阈值为0,则当△D≤0时,说明第一传输时延与第二传输时延相等,第二测量报文作为普通报文,在传输过程中没有额外的传输时延,那么说明第一路径中不存在拥塞。
可见,在本申请实施例中,在第一路径中发送优先级不同的两种测量报文,然后根据两 种测量报文的传输时延差值确定传输路径中的链路拥塞,不需要额外的硬件支持和协议部署,减少链路拥塞确定的资源开销,另外这个过程能够对发送第一测量报文和发送第二测量报文之间的所有报文可能产生的拥塞进行统计,提升拥塞检测效率和检测范围。
可选情况下,根据第一响应报文和第二响应报文确定第一路径是否网络异常,包括:根据源端发送N1个第一测量报文前的发送报文数确定第一发送报文数;根据N2个第一响应报文确定宿端接收N1个第一测量报文前的接收报文数,作为第一接收报文数;根据第一通路报文差值确定第一路径是否存在物理路径异常,第一通路报文差值为第一发送报文数和第一接收报文数的差值。
源端可以对自身发送的所有报文数进行统计,也可以获取某个时间段内发送的报文数,宿端可以对自身接收的所有报文数进行统计,也可以获取某个时间段内接收的报文数。因此源端可以获取发送N1个第一测量报文前的第一发送报文数,包括分别获取发送每个第一测量报文前的第一发送报文数,例如针对第{1,2,…,N1}个测量报文,其对应的第一发送报文数分别为{s1,s2,…,sn1};或者获取发送N1个第一测量报文前总的发送报文数作为第一发送报文数,即第一发送报文数为s1+s2+…+sn1;或者可以将N1个第一测量报文中的最后一个测量报文前发送的报文数作为第一发送报文数,即第一发送报文数为sn1。
对应地,宿端可以将第一接收报文数添加在第一响应报文中发送给源端,源端可以根据N2个第一响应报文确定宿端接收N1个第一测量报文前的第一接收报文数。
可选情况下,在第一测量报文添加报文计数或报文占用字节,用于确定第一发送报文数;和/或获取第一响应报文中的报文计数或报文占用字节,用于确定第一接收报文数。
源端在发送第一测量报文前,在第一测量报文中添加报文计数或报文占用字节,根据报文计数可以直接确定第一发送报文数,根据报文总的占用字节以及单个报文的大小也可以确定第一发送报文数。同样的,宿端接收到第一测量报文后,也可以将在接收到第一测量报文前的报文通过报文计数或报文占用字节的方式记录在第一响应报文中,以便宿端根据第一响应报文确定第一接收报文数。
另外,第一发送报文数和第一接收报文数为与第一测量报文同优先级和/或更高优先级的报文数量。即,第一发送报文数为源端发送第一测量报文前发送的与第一测量报文同优先级,或者优先级高于第一测量报文的报文数量,第一接收报文数为宿端接收第一测量报文前接收的与第一测量报文同优先级,或者优先级高于第一测量报文的报文数量。这样,在不存在网络异常的情况下,第一发送报文数=第一接收报文数。当第一通路报文差值LM1=第一发送报文数-第一接收报文数时>第二预设阈值时,表示信号在第一路径中传输时,有报文丢失,由于第一发送报文和第一接收报文都为高优先级报文,不受网络拥塞影响,可以确定报文丢失由物理异常造成。
上述过程中,第一发送报文数中可以包括源端发送的第一测量报文的个数,也可以不包括第一测量报文的个数;第一接收报文数中可以包括宿端接收到的第一测量报文的个数,也可以不包括第一测量报文的个数。根据实际情况确定。
可见,在本申请实施例中,在第一路径中发送高优先级的第一测量报文,然后根据源端发送第一测量报文前的发送报文数确定第一发送报文数,根据宿端接收第一测量报文前的接收报文数确定第一接收报文数,因为第一测量报文和第一响应报文都为高优先级报文,不受链路拥塞影响,因此根据第一发送报文数和第一接收报文数之间的差值可以确定第一路径中存在物理路径异常。该过程不需要额外的硬件支持和协议部署,减少物理路径异常确定的资源开销。
可选情况下,根据第一响应报文和第二响应报文确定第一路径是否网络异常,还包括:根据源端发送M1个第二测量报文前的发送报文数确定第二发送报文数;根据M2个第二响应报文确定宿端接收M1个第二测量报文前的发送报文数,作为第二接收报文数;根据第二通路报文差值,结合第一路径是否存在链路拥塞和第一链路是否存在物理路径异常确定第一路径是否存在拥塞丢包,第二通路报文差值为第二发送报文数和第二接收报文数的差值。
与上述获得第一发送报文和第一接收报文的过程类似,源端可以对自身发送的所有报文数进行统计,也可以获取某个时间段内发送的报文数,宿端可以对自身接收的所有报文数进行统计,也可以获取某个时间段内接收的报文数。因此源端可以获取发送M1个第二测量报文前的第二发送报文数,包括分别获取发送每个第二测量报文前的第二发送报文数,或者获取发送M1个第二测量报文前总的发送报文数作为第二发送报文数,或者可以将M1个第二测量报文中的最后一个测量报文前发送的报文数作为第二发送报文数。
对应地,宿端可以将第二接收报文数添加在第二响应报文中发送给源端,源端可以根据M2个第二响应报文确定宿端接收M1个第二测量报文前的第二接收报文数。
可选情况下,在第二测量报文添加报文计数或报文占用字节,用于确定第二发送报文数;和/或获取第二响应报文中的报文计数或报文占用字节,用于确定第二接收报文数。
可选情况下,第二发送报文数和第二接收报文数为所有优先级的报文数量。具体地,源端向宿端发送的信号中,包括各种优先级的报文,高优先级的报文,例如信令报文,不受拥塞影响,普通优先级的报文,例如业务报文,在链路中传输其他报文的情况下,需要排队等候。第二发送报文数为源端发送第二测量报文前发送的所有优先级的报文统计数量,包括高优先级报文和普通优先级报文的数量,同样的,第二接收报文数为宿端接收第二测量报文前接收的所有优先级的报文统计数量,那么,第二接收报文数和第二发送报文数之间的差值可以包括所有优先级的报文丢失数量。当第二通路报文差值=第二发送报文数-第二接收报文数=LM2>第三预设阈值时,这个过程中丢失的报文,可能是拥塞导致的丢包,也可能是物理路径异常导致的报文丢失,需要结合前述两种确定链路拥塞和物理路径异常的方法确定拥塞丢包情况。前述两种确定链路拥塞和物理路径异常的方法都可以根据发送两种测量报文,接收响应报文的方式确定,因此确定拥塞丢包情况也可以通过该方法确定。
可见,在本申请实施例中,在第一路径中发送普通优先级的第二测量报文,然后根据源端发送第二测量报文前的发送报文数确定第二发送报文数,根据宿端接收第二测量报文前的接收报文数确定第二接收报文数,因为第二测量报文为普通优先级报文,传输过程受到链路拥塞影响,因此在确定第一路径中是否存在链路拥塞和是否存在物理路径异常的情况下,根据第二发送报文数和第二接收报文数之间的差值可以确定第一路径中是否存在拥塞丢包。进一步地,第二发送报文数和第二接收报文数为所有优先级的报文数量,可以根据两者的差值确定第二测量报文传输过程中所有丢失报文的数量,该过程不需要额外的硬件支持和协议部署,减少物理路径异常确定的资源开销。
根据上述方式确定的网络异常可以包括几种可能的情况,如表1所示:
表1 网络异常的可能情况
Figure PCTCN2021117865-appb-000001
Figure PCTCN2021117865-appb-000002
在第一路径传输正常的情况下,第二测量报文对应的第二传输时延和第一测量报文对应的第一传输时延之间的差值△D小于或等于第一预设阈值,第一发送报文数和第一接收报文的差值对应的第一通路报文差值LM1小于或等于第二预设阈值,第二发送报文和第二接收报文的差值对应的第二通路报文差值LM2小于或等于第三预设阈值。
第一预设阈值可以为一个极小的时间值,也可以为0,当第一预设阈值为0时,表示只有第一传输时延=第二传输时延的情况下(正常情况下第二传输时延不会小于第一传输时延),判断不存在链路拥塞。当第一预设阈值为一个大于0的极小时间值时,表示第二传输时延与第一传输时延之间允许存在一定的时间差,这个时间差可能是微小的链路拥塞或测量误差造成的,不作为判断链路拥塞的依据。只有当时间差大于第一预设阈值的情况下,认为链路拥塞已经达到影响通信效果的程度,判断存在链路拥塞。第二预设阈值可以为一个极小的数值,也可以为0。当第二预设阈值为0时,表示只有第一发送报文数=第一接收报文数的情况下(正常情况下第一发送报文数不会小于第二发送报文数),判断不存在物理路径异常。当第二预设阈值为大于0的极小数值时,表示第一发送报文数与第一接收报文数之间允许存在一定的报文差值,这个报文差值可能是统计误差或者光纤衰减造成的,不作为判断物理路径异常的依据。只有当报文差值大于第二预设阈值的情况下,认为报文差值已经达到影响通信效果的程度,判断存在物理路径异常。同样的,第三预设阈值可以为一个大于0的极小数值,也可以为0。为0表示在第二发送报文数和第二接收报文数之间存在任何报文差值时,认为已形成拥塞丢包或物理路径异常导致的丢包;第三预设阈值为一个大于0的极小数值时,表示允许第二发送报文数和第二接收报文数之间存在少量报文差,只有报文差大于第三预设阈值时,认为报文差值已达到影响通信效果的程度,可以进一步判断是否存在拥塞或物理路径异常。
在LM1小于或等于第二预设阈值,LM2小于或等于第三预设阈值,△D大于第一预设阈值的情况下,可以判断第一路径中物理路径正常,有未丢包的链路拥塞。具体地,△D大于第一预设阈值,表示链路中存在拥塞,LM2小于或等于第三预设阈值,可能是报文堆积,还未达到最大缓存,因此拥塞还未导致丢包;LM1小于或等于第二预设阈值,且LM2小于或等于第三预设阈值,表示第一路径中无报文丢失(或报文丢失数很少),确定物理路径正常。
在LM1小于或等于第二预设阈值,LM2大于第三预设阈值,△D大于第一预设阈值的情况下,可以判断第一路径中物理路径正常,有拥塞丢包。具体地,可根据△D大于第一预设阈值判断存在拥塞,而LM1小于第二预设阈值,表示不存在物理路径异常,LM2大于第三预设阈值,说明第一路径传输第二测量报文过程中有报文丢失,且为拥塞导致的。
在LM1大于第二预设阈值,LM2大于第三预设阈值,△D小于或等于第一预设阈值的情况下,可以判断第一路径中存在物理路径异常,不存在拥塞。具体地,根据△D小于或等于第一预设阈值可判断第一路径中不存在拥塞,LM1大于第二预设阈值,LM2大于第三预设阈值,说明传输第一测量报文和传输第二测量报文的过程中都有报文丢失,可以判定这些报 文丢失是物理路径异常导致。
在LM1大于第二预设阈值,LM2大于第三预设阈值,△D大于第一预设阈值的情况下,可以判断第一路径中存在拥塞和物理路径异常。具体地,根据△D大于第一预设阈值可判断第一路径中存在拥塞,LM1大于第二预设阈值,说明第一测量报文传输过程中存在报文丢失,可确定第一路径中存在物理路径异常,LM2大于第三预设阈值,说明第二测量报文传输过程中存在报文丢失,可能是物理路径异常导致的,也可能是拥塞导致的,因此不能确定是否存在拥塞丢包。
可选情况下,本申请实施例中的方法还包括:N2小于第一预设个数,M2小于第二预设个数,源端根据宿端发送的路径异常响应确定第一路径是否网络异常。
N2为宿端发送的第一响应报文个数,M2为宿端发送到的第二响应报文个数,正常情况下,源端向宿端发送N1个第一测量报文和M1个第二测量报文,则能够收到对应个数的响应报文,例如宿端根据接收到的每个测量报文生成并发送一个对应的响应报文,那么宿端应该发送N2=N1个第一响应报文,M2=M1个第二响应报文。假设N2小于第一预设个数,M2小于第二预设个数,说明由源端传输至宿端的测量报文有丢失,导致对应的响应报文数少于预设个数。请参阅图4D,图4D为本申请实施例提供的一种测量报文丢失的示意图,如图4D所示,第一周期内的第一测量报文丢失,则宿端不会生成其对应的第一响应报文,第二测量报文丢失,则宿端不会生成其对应的第二响应报文。如果第一测量报文和第二测量报文都丢失,则第一响应报文和第二响应报文都不会生成。因此,假设宿端接收到的第一测量报文个数少于第三预设个数,或第二测量报文个数少于第四预设个数,或第一测量报文和第二测量报文的总个数少于第五预设个数,生成的响应报文可能并不能有助于源端准确判断网络异常情况,因此宿端可以直接确定网络异常情况,生成网络异常响应并发送给源端。或者宿端根据接收到的第一测量报文和第二测量报文生成N2个第一响应报文和M2个第二响应报文,在N2小于第一预设个数,或者M2小于第二预设个数,或者同时存在N2小于第一预设个数和M2小于第二预设个数的情况时,宿端可以直接确定网络异常情况,生成网络异常响应并发送给源端。
宿端确定的网络异常情况具体包括:若N2大于或等于第一预设次数,且M2小于第二预设次数,则确定第一路径中存在丢包的链路拥塞;若N2小于第一预设次数,且M2小于第二预设次数,则确定第一路径中存在物理路径异常。
N2≥第一预设次数,表示生成的第一响应报文个数与预设应该生成的第一响应报文个数差距小,可认为第一测量报文在传输过程中无丢失,M2<第二预设次数,表示生成的第二响应报文个数与预设应该生成的第二响应报文个数差距大,第二测量报文在传输过程中丢失多。因为第二测量报文受拥塞影响,第一测量报文不受拥塞影响,因此可以判定第二测量报文的丢失由拥塞造成,且第一测量报文无丢失,可以确定无物理路径异常。
若N2<第一预设次数,且M2<第二预设次数,说明第一测量报文和第二测量报文在传输过程中都有丢失,能够同时造成第一测量报文和第二测量报文丢失的,可以判断为物理路径异常。
可见,在本申请实施例中,假设源端发送的用于判断网络异常的第一测量报文和第二测量报文在传输过程中丢失,宿端也可以根据对第一测量报文和第二测量报文的接收情况判断网络异常情况并发送给源端,这样进一步扩展了确定网络异常的可实现范围,进而提升了网络异常确定的准确性。
可选情况下,该方法还包括:若确定第一路径中不存在链路拥塞,也不存在物理路径异 常,则第一周期大于或等于该第二周期。
第一周期为发送第一测量报文的周期,第二周期为发送第二测量报文的周期,在确定第一路径中不存在链路拥塞,也不存在物理路径异常的情况下,可以基本确定第一路径中不存在网络异常,因此可以正常发送第二测量报文,而减少第一测量报文的发送。这样可以一方面继续监控第一路径中的异常情况,另一方面也可以减少测量报文的发送,进而减少报文处理的资源消耗。
上述描述中,“等于”可以与“小于”结合使用,也可以与“大于”结合使用,即上述“小于或等于”可以替换为“小于”,“大于”可以替换为“大于或等于”,“大于或等于”可以替换为“大于”,“小于”可以替换为“小于或等于”,具体结合方式在本申请实施例中不做限制。
上述过程中生成的报文格式具体可参阅图4E,图4E为本申请实施例提供的一种报文格式示意图,如图4E中的(a)所示,为第二测量报文的报文格式,第二测量报文为普通优先级报文,其中可以包括第二测量报文的发送时间戳,以及在发送第二测量报文前,源端的发送报文计数或发送报文占用字节。如图4E中的(b)所示,为第一测量报文的报文格式,第一测量报文为高优先级报文,其中可以包括第一测量报文的发送时间戳,以及在发送第一测量报文前,源端的发送报文计数或发送报文占用字节。另外,高优先级的测量报文中还可以携带路径所经节点信息,例如源端标识,源端出端口,中间节点标识,中间节点出端口,宿端标识,宿端出端口,其中宿端出端口也可以不添加在测量报文信息中,中间节点标识和中间节点出端口用于指示下一跳信息,在出端口发生故障的情况下,可以立即向源端发送故障响应信息,源端可以根据中间节点标识确定路径中发生故障的节点,进而可以以最快的速度通报物理故障。
图4E中的(c)为响应报文(第一响应报文或第二响应报文)的报文格式示意图,响应报文为高优先级报文,其中可以携带对应测量报文的发送时间戳,以及宿端接收到测量报文的接收时间戳,以便源端根据响应报文中的发送时间戳和接收时间戳确定该响应报文对应的测量报文的传输时延。响应报文中还可以携带发送报文计数(或发送报文占用字节)以及接收报文计数(或接收报文占用字节),以便源端接收到响应报文后,根据发送报文计数和接收报文计数确定测量报文从源端传输到宿端的过程中,是否有报文丢失。如果要进一步确定拥塞位置,可以以第一路径中的源端为在前节点,宿端为在后节点,从后向前逐步将中间节点设置为宿端,重新发送新的测量报文,测量流程同前,从而可以判断具体的故障点。
可选情况下,本申请实施例中的第一路径中不包括重复的中间节点。请参阅图4F,图4F为本申请实施例提供的一种网络架构示意图,如图4F所示,网络架构中包括端节点(源端或宿端节点),中间节点,中间节点可以为核心路由器(core router,CR),或边界路由器(border router,BR),端节点可以为接入路由器(access router,AR)等,节点之间的链路组成一个路径,重复的节点意味着非最短通信路径,因此,第一路径可以为如图4F中曲线连接的节点组成的路径,使得源端与宿端之间的通信路径最短,提升通信效率。
图5为本申请实施例提供的一种通信装置500,其可用于执行上述图4A~图4F的应用于源端的网络异常确定方法和具体实施例,该通信装置包括接收模块501,处理模块502和发送模块503。
接收模块501,用于接收源端通过第一路径发送的N1个第一测量报文和M1个第二测量报文,其中第一测量报文为高优先级报文,第二测量报文为普通优先级报文,高优先级报文为不受拥塞影响的报文;
处理模块502,用于根据第一测量报文生成N2个第一响应报文,根据第二测量报文生成 M2个第二响应报文,第一响应报文和第二响应报文为高优先级报文;
发送模块503,用于将N2个第一响应报文和M2个第二响应报文发送给源端。
在一种可能的实现方式中,处理模块502具体用于:获取源端发送N1个第一测量报文的第一时间,以及源端发送M1个第二测量报文的第二时间;根据N2个第一响应报文确定宿端接收N1个第一测量报文的第三时间,根据M2个响应报文确定宿端接收M1个第二测量报文的第四时间;根据第一时间和第三时间确定第一测量报文的第一传输时延,根据第二时间和第四时间确定第二测量报文的第二传输时延;根据第一传输时延和第二传输时延的差值确定第一路径是否存在链路拥塞。
在一种可能的实现方式中,处理模块502具体用于:根据源端发送N1个第一测量报文前的发送报文数确定第一发送报文数;根据N2个第一响应报文确定宿端接收N1个第一测量报文前的接收报文数,作为第一接收报文数;根据第一通路报文差值确定第一路径是否存在物理路径异常,第一通路报文差值为第一发送报文数和第一接收报文数的差值。
在一种可能的实现方式中,处理模块502还具体用于:根据源端发送M1个第二测量报文前的发送报文数确定第二发送报文数;根据M2个第二响应报文确定宿端接收M1个第二测量报文前的发送报文数,作为第二接收报文数;根据第二通路报文差值,结合第一路径是否存在链路拥塞和第一链路是否存在物理路径异常确定第一路径是否存在拥塞丢包,第二通路报文差值为第二发送报文数和第二接收报文数的差值。
在一种可能的实现方式中,处理模块502还用于:在第一测量报文和第二测量报文中分别添加第一时间戳和第二时间戳,第一时间戳用于确定第一时间,第二时间戳用于确定第二时间;和/或获取第一响应报文和第二响应报文中的第三时间戳和第四时间戳,第三时间戳用于确定第三时间,第四时间戳用于确定第四时间。
在一种可能的实现方式中,处理模块502还用于:在第一测量报文添加报文计数或报文占用字节,用于确定第一发送报文数;和/或获取第一响应报文中的报文计数或报文占用字节,用于确定第一接收报文数。
在一种可能的实现方式中,处理模块502还用于:在第二测量报文添加报文计数或报文占用字节,用于确定第二发送报文数;和/或获取第二响应报文中的报文计数或报文占用字节,用于确定第二接收报文数。
在一种可能的实现方式中,处理模块502还用于:若第一传输时延与第二传输时延的差值小于或等于第一预设阈值,则确定第一路径上不存在链路拥塞;若第一传输时延与第二传输时延的差值大于第一预设阈值,则确定第一路径上存在链路拥塞。
在一种可能的实现方式中,处理模块502还用于:若第一通路报文差值大于第二预设阈值,则确定第一路径上存在物理路径异常;若第一通路报文差值小于或等于第二预设阈值,则确定第一路径上物理路径正常。
在一种可能的实现方式中,处理模块502还用于:在确定第一路径上存在链路拥塞,且不存在物理路径异常的情况下,若第二通路报文差值小于或等于第三预设阈值,则确定第一路径上存在未丢包的链路拥塞;若第二通路报文差值大于第三预设阈值,则确定第一路径上存在丢包的链路拥塞。
在一种可能的实现方式中,处理模块502还用于:在确定第一路径上不存在链路拥塞,且存在物理路径异常的情况下,若第二通路报文差值小于或等于第三预设阈值,则确定第一路径上存在的物理路径异常为光衰或闪断;若第二通路报文差值大于第三预设阈值,则确定第一路径上存在的物理路径异常为链路中断。
在一种可能的实现方式中,处理模块502还用于:根据宿端发送的路径异常响应确定第一路径是否网络异常。
在一种可能的实现方式中,处理模块502还用于:若确定第一路径中不存在链路拥塞,也不存在物理路径异常,则设置第一周期大于或等于第二周期。
可选的,上述的处理模块502可以是芯片,编码器,编码电路或其他可以实现本申请方法的集成电路。
可选的,接收模块501和发送模块503可以为接口电路或者收发器。接收模块501和发送模块503可以为独立的模块,也可以集成为收发模块(图未示),收发模块可以实现上述接收模块501和发送模块503的功能。可以为接口电路或者收发器。
由于具体的方法和实施例在前面已经介绍过,该装置500是用于执行对应于源端的网络异常确定方法,因此涉及该方法的具体描述可以参考对应实施例的相关部分,此处不再赘述。
可选的,装置500还可以包括存储模块(图中未示出),该存储模块可以用于存储数据和/或信令,存储模块可以和处理模块502耦合,也可以和接收模块501或发送模块503耦合。例如,处理模块502可以用于读取存储模块中的数据和/或信令,使得前述方法实施例中的密钥获取方法被执行。
图6是本申请实施例提供的另一种通信装置600,其可以用于执行上述图4A~图4F的应用于宿端的网络异常确定方法和具体实施例。在一种可能的实现方式中,如图6所示,该通信装置600包括发送模块601,接收模块602和处理模块603。
接收模块602,用于接收源端通过第一路径发送的N1个第一测量报文和M1个第二测量报文,其中第一测量报文为高优先级报文,第二测量报文为普通优先级报文,高优先级报文为不受拥塞影响的报文;
处理模块603,用于根据第一测量报文生成N2个第一响应报文,根据第二测量报文生成M2个第二响应报文,第一响应报文和第二响应报文为高优先级报文;
发送模块601,用于将N2个第一响应报文和M2个第二响应报文发送给源端。
在一种可能的实现方式中,处理模块603具体用于:根据接收到的N2个第一测量报文生成N2个第一响应报文;根据接收到的M2个第二测量报文生成M2个第二响应报文。
在一种可能的实现方式中,处理模块603还用于:根据接收到第一测量报文的时间添加第一响应报文中的第三时间戳;根据接收到第二测量报文的时间添加第二响应报文中的第四时间戳。
在一种可能的实现方式中,处理模块603还用于:根据接收第一测量报文前的接收报文数添加第一响应报文中的报文计数或报文占用字节;根据接收第二测量报文前的接收报文数添加第二响应报文中的报文计数或报文占用字节。
在一种可能的实现方式中,若N2小于第一预设个数,和/或M2小于第二预设个数,则处理模块603还用于确定第一路径中的网络异常,并生成携带网络异常的异常响应;发送模块还用于将异常响应发送给源端。
在一种可能的实现方式中,若N2大于或等于第一预设次数,且M2小于第二预设次数,则处理模块603具体用于确定第一路径中存在丢包的链路拥塞,不存在物理路径异常。
在一种可能的实现方式中,若N2小于第一预设次数,且M2小于第二预设次数,则处理模块603具体用于确定第一路径中存在物理路径异常。
可选的,上述的处理模块603可以是芯片,编码器,编码电路或其他可以实现本申请方法的集成电路。
可选的,接收模块602和发送模块601可以为接口电路或者收发器。接收模块602和发送模块601可以为独立的模块,也可以集成为收发模块(图未示),收发模块可以实现上述接收模块602和发送模块601的功能。可以为接口电路或者收发器。
由于具体的方法和实施例在前面已经介绍过,该装置600是用于执行对应于宿端的网络异常确定方法,因此涉及该方法的具体描述可以参考对应实施例的相关部分,此处不再赘述。
可选的,装置600还可以包括存储模块(图中未示出),该存储模块可以用于存储数据和/或信令,存储模块可以和处理模块603耦合,也可以和接收模块602或发送模块601耦合。例如,处理模块603可以用于读取存储模块中的数据和/或信令,使得前述方法实施例中的密钥获取方法被执行。
如图7所示,图7示出了本申请实施例中的一种通信装置的结构示意图。终端或定位设备的结构可以参考图7所示的结构。通信装置900包括:处理器111和通收发器112,所述处理器111和所述收发器112之间电偶合;
所述处理器111,用于执行所述存储器中的部分或者全部计算机程序指令,当所述部分或者全部计算机程序指令被执行时,使得所述装置执行上述任一实施例所述的方法。
所述收发器112,用于和其他设备进行通信;例如通过所述第一资源向所述网络设备发送探测参考信号SRS,所述SRS用于对所述终端定位。
可选的,还包括存储器113,用于存储计算机程序指令,可选的,所述存储器113(存储器#1)位于所述装置内,所述存储器113(存储器#2)与处理器111集成在一起,或者所述存储器113(存储器#3)位于所述装置之外。
应理解,图7所示的通信装置900可以是芯片或电路。例如可设置在终端装置或者通信装置内的芯片或电路。上述收发器112也可以是通信接口。收发器包括接收器和发送器。进一步地,该通信装置900还可以包括总线系统。
其中,处理器111、存储器113、收发器112通过总线系统相连,处理器111用于执行该存储器113存储的指令,以控制收发器接收信号和发送信号,完成本申请涉及的实现方法中第一设备或者第二设备的步骤。所述存储器113可以集成在所述处理器111中,也可以与所述处理器111分开设置。
作为一种实现方式,收发器112的功能可以考虑通过收发电路或者收发专用芯片实现。处理器111可以考虑通过专用处理芯片、处理电路、处理器或者通用芯片实现。处理器可以是中央处理器(central processing unit,CPU),网络处理器(network processor,NP)或者CPU和NP的组合。处理器还可以进一步包括硬件芯片或其他通用处理器。上述硬件芯片可以是专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,CPLD),现场可编程逻辑门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)及其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等或其任意组合。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
还应理解,本申请实施例中提及的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static  RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。应注意,本申请描述的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
本申请实施例提供了一种计算机可读存储介质,存储有计算机程序,该计算机程序用于执行上述实施例中对应用于源端的方法。
本申请实施例提供了一种计算机可读存储介质,存储有计算机程序,该计算机程序用于执行上述实施例中对应用于宿端的方法。
本申请实施例提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例中对应用于源端的方法。
本申请实施例提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例中对应用于宿端的方法。
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的模块及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。
作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。
功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (33)

  1. 一种网络异常确定方法,其特征在于,所述方法包括:
    源端通过第一路径向宿端发送N1个第一测量报文和M1个第二测量报文,其中所述第一测量报文为高优先级报文,所述第二测量报文为普通优先级报文,所述高优先级报文为不受拥塞影响的报文;
    所述源端接收宿端发送的N2个第一响应报文和M2个第二响应报文,所述第一响应报文根据所述第一测量报文生成,所述第二响应报文根据所述第二测量报文生成,所述第一响应报文和所述第二响应报文为高优先级报文;
    所述源端根据所述第一响应报文和所述第二响应报文确定所述第一路径是否网络异常。
  2. 根据权利要求1所述的方法,其特征在于,所述源端通过第一周期发送所述N1个第一测量报文,和/或通过第二周期发送所述M1个第二测量报文。
  3. 根据权利要求1或2所述的方法,其特征在于,所述N1个第一测量报文和所述M2个第二测量报文之间具有对应关系,具有对应关系的第一测量报文和第二测量报文之间的发送间隔小于第一预设时间间隔。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述根据所述第一响应报文和所述第二响应报文确定所述第一路径是否网络异常,包括:
    获取所述源端发送所述N1个第一测量报文的第一时间,以及所述源端发送所述M1个第二测量报文的第二时间;
    根据所述N2个第一响应报文确定所述宿端接收所述N1个第一测量报文的第三时间,根据所述M2个响应报文确定所述宿端接收所述M1个第二测量报文的第四时间;
    根据所述第一时间和所述第三时间确定第一测量报文的第一传输时延,根据所述第二时间和所述第四时间确定第二测量报文的第二传输时延;
    根据第一传输时延和第二传输时延的差值确定所述第一路径是否存在链路拥塞。
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述根据所述第一响应报文和所述第二响应报文确定所述第一路径是否网络异常,包括:
    根据所述源端发送所述N1个第一测量报文前的发送报文数确定第一发送报文数;
    根据所述N2个第一响应报文确定所述宿端接收所述N1个第一测量报文前的接收报文数,作为第一接收报文数;
    根据第一通路报文差值确定所述第一路径是否存在物理路径异常,所述第一通路报文差值为所述第一发送报文数和所述第一接收报文数的差值。
  6. 根据权利要求4或5所述的方法,其特征在于,所述根据所述第一响应报文和所述第二响应报文确定所述第一路径是否网络异常,还包括:
    根据所述源端发送所述M1个第二测量报文前的发送报文数确定第二发送报文数;
    根据所述M2个第二响应报文确定所述宿端接收所述M1个第二测量报文前的发送报文数,作为第二接收报文数;
    根据第二通路报文差值,结合第一路径是否存在链路拥塞和第一链路是否存在物理路径异常确定所述第一路径是否存在拥塞丢包,所述第二通路报文差值为所述第二发送报文数和所述第二接收报文数的差值。
  7. 根据权利要求5所述的方法,其特征在于,所述第一发送报文数和所述第一接收报文数为与所述第一测量报文同优先级和/或更高优先级的报文数量。
  8. 根据权利要求6所述的方法,其特征在于,所述第二发送报文数和所述第二接收报文数为所有优先级的报文数量。
  9. 根据权利要求4所述的方法,其特征在于,所述方法还包括:
    在所述第一测量报文和所述第二测量报文中分别添加第一时间戳和第二时间戳,所述第一时间戳用于确定所述第一时间,所述第二时间戳用于确定所述第二时间;和/或
    获取所述第一响应报文和所述第二响应报文中的第三时间戳和第四时间戳,所述第三时间戳用于确定所述第三时间,所述第四时间戳用于确定所述第四时间。
  10. 根据权利要求5所述的方法,其特征在于,所述方法还包括:
    在所述第一测量报文添加报文计数或报文占用字节,用于确定所述第一发送报文数;和/或获取所述第一响应报文中的报文计数或报文占用字节,用于确定所述第一接收报文数。
  11. 根据权利要求6所述的方法,其特征在于,所述方法还包括:
    在所述第二测量报文添加报文计数或报文占用字节,用于确定所述第二发送报文数;和/或获取所述第二响应报文中的报文计数或报文占用字节,用于确定所述第二接收报文数。
  12. 根据权利要求4或9所述的方法,其特征在于,若所述第一传输时延与所述第二传输时延的差值小于或等于第一预设阈值,则确定所述第一路径上不存在链路拥塞;若所述第一传输时延与所述第二传输时延的差值大于第一预设阈值,则确定所述第一路径上存在链路拥塞。
  13. 根据权利要求5或10所述的方法,其特征在于,若所述第一通路报文差值大于第二预设阈值,则确定所述第一路径上存在物理路径异常;若所述第一通路报文差值小于或等于第二预设阈值,则确定所述第一路径上物理路径正常。
  14. 根据权利要求6或11所述的方法,其特征在于,在确定所述第一路径上存在链路拥塞,且不存在物理路径异常的情况下,若所述第二通路报文差值小于或等于第三预设阈值,则确定所述第一路径上存在未丢包的链路拥塞;若所述第二通路报文差值大于第三预设阈值,则确定所述第一路径上存在丢包的链路拥塞。
  15. 根据权利要求6或11所述的方法,其特征在于,在确定所述第一路径上不存在链路拥塞,且存在物理路径异常的情况下,若所述第二通路报文差值小于或等于第三预设阈值,则确定所述第一路径上存在的物理路径异常为光衰或闪断;若所述第二通路报文差值大于第三预设阈值,则确定所述第一路径上存在的物理路径异常为链路中断。
  16. 根据权利要求1所述的方法,其特征在于,所述源端根据所述宿端发送的路径异常响应确定所述第一路径是否网络异常。
  17. 根据权利要求1-16任一项所述的方法,其特征在于,所述第一路径中不包括重复的中间节点。
  18. 根据权利要求2-17任一项所述的方法,其特征在于,所述方法还包括:
    若确定所述第一路径中不存在链路拥塞,也不存在物理路径异常,则设置所述第一周期大于或等于所述第二周期。
  19. 一种网络异常确定方法,其特征在于,所述方法包括:
    宿端接收源端通过第一路径发送的N1个第一测量报文和M1个第二测量报文,其中所述第一测量报文为高优先级报文,所述第二测量报文为普通优先级报文,所述高优先级报文为不受拥塞影响的报文;
    所述宿端根据所述第一测量报文生成N2个第一响应报文,根据所述第二测量报文生成 M2个第二响应报文,所述第一响应报文和所述第二响应报文为高优先级报文;
    所述宿端将所述N2个第一响应报文和所述M2个第二响应报文发送给所述源端。
  20. 根据权利要求19所述的方法,其特征在于,所述根据所述第一测量报文生成N2个第一响应报文,根据所述第二测量报文生成M2个第二响应报文,包括:
    根据接收到的N2个第一测量报文生成N2个第一响应报文;
    根据接收到的M2个第二测量报文生成M2个第二响应报文。
  21. 根据权利要求20所述的方法,其特征在于,所述方法还包括:
    根据接收到所述第一测量报文的时间添加所述第一响应报文中的第三时间戳;
    根据接收到所述第二测量报文的时间添加所述第二响应报文中的第四时间戳。
  22. 根据权利要求20或21所述的方法,其特征在于,所述方法还包括:
    根据接收所述第一测量报文前的接收报文数添加所述第一响应报文中的报文计数或报文占用字节;
    根据接收所述第二测量报文前的接收报文数添加所述第二响应报文中的报文计数或报文占用字节。
  23. 根据权利要求22所述的方法,其特征在于,所述接收所述第一测量报文前的接收报文数为接收所述第一测量报文前所述宿端接收到的与所述第一测量报文同优先级和/或更高优先级的报文数量。
  24. 根据权利要求22所述的方法,其特征在于,所述接收所述第二测量报文前的接收报文数为接收所述第二测量报文前所述宿端接收到的所有优先级的报文数量。
  25. 根据权利要求20-24任一项所述的方法,其特征在于,若所述N2小于第一预设个数,和/或所述M2小于第二预设个数,则所述宿端确定所述第一路径中的网络异常,并生成携带所述网络异常的异常响应发送给所述源端。
  26. 根据权利要求25所述的方法,其特征在于,若所述N2大于或等于第一预设次数,且所述M2小于第二预设次数,则确定所述第一路径中存在丢包的链路拥塞,不存在物理路径异常。
  27. 根据权利要求25所述的方法,其特征在于,若所述N2小于第一预设次数,且所述M2小于第二预设次数,则确定所述第一路径中存在物理路径异常。
  28. 一种通信装置,其特征在于,所述通信装置包括:
    发送模块,用于通过第一路径向宿端发送N1个第一测量报文和M1个第二测量报文,其中所述第一测量报文为高优先级报文,所述第二测量报文为普通优先级报文,所述高优先级报文为不受拥塞影响的报文;
    接收模块,用于接收宿端发送的N2个第一响应报文和M2个第二响应报文,所述第一响应报文根据所述第一测量报文生成,所述第二响应报文根据所述第二测量报文生成,所述第一响应报文和所述第二响应报文为高优先级报文;
    处理模块,用于根据所述第一响应报文和所述第二响应报文确定所述第一路径是否网络异常。
  29. 一种通信装置,其特征在于,所述通信装置包括:
    接收模块,用于接收源端通过第一路径发送的N1个第一测量报文和M1个第二测量报文,其中所述第一测量报文为高优先级报文,所述第二测量报文为普通优先级报文,所述高优先级报文为不受拥塞影响的报文;
    处理模块,用于根据所述第一测量报文生成N2个第一响应报文,根据所述第二测量报 文生成M2个第二响应报文,所述第一响应报文和所述第二响应报文为高优先级报文;
    发送模块,用于将所述N2个第一响应报文和所述M2个第二响应报文发送给所述源端。
  30. 一种通信装置,其特征在于,所述通信装置包括处理器和接口电路,所述接口电路用于接收代码指令并传输至所述处理器,所述处理器用于运行所述代码指令以执行如权利要求1至18任一项所述的方法,或运行所述代码指令以执行如权利要求19至27任一项所述的方法。
  31. 一种通信装置,其特征在于,所述通信装置包括处理器、收发器、存储器以及存储在所述存储器上并可在所述处理器上运行的计算机执行指令,当所述计算机执行指令被运行时,使得所述通信装置执行如权利要求1至18项任一项所述的方法,或执行如权利要求19至27任一项所述的方法。
  32. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机指令,当所述计算机指令在通信装置上运行时,使得所述通信装置执行权利要求1至18任一项所述的方法,或使得所述通信装置执行权利要求19至27任一项所述的方法。
  33. 一种通信系统,其特征在于,包括如权利要求28所述的通信装置,和/或如权利要求29所述的通信装置。
PCT/CN2021/117865 2020-09-25 2021-09-11 网络异常确定方法及装置 WO2022062931A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011024469.0 2020-09-25
CN202011024469.0A CN114338465A (zh) 2020-09-25 2020-09-25 网络异常确定方法及装置

Publications (1)

Publication Number Publication Date
WO2022062931A1 true WO2022062931A1 (zh) 2022-03-31

Family

ID=80845002

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/117865 WO2022062931A1 (zh) 2020-09-25 2021-09-11 网络异常确定方法及装置

Country Status (2)

Country Link
CN (1) CN114338465A (zh)
WO (1) WO2022062931A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114900233A (zh) * 2022-05-16 2022-08-12 中国联合网络通信集团有限公司 光网络单元的整治管理方法、装置、电子设备及介质
CN115914038A (zh) * 2022-11-11 2023-04-04 中国联合网络通信集团有限公司 劣化转发设备检测方法、装置、设备及存储介质
WO2023236874A1 (zh) * 2022-06-08 2023-12-14 华为技术有限公司 通信链路的检测方法及装置

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115242669B (zh) * 2022-06-30 2023-10-03 北京华顺信安科技有限公司 一种网络质量监测方法
CN115834436B (zh) * 2022-11-24 2024-05-03 中国联合网络通信集团有限公司 网络连通性检测方法、装置及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3082281A1 (en) * 2013-12-13 2016-10-19 ZTE Corporation Method for measuring transmission delay of optical transport network device and source otn device
CN106936657A (zh) * 2015-12-30 2017-07-07 华为技术有限公司 一种实现时延检测的方法、装置和系统
CN107342830A (zh) * 2016-05-03 2017-11-10 工业和信息化部电信研究院 一种实现分组传送网性能劣化定位方法
CN107911263A (zh) * 2017-11-23 2018-04-13 盛科网络(苏州)有限公司 一种能够同时测量以太网时延和拥塞的报文

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3082281A1 (en) * 2013-12-13 2016-10-19 ZTE Corporation Method for measuring transmission delay of optical transport network device and source otn device
CN106936657A (zh) * 2015-12-30 2017-07-07 华为技术有限公司 一种实现时延检测的方法、装置和系统
CN107342830A (zh) * 2016-05-03 2017-11-10 工业和信息化部电信研究院 一种实现分组传送网性能劣化定位方法
CN107911263A (zh) * 2017-11-23 2018-04-13 盛科网络(苏州)有限公司 一种能够同时测量以太网时延和拥塞的报文

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114900233A (zh) * 2022-05-16 2022-08-12 中国联合网络通信集团有限公司 光网络单元的整治管理方法、装置、电子设备及介质
CN114900233B (zh) * 2022-05-16 2023-05-16 中国联合网络通信集团有限公司 光网络单元的整治管理方法、装置、电子设备及介质
WO2023236874A1 (zh) * 2022-06-08 2023-12-14 华为技术有限公司 通信链路的检测方法及装置
CN115914038A (zh) * 2022-11-11 2023-04-04 中国联合网络通信集团有限公司 劣化转发设备检测方法、装置、设备及存储介质
CN115914038B (zh) * 2022-11-11 2024-04-09 中国联合网络通信集团有限公司 劣化转发设备检测方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN114338465A (zh) 2022-04-12

Similar Documents

Publication Publication Date Title
WO2022062931A1 (zh) 网络异常确定方法及装置
US11405295B2 (en) Scalable distributed end-to-end performance delay measurement for segment routing policies
US9917745B2 (en) Validation of chained network services
WO2017000750A1 (zh) 测量终端上运行的业务的质量的方法、设备及系统
EP4050858A1 (en) Method and device for updating mapping
US20220407791A1 (en) Network performance detection method and apparatus, and network device
WO2018113425A1 (zh) 一种检测时延的方法、装置及系统
US9197516B2 (en) In-service throughput testing in distributed router/switch architectures
US11606288B2 (en) Network communication method and apparatus
US20230102193A1 (en) Network Performance Measurement Method, Apparatus, Device, and System, and Storage Medium
CN114430386A (zh) 组播业务流的检测方法及相关装置
US20230300051A1 (en) In-band Edge-to-Edge Round-Trip Time Measurement
US20230318970A1 (en) Packet Processing Method and Apparatus
US11388090B2 (en) Bandwidth measurement method and measurement device
WO2014000509A1 (zh) 一种传输监控方法及装置
US9203718B2 (en) Frame loss measurement device, communication device, communication system and performance measurement method
WO2022222544A1 (zh) 一种操作维护管理oam检测方法及装置
WO2023231426A1 (zh) 时延测量方法及其装置、存储介质、程序产品
CN113328903B (zh) 检测传输质量的方法、装置和系统
EP4311195A1 (en) Method and apparatus for ensuring deterministic latency of network slice, storage medium, and product
CN117597887A (zh) 报文处理
CN116760765A (zh) 一种网络状态检测方法、装置、电子设备及存储介质

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21871302

Country of ref document: EP

Kind code of ref document: A1