Home Open Source Transforming a Linux Machine into a Powerful Router with Open Source FRR...

Transforming a Linux Machine into a Powerful Router with Open Source FRR on Ubuntu 24.04

0

Modern networking requires agility, programmability, and cost efficiency. While enterprise-grade routers from Cisco, Juniper, and others are highly capable, they come with significant costs and proprietary limitations. Enter Free Range Routing (FRR) — an open-source IP routing protocol suite that allows you to turn a standard Linux machine into a feature-rich, BGP-speaking, multi-protocol router.

FRR was forked from Quagga in 2016 and is now supported by a vibrant community and leading vendors. It implements several dynamic routing protocols and is used in large-scale data centers, campus networks, edge sites, and cloud environments. In this article, we will explore how FRR can transform a Linux machine into a full-fledged router and what you need to consider during deployment — specifically on Ubuntu Server 24.04 LTS.

What is FRR (Free Range Routing)?

FRR is a robust and scalable routing software suite. It runs on Linux and Unix-like operating systems and supports multiple routing protocols including:

  • BGP (Border Gateway Protocol)
  • OSPF (Open Shortest Path First – v2 and v3)
  • IS-IS (Intermediate System to Intermediate System)
  • RIP (Routing Information Protocol)
  • PIM (Protocol Independent Multicast)
  • EIGRP (in experimental stages)
  • NHRP, LDP, Babel

FRR is designed to work as a control plane while the Linux kernel acts as the forwarding plane. It interfaces with the kernel using Netlink to program routing tables and redistribute routes.

Why Use a Linux Machine as a Router?

There are several compelling reasons:

  1. Cost-Effective: No need to purchase proprietary hardware.
  2. Customizable: Full control over OS, daemons, and configurations.
  3. Open Source: No vendor lock-in and large community support.
  4. Flexible Hardware: Can run on x86 servers, Raspberry Pi, cloud VMs, etc.
  5. Programmability: Integrates well with automation tools (Ansible, Python, Netconf/YANG).
  6. Lab and Testing: Ideal for learning BGP, MPLS, EVPN, etc.

System Requirements

  • A machine running Ubuntu Server 24.04 LTS
  • At least 2 network interfaces for routing between segments
  • FRR package (installed from official Ubuntu repo or FRR PPA)
  • IP forwarding enabled

Installing FRR on Ubuntu 24.04

As of Ubuntu 24.04, FRR is available directly from the official repositories:

sudo apt update

sudo apt install frr frr-pythontools

To ensure you’re using the latest FRR version, you can add the official FRR repository:

echo deb https://deb.frrouting.org/frr bookworm frr-stable | sudo tee -a /etc/apt/sources.list.d/frr.list

curl -s https://deb.frrouting.org/frr/keys.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/frr.gpg > /dev/null

sudo apt update

sudo apt install frr frr-pythontools

Basic Configuration Steps

1. Enable IP forwarding

echo 'net.ipv4.ip_forward=1' | sudo tee -a /etc/sysctl.conf

echo 'net.ipv6.conf.all.forwarding=1' | sudo tee -a /etc/sysctl.conf

sudo sysctl -p

2. Configure FRR daemons

Edit /etc/frr/daemons and enable the protocols you need:

zebra=yes

bgpd=yes

ospfd=yes

3. Start the FRR services

sudo systemctl enable frr

sudo systemctl start frr

sudo systemctl status frr

4. Enter FRR CLI

sudo vtysh

You are now ready to configure your routing protocols.

Example Use Case: Basic BGP Configuration

Router A (192.168.2.1)

router bgp 65522

 bgp router-id 1.1.1.1

 neighbor 192.168.2.2 remote-as 65523

 network 10.1.1.0/24

Router B (192.168.2.2)

router bgp 65523

 bgp router-id 2.2.2.2

 neighbor 192.168.2.1 remote-as 65522

 network 10.2.2.0/24

View BGP status:

show ip bgp summary

Let’s assume we want to run BGP between two Linux routers:

Advanced Features in FRR

  • Route Redistribution
  • MPLS and Segment Routing (SR-MPLS/SRv6)
  • Multicast Routing (PIM, IGMP Proxy)
  • VRF Support
  • Zebra for Kernel Routing Integration

Monitoring & Telemetry

  • show ip route, show ip bgp, show zebra rib
  • Logs: /var/log/frr/
  • Prometheus & SNMP support

Automation & SDN Integration

  • Netconf/YANG, RESTCONF
  • JSON and gRPC northbound APIs
  • Works with NAPALM, Ansible, SaltStack

Security Considerations

  • Use access-lists, prefix-lists
  • Enable authentication on CLI access
  • Use MD5 for BGP neighbor security
  • Isolate traffic with VRFs

Real-World Use Cases

  • Data Center Spine-Leaf Architectures
  • Edge Routing and Customer Premises Equipment (CPE)
  • Cloud-native Virtual Routers (e.g., GNS3, EVE-NG labs)
  • Embedded Linux Routers (OpenWRT + FRR)
  • SDN Controllers and BGP Route Reflectors

By leveraging FRR and Ubuntu 24.04, you can build powerful open-source routers without expensive vendor hardware. FRR’s modular architecture, broad protocol support, and active community make it ideal for labs, production edge routers, and even cloud-native applications.

For additional documentation and real-world examples, visit the official FRR docs.

No comments

Leave a reply

Please enter your comment!
Please enter your name here

Exit mobile version