Skip to content

Getting Started with Free Range Routing (FRR) on Raspberry Pi OS (last edited 2022-05-20)

Installation

Since we are introducing a new software package, it is a good idea to review the project homepage and learn what resources are provided to you. The FRRouting home page at https://frrouting.org provides links to official documentation as well as to download the current software release. As we have with other installs, we would like to rely on package-based installation with apt. FRRouting does provide installation packages, but these are not included in the default repositories for Raspberry Pi OS or other Debian-based Linux flavors.

To resolve this issue, navigate to the Releases section of the home page and follow the link for Debian packages. Follow the instructions at this link in order to add a new package repository to apt and install the FRRouting software on your Pi.

Getting Started

The official FRRouting documentation linked from the home page also contains a Basic Setup section. While this document is helpful, it is unfortunately missing some details that would be helpful to new users. You can follow the instructions below to finish installing FRR and connect to its management shell for the first time.

  1. Give the Pi user permission to run the FRR managment client
    • a. Run sudo usermod -aG frrvty pi to add the pi user to the frrvty management group
    • b. Logout (exit SSH) and return in order for Linux to recognize your new privileges
  2. Fix file system permissions
    • a. Run sudo chmod o+x /etc/frr to enable directory level access needed to read/write configuration files.
    • b. Run sudo install -o frr -g frrvty -m 660 /dev/null /etc/frr/vtysh.conf to create an empty configuration file called vtysh.conf with the necessary ownership and permissions. This handy one-liner creates the file and then sets user/group ownership and permissions without needing to make separate calls to chmod and chown.
  3. Enable the BGP routing daemon
    • a. Edit /etc/frr/daemons and set bgpd=yes.
    • b. If applicable, repeat this process for other routing daemons.
  4. Restart FRRouting: sudo systemctl restart frr

Learn the basics of navigating VTY Shell Basics

Launch VTY shell

To manage FRR, we will use a dedicated UI called the VTY shell. Launch the shell with the vtysh command.

VTYSH modes

While using the VTY shell, you'll need to switch between modes. While most of our work will be conducted in Configuration Mode, the shell will launch initially in Enable mode. To enter Configuration Mode, type configure terminal at the VTY shell prompt. To exit Configuration Mode and return to Enable Mode, type exit.

Save Configuration (from enable mode)

Configuration changes you make from VTY shell will take effect right away, but they do not persist between reboots due to a distinction FRR makes between the Running Config and the Startup Config. To save your changes to disk(/etc/frr/frr.conf), run write memory or copy running-config startup-config from Enable Mode.

This command will fail if run from Configuration Mode. Return to Enable Mode and try again if you receive an Unknown command error.

Show the Running Config (from enable mode)

To view the active Running Config, return to Enable Mode and enter show running-config or write terminal at the prompt.

Shortcuts

Command abbreviations are accepted in VTY shell as long as the abbreviation is unambiguous. The shell will do its best to determine your intent and complete the command.

  • configure terminal can be abbreviated conf
  • quit can be abbreviated q
  • write memory can be abbreviated w m
Back to top