Installing FRR
Tags: beginners, bgp, network, ospf
Published: 2021-03-19 15:02:58

FRRouting (FRR) is an IP routing protocol suite for Linux and Unix platforms. It includes protocol daemons for BGP, IS-IS, LDP, OSPF, PIM, and RIP.

> Since the FRR project was forked from Quagga, another routing protocol suite for Linux, FRR includes the fundamentals that made Quagga so popular as well as many other enhancements.

In this blogpost we will focus on how to install FRR on Debian based OS (such as Ubuntu) and on CentOS.

![via https://docs.cumulusnetworks.com/cumulus-linux-41/Layer-3/FRRouting-Overview/](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xg09dcfuihte625z16yj.png)

###Installing on Ubuntu ( and other Debian based OS):
```
# add GPG key
curl -s https://deb.frrouting.org/frr/keys.asc | sudo apt-key add -

# possible values for FRRVER: frr-6 frr-7 frr-stable
# frr-stable will be the latest official stable release
FRRVER="frr-stable"
echo deb https://deb.frrouting.org/frr $(lsb_release -s -c) $FRRVER | sudo tee -a /etc/apt/sources.list.d/frr.list

# update and install FRR
sudo apt update && sudo apt install frr frr-pythontools
```

###Installing in CentOS:
```
# possible values for FRRVER: frr-6 frr-7 frr-stable
# frr-stable will be the latest official stable release
FRRVER="frr-stable"

# add RPM repository on CentOS 6
curl -O https://rpm.frrouting.org/repo/$FRRVER-repo-1-0.el6.noarch.rpm
sudo yum install ./$FRRVER*

# add RPM repository on CentOS 7
curl -O https://rpm.frrouting.org/repo/$FRRVER-repo-1-0.el7.noarch.rpm
sudo yum install ./$FRRVER*

# add RPM repository on CentOS 8
curl -O https://rpm.frrouting.org/repo/$FRRVER-repo-1-0.el8.noarch.rpm
sudo yum install ./$FRRVER*

# install FRR
sudo yum install frr frr-pythontools
```

###Configuring FRR for the first time

#####Enable IP forwarding
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. 
```
net.ipv4.conf.all.forwarding=1
net.ipv6.conf.all.forwarding=1
```

#####Enable BGPD daemon
After a fresh install, starting FRR will do nothing. This is because daemons must be explicitly enabled by editing a file in your configuration directory. This file is usually located at /etc/frr/daemons and determines which daemons are activated when issuing a service start / stop command via init or systemd. To enable a particular daemon, simply change the corresponding ‘no’ to ‘yes’. Subsequent service restarts should start the daemon.

To enable bpd daemon, in */etc/frr/daemons* change *bgpd=no* to 
```
bgpd=yes
```

##### Restart and enable FRR
Once you have enabled daemon, now restart FRR and enable FRR systemd service to start at boot using following commands.

```
systemctl restart frr.service
systemctl enable frr.service
```

###Links for reference:
1. [frrouting.org](https://frrouting.org)
2. [Learn Frrouting - Cumulus](https://cumulusnetworks.com/learn/frrouting/)
3. [FRR User Manual](https://docs.frrouting.org/_/downloads/en/latest/pdf/)
4. [FRR Releases](https://github.com/FRRouting/frr/releases)
5. [FRR Overview - Cumulus](https://docs.cumulusnetworks.com/cumulus-linux-41/Layer-3/FRRouting-Overview/)

##### Image Source: 
https://docs.cumulusnetworks.com/cumulus-linux-41/Layer-3/FRRouting-Overview/