TNSR is a software virtual router that runs on commodity bare metal hardware, AWS, Azure, or your own data center virtualization. It is able to achieve extremely high performance, surpassing what would normally be found in traditional hardware ASIC based routers, but at a fraction of the cost. Because of its feature complete design, and ability to route large amounts of network traffic at extremely high speeds, TNSR is a perfect choice for Service Providers and Enterprises who have the need for reliability and performance across their networks.
An important function of network routers is the ability to detect outages and begin the mitigation process as quickly as possible. In most environments, this means the need for near instantaneous detection of the event. This month’s Tech Tip will explain how to use BFD to detect a network outage much faster than would be possible using only an Interior Gateway Protocol like OSPF. This will allow OSPF to begin the process of recomputing available paths through the network, routing around and mitigating the problem much sooner.
Consider a simplified network that looks like this:
In the diagram above, we have three TNSR routers, connected in a “ring” topology. Each router has two paths to reach any other router. Obviously in most cases, the routers will take the most direct path to reach each other - unless there is an outage along the ring.
In the event of an outage, OSPF will recalculate the available paths, but this outage takes time to first detect. By default, OSPF sends and receives “Hello” messages between routers every 10 seconds, and will wait for up to a default of 40 seconds of silence before declaring a given path down. In today’s demanding network environments, that is a very long time.
Of course these values may be tuned lower, but at the cost of system resources and performance. Instead, BFD is used to detect faults between two routers across a link, even if the physical link does not support failure detection. Even in cases where physical link issues occur and are detected, BFD can coordinate reaction to these failures rather than each component relying on its own failure detection methods. This results in faster convergence than relying on the OSPF alone.
As above, our test network will be comprised of 3 TNSR routers in a ring topology. We will already have OSPF configured around the ring, and we will be adding BFD to each segment. The completed network will look like this:
We must first configure a BFD session on the interface of each router that we will be monitoring. Each session will have a name, and it is a good idea to make that session name something descriptive. In our case, the session names will be TNSR-A_B, TNSR-B_C, and TNSR-A_C.
In this example, BFD will be configured for a “Hello” transmit and receive interval of 1000000 microseconds (1 second), and a detect multiplier of 3. This means that an outage will be detected and acted upon within 3 seconds. Configure BFD sessions on each interface like this:
We can check if BFD is configured correctly and operational on each router’s links, by issuing the show bfd sessions command on each router. For example, TNSR-A should look like this:
Notice that the status is UP on both links. Now we can go on to use these BFD sessions to detect outages on our ring running OSPF.
Enabling BFD in OSPF is quite simple. In this example, the OSPF configuration on each router looks similar to this:
We can tell OSPF to use BFD on a per-interface basis, by adding the following to each OSPF interface configuration on every router:
With this configured on every router, outages can be detected and acted upon within a 3 second timeframe.
BFD is a very useful and efficient method of detecting network faults, allowing your routing protocol to begin the work of mitigation much faster than relying on the protocol alone. In addition to OSPF, BFD can also be used with BGP sessions. Being a full-featured high-performance class router, TNSR provides all the tools necessary for Service Providers and Enterprises to perform at their best.
Visit our online documentation for more information about BFD, and all the other features found in TNSR.