Installing FRRouting (FRR) on your CentOS KVM/Libvirt host and setting up BGP


So I had this idea when looking at FRRouting. As it's a Linux package, you can install it on a box running KVM/Libvirt, then you can enable BGP and redistribute the connected networks. This makes spinning up new virtual networks on the hypervisor very easy as you do not need to rely on static routes and as soon as you spin up a new virtual network it's advertising to the rest of your network.

What is FRRouting (FRR)
FRRouting (FRR) is a fork of Quagga. It's used in Cumulus networks OS as the routing suite.

This guide is based on an install of CentOS 7.5.

Step 1 Install FRR

Install the latest FRR rpm from
yum install -y

Edit the daemons file and change the routing protocols you want from no to yes (you must always enable zebra) in this case zebra and bgpd.
vi /etc/frr/daemons


Start FRR and set to start on boot.
systemctl enable frr && systemctl start frr

Check status of FRR - should show as active (running).
systemctl status frr

Step 2 configure FRR and BGP

open the FRR shell by typing the command.

Enter configuration mode.

conf t

This step is optional this command puts all the FRR configuration into one file.
service integrated-vtysh-config

Configure BGP on the KVM host.

I am configuring a route-map used to prevent some routes from being redistributed also will tag a BGP community for all the permitted routes you do not need to do this but it gives you more control and tagging the route helps with visibility.

ip prefix-list PL_BGP_DENY_CONNECTED seq 5 permit

match ip address prefix-list PL_BGP_DENY_CONNECTED

set community 65010:10100

Here we are configuring the BGP process AS/router id/tuning the timers from the default to 2/6 and configuring the neighbour.

router bgp 65010
bgp router-id
bgp log-neighbor-changes
timers bgp 2 6
neighbor remote-as 65000

Now to configure the redistribute connected command and set the route map we have created.

address-family ipv4 unicast
redistribute connected route-map RM_BGP_REDISTRIBUTED_CONNECTED

Exit and save the configuration.



Step 3 Verify BGP is up and that we have routes

Here we can see that the BGP session is up.

Below we can see that have two connected virtual networks in BGP and are receiving a default route from the router we are connected to.