Reducing Link Failure Detection Time with BFD

本文探讨了现代网络面临的挑战,特别是在使用IP技术时如何支持敏感于包丢失、传输错误、延迟和抖动的服务,如语音和实时视频。重点介绍了BFD(Bidirectional Forwarding Detection)技术,它是一种轻量级、协议独立的Hello协议,能够在毫秒范围内检测到链路故障。通过调整检测时间,BFD可以在不牺牲性能的情况下快速检测到链路故障,从而提高网络的鲁棒性和恢复速度。

One of the great challenges of modern networking is the need to support services such as voice and real-time video that are quite sensitive to packet loss, transmission errors, delay, and jitter using a technology - IP - that is designed to be tolerant of packet loss, transmission errors, delay, and jitter.

We design our networks with backup links, alternate routes, redundant node components, and resiliency features such as Fast Reroute (FRR) to insure that we can quickly recover from a detected link failure.

But detecting the link failure is the catch.

SONET detects and reacts to link failures very quickly, but SONET interfaces are outrageously expensive. Ethernet links are increasingly being used wherever possible because the interfaces are cheap and the technology is simple and well understood. But Ethernet is not adept at quickly detecting link failures: The keepalives it sends (Ethertype 0x9000) do little more than check the electrical integrity of the interface's connection to the link. They do nothing to verify functional bidirectional communication with a neighboring node. It is slow to detect half-opens; and if a failure occurs on the far side of a switch, or under any other situation where the local interface continues to see a good signal on the wire or fiber, the failure is not detected until some Layer 3 protocol - usually the routing protocol - misses enough keepalives or Hello messages to declare its neighbor down.

This problem leads many operators to rely on their IGP to detect link loss. For example, the Hello and Dead intervals of OSPF can be cranked down to 1 second; Cisco's hello-multiplier command even allows you to configure a Hello interval in the sub-second range. But in any case it is unlikely that OSPF is going to detect a neighbor loss due to a link failure in less than 2 seconds - a very long time if voice and video packets are being dropped. And if the IGP Hellos are being processed in software at the control plane, there is a performance price to be paid for short Hello intervals.

This is where Bidirectional Forwarding Detection (BFD) can help. BFD is a lightweight, protocol-independent Hello protocol that can detect link failures in the millisecond range. Typical detection times are around 50ms; the "lightweight" nature of the protocol means that it can run in hardware on routers with ASIC-based forwarding planes, avoiding the performance price you must pay for aggressive IGP Hello intervals.

BFD is usually called a "liveness detection" protocol because it does not itself take any remedial action when a neighbor loss is detected; instead it informs the protocols running on the interface in question when a loss is detected..

Currently BFD is being deployed primarily for failure detection on Ethernet links - particularly where the use of switches obscures the efficient detection of failures.

There are a few caveats:

Although the timers can be set as low as 1ms, experience has shown that below 50ms processing delays - even in hardware - begin causing timing jitter. And overly aggressive timers can cause BFD to incorrectly declare a neighbor down when its Control packets are delayed by even small periods of congestion or where a short burst of noise can corrupt all the BFD Control packets within the expected Detection time.

Of course your network must still reconverge around the link failure, but detecting the failure as quickly as possible is the first step in the recovery process. If you support or are planning to support applications that require high network resiliency, BFD is worth a look as a component of fast failure recovery.

 
In the context of computer vision, enhancing 3D object detection using stereo matching techniques involves leveraging the geometric constraints provided by stereo imagery to improve the accuracy and robustness of object detection algorithms. Stereo matching, which is the process of finding corresponding points between two images taken from slightly different viewpoints, can provide depth information that is crucial for 3D object detection. By utilizing this depth information, one can better understand the spatial layout of objects within a scene, thereby improving the detection performance. One approach to enhancing 3D object detection using stereo matching involves the integration of stereo vision principles with deep learning models. This can be achieved by designing neural network architectures that take advantage of the disparity maps generated from stereo pairs. Disparity maps represent the pixel-wise differences between the left and right images, which can be converted into depth maps. These depth maps can then be used as additional input channels to convolutional neural networks (CNNs), providing the model with explicit 3D information that can aid in object detection tasks. Moreover, the use of stereo matching can help in refining the bounding box predictions for objects in 3D space. Traditional 2D object detectors provide bounding boxes that are confined to the image plane. However, when combined with stereo matching, these detectors can be extended to predict 3D bounding boxes that encompass the objects in the real world, thus providing more accurate localization of objects in the environment. Another aspect of enhancing 3D object detection using stereo matching lies in the area of multi-view geometry. Multi-view geometry principles can be applied to ensure that the detected objects in 3D space are consistent across different views. This consistency check can help in reducing false positives and improving the overall reliability of the detection system. For instance, when implementing stereo matching techniques for 3D object detection, one might consider the following code snippet that demonstrates how to compute disparity maps using OpenCV, a popular computer vision library: ```python import cv2 import numpy as np # Load left and right images img_left = cv2.imread('left_image.png', 0) img_right = cv2.imread('right_image.png', 0) # Create a stereo block matching object stereo = cv2.StereoBM_create(numDisparities=16, blockSize=15) # Compute the disparity map disparity = stereo.compute(img_left, img_right) # Display the disparity map cv2.imshow('Disparity', disparity) cv2.waitKey(0) cv2.destroyAllWindows() ``` This code snippet uses the StereoBM algorithm from OpenCV to compute a disparity map from a pair of stereo images. The disparity map can then be used as input to a 3D object detection pipeline, where it serves as a proxy for depth information, enabling the detection of objects in three-dimensional space. Furthermore, the application of stereo matching in 3D object detection can benefit from the use of advanced stereo matching algorithms that can handle large disparities and varying lighting conditions. These algorithms can provide more accurate disparity maps, which in turn can lead to better 3D object detection results. In summary, enhancing 3D object detection using stereo matching techniques involves integrating stereo vision principles with modern machine learning models, utilizing disparity maps to provide depth information, applying multi-view geometry for consistency checks, and employing advanced stereo matching algorithms to handle challenging scenarios. By doing so, one can significantly improve the performance of 3D object detection systems in various applications, such as autonomous driving, robotics, and augmented reality.
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值