Upgrade FRR on Debian or Ubuntu
This article is about the upgrade from FRR on Debian or Ubuntu systems.
Pre checks:
Before you upgrade your system please check the following things:
- OS Installed
- FRR Repo
- FRR Version running
- Make sure you have OOB access to your router
The upgrade:
Depending on the router config it can be that you are loosing the network connectivity during the upgrades. Therefore it is handy do download the packages first before stoping or upgrading the FRR daemon.
Check available packages:
root@core02-dus:~# apt update; apt list --upgradable | grep frr Hit:1 https://deb.frrouting.org/frr focal InRelease Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease Hit:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease Hit:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease Hit:5 http://archive.ubuntu.com/ubuntu focal-security InRelease Reading package lists... Done Building dependency tree Reading state information... Done 55 packages can be upgraded. Run 'apt list --upgradable' to see them. WARNING: apt does not have a stable CLI interface. Use with caution in scripts. frr-pythontools/unknown 7.5-0~ubuntu20.04 all [upgradable from: 7.3.1-1+frr1~ubuntu20.04.1] frr-rpki-rtrlib/unknown 7.5-0~ubuntu20.04 amd64 [upgradable from: 7.3.1-1+frr1~ubuntu20.04.1] frr-snmp/unknown 7.5-0~ubuntu20.04 amd64 [upgradable from: 7.3.1-1+frr1~ubuntu20.04.1] frr/unknown 7.5-0~ubuntu20.04 amd64 [upgradable from: 7.3.1-1+frr1~ubuntu20.04.1] root@core02-dus:~#
Download the needed packages:
Next just download the packages you want to upgrade. In our case we are using the FRR SNMP and RPKI extension. It's also necessaryto download the libyang1 package beause it's a FRR 7.5 dependency.
root@core02-dus:~# sudo apt download frr frr-snmp frr-pythontools frr-rpki-rtrli libyang1
If the above command didn't return anything we are done here. To doublecheck we can do the following:
root@core02-dus:~# ls frr_7.5-0~ubuntu20.04_amd64.deb frr-pythontools_7.5-0~ubuntu20.04_all.deb frr-rpki-rtrlib_7.5-0~ubuntu20.04_amd64.deb frr-snmp_7.5-0~ubuntu20.04_amd64.deb libyang1_1.0.184-2~ubuntu20.04_amd64.deb
Shutdown FRR in order to upgrade:
Please make sure you will be able to access your router also after shutting down all your BGP sessions!
root@core02-dus:~# service frr stop
^* Sometimes it's also possible to upgrade without stoping the daemon. We recommend to do it still for an clean upgrade. We leave it up to you!
Install the new packages:
To install the packages just use the linux internal package manager. The package manager might ask for an action. In our case we just hit enter to accept the default value.
root@core02-dus:~# dpkg -i * (Reading database ... 138062 files and directories currently installed.) Preparing to unpack frr_7.5-0~ubuntu20.04_amd64.deb ... Unpacking frr (7.5-0~ubuntu20.04) over (7.5-0~ubuntu20.04) ... Preparing to unpack frr-pythontools_7.5-0~ubuntu20.04_all.deb ... Unpacking frr-pythontools (7.5-0~ubuntu20.04) over (7.5-0~ubuntu20.04) ... Preparing to unpack frr-rpki-rtrlib_7.5-0~ubuntu20.04_amd64.deb ... Unpacking frr-rpki-rtrlib (7.5-0~ubuntu20.04) over (7.5-0~ubuntu20.04) ... Preparing to unpack frr-snmp_7.5-0~ubuntu20.04_amd64.deb ... Unpacking frr-snmp (7.5-0~ubuntu20.04) over (7.5-0~ubuntu20.04) ... Selecting previously unselected package libyang1. Preparing to unpack libyang1_1.0.184-2~ubuntu20.04_amd64.deb ... Unpacking libyang1 (1.0.184-2~ubuntu20.04) ... Setting up libyang1 (1.0.184-2~ubuntu20.04) ... Setting up frr (7.5-0~ubuntu20.04) ... Configuration file '/etc/frr/daemons' ==> Modified (by you or by a script) since installation. ==> Package distributor has shipped an updated version. What would you like to do about it ? Your options are: Y or I : install the package maintainer's version N or O : keep your currently-installed version D : show the differences between the versions Z : start a shell to examine the situation The default action is to keep your current version. *** daemons (Y/I/N/O/D/Z) [default=N] ? Installing new version of config file /etc/frr/support_bundle_commands.conf ... Installing new version of config file /etc/init.d/frr ... Installing new version of config file /etc/logrotate.d/frr ... addgroup: The group `frrvty' already exists as a system group. Exiting. addgroup: The group `frr' already exists as a system group. Exiting. Warning: The home dir /nonexistent you specified can't be accessed: No such file or directory The system user `frr' already exists. Exiting. Setting up frr-pythontools (7.5-0~ubuntu20.04) ... Setting up frr-rpki-rtrlib (7.5-0~ubuntu20.04) ... Setting up frr-snmp (7.5-0~ubuntu20.04) ... Processing triggers for systemd (245.4-4ubuntu3.2) ... Processing triggers for rsyslog (8.2001.0-1ubuntu1.1) ... Processing triggers for man-db (2.9.1-1) ... Processing triggers for libc-bin (2.31-0ubuntu9) ...
If this was successfull we are done. You can now check the running version by entering the vtysh CLI. One of the post-upgrade steps is the restart of the start of the deamons if they are down. So nothing else to do here.
root@core02-dus:~# vtysh Hello, this is FRRouting (version 7.5). Copyright 1996-2005 Kunihiro Ishiguro, et al.