Several distributions provide packages for FRR. Check your distribution’s repositories to find out if a suitable version is available.

FRR depends on various libraries depending on your operating system.

After installing these dependencies, change to the frr source directory and issue the following commands:

$ ./
$ ./configure
$ make
$ make install

Configure the Software

The Configure Script

FRR has an excellent configure script which automatically detects most host configurations. There are several additional configure options to customize the build to include or exclude specific features and dependencies.


Do not build zebra daemon.


Do not build ripd.


Do not build ripngd.


Do not build ospfd.


Do not build ospf6d.


Do not build bgpd.


Make bgpd which does not make bgp announcements at all. This feature is good for using bgpd as a BGP announcement listener.


Enable system defaults to work as if in a Data Center. See defaults.h for what is changed by this configure option.


Enable SNMP support. By default, SNMP support is disabled.


Disable support for OSPF-API, an API to interface directly with ospfd. OSPF-API is enabled if –enable-opaque-lsa is set.


Disable building of the example OSPF-API client.


Disable support for OSPF Router Information (RFC4970 & RFC5088) this requires support for Opaque LSAs and Traffic Engineering.


Do not build isisd.


Enable IS-IS topology generator.


Enable Traffic Engineering Extension for ISIS (RFC5305)


Enable the support of Linux Realms. Convert tag values from 1-255 into a realm value when inserting into the Linux kernel. Then routing policy can be assigned to the realm. See the tc man page.


Disable support IPV6 router advertisement in zebra.


Pass the -rdynamic option to the linker driver. This is in most cases necessary for getting usable backtraces. This option defaults to on if the compiler is detected as gcc, but giving an explicit enable/disable is suggested.


Controls backtrace support for the crash handlers. This is autodetected by default. Using the switch will enforce the requested behaviour, failing with an error if support is requested but not available. On BSD systems, this needs libexecinfo, while on glibc support for this is part of libc itself.


Turn on some options for compiling FRR within a development environment in mind. Specifically turn on -g3 -O0 for compiling options and add inclusion of grammar sandbox.


Turn on some compile options to allow you to run fuzzing tools against the system. This flag is intended as a developer only tool and should not be used for normal operations.


Build without SNMP support.


Build without VTYSH.


Build with FPM module support.


Alpine Linux does not allow non-numeric characters in the version string. With this option, we provide a way to strip out these characters for APK dev package builds.


Compile FRR with up to X way ECMP supported. This number can be from 0-999. For backwards compatability with older configure options when setting X = 0, we will build FRR with 64 way ECMP. This is needed because there are hardcoded arrays that FRR builds towards, so we need to know how big to make these arrays at build time.

You may specify any combination of the above options to the configure script. By default, the executables are placed in /usr/local/sbin and the configuration files in /usr/local/etc. The /usr/local/ installation prefix and other directories may be changed using the following options to the configuration script.

--prefix <prefix>

Install architecture-independent files in prefix [/usr/local].

--sysconfdir <dir>

Look for configuration files in dir [prefix/etc]. Note that sample configuration files will be installed here.

--localstatedir <dir>

Configure zebra to use dir for local state files, such as pid files and unix sockets.

Least-Privilege Support

Additionally, you may configure zebra to drop its elevated privileges shortly after startup and switch to another user. The configure script will automatically try to configure this support. There are three configure options to control the behaviour of FRR daemons.

--enable-user <user>

Switch to user user shortly after startup, and run as user `user in normal operation.

--enable-group <user>

Switch real and effective group to group shortly after startup.

--enable-vty-group <group>

Create Unix Vty sockets (for use with vtysh) with group ownership set to group. This allows one to create a separate group which is restricted to accessing only the vty sockets, hence allowing one to delegate this group to individual users, or to run vtysh setgid to this group.

The default user and group which will be configured is ‘frr’ if no user or group is specified. Note that this user or group requires write access to the local state directory (see --localstatedir) and requires at least read access, and write access if you wish to allow daemons to write out their configuration, to the configuration directory (see --sysconfdir).

On systems which have the ‘libcap’ capabilities manipulation library (currently only Linux), FRR will retain only minimal capabilities required and will only raise these capabilities for brief periods. On systems without libcap, FRR will run as the user specified and only raise its UID to 0 for brief periods.

Linux Notes

There are several options available only to GNU/Linux systems [1]. If you use GNU/Linux, make sure that the current kernel configuration is what you want. FRR will run with any kernel configuration but some recommendations do exist.

  • CONFIG_NETLINK Kernel/User Netlink socket. This is a brand new feature which enables an advanced interface between the Linux kernel and zebra (Kernel Interface).
  • CONFIG_RTNETLINK Routing messages. This makes it possible to receive Netlink routing messages. If you specify this option, zebra can detect routing information updates directly from the kernel (Kernel Interface).
  • CONFIG_IP_MULTICAST IP: multicasting. This option should be specified when you use ripd (RIP) or ospfd (OSPFv2) because these protocols use multicast.

IPv6 support has been added in GNU/Linux kernel version 2.2. If you try to use the FRR IPv6 feature on a GNU/Linux kernel, please make sure the following libraries have been installed. Please note that these libraries will not be needed when you uses GNU C library 2.1 or upper.

  • inet6-apps

    The inet6-apps package includes basic IPv6 related libraries such as inet_ntop and inet_pton. Some basic IPv6 programs such as ping, ftp, and inetd are also included. The inet-apps can be found at

  • net-tools

    The net-tools package provides an IPv6 enabled interface and routing utility. It contains ifconfig, route, netstat, and other tools. net-tools may be found at

Linux sysctl settings and kernel modules

There are several kernel parameters that impact overall operation of FRR when using Linux as a router. Generally these parameters should be set in a sysctl related configuration file, e.g., /etc/sysctl.conf on Ubuntu based systems and a new file /etc/sysctl.d/90-routing-sysctl.conf on Centos based systems. Additional kernel modules are also needed to support MPLS forwarding.

IPv4 and IPv6 forwarding

The following are set to enable IP forwarding in the kernel:

MPLS forwarding

Basic MPLS kernel support was introduced 4.1, additional capability was introduced in 4.3 and 4.5. For some general information on Linux MPLS support see The following modules should be loaded to support MPLS forwarding, and are generally added to a configuration file such as /etc/modules-load.d/modules.conf:

# Load MPLS Kernel Modules

The following is an example to enable MPLS forwarding in the kernel:

# Enable MPLS Label processing on all interfaces

Make sure to add a line equal to net.mpls.conf.<if>.input for each interface ‘<if>’ used with MPLS and to set labels to an appropriate value.

VRF forwarding

General information on Linux VRF support can be found in Kernel support for VRFs was introduced in 4.3 and improved upon through 4.13, which is the version most used in FRR testing (as of June 2018). Additional background on using Linux VRFs and kernel specific features can be found in

The following impacts how BGP TCP sockets are managed across VRFs:


With this setting a BGP TCP socket is opened per VRF. This setting ensures that other TCP services, such as SSH, provided for non-VRF purposes are blocked from VRF associated Linux interfaces.


With this setting a single BGP TCP socket is shared across the system. This setting exposes any TCP service running on the system, e.g., SSH, to all VRFs. Generally this setting is not used in environments where VRFs are used to support multiple administrative groups.

Important note as of June 2018, Kernel versions 4.14-4.18 have a known bug where VRF-specific TCP sockets are not properly handled. When running these kernel versions, if unable to establish any VRF BGP adjacencies, either downgrade to 4.13 or set ‘net.ipv4.tcp_l3mdev_accept=1’. The fix for this issue is planned to be included in future kernel versions so upgrading your kernel may also address this issue.

Build the Software

After configuring the software, you will need to compile it for your system. Simply issue the command make in the root of the source directory and the software will be compiled. Cliff Notes versions of different compilation examples can be found in the Developer’s Manual Appendix. If you have any problems at this stage, please send a bug report Bug Reports.

$ ./
$ ./configure <appropriate to your system>
$ make

Install the Software

Installing the software to your system consists of copying the compiled programs and supporting files to a standard location. After the installation process has completed, these files have been copied from your work directory to /usr/local/bin, and /usr/local/etc.

To install the FRR suite, issue the following command at your shell prompt::

$ make install

FRR daemons have their own terminal interface or VTY. After installation, you have to setup each beast’s port number to connect to them. Please add the following entries to /etc/services.

zebrasrv      2600/tcp                  # zebra service
zebra         2601/tcp                  # zebra vty
ripd          2602/tcp                  # RIPd vty
ripngd        2603/tcp                  # RIPngd vty
ospfd         2604/tcp                  # OSPFd vty
bgpd          2605/tcp                  # BGPd vty
ospf6d        2606/tcp                  # OSPF6d vty
ospfapi       2607/tcp                  # ospfapi
isisd         2608/tcp                  # ISISd vty
nhrpd         2610/tcp                  # nhrpd vty
pimd          2611/tcp                  # PIMd vty

If you use a FreeBSD newer than 2.2.8, the above entries are already added to /etc/services so there is no need to add it. If you specify a port number when starting the daemon, these entries may not be needed.

You may need to make changes to the config files in /etc/frr. Config Commands.

[1]GNU/Linux has very flexible kernel configuration features.