Configuring frr on Linux

The FRR package is “a fully featured, high performance, free software IP routing suite.
It implements all standard routing protocols such as BGP, RIP, OSPF, IS-IS and more (see Feature Matrix), as well as many of their extensions”. The package was developed from the zebra and quagga packages.

This looks an excellent package which works well. There is a lot of good documentation, but the documentation is not entirely accurate, and some of the examples do not work.

Looking at the code helped, but I found that that using the administration tool, almost does away with the need for documentation to configure frr – but the path is not obvious.

I’ll give the steps I took to configure router ospf6 in frr.

I’m assuming you have frr active, and

sudo frr -m -f /etc/frr/frr.conf

runs with no errors. This checks the syntax of the configuration file (/etc/frr/frr.con).

Copy this configuration file, because when frr configuration writes the configuration file, the file is replaced, and may be missing stuff.

Invoke the configuration tool.

sudo vtysh

This gives me

Hello, this is FRRouting (version 7.2.1).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

laptop# 

where laptop was the hostname name I specified in the /etc/frr/vtysh.conf file. This is a useful facility when you are using multiple systems.

You can use the up arrow and down arrow to scroll through the command history.

You can use ? to display available commands and options.

Configuring the ospf6 router

#configure terminal
#router ospf6

This gives

laptop(config-ospf6)#

so you know you are in the configuration of the ospf6 router.

  • A question mark ? – gives the available commands (and options).
  • There is command-complete so you only need to type the first few characters followed by tab for it to complete the command. For example if “¬” is the tab key, list p¬ gives list permutations. Interface ¬ gives the name of the interfaces so int¬ e¬ completes to interface enp0s31f6; int¬ e¬ ¬ gives interface enp0s31f6 area.
  • The list command gives a short summary of the commands and options, for example
interface IFNAME area A.B.C.D
...
ospf6 router-id A.B.C.D

Capital letters indicate where you specify values.

If you do not know which command option to use, you can use ?.

laptop(config-ospf6)# ?
  area                   OSPF6 area parameters
  auto-cost              Calculate OSPF interface cost according to bandwidth
  distance               Administrative distance
  end                    End current mode and change to enable mode
  exit                   Exit current mode and down to previous mode
  find                   Find CLI command matching a regular expression
  interface              Enable routing on an IPv6 interface
  list                   Print command list
  log-adjacency-changes  Log changes in adjacency state
  no                     Negate a command or set its defaults
  ospf6                  Open Shortest Path First (OSPF) for IPv6
  output                 Direct vtysh output to file
  quit                   Exit current mode and down to previous mode
  redistribute           Redistribute
  stub-router            Make router a stub router
  timers                 Adjust routing timers

laptop(config-ospf6)#ospf6 ?

gave

laptop(config-ospf6)# router-id Configure OSPF6 Router-ID

this means the command is ospf6 router…. and the description of the name is Configure OSPF6 Router-ID.

laptop(config-ospf6)#ospf6 router ?

gave

laptop(config-ospf6)# A.B.C.D specify by IPv4 address notation(e.g. 0.0.0.0)

so the command is ospf6 router A.B.C.D

ospf6 router-id 2.2.2.2

this worked with no error messages.

To get out of config-ospf6# use

end

this gets you out of config-ospf6 and back to

laptop# 

You can display the current status

laptop# write terminal

to save it to file

write file

gave

laptop# write file
Note: this version of vtysh never writes vtysh.conf
Building Configuration...
Integrated configuration saved to /etc/frr/frr.conf
[OK]
laptop# 

Note: I had the ospf6 agent running, and had stopped the rip agent. The rip configuration was not written to the file! You can use your backed up copy and re-enter it.

To exit vtysh

laptop# quit

Displaying current status

You can use the show command to display information from frr. It works the same way. show ? gives you the command syntax. It has command-completion.

One-liner commands

You can use sudo vtysh -c “show ipv6…” to display one command (and then pipe it into grep for example).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s