Course contentsShow
← Linux
Lesson 1121 of 1,81910. Network Administration and Kernel StacksFree lesson

Dynamic Routing with FRR

Configure BGP and OSPF on a Linux host for automated network path discovery.

In this lesson, you will learn how to transition from static routing to automated path discovery by integrating Free Range Routing (FRR) into your Linux network stack.

From Static to Dynamic

Up until now, we have managed routing tables manually or through Policy-Based Routing. However, manual management becomes impossible in large or evolving network topologies. FRR (Free Range Routing) acts as a bridge between the Linux kernel’s routing table and the rest of the network, using standard protocols like OSPF and BGP to "learn" the topology dynamically.

When you install FRR, it creates a suite of daemons (like ospfd and bgpd). These daemons communicate with neighbors to exchange reachability information. Once a path is identified, FRR uses Netlink—a mechanism you learned earlier—to push those routes directly into the kernel’s Forwarding Information Base (FIB).

Practical Setup: OSPF

To enable dynamic discovery, you define a router ID and associate interfaces with an OSPF area. Here is a simplified snippet of an ospfd.conf file:

router ospf
 ospf router-id 1.1.1.1
 network 192.168.1.0/24 area 0.0.0.0
!

Once this configuration is loaded, ospfd listens for hello packets on the 192.168.1.0/24 subnet. If another router appears, they will establish an adjacency, exchange their local network states, and update the Linux kernel routing table automatically. If a link fails, the kernel is updated instantly, removing the route without human intervention.

Integration with the Kernel

The beauty of this architecture is that the Linux kernel remains the ultimate authority for packet forwarding. FRR simply serves as the "intelligent agent" that keeps the kernel’s routing table synchronized with the reality of the network. Because the kernel handles the actual forwarding via the routing table mechanics you studied in the previous modules, there is no performance penalty compared to static routing.

By offloading path discovery to FRR, your Linux host behaves less like a static server and more like a high-performance network appliance, capable of healing its own connectivity.

Key Takeaway: FRR automates route management by dynamically injecting reachability data into the Linux kernel via Netlink, ensuring your routing tables remain accurate without manual intervention.