Free Range Routing (FRR) is a powerful, open-source routing software suite that provides implementations of various routing protocols, including BGP, OSPF, IS-IS, RIP, PIM, and more.
It’s designed to run on Linux and Unix-like systems, making it a flexible solution for a wide range of network setups—from small labs to large-scale data centers.

Why FRR?

  • Scalability: Supports complex network topologies.
  • Flexibility: Easily integrates with existing network infrastructures.
  • Community-driven: Regular updates and active community support.

A Brief History

FRR originated as a fork of the Quagga project (which is still used for the Looking Glass service) in 2016, aiming to create a more dynamic and community-focused development path. Since then, it has grown into a robust and widely adopted routing platform, used by service providers, enterprises, and research institutions.

Demo Lab Overview

🌐 Topology

This demo lab showcases a Hub-and-Spoke topology using WireGuard for secure tunneling between the nodes.
We use unique ASN (Autonomous System Number) to run eBGP (external Border Gateway Protocol) between the entities.
The OS we use is Ubuntu 24.04.1.

Hub:

  • Public IP: Static (known)
  • Tunnel IP: 10.5.5.1

Spoke #1:

  • Public IP: Ephemeral
  • Tunnel IP: 10.5.5.20

Spoke #2:

  • Public IP: Ephemeral
  • Tunnel IP: 10.5.5.10

The Hub acts as a central point with a fixed public IP, while both Spokes establish dynamic WireGuard connections, enabling BGP peering over the secure tunnels.

Objectives

  • Establish WireGuard tunnels between the Hub and Spokes.
  • Configure BGP on FRR to route traffic between the nodes.
  • Ensure seamless communication between Spokes through the Hub.

In the next sections, we’ll dive into the WireGuard setup, followed by configuring FRR BGP for efficient routing.

Firewall Considerations

  • Hub:
    • Allow inbound UDP 51820 to accept incoming WireGuard connections from the Spokes.
  • Spokes:
    • Allow outbound UDP 51820 to the Hub’s public IP to establish the WireGuard tunnel.
  • BGP (TCP 179) runs inside the WireGuard tunnel and does not require any firewall exceptions.

Why Use WireGuard?

We chose WireGuard for this setup to enhance the privacy, integrity, and security for every bit we transport across the internet.
Wireguard provides:

  • End-to-End Encryption: All traffic between Hub and Spokes is encrypted using state-of-the-art cryptographic protocols (ChaCha20 for encryption, Poly1305 for message authentication).
  • Simplicity & Performance: WireGuard is lightweight, easy to configure, and offers high performance with low overhead.
  • Ephemeral IP Handling: Its ability to handle dynamic public IPs makes it ideal for spokes with changing network addresses.
  • Integrity & Authentication: Only peers with the correct public keys can establish connections, ensuring data integrity and preventing unauthorized access.

WireGuard Setup

📦 Prerequisites

Ensure WireGuard is installed on all nodes:

🔑 Key Generation

On each node (Hub and Spokes), generate WireGuard key pairs:

  • privatekey  → Keep this secure.
  • publickey  →Share with peers.

⚙️ Hub Configuration (/etc/wireguard/wg0.conf)

⚙️ Spoke Configuration (/etc/wireguard/wg0.conf)

Spoke #1:

Spoke #2:

🚀 Start WireGuard

On all nodes, start and enable WireGuard:

✅ Verify Tunnel

Run on each node to check peer status:

example-output for Spoke1:

Once the tunnels are active, you can ping between the nodes using their Tunnel IPs.

Next, we’ll dive into configuring BGP to enable dynamic routing over the WireGuard tunnels.

Install FRR

Ensure FRR is installed on all nodes, we will stick on the stable release of FRR:

expected output:

Check if FRR daemon is up and running with systemctl status frr.service

output:

Let’s enable BGPd with vi /etc/frr/daemons

Restart the daemon with with systemctl restart frr.service
With enabled BGPd FRR uses minimal resources:

Compute-allocation for FRR with enabled BGPd

Let’s access the virtual-console of the Hub with sudo vtysh and setup the virtual-router. We also log all configuration commands entered via the vtysh shell:

Hub

Spoke #2

Spoke #1

Let’s see if Spoke#1 can see the Hub as a BGP neighbor:

The Lab seems to be in a pretty good shape 🙂
Go ahead and try to establish a connection with Spoke#2!

Let’s announce a BGP-Route

On the HUB, we will announce a BGP route (10.5.7.1/32) for testing.
To do this, we will create a dummy interface and assign an IPv4 address.
FRR will then announce this network via BGP to the peers (Spoke#1 and Spoke#2).
Finally, we will verify if we are advertising the route to Spoke#1.

Ok, let’s see if we receive route 10.5.7.1/32 on Spoke#1 and check connectivity:

Good! That’s it so far.


We have established a highly secure and scalable network topology across the internet. By leveraging WireGuard for routing transmission and communication, we ensure that this network topology remains exceptionally secure.