WO2012088843A1 - Method and system for bidirectional forwarding detection - Google Patents

Method and system for bidirectional forwarding detection Download PDF

Info

Publication number
WO2012088843A1
WO2012088843A1 PCT/CN2011/076007 CN2011076007W WO2012088843A1 WO 2012088843 A1 WO2012088843 A1 WO 2012088843A1 CN 2011076007 W CN2011076007 W CN 2011076007W WO 2012088843 A1 WO2012088843 A1 WO 2012088843A1
Authority
WO
WIPO (PCT)
Prior art keywords
detection
network quality
packet
message
sequence number
Prior art date
Application number
PCT/CN2011/076007
Other languages
French (fr)
Chinese (zh)
Inventor
周蕙菁
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2012088843A1 publication Critical patent/WO2012088843A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks

Definitions

  • the bidirectional forwarding detection (BFD) technology of the present invention specifically relates to a method and system for implementing dual-issue forwarding detection by using a BFD protocol.
  • BFD provides a common low-cost fast fault detection service for various upper-layer control protocols.
  • the upper-layer control protocol can use the services provided by BFD to determine the corresponding operations, such as re-routing. It is called bidirectional because the BFD protocol provides connectivity detection in both directions of the link through the three-way handshake mechanism. BFD can quickly detect the interface and link faults on the forwarding path, the forwarding engine fault of the node, and notify the upper layer protocol of the fault, so that the upper layer protocol can converge quickly.
  • BFD is only used to detect link connectivity. That is, link information obtained through BFD is either connected or disconnected. In some cases, the link usually has a small amount of packet loss, and then a large amount of packet loss, and finally the chain is broken. When there is a small amount of packet loss in the transmission, the current BFD may not be discovered. The service may be affected at this time. However, BFD needs to wait until the packet loss reaches a certain level to detect the link failure.
  • the technical problem to be solved by the present invention is to provide a bidirectional forwarding detection method and system for effectively preventing chain scission.
  • the present invention provides a bidirectional forwarding detection method, which includes:
  • the two-way forwarding detection sends the first detection packet carrying the network quality detection information to the local end; the peer end of the BFD receives the first detection packet, and sends a second detection packet carrying the network quality detection information;
  • the BFD local end receives the second detection packet, and detects network quality according to network quality detection information in the first detection packet and network quality detection information in the second detection packet;
  • the terminal reports the network quality detection result according to the preset reporting condition.
  • the network quality detection information includes a message sequence number, and the method further includes:
  • the BFD local end determines whether to drop packets by comparing the message sequence number in the first detection packet with the message sequence number in the second detection packet.
  • the network quality detection information includes a message sequence number, and the method further includes:
  • the local end of the BFD sends a plurality of first detection messages in sequence, wherein the sequence number of the message is regularly increased or decreased;
  • the BFD local end After receiving the returned second detection packet, the BFD local end compares the packet sequence number in the current received packet with the packet sequence number in the previous received packet, and calculates the number of lost packets.
  • the network quality detection information includes timestamp information.
  • the method further includes: the BFD local end calculating delay or jitter according to the timestamp information and the current timestamp information in the second detection packet.
  • the first detection message and the second detection message use an ECHO message.
  • the present invention also provides a bidirectional forwarding detection system, which includes a bidirectional forwarding detection (BFD) local end and a peer end of the BFD, where:
  • the local end of the BFD includes: a first packet sending and receiving unit, a network quality determining unit, and a reporting unit, where:
  • the first packet sending and receiving unit is configured to: send a first detection message carrying network quality detection information; and receive a second detection message;
  • the network quality determining unit is configured to: detect network quality according to network quality detection information in the first detection packet and network quality detection information in the second detection packet;
  • the reporting unit is configured to: report the network quality detection result when the reporting condition is met; the opposite end of the BFD includes a second packet sending and receiving unit, and the second packet sending and receiving unit is configured to: receive the first detection report And transmitting the second detection report carrying network quality detection information Text.
  • the network quality detection information includes a message sequence number
  • the network quality determining unit is configured to detect the network quality according to the following manner: determining whether the packet is lost by comparing the message sequence number sent by the packet sending and receiving unit with the message sequence number received by the packet sending and receiving unit.
  • the network quality detection information includes a message sequence number
  • the first packet sending and receiving unit is further configured to: send a plurality of first detection messages in sequence, wherein the message sequence number is regularly increased or decreased;
  • the network quality determining unit is configured to detect the network quality according to the following manner: after receiving the returned second detection packet, calculating, by sequentially comparing the message sequence number in the current received message with the message sequence number in the previous received message, The number of lost packets.
  • the network quality detection information includes timestamp information
  • the network quality determining unit is configured to detect the network quality according to the following manner: calculating the delay or jitter according to the timestamp information and the current timestamp information in the second detection message.
  • the first detection message and the second detection message use an ECHO message.
  • the present invention further provides a bidirectional forwarding detection apparatus, including: a first packet transceiving unit, a network quality judging unit, and a reporting unit, wherein:
  • the first packet sending and receiving unit is configured to: send a first detection packet carrying the network quality detection information to the first BFD peer end; and receive the second detection of the network quality detection information returned by the first BFD peer end Message
  • the network quality determining unit is configured to: detect network quality according to network quality detection information in the first detection packet and network quality detection information in the second detection packet;
  • the reporting unit is configured to: report the network quality detection result when the reporting condition is met.
  • the two-way forwarding detection device further includes:
  • a second packet sending and receiving unit configured to: receive a third detection packet that carries the network quality detection information that is sent by the second BFD peer end, and return a fourth detection that carries the network quality detection information to the second BFD peer end Message.
  • the network quality detection information includes a message sequence number
  • the network quality determining unit is configured to detect the network quality according to the following manner: determining whether the packet is lost by comparing the message sequence number sent by the packet sending and receiving unit with the message sequence number received by the packet sending and receiving unit.
  • the network quality detection information includes a message sequence number
  • the first packet sending and receiving unit is further configured to: send a plurality of first detection messages in sequence, wherein the message sequence number is regularly increased or decreased;
  • the network quality determining unit is configured to detect the network quality according to the following manner: after receiving the returned second detection packet, calculating, by sequentially comparing the message sequence number in the current received message with the message sequence number in the previous received message, The number of lost packets.
  • the network quality detection information includes timestamp information
  • the network quality determining unit is configured to detect the network quality according to the following manner: calculating the delay or jitter according to the timestamp information and the current timestamp information in the second detection message.
  • the first detection message and the second detection message use an ECHO message.
  • the bidirectional forwarding detection method and system of the present invention detects network quality, such as packet loss, delay, and jitter, while detecting network switching, and is applied to all systems that need to enable BFD detection links, and the detected network quality. It can be used as a reference for upper-layer services. When the network status is unstable, but BFD has not been broken before the link is effectively prevented, the link will be taken to prevent the link from being interrupted. BRIEF abstract
  • FIG. 1 is a schematic diagram of a bidirectional forwarding detection method according to an embodiment of the present invention.
  • FIG. 2 is a schematic diagram of a format of an ECHO packet according to an embodiment of the present invention.
  • Figure 3 is a schematic diagram of an embodiment of implementing bidirectional forwarding detection using ECHO messages. Preferred embodiment of the invention
  • the main idea of the bidirectional forwarding detection method and system of the present invention is that in detecting the continuity of the network When detecting network quality, such as packet loss, delay, jitter, etc., the transmission quality is applied to all needs to be enabled.
  • the detected network quality can be referenced by the upper-layer service. If the network status is unstable, but the BFD has not been broken before the link is effectively prevented, the measures are taken to prevent the link from actually failing. Causes business interruption.
  • the bidirectional forwarding detection method includes step 101-step.
  • Step 101 The BFD local end sends a first detection packet carrying network quality detection information.
  • Step 102 The peer end of the BFD receives the first detection packet, and sends a second detection packet carrying network quality detection information.
  • Step 103 The BFD local end receives the second detection packet, and detects network quality according to the network quality detection information in the first detection packet and the network quality detection information in the second detection packet.
  • Step 104 The BFD local end reports the network quality detection result according to the preset reporting condition.
  • the basis for detecting network quality may be packet sequence number, timestamp information, etc., such as:
  • the network quality detection information includes the packet sequence number, and the BFD local end determines whether the packet is lost by comparing the number of the sent and received packets; or
  • the network quality detection information includes a packet sequence number, and the BFD local end sends a plurality of detection packets in sequence, and the sequence number of the message is regularly incremented or decremented, and the increment and decrement may be a message difference of 1 each.
  • the BFD local end calculates the number of lost packets by comparing the sequence number of the currently received packet with the sequence number of the received packet in the previous received packet; or
  • the network quality detection information includes timestamp information, and the BFD local end calculates delay or jitter according to the timestamp information and the current timestamp information in the received detection message.
  • the system can provide the packet sequence number and/or the timestamp letter, packet, or other information according to the network quality management requirement, and set the different reporting conditions, such as the preset reporting threshold or the periodic reporting, so that the BFD device can
  • the set reporting conditions report the network quality, which in turn enables the BFD device to have the network quality detection function while the network link is detected.
  • the detection packet can be implemented in multiple packet formats.
  • the following is an example of using ECHO packets as an example:
  • ECHO message fields in the present invention are briefly described as follows:
  • Version (V) 2 bit ECHO message version, specified as 1.
  • Packet Length The length of the entire ECHO packet, in bytes.
  • the local discriminator (My Discriminator) is the same as the My Discriminator field in the BFD document. It is used to identify the BFD session that sends ECHO packets.
  • Your Discriminator is the same as the Your Discriminator field in the BFD document. If the peer packet has not been received, the field is filled with 0.
  • NTP timestmp 64 bit, NTP timestamp when ECHO is sent.
  • Absolute timestamp represented by the NTP (Network Time Protocol) format.
  • NTP Network Time Protocol
  • Serial Number Accumulate 1 each time an ECHO message is sent, and use it to detect packet loss and out of order.
  • the initial value of SN is random, which prevents plaintext attacks to a certain extent.
  • the timestamp is continuously monotonically increasing when transmitting, even when no ECHO message is sent. When receiving, as long as the received message sequence number is not lost, it is known that no data loss occurs. And, as long as the time difference between the messages before and after is compared, the time interval for sending the message can be determined. If the system does not support the NTP timestamp, the timestamp can be used to measure the loop delay. The initial timestamp must be chosen at random.
  • the service informs the BFD device to create a session and informs the BFD device of the network quality threshold (including packet loss, delay, and jitter).
  • BFD can detect that the network quality is poor according to the network quality threshold, and a quality parameter exceeds the threshold. Then report the business.
  • the process of creating a session on the BFD device includes: The local end notifies the peer to support the ECHO function in the BFD negotiation; the peer also informs the local end to support the ECHO function; the session negotiation succeeds, the status of both parties is UP, and the ECHO function is enabled.
  • Step 301 A terminal provides a timer function, and the BFD application sets a timing to send an ECHO message. Before sending the first ECHO message, the A end randomly generates an SN, a timestamp, as an initial value, and each subsequent transmission. a message, monotonically increasing;
  • Step 302 The ECHO sending timer expires, constructing and sending an ECHO packet, and recording the sent SN sequence number, NTP time, and timestamp value;
  • the A-side constructs the ECHO packet, and fills in the fields according to the ECHO packet format:
  • the local discriminator and the remote discriminator value are respectively filled in according to the actual values in the session. If the BFD packet of the B-side is not received, the remote authentication is performed. If the A port supports NTP, you need to fill in the NTP timestmp field. If it is not supported, fill in 0; SN takes the current value to be sent, and adds 1 after sending; timestamp is not necessarily absolute time, nor strict unit
  • the rule may be the system tick value, which may be the number of milliseconds after the system is powered on, as long as the A end can recognize and the accuracy is sufficient to calculate the delay and jitter;
  • Step 303 The BFD session receives the ECHO packet and forwards it back to the A end according to the forwarding path.
  • Step 304 The A end receives the ECHO packet sent by the B end, records the timestamp at this time, records the received SN sequence number, calculates the packet loss, delay, and jitter, and reports when the threshold is exceeded.
  • the current sequence number is the same as the sequence number of the first ECHO packet sent. If they are inconsistent, they may be lost packets or out of order. Packet hypothesis calculation: The current message sequence number minus the first ECHO sequence number sent is the number of packet loss; if they are consistent, it means no packet loss;
  • the timestamp and timestamp if the NTP time protocol is enabled, the NTP time is used first to calculate the delay and jitter; otherwise, the timestamp is used to calculate the delay and jitter.
  • the current NTP time (or timpstamp) is subtracted from the NTP time (or tempstamp) difference in the text, and converted to ms. This is the ECHO sent from A, and the B-end forwarding returns the loopback time of the A end. Ignore the B-side forwarding processing time, which can be considered as the network round-trip delay.
  • the obtained packet loss, delay, and jitter are compared with the service setting threshold.
  • the service reporting threshold is exceeded, the current network quality of the service is notified.
  • the invention can detect the link quality in real time through BFD.
  • the network has quality problems, it may not be very serious, there is quantitative network quality data reporting, and each service analyzes the data, and the service senses the network status as early as possible.
  • Intervene to adjust the transmission mode or transmission rate reduce the network burden, avoid network transmission interruption as much as possible, such as determining the corresponding measures according to their own characteristics, ignoring or mitigating the current link burden or switching to the backup link. How the business analyzes the relevant data and what measures are taken is outside the scope of the description of the present specification.
  • the present invention further provides a bidirectional forwarding detection system, where the system includes a BFD local end and a peer end of the BFD, where:
  • the BFD local end includes: a packet sending and receiving unit, a network quality determining unit, and a reporting unit, where the packet sending and receiving unit is configured to: send a first detection message carrying network quality detection information; and receive a second detection message;
  • the network quality determining unit is configured to: detect network quality according to the network quality detection information in the first detection packet and the network quality detection information in the second detection packet;
  • the reporting unit is configured to: report the network quality detection result when the reporting condition is met;
  • the peer end of the BFD includes a second packet sending and receiving unit, and the second packet sending and receiving unit is configured to: receive the first detecting packet; and send the second detecting packet that carries network quality detecting information.
  • the network quality detection information includes a packet sequence number, and the network quality determining unit is Compare the number of sent and received packets to determine whether to drop packets.
  • the network quality detection information includes a packet sequence number, and the packet sending and receiving unit of the BFD local end sends a plurality of detection packets in sequence, and the message sequence number is regularly incremented or decremented, and the network quality determining unit receives After the detected packet is returned, the packet loss number is calculated by comparing the sequence number of the currently received packet with the sequence number of the packet received in the previous packet.
  • the network quality detection information includes timestamp information, and the network quality determining unit calculates delay or jitter according to the timestamp information and the current timestamp information in the received detection message.
  • the detection packet uses an ECHO protocol packet.
  • the method and system of the present invention use the BFD protocol to detect not only the link is disconnected, but also to timely detect and feed back the network quality status to the service, provide service reference to adjust network traffic, and take early measures to prevent service interruption.
  • the bidirectional forwarding detection method and system of the present invention detects network quality, such as packet loss, delay, and jitter, while detecting network switching, and is applied to all systems that need to enable BFD detection links, and the detected network quality. It can be used as a reference for upper-layer services. When the network status is unstable, but BFD has not been broken before the link is effectively prevented, it will prevent the link from being interrupted and cause traffic interruption. It has strong industrial applicability.
  • network quality such as packet loss, delay, and jitter

Abstract

The present invention provides a method and system for Bidirectional Forwarding Detection (BFD). The method includes: a BFD local end transmits a first detection message which carries the network quality detection information(101); a BFD opposite end receives the first detection message, and transmits a second detection message which carries the network quality detection information(102); the BFD local end receives the second detection message, and detects the network quality according to the network quality detection information in the first detection message and the network quality detection information in the second detection message(103); the BFD local end reports the detection result of network quality according to preset reporting conditions(104).

Description

双向转发检测方法和系统  Bidirectional forwarding detection method and system
技术领域 Technical field
本发明双向转发检测( BFD )技术, 具体涉及通过 BFD协议实现双发转 发检测的方法和系统。  The bidirectional forwarding detection (BFD) technology of the present invention specifically relates to a method and system for implementing dual-issue forwarding detection by using a BFD protocol.
背景技术 Background technique
BFD为各种上层控制协议提供一种通用的低开销快速故障检测服务, 上 层控制协议可以利用 BFD提供的服务来决定自己釆取相应操作, 比如重新选 路。 之所以称为双向, 是因为 BFD协议通过三次握手机制, 能提供链路来回 两个方向的连通性检测。 BFD可以快速检测到转发路径上的接口和链路故障、 节点的转发引擎故障等, 并把故障通知上层协议, 使上层协议能够快速收敛。  BFD provides a common low-cost fast fault detection service for various upper-layer control protocols. The upper-layer control protocol can use the services provided by BFD to determine the corresponding operations, such as re-routing. It is called bidirectional because the BFD protocol provides connectivity detection in both directions of the link through the three-way handshake mechanism. BFD can quickly detect the interface and link faults on the forwarding path, the forwarding engine fault of the node, and notify the upper layer protocol of the fault, so that the upper layer protocol can converge quickly.
目前, BFD仅适用于检测链路连通性,也就是说通过 BFD获取的链路信 息, 要么是连通的, 要么是断开的。 而有些情况, 链路通常先有少量丟包, 继而大量丟包, 最终断链。 当传输存在少量丟包时, 现在的 BFD也许并不能 发现, 此时的业务可能已经受到影响, 但 BFD需要等到丟包达到一定程度时 才能检测到链路故障。  Currently, BFD is only used to detect link connectivity. That is, link information obtained through BFD is either connected or disconnected. In some cases, the link usually has a small amount of packet loss, and then a large amount of packet loss, and finally the chain is broken. When there is a small amount of packet loss in the transmission, the current BFD may not be discovered. The service may be affected at this time. However, BFD needs to wait until the packet loss reaches a certain level to detect the link failure.
发明内容 Summary of the invention
本发明要解决的技术问题是提供一种双向转发检测方法和系统, 以有效 预防断链。 为解决以上技术问题, 本发明提供了一种双向转发检测方法, 该方法包 括:  The technical problem to be solved by the present invention is to provide a bidirectional forwarding detection method and system for effectively preventing chain scission. To solve the above technical problem, the present invention provides a bidirectional forwarding detection method, which includes:
双向转发检测(BFD )本端发送携带网络质量检测信息的第一检测报文; 所述 BFD的对端接收所述第一检测报文,发送携带网络质量检测信息的 第二检测报文; 所述 BFD本端接收所述第二检测报文,根据所述第一检测报文中的网络 质量检测信息与所述第二检测报文中的网络质量检测信息检测网络质量; 所述 BFD本端根据预设上报条件上报网络质量检测结果。 其中, 所述网络质量检测信息包括报文序号, 该方法还包括: The two-way forwarding detection (BFD) sends the first detection packet carrying the network quality detection information to the local end; the peer end of the BFD receives the first detection packet, and sends a second detection packet carrying the network quality detection information; The BFD local end receives the second detection packet, and detects network quality according to network quality detection information in the first detection packet and network quality detection information in the second detection packet; The terminal reports the network quality detection result according to the preset reporting condition. The network quality detection information includes a message sequence number, and the method further includes:
所述 BFD本端通过比较所述第一检测报文中的报文序号和所述第二检测 报文中的报文序号判断是否丟包。 其中, 所述网络质量检测信息包括报文序号, 该方法还包括:  The BFD local end determines whether to drop packets by comparing the message sequence number in the first detection packet with the message sequence number in the second detection packet. The network quality detection information includes a message sequence number, and the method further includes:
所述 BFD本端依次发送多个第一检测报文,其中的报文序号规律性递增 或递减;  The local end of the BFD sends a plurality of first detection messages in sequence, wherein the sequence number of the message is regularly increased or decreased;
所述 BFD本端接收返回的第二检测报文后,通过依次比较当前接收报文 中的报文序号与前一次接收报文中的报文序号, 计算丟包数。  After receiving the returned second detection packet, the BFD local end compares the packet sequence number in the current received packet with the packet sequence number in the previous received packet, and calculates the number of lost packets.
其中, 所述网络质量检测信息包括时间戳信息; 该方法还包括: 所述 BFD本端根据所述第二检测报文中的时间戳信息和当前时间戳信息 计算时延或抖动。  The network quality detection information includes timestamp information. The method further includes: the BFD local end calculating delay or jitter according to the timestamp information and the current timestamp information in the second detection packet.
其中, 所述第一检测报文和所述第二检测报文釆用 ECHO报文。  The first detection message and the second detection message use an ECHO message.
本发明还提供了一种双向转发检测系统, 该系统包括双向转发检测 ( BFD )本端和所述 BFD的对端, 其中:  The present invention also provides a bidirectional forwarding detection system, which includes a bidirectional forwarding detection (BFD) local end and a peer end of the BFD, where:
所述 BFD本端包括:第一报文收发单元、网络质量判断单元及上报单元, 其中:  The local end of the BFD includes: a first packet sending and receiving unit, a network quality determining unit, and a reporting unit, where:
所述第一报文收发单元设置成: 发送携带网络质量检测信息的第一检测 报文; 以及接收第二检测报文;  The first packet sending and receiving unit is configured to: send a first detection message carrying network quality detection information; and receive a second detection message;
所述网络质量判断单元设置成: 根据所述第一检测报文中的网络质量检 测信息与所述第二检测报文中的网络质量检测信息检测网络质量;  The network quality determining unit is configured to: detect network quality according to network quality detection information in the first detection packet and network quality detection information in the second detection packet;
所述上报单元设置成: 在符合上报条件时上报网络质量检测结果; 所述 BFD的对端包括第二报文收发单元,所述第二报文收发单元设置成: 接收所述第一检测报文; 以及发送携带网络质量检测信息的所述第二检测报 文。 The reporting unit is configured to: report the network quality detection result when the reporting condition is met; the opposite end of the BFD includes a second packet sending and receiving unit, and the second packet sending and receiving unit is configured to: receive the first detection report And transmitting the second detection report carrying network quality detection information Text.
其中, 所述网络质量检测信息包括报文序号;  The network quality detection information includes a message sequence number;
所述网络质量判断单元设置成按照以下方式检测网络质量: 通过比较所 述报文收发单元发送的报文序号和所述报文收发单元接收的报文序号判断是 否丟包。  The network quality determining unit is configured to detect the network quality according to the following manner: determining whether the packet is lost by comparing the message sequence number sent by the packet sending and receiving unit with the message sequence number received by the packet sending and receiving unit.
其中, 所述网络质量检测信息包括报文序号;  The network quality detection information includes a message sequence number;
所述第一报文收发单元还设置成: 依次发送多个第一检测报文, 其中的 报文序号规律性递增或递减;  The first packet sending and receiving unit is further configured to: send a plurality of first detection messages in sequence, wherein the message sequence number is regularly increased or decreased;
所述网络质量判断单元设置成按照以下方式检测网络质量: 接收返回的 第二检测报文后, 通过依次比较当前接收报文中的报文序号与前一次接收报 文中的报文序号, 计算丟包数。  The network quality determining unit is configured to detect the network quality according to the following manner: after receiving the returned second detection packet, calculating, by sequentially comparing the message sequence number in the current received message with the message sequence number in the previous received message, The number of lost packets.
其中, 所述网络质量检测信息包括时间戳信息;  The network quality detection information includes timestamp information;
所述网络质量判断单元设置成按照以下方式检测网络质量: 根据所述第 二检测报文中的时间戳信息和当前时间戳信息计算时延或抖动。  The network quality determining unit is configured to detect the network quality according to the following manner: calculating the delay or jitter according to the timestamp information and the current timestamp information in the second detection message.
其中, 所述第一检测报文和所述第二检测报文釆用 ECHO报文。  The first detection message and the second detection message use an ECHO message.
本发明还提供了一种双向转发检测装置, 包括: 第一报文收发单元、 网 络质量判断单元及上报单元, 其中:  The present invention further provides a bidirectional forwarding detection apparatus, including: a first packet transceiving unit, a network quality judging unit, and a reporting unit, wherein:
所述第一报文收发单元设置成: 发送携带网络质量检测信息的第一检测 报文至第一 BFD对端; 以及接收所述第一 BFD对端返回的携带网络质量检 测信息的第二检测报文;  The first packet sending and receiving unit is configured to: send a first detection packet carrying the network quality detection information to the first BFD peer end; and receive the second detection of the network quality detection information returned by the first BFD peer end Message
所述网络质量判断单元设置成: 根据所述第一检测报文中的网络质量检 测信息与所述第二检测报文中的网络质量检测信息检测网络质量;  The network quality determining unit is configured to: detect network quality according to network quality detection information in the first detection packet and network quality detection information in the second detection packet;
所述上报单元设置成: 在符合上报条件时上报网络质量检测结果。  The reporting unit is configured to: report the network quality detection result when the reporting condition is met.
所述的双向转发检测装置还包括:  The two-way forwarding detection device further includes:
第二报文收发单元, 其设置成: 接收第二 BFD对端发送的携带网络质量 检测信息的第三检测报文; 以及向所述第二 BFD对端返回携带网络质量检测 信息的第四检测报文。 其中, 所述网络质量检测信息包括报文序号; And a second packet sending and receiving unit, configured to: receive a third detection packet that carries the network quality detection information that is sent by the second BFD peer end, and return a fourth detection that carries the network quality detection information to the second BFD peer end Message. The network quality detection information includes a message sequence number;
所述网络质量判断单元设置成按照以下方式检测网络质量: 通过比较所 述报文收发单元发送的报文序号和所述报文收发单元接收的报文序号判断是 否丟包。  The network quality determining unit is configured to detect the network quality according to the following manner: determining whether the packet is lost by comparing the message sequence number sent by the packet sending and receiving unit with the message sequence number received by the packet sending and receiving unit.
其中, 所述网络质量检测信息包括报文序号;  The network quality detection information includes a message sequence number;
所述第一报文收发单元还设置成: 依次发送多个第一检测报文, 其中的 报文序号规律性递增或递减;  The first packet sending and receiving unit is further configured to: send a plurality of first detection messages in sequence, wherein the message sequence number is regularly increased or decreased;
所述网络质量判断单元设置成按照以下方式检测网络质量: 接收返回的 第二检测报文后, 通过依次比较当前接收报文中的报文序号与前一次接收报 文中的报文序号, 计算丟包数。  The network quality determining unit is configured to detect the network quality according to the following manner: after receiving the returned second detection packet, calculating, by sequentially comparing the message sequence number in the current received message with the message sequence number in the previous received message, The number of lost packets.
其中, 所述网络质量检测信息包括时间戳信息;  The network quality detection information includes timestamp information;
所述网络质量判断单元设置成按照以下方式检测网络质量: 根据所述第 二检测报文中的时间戳信息和当前时间戳信息计算时延或抖动。  The network quality determining unit is configured to detect the network quality according to the following manner: calculating the delay or jitter according to the timestamp information and the current timestamp information in the second detection message.
其中, 所述第一检测报文及所述第二检测报文釆用 ECHO报文。  The first detection message and the second detection message use an ECHO message.
本发明双向转发检测方法和系统在检测网络通断的同时,检测网络质量, 如丟包, 时延, 抖动等传输质量, 应用于所有需要启用 BFD检测链路的系统 中, 检测出的网络质量可供上层业务参考, 在网络状况不稳定, 但 BFD还没 有断链前, 就进行有效预防, 防止链路真正出现故障时才釆取措施而引起业 务发生中断。 附图概述  The bidirectional forwarding detection method and system of the present invention detects network quality, such as packet loss, delay, and jitter, while detecting network switching, and is applied to all systems that need to enable BFD detection links, and the detected network quality. It can be used as a reference for upper-layer services. When the network status is unstable, but BFD has not been broken before the link is effectively prevented, the link will be taken to prevent the link from being interrupted. BRIEF abstract
图 1 是本发明实施方式的双向转发检测方法的示意图;  1 is a schematic diagram of a bidirectional forwarding detection method according to an embodiment of the present invention;
图 2是本发明实施方式的 ECHO报文格式示意图;  2 is a schematic diagram of a format of an ECHO packet according to an embodiment of the present invention;
图 3 是釆用 ECHO报文实现双向转发检测的实施例示意图。 本发明的较佳实施方式  Figure 3 is a schematic diagram of an embodiment of implementing bidirectional forwarding detection using ECHO messages. Preferred embodiment of the invention
本发明双向转发检测方法和系统的主要思想在于, 在检测网络通断的同 时, 检测网络质量, 如丟包, 时延, 抖动等传输质量, 应用于所有需要启用The main idea of the bidirectional forwarding detection method and system of the present invention is that in detecting the continuity of the network When detecting network quality, such as packet loss, delay, jitter, etc., the transmission quality is applied to all needs to be enabled.
BFD检测链路的系统中, 检测出的网络质量可供上层业务参考, 在网络状况 不稳定, 但 BFD还没有断链前, 就进行有效预防, 防止链路真正出现故障时 才釆取措施, 引起业务发生中断。 In the BFD detection link system, the detected network quality can be referenced by the upper-layer service. If the network status is unstable, but the BFD has not been broken before the link is effectively prevented, the measures are taken to prevent the link from actually failing. Causes business interruption.
如图 1 所示, 本发明实施方式的双向转发检测方法包括步骤 101-步骤 As shown in FIG. 1, the bidirectional forwarding detection method according to an embodiment of the present invention includes step 101-step.
104: 104:
步骤 101 : BFD本端发送携带网络质量检测信息的第一检测报文; 步骤 102: 所述 BFD的对端接收所述第一检测报文, 发送携带网络质量 检测信息的第二检测报文;  Step 101: The BFD local end sends a first detection packet carrying network quality detection information. Step 102: The peer end of the BFD receives the first detection packet, and sends a second detection packet carrying network quality detection information.
步骤 103: 所述 BFD本端接收所述第二检测报文, 根据所述第一检测报 文中的网络质量检测信息与所述第二检测报文中的网络质量检测信息检测网 络质量;  Step 103: The BFD local end receives the second detection packet, and detects network quality according to the network quality detection information in the first detection packet and the network quality detection information in the second detection packet.
步骤 104: 所述 BFD本端根据预设上报条件上报网络质量检测结果。 检测网络质量的依据可以是报文序号、 时间戳信息等, 如:  Step 104: The BFD local end reports the network quality detection result according to the preset reporting condition. The basis for detecting network quality may be packet sequence number, timestamp information, etc., such as:
网络质量检测信息包括报文序号,所述 BFD本端通过比较发送和接收的 报文序号判断是否丟包; 或者,  The network quality detection information includes the packet sequence number, and the BFD local end determines whether the packet is lost by comparing the number of the sent and received packets; or
所述网络质量检测信息包括报文序号,所述 BFD本端依次发送若干个检 测报文, 且其中的报文序号规律性递增或递减, 递增和递减可以是是逐个报 文差为 1 , 所述 BFD本端接收返回的检测报文后, 通过依次比较当前接收报 文中的报文序号与前一次接收报文中的报文序号, 计算丟包数; 或者,  The network quality detection information includes a packet sequence number, and the BFD local end sends a plurality of detection packets in sequence, and the sequence number of the message is regularly incremented or decremented, and the increment and decrement may be a message difference of 1 each. After receiving the detected test packet, the BFD local end calculates the number of lost packets by comparing the sequence number of the currently received packet with the sequence number of the received packet in the previous received packet; or
所述网络质量检测信息包括时间戳信息,所述 BFD本端根据接收的检测 报文中的时间戳信息和当前时间戳信息计算时延或抖动。  The network quality detection information includes timestamp information, and the BFD local end calculates delay or jitter according to the timestamp information and the current timestamp information in the received detection message.
当然, 系统可以根据网络质量管理需要提供报文序号和 /或时间戳信 ,包、, 或其他信息, 并通过设定不同的上报条件, 比如预设上报门限或定时上报等, 使得 BFD设备根据设定的上报条件上报网络质量, 进而使得 BFD设备在网 络链路通断检测的同时, 具备网络质量检测功能。  Of course, the system can provide the packet sequence number and/or the timestamp letter, packet, or other information according to the network quality management requirement, and set the different reporting conditions, such as the preset reporting threshold or the periodic reporting, so that the BFD device can The set reporting conditions report the network quality, which in turn enables the BFD device to have the network quality detection function while the network link is detected.
检测报文可以釆用多种报文格式实现, 以下以釆用 ECHO报文为例进行 说明: 首先对本发明中的 ECHO报文字段简要说明如下: The detection packet can be implemented in multiple packet formats. The following is an example of using ECHO packets as an example: First, the ECHO message fields in the present invention are briefly described as follows:
如图 2所示, ECHO请求报文格式字段说明:  As shown in Figure 2, the ECHO request packet format field description:
版本(V ) : 2 bit ECHO报文版本, 规定为 1。  Version (V): 2 bit ECHO message version, specified as 1.
报文类型 (PT): 8 bit, ECHO定义为 1。  Message Type (PT): 8 bit, ECHO is defined as 1.
报文长度( Length ) : 整个 ECHO报文的长度, 以字节为单位。  Packet Length ( Length): The length of the entire ECHO packet, in bytes.
本端鉴别器( My Discriminator ) : 与 BFD才艮文中的 My Discriminator字 段一致, 用于标识发出 ECHO报文的 BFD会话。  The local discriminator (My Discriminator) is the same as the My Discriminator field in the BFD document. It is used to identify the BFD session that sends ECHO packets.
远端鉴另 ll器 ( Your Discriminator ) : 与 BFD才艮文中的 Your Discriminator 字段一致, 如果没有收到过对端的报文, 则该字段填 0.  Your Discriminator is the same as the Your Discriminator field in the BFD document. If the peer packet has not been received, the field is filled with 0.
NTP时戳(NTP timestmp ) : 64 bit, ECHO发送时的 NTP时间戳。 NTP timestmp (NTP timestmp): 64 bit, NTP timestamp when ECHO is sent.
NTP(Network Time Protocol 网络时间协议)格式表示的绝对时间戳。 发送 ECHO报文时标明当前时戳, 和接收到接收方返回时的时戳进行比较, 以测 量环路时延。 如果发送系统不能获得这个时间读数, 那么把这个域设置为 0。 Absolute timestamp represented by the NTP (Network Time Protocol) format. When the ECHO message is sent, the current timestamp is indicated, and compared with the timestamp when the receiver returns, to measure the loop delay. If the sending system cannot get this time reading, set this field to 0.
序列号(SN ) : 每发送一个 ECHO报文时累加 1 , 接收时用它来检测丟 包、 乱序。 SN的初始值是随机的, 这在一定程度防止了明文攻击。  Serial Number (SN): Accumulate 1 each time an ECHO message is sent, and use it to detect packet loss and out of order. The initial value of SN is random, which prevents plaintext attacks to a certain extent.
系统相对时戳(timestamp ) : 发送时时间戳是连续单调递增的, 即使在 没有 ECHO报文发出时也是如此; 在接收时, 只要接收到的报文序列号没有 丟失, 就知道没有发生数据丟失, 而且只要比较前后报文的时间戳的差异, 就可以确定报文发出的时间间隔, 如果系统不支持 NTP时戳, 可以使用这个 时戳来测量环路时延。 初始的时间戳必须随机选择。  System relative timestamp (timestamp): The timestamp is continuously monotonically increasing when transmitting, even when no ECHO message is sent. When receiving, as long as the received message sequence number is not lost, it is known that no data loss occurs. And, as long as the time difference between the messages before and after is compared, the time interval for sending the message can be determined. If the system does not support the NTP timestamp, the timestamp can be used to measure the loop delay. The initial timestamp must be chosen at random.
业务通知 BFD设备创建会话,并告知 BFD设备相关的网络质量门限(包 括丟包, 时延, 抖动 ); BFD可根据这些网络质量门限检测到网络质量较差, 某个质量参数超过门限值, 则上报业务。  The service informs the BFD device to create a session and informs the BFD device of the network quality threshold (including packet loss, delay, and jitter). BFD can detect that the network quality is poor according to the network quality threshold, and a quality parameter exceeds the threshold. Then report the business.
BFD设备创建会话的过程包括: BFD协商时本端通知对端支持 ECHO(应 答)功能;对端也通知本端支持 ECHO功能;会话协商成功,双方状态为 UP, 且启用 ECHO功能。  The process of creating a session on the BFD device includes: The local end notifies the peer to support the ECHO function in the BFD negotiation; the peer also informs the local end to support the ECHO function; the session negotiation succeeds, the status of both parties is UP, and the ECHO function is enabled.
以一个 BFD会话模型为例,设 A为 BFD本端, B为 BFD对端,参见 BFD 会话检测网络质量实例, 如图 3所示, 具体方式包括以下步骤: 步骤 301 , A端提供定时器功能, 由 BFD的应用来设置定时发送 ECHO 报文, 在发送第一个 ECHO报文前, A端随机产生一个 SN, —个 timestamp, 作为初始值, 后续每发送一个报文, 单调递增; Take a BFD session as an example. Set A as the local BFD and B as the peer. For details, see BFD session detection network quality. Figure 3 shows the following steps: Step 301: A terminal provides a timer function, and the BFD application sets a timing to send an ECHO message. Before sending the first ECHO message, the A end randomly generates an SN, a timestamp, as an initial value, and each subsequent transmission. a message, monotonically increasing;
步骤 302, ECHO发送定时器超时, 构造并发送 ECHO报文, 记录发送 的 SN序号, NTP时间, timestamp值;  Step 302: The ECHO sending timer expires, constructing and sending an ECHO packet, and recording the sent SN sequence number, NTP time, and timestamp value;
A端构造 ECHO报文, 按照 ECHO报文格式填写各字段: 本端鉴别器和 远端鉴别器值分别按照会话中的实际值填写,如果没有收到过 B端的 BFD报 文,则远端鉴别器值填 0;如果 A端支持 NTP协议,则需要填写 NTP timestmp 字段, 如果不支持则填 0; SN取当前待发送值, 发送后加 1 ; timestamp不一 定是绝对时间, 也没有严格的单位规定, 可以是系统 tick值, 可以是系统上 电后的毫秒数, 只要 A本端能识别且精度足够计算时延和抖动;  The A-side constructs the ECHO packet, and fills in the fields according to the ECHO packet format: The local discriminator and the remote discriminator value are respectively filled in according to the actual values in the session. If the BFD packet of the B-side is not received, the remote authentication is performed. If the A port supports NTP, you need to fill in the NTP timestmp field. If it is not supported, fill in 0; SN takes the current value to be sent, and adds 1 after sending; timestamp is not necessarily absolute time, nor strict unit The rule may be the system tick value, which may be the number of milliseconds after the system is powered on, as long as the A end can recognize and the accuracy is sufficient to calculate the delay and jitter;
步骤 303 , B端 BFD会话收到 ECHO报文, 按照转发路径原样转发回 A 端;  Step 303: The BFD session receives the ECHO packet and forwards it back to the A end according to the forwarding path.
步骤 304, A端收到 B端发出的 ECHO报文, 记录此时的时间戳, 记录 收到的 SN序号, 计算丟包、 时延和抖动, 超出门限时上报:  Step 304: The A end receives the ECHO packet sent by the B end, records the timestamp at this time, records the received SN sequence number, calculates the packet loss, delay, and jitter, and reports when the threshold is exceeded.
1、 将收到的 SN序号与发送的 SN序号对比, 查看是否有丟包, 若有丟 包, 计算丟包率:  1. Compare the received SN sequence number with the sent SN sequence number to see if there is any packet loss. If there is a packet loss, calculate the packet loss rate:
1.1 如果是收到的第一个报文, 记录当前接收到的序号, 与发送的第一 个 ECHO报文序号比较是否一致, 如果不一致, 可能是丟包, 也可能是乱序, 先按照丟包假设计算: 当前的报文序号减去发送的第一个 ECHO序号所得到 的值即为丟包数; 如果一致, 则表示没有丟包;  If the first packet is received, the current sequence number is the same as the sequence number of the first ECHO packet sent. If they are inconsistent, they may be lost packets or out of order. Packet hypothesis calculation: The current message sequence number minus the first ECHO sequence number sent is the number of packet loss; if they are consistent, it means no packet loss;
1.2 如果是后续的报文, 则与上一个收到的报文序号比较, 如果与上一 个接收报文是连续的, 则没有丟包, 更新当前接收到的序号, 否则计算丟包: 当前的报文序号在上次接收的序号之前, 则丟包统计减 1 , 不更新当前接收 到的序号; 当前的报文序号在上次接收的序号之后且不连续, 则当前的报文 序号减去上次接收到的报文序号再减 1所得到的值即为丟包数。  1.2 If it is a subsequent packet, it is compared with the previous received packet sequence number. If it is continuous with the previous received packet, there is no packet loss, and the currently received sequence number is updated. Otherwise, the packet loss is calculated: Current If the message sequence number is before the last received sequence number, the packet loss statistics are decremented by 1 and the currently received sequence number is not updated. The current message sequence number is not continuous after the last received sequence number, and the current message sequence number is subtracted. The value obtained by subtracting 1 from the last received message number is the number of lost packets.
2、将收到报文时刻的时间戳与报文中发送时刻的时间戳比较, 计算报文 往返的网络时延:  2. Compare the timestamp of the received packet with the timestamp of the sending time in the packet, and calculate the network delay of the round trip of the packet:
收到报文后获取当前的 NTP时间或 timestamp时间, 提取报文中的 NTP 时间戳和 timestamp, 如果启用了 NTP时间协议, 则优先使用 NTP时间计算 时延和抖动; 否则使用 timestamp计算时延和抖动。 将当前的 NTP时间 (或 timpstamp )减去才艮文中的 NTP时间 (或 tempstamp )的差, 换算成 ms, 这是 从 A发送 ECHO, 经过 B端转发, 返回 A端的环回时间。 忽略 B端转发处理 时间, 可认为是网络往返时延。 有的系统需要单向时延, 则可以将往返时延 除以 2, 即得到网络单向传输时延的估算值。 Obtain the current NTP time or timestamp time after receiving the packet, and extract the NTP in the packet. The timestamp and timestamp, if the NTP time protocol is enabled, the NTP time is used first to calculate the delay and jitter; otherwise, the timestamp is used to calculate the delay and jitter. The current NTP time (or timpstamp) is subtracted from the NTP time (or tempstamp) difference in the text, and converted to ms. This is the ECHO sent from A, and the B-end forwarding returns the loopback time of the A end. Ignore the B-side forwarding processing time, which can be considered as the network round-trip delay. Some systems require one-way delay, and the round-trip delay can be divided by 2, that is, the estimated value of the network one-way transmission delay is obtained.
3、 每收到一个报文都计算获取一个时延值, 相邻的时延比较, 取差值的 绝对值, 即当前的抖动值。  3. Each time a message is received, a delay value is calculated, and the adjacent delays are compared, and the absolute value of the difference is taken, that is, the current jitter value.
将获得的丟包, 时延, 抖动与业务设置的门限比较, 超过业务的上报门 限, 则通知业务当前的网络质量。  The obtained packet loss, delay, and jitter are compared with the service setting threshold. When the service reporting threshold is exceeded, the current network quality of the service is notified.
本发明通过 BFD做到实时检测链路质量, 当网络出现质量问题, 也许并 不一定很严重时, 就有量化的网络质量数据上报, 由各个业务分析数据, 业 务尽早感知到了网络状况, 可以及时干预调整传输方式或传输速率, 减少网 络负担, 尽可能避免网络传输中断, 如根据自身特点自行决定相应措施, 忽 略或减轻现在链路负担或切换到备份链路。 业务如何分析相关数据及釆取何 种措施不在本发明说明书描述范围内。  The invention can detect the link quality in real time through BFD. When the network has quality problems, it may not be very serious, there is quantitative network quality data reporting, and each service analyzes the data, and the service senses the network status as early as possible. Intervene to adjust the transmission mode or transmission rate, reduce the network burden, avoid network transmission interruption as much as possible, such as determining the corresponding measures according to their own characteristics, ignoring or mitigating the current link burden or switching to the backup link. How the business analyzes the relevant data and what measures are taken is outside the scope of the description of the present specification.
为了实现以上方法, 本发明还提供了一种双向转发检测系统, 该系统包 括 BFD本端和所述 BFD的对端 , 其中: In order to implement the above method, the present invention further provides a bidirectional forwarding detection system, where the system includes a BFD local end and a peer end of the BFD, where:
BFD本端包括: 报文收发单元、 网络质量判断单元及上报单元, 其中, 所述报文收发单元设置成:发送携带网络质量检测信息的第一检测报文; 以及接收第二检测报文;  The BFD local end includes: a packet sending and receiving unit, a network quality determining unit, and a reporting unit, where the packet sending and receiving unit is configured to: send a first detection message carrying network quality detection information; and receive a second detection message;
网络质量判断单元设置成: 根据所述第一检测报文中的网络质量检测信 息与所述第二检测报文中的网络质量检测信息检测网络质量;  The network quality determining unit is configured to: detect network quality according to the network quality detection information in the first detection packet and the network quality detection information in the second detection packet;
上报单元设置成: 在符合上报条件时上报网络质量检测结果;  The reporting unit is configured to: report the network quality detection result when the reporting condition is met;
所述 BFD的对端包括第二报文收发单元,所述第二报文收发单元设置成: 接收所述第一检测报文; 以及发送携带网络质量检测信息的所述第二检测报 文。  The peer end of the BFD includes a second packet sending and receiving unit, and the second packet sending and receiving unit is configured to: receive the first detecting packet; and send the second detecting packet that carries network quality detecting information.
其中, 所述网络质量检测信息包括报文序号, 所述网络质量判断单元通 过比较发送和接收的报文序号判断是否丟包。 The network quality detection information includes a packet sequence number, and the network quality determining unit is Compare the number of sent and received packets to determine whether to drop packets.
其中, 所述网络质量检测信息包括报文序号, 所述 BFD本端的报文收发 单元依次发送若干个检测报文, 且其中的报文序号规律性递增或递减, 所述 网络质量判断单元, 接收返回的检测报文后, 通过依次比较当前接收报文中 的报文序号与前一次接收报文中的报文序号, 计算丟包数。  The network quality detection information includes a packet sequence number, and the packet sending and receiving unit of the BFD local end sends a plurality of detection packets in sequence, and the message sequence number is regularly incremented or decremented, and the network quality determining unit receives After the detected packet is returned, the packet loss number is calculated by comparing the sequence number of the currently received packet with the sequence number of the packet received in the previous packet.
其中, 所述网络质量检测信息包括时间戳信息, 所述网络质量判断单元, 根据接收的检测报文中的时间戳信息和当前时间戳信息计算时延或抖动。  The network quality detection information includes timestamp information, and the network quality determining unit calculates delay or jitter according to the timestamp information and the current timestamp information in the received detection message.
其中, 所述检测报文釆用 ECHO协议报文。  The detection packet uses an ECHO protocol packet.
本发明方法和系统, 使用 BFD协议, 不仅检测出链路的通断, 更进一步 及时检测并向业务反馈网络质量状况, 供业务参考以调整网络流量, 及早釆 取措施预防业务中断。  The method and system of the present invention use the BFD protocol to detect not only the link is disconnected, but also to timely detect and feed back the network quality status to the service, provide service reference to adjust network traffic, and take early measures to prevent service interruption.
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序 来指令相关硬件完成, 所述程序可以存储于计算机可读存储介质中, 如只读 存储器、 磁盘或光盘等。 可选地, 上述实施例的全部或部分步骤也可以使用 一个或多个集成电路来实现。 相应地, 上述实施例中的各单元可以釆用硬件 的形式实现, 也可以釆用软件功能模块的形式实现。 本发明不限制于任何特 定形式的硬件和软件的结合。  One of ordinary skill in the art will appreciate that all or a portion of the above steps may be accomplished by a program instructing the associated hardware, such as a read-only memory, a magnetic disk, or an optical disk. Alternatively, all or part of the steps of the above embodiments may also be implemented using one or more integrated circuits. Correspondingly, each unit in the foregoing embodiment may be implemented in the form of hardware, or may be implemented in the form of a software function module. The invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已, 并非用于限定本发明的保护范 围。 根据本发明的发明内容, 还可有其他多种实施例, 在不背离本发明精神 改变和变形, 凡在本发明的精神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。  The above description is only a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. In view of the present invention, various other modifications, equivalents, improvements, etc., should be made without departing from the spirit and scope of the invention. It is included in the scope of protection of the present invention.
工业实用性 Industrial applicability
本发明双向转发检测方法和系统在检测网络通断的同时,检测网络质量, 如丟包, 时延, 抖动等传输质量, 应用于所有需要启用 BFD检测链路的系统 中, 检测出的网络质量可供上层业务参考, 在网络状况不稳定, 但 BFD还没 有断链前, 就进行有效预防, 防止链路真正出现故障时才釆取措施而引起业 务发生中断, 具有极强的工业实用性。  The bidirectional forwarding detection method and system of the present invention detects network quality, such as packet loss, delay, and jitter, while detecting network switching, and is applied to all systems that need to enable BFD detection links, and the detected network quality. It can be used as a reference for upper-layer services. When the network status is unstable, but BFD has not been broken before the link is effectively prevented, it will prevent the link from being interrupted and cause traffic interruption. It has strong industrial applicability.

Claims

权 利 要 求 书 Claim
1、 一种双向转发检测方法, 该方法包括: 1. A two-way forwarding detection method, the method comprising:
双向转发检测(BFD )本端发送携带网络质量检测信息的第一检测报文; 所述 BFD的对端接收所述第一检测报文,发送携带网络质量检测信息的 第二检测报文;  The two-way forwarding detection (BFD) sends the first detection packet carrying the network quality detection information to the local end; the peer end of the BFD receives the first detection packet, and sends a second detection packet carrying the network quality detection information;
所述 BFD本端接收所述第二检测报文,根据所述第一检测报文中的网络 质量检测信息与所述第二检测报文中的网络质量检测信息检测网络质量; 所述 BFD本端根据预设上报条件上报网络质量检测结果。  The BFD local end receives the second detection packet, and detects network quality according to network quality detection information in the first detection packet and network quality detection information in the second detection packet; The terminal reports the network quality detection result according to the preset reporting condition.
2、 如权利要求 1所述的双向转发检测方法, 其中, 所述网络质量检测信 息包括 序号, 该方法还包括: 2. The bidirectional forwarding detection method according to claim 1, wherein the network quality detection information includes a sequence number, and the method further includes:
所述 BFD本端通过比较所述第一检测报文中的报文序号和所述第二检测 报文中的报文序号判断是否丟包。  The BFD local end determines whether to drop packets by comparing the message sequence number in the first detection packet with the message sequence number in the second detection packet.
3、 如权利要求 1所述的双向转发检测方法, 其中, 所述网络质量检测信 息包括 "^文序号, 该方法还包括: 3. The bidirectional forwarding detection method according to claim 1, wherein the network quality detection information includes a "^ text number, the method further includes:
所述 BFD本端依次发送多个第一检测报文,其中的报文序号规律性递增 或递减;  The local end of the BFD sends a plurality of first detection messages in sequence, wherein the sequence number of the message is regularly increased or decreased;
所述 BFD本端接收返回的第二检测报文后,通过依次比较当前接收报文 中的报文序号与前一次接收报文中的报文序号, 计算丟包数。  After receiving the returned second detection packet, the BFD local end compares the packet sequence number in the current received packet with the packet sequence number in the previous received packet, and calculates the number of lost packets.
4、 如权利要求 1所述的双向转发检测方法, 其中, 所述网络质量检测信 息包括时间戳信息; 该方法还包括: The method of detecting the bidirectional forwarding according to claim 1, wherein the network quality detection information includes timestamp information; the method further includes:
所述 BFD本端根据所述第二检测报文中的时间戳信息和当前时间戳信息 计算时延或抖动。  The local end of the BFD calculates the delay or jitter according to the timestamp information and the current timestamp information in the second detection packet.
5、 如权利要求 1-4中任一项所述的双向转发检测方法, 其中, 所述第一 检测报文和所述第二检测报文釆用 ECHO报文。 The bidirectional forwarding detection method according to any one of claims 1 to 4, wherein the first detection message and the second detection message use an ECHO message.
6、 一种双向转发检测系统, 该系统包括双向转发检测(BFD )本端和所 述 BFD的对端, 其中: 6. A two-way forwarding detection system, the system comprising a bidirectional forwarding detection (BFD) local end and a The opposite end of the BFD, where:
所述 BFD本端包括:第一报文收发单元、网络质量判断单元及上报单元, 其中:  The local end of the BFD includes: a first packet sending and receiving unit, a network quality determining unit, and a reporting unit, where:
所述第一报文收发单元设置成: 发送携带网络质量检测信息的第一检测 报文; 以及接收第二检测报文;  The first packet sending and receiving unit is configured to: send a first detection message carrying network quality detection information; and receive a second detection message;
所述网络质量判断单元设置成: 根据所述第一检测报文中的网络质量检 测信息与所述第二检测报文中的网络质量检测信息检测网络质量;  The network quality determining unit is configured to: detect network quality according to network quality detection information in the first detection packet and network quality detection information in the second detection packet;
所述上报单元设置成: 在符合上报条件时上报网络质量检测结果; 所述 BFD的对端包括第二报文收发单元,所述第二报文收发单元设置成: 接收所述第一检测报文; 以及发送携带网络质量检测信息的所述第二检测报 文。  The reporting unit is configured to: report the network quality detection result when the reporting condition is met; the opposite end of the BFD includes a second packet sending and receiving unit, and the second packet sending and receiving unit is configured to: receive the first detection report And sending the second detection message carrying network quality detection information.
7、 如权利要求 6所述的双向转发检测系统, 其中, 7. The bidirectional forwarding detection system according to claim 6, wherein
所述网络质量检测信息包括报文序号;  The network quality detection information includes a message sequence number;
所述网络质量判断单元设置成按照以下方式检测网络质量: 通过比较所 述报文收发单元发送的报文序号和所述报文收发单元接收的报文序号判断是 否丟包。  The network quality determining unit is configured to detect the network quality according to the following manner: determining whether the packet is lost by comparing the message sequence number sent by the packet sending and receiving unit with the message sequence number received by the packet sending and receiving unit.
8、 如权利要求 6所述的双向转发检测系统, 其中, 8. The bidirectional forwarding detection system according to claim 6, wherein
所述网络质量检测信息包括报文序号;  The network quality detection information includes a message sequence number;
所述第一报文收发单元还设置成: 依次发送多个第一检测报文, 其中的 报文序号规律性递增或递减;  The first packet sending and receiving unit is further configured to: send a plurality of first detection messages in sequence, wherein the message sequence number is regularly increased or decreased;
所述网络质量判断单元设置成按照以下方式检测网络质量: 接收返回的 第二检测报文后, 通过依次比较当前接收报文中的报文序号与前一次接收报 文中的报文序号, 计算丟包数。  The network quality determining unit is configured to detect the network quality according to the following manner: after receiving the returned second detection packet, calculating, by sequentially comparing the message sequence number in the current received message with the message sequence number in the previous received message, The number of lost packets.
9、 如权利要求 6所述的双向转发检测系统, 其中, 9. The bidirectional forwarding detection system according to claim 6, wherein
所述网络质量检测信息包括时间戳信息;  The network quality detection information includes timestamp information;
所述网络质量判断单元设置成按照以下方式检测网络质量: 根据所述第 二检测报文中的时间戳信息和当前时间戳信息计算时延或抖动。 The network quality determining unit is configured to detect network quality in the following manner: according to the The timestamp information and the current timestamp information in the second detection packet calculate delay or jitter.
10、 如权利要求 6-9 中任一项所述的双向转发检测系统, 其中, 所述第 一检测报文和所述第二检测报文釆用 ECHO报文。  The bidirectional forwarding detection system according to any one of claims 6-9, wherein the first detection message and the second detection message use an ECHO message.
11、 一种双向转发检测装置, 包括: 第一报文收发单元、 网络质量判断 单元及上^艮单元, 其中:  11. A bidirectional forwarding detection apparatus, comprising: a first packet transceiver unit, a network quality judging unit, and an upper unit, wherein:
所述第一报文收发单元设置成: 发送携带网络质量检测信息的第一检测 报文至第一 BFD对端; 以及接收所述第一 BFD对端返回的携带网络质量检 测信息的第二检测报文;  The first packet sending and receiving unit is configured to: send a first detection packet carrying the network quality detection information to the first BFD peer end; and receive the second detection of the network quality detection information returned by the first BFD peer end Message
所述网络质量判断单元设置成: 根据所述第一检测报文中的网络质量检 测信息与所述第二检测报文中的网络质量检测信息检测网络质量;  The network quality determining unit is configured to: detect network quality according to network quality detection information in the first detection packet and network quality detection information in the second detection packet;
所述上报单元设置成: 在符合上报条件时上报网络质量检测结果。  The reporting unit is configured to: report the network quality detection result when the reporting condition is met.
12、 如权利要求 11所述的双向转发检测装置, 其还包括:  12. The bidirectional forwarding detection apparatus of claim 11, further comprising:
第二报文收发单元, 其设置成: 接收第二 BFD对端发送的携带网络质量 检测信息的第三检测报文; 以及向所述第二 BFD对端返回携带网络质量检测 信息的第四检测报文。  And a second packet sending and receiving unit, configured to: receive a third detection packet that carries the network quality detection information that is sent by the second BFD peer end, and return a fourth detection that carries the network quality detection information to the second BFD peer end Message.
13、 如权利要求 11所述的双向转发检测装置, 其中,  13. The bidirectional forwarding detection apparatus according to claim 11, wherein
所述网络质量检测信息包括报文序号;  The network quality detection information includes a message sequence number;
所述网络质量判断单元设置成按照以下方式检测网络质量: 通过比较所 述报文收发单元发送的报文序号和所述报文收发单元接收的报文序号判断是 否丟包。  The network quality determining unit is configured to detect the network quality according to the following manner: determining whether the packet is lost by comparing the message sequence number sent by the packet sending and receiving unit with the message sequence number received by the packet sending and receiving unit.
14、 如权利要求 11所述的双向转发检测装置, 其中,  14. The bidirectional forwarding detection apparatus according to claim 11, wherein
所述网络质量检测信息包括报文序号;  The network quality detection information includes a message sequence number;
所述第一报文收发单元还设置成: 依次发送多个第一检测报文, 其中的 报文序号规律性递增或递减;  The first packet sending and receiving unit is further configured to: send a plurality of first detection messages in sequence, wherein the message sequence number is regularly increased or decreased;
所述网络质量判断单元设置成按照以下方式检测网络质量: 接收返回的 第二检测报文后, 通过依次比较当前接收报文中的报文序号与前一次接收报 文中的报文序号, 计算丟包数。 The network quality determining unit is configured to detect the network quality according to the following manner: after receiving the returned second detection packet, calculating, by sequentially comparing the message sequence number in the current received message with the message sequence number in the previous received message, The number of lost packets.
15、 如权利要求 11所述的双向转发检测装置, 其中, 15. The bidirectional forwarding detection apparatus according to claim 11, wherein
所述网络质量检测信息包括时间戳信息;  The network quality detection information includes timestamp information;
所述网络质量判断单元设置成按照以下方式检测网络质量: 根据所述第 二检测报文中的时间戳信息和当前时间戳信息计算时延或抖动。  The network quality determining unit is configured to detect the network quality according to the following manner: calculating the delay or jitter according to the timestamp information and the current timestamp information in the second detection message.
16、 如权利要求 11、 13-15 中任一项所述的双向转发检测装置, 其中, 所述第一检测报文及所述第二检测报文釆用 ECHO报文。  The bidirectional forwarding detection apparatus according to any one of claims 11 to 13-15, wherein the first detection message and the second detection message use an ECHO message.
PCT/CN2011/076007 2010-12-29 2011-06-21 Method and system for bidirectional forwarding detection WO2012088843A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010612467.3 2010-12-29
CN2010106124673A CN102064981A (en) 2010-12-29 2010-12-29 Bidirectional forwarding detection (BFD) method and system

Publications (1)

Publication Number Publication Date
WO2012088843A1 true WO2012088843A1 (en) 2012-07-05

Family

ID=44000092

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/076007 WO2012088843A1 (en) 2010-12-29 2011-06-21 Method and system for bidirectional forwarding detection

Country Status (2)

Country Link
CN (1) CN102064981A (en)
WO (1) WO2012088843A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11646956B2 (en) 2019-07-24 2023-05-09 Cisco Technology, Inc. Systems and methods for providing bidirectional forwarding detection with performance routing measurements

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102064981A (en) * 2010-12-29 2011-05-18 中兴通讯股份有限公司 Bidirectional forwarding detection (BFD) method and system
CN103684818A (en) * 2012-09-07 2014-03-26 中兴通讯股份有限公司 Method and device for detecting failures of network channel
CN103139014B (en) * 2013-01-28 2016-08-10 深信服网络科技(深圳)有限公司 Network quality evaluating method based on bypass and device
CN104104644A (en) * 2013-04-01 2014-10-15 中兴通讯股份有限公司 Bidirectional forwarding detection system and detection time configuration method of bidirectional forwarding detection
US9602374B2 (en) 2014-07-21 2017-03-21 Ciena Corporation Systems and methods for collecting and analyzing data to determine link quality and stability in layer two networks
CN106330579B (en) * 2015-06-15 2020-04-28 中兴通讯股份有限公司 Packet loss statistical method and device for PTN (packet transport network) equipment
CN107743228A (en) * 2017-11-24 2018-02-27 深圳市创维软件有限公司 Video quality detection method, monitoring device and storage medium
CN109981390B (en) * 2017-12-28 2020-11-24 北京金风科创风电设备有限公司 Network quality judgment system and method based on OPCUA message characteristics
CN108173718A (en) * 2018-01-29 2018-06-15 赛特斯信息科技股份有限公司 The system and method for BFD link detectings and assessment based on SD-WAN scenes
CN111756588B (en) * 2019-03-26 2023-01-06 华为技术有限公司 Communication link detection method and related device
CN112787881A (en) * 2019-11-11 2021-05-11 中兴通讯股份有限公司 Communication link detection method, communication device, and storage medium
CN111654407B (en) * 2020-04-14 2022-05-27 新华三信息安全技术有限公司 Stacking system and bidirectional forwarding detection method thereof

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1925435A (en) * 2005-08-31 2007-03-07 华为技术有限公司 Method for obtaining chain circuit evaluating method
CN101640629A (en) * 2008-07-29 2010-02-03 华为技术有限公司 Method for monitoring link packet loss and bidirectional forwarding detector
CN101729303A (en) * 2008-10-25 2010-06-09 华为技术有限公司 Method and device for measuring network performance parameter
CN102064981A (en) * 2010-12-29 2011-05-18 中兴通讯股份有限公司 Bidirectional forwarding detection (BFD) method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101247288B (en) * 2008-03-14 2010-08-18 华为技术有限公司 Periodic line quality detecting method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1925435A (en) * 2005-08-31 2007-03-07 华为技术有限公司 Method for obtaining chain circuit evaluating method
CN101640629A (en) * 2008-07-29 2010-02-03 华为技术有限公司 Method for monitoring link packet loss and bidirectional forwarding detector
CN101729303A (en) * 2008-10-25 2010-06-09 华为技术有限公司 Method and device for measuring network performance parameter
CN102064981A (en) * 2010-12-29 2011-05-18 中兴通讯股份有限公司 Bidirectional forwarding detection (BFD) method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11646956B2 (en) 2019-07-24 2023-05-09 Cisco Technology, Inc. Systems and methods for providing bidirectional forwarding detection with performance routing measurements

Also Published As

Publication number Publication date
CN102064981A (en) 2011-05-18

Similar Documents

Publication Publication Date Title
WO2012088843A1 (en) Method and system for bidirectional forwarding detection
EP2339784B1 (en) Method and device for measuring network performance parameters
Frost et al. Packet loss and delay measurement for mpls networks
CA2592079C (en) Wireless communication path management methods and systems
RU2466505C2 (en) Method, device and system of communication for protection of alarm transfer
EP2720418B1 (en) Lacp link switching and data transmission method and device
US8576698B2 (en) Connectivity fault management timeout period control
US8867364B2 (en) Method and apparatus for multi-homing path selection of stream control transmission protocol
US9451500B2 (en) Conditional routing technique
US9246793B2 (en) Network, network fault recovery method, and node device
JP5088239B2 (en) Congestion control system, boundary gateway device, and congestion control method used therefor
WO2012167667A1 (en) Signal degradation processing method, device and node device
JP2013191931A (en) Information processing device, congestion control method, and congestion control program
JP2008109327A (en) Data transmission method for performing multi-link bundle control, data transmission device, and data transmission system
WO2012088910A1 (en) Method and system for detecting connectivity fault
CN102075390A (en) Transmission state detection method and related device thereof
WO2012071851A1 (en) Method and apparatus for adjusting bidirectional forwarding detection transmission interval according to network jitter
JP5352502B2 (en) Packet communication system and packet communication apparatus control method
KR20130039312A (en) Method of shared mesh protection switching
WO2008095390A1 (en) An equipment for detecting the line fault of the pseudo wire emulation and a method thereof
US7046693B1 (en) Method and system for determining availability in networks
JP5592301B2 (en) Client device, communication system, survival confirmation method, and program
JP2012199870A (en) Network control device, communication speed change method, and program
CN109039728A (en) Flow congestion detection method and system based on BFD
CN117220814A (en) Clock device synchronization method, nonvolatile storage medium, and electronic device

Legal Events

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

Ref document number: 11852681

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11852681

Country of ref document: EP

Kind code of ref document: A1