OSPFv2 Component

Configuration Overview

/etc/flockd/ospfv2.toml is the configuration file. If this file exists OSPFv2 is enabled, otherwise OSPFv2 remains disabled. The default flockd debian package install will create this file, so OSPFv2 will be enabled as part of the install.

The Flock Networks Routing Suite is designed for massive scale so placing all routers in a single OSPF area is recommended. (If you are adding a device to an existing multi-area OSPF Autonomous System, multiple areas are fully supported)

flock@r01:~$ cat /etc/flockd/ospfv2.toml
# Place all ethernet interfaces into area
area_id = ""
# Match any interfaces that have name starting with "en"
name = "^en"

This is all the OSPFv2 configuration you need, to create an OSPF network as large as you like. Each device has an identical configuration which simplifies the operation of the network. A management station can easily determine all the Router Id's in the network by querying a single device for all of its Router LSA's. But anyway if you like complexity (we don't) then read on, otherwise skip to the Operational State section.

Redistribution of Kernel routes into OSPF

You may wish to redistribute static routes from the RIB into OSPFv2.

origin = "kernel-static"
metric_type = 2
metric = 1000

As a minimum we may want a default route added to the kernel of each ASBR router. This route will appear in the RIB and then be redistributed into OSPFv2. OSPFv2 will advertise this route across the AS, so all nodes learn the route to exit the network. Static routes are added using the Linux command line.

# ip route add via dev enp9s0

In Debian make this permanent by adding the following lines in /etc/network/interfaces under the iface enp9s0 entry.

post-up /bin/ip route add via dev enp9s0

Explicit Router Id

By default the highest IPv4 Address is used as the Router Id. To explicitly set the Router Id to place this line at the top of ospfv2.toml

router_id = ""

An alternative approach that can be useful when operating the network, is to create a dummy interface with an IP Address that becomes the Router ID.

First create the dummy interface. On Debian add this entry in /etc/network/interfaces.

flock@r01:~$ cat /etc/network/interfaces
auto dummy0
iface dummy0 inet static
pre-up /bin/ip link add dummy0 type dummy
post-down /bin/ip link del dummy0

flock@r01:~$ sudo systemctl restart networking

Second place the dummy0 interface in OSPF area 0. The Flock Networks Routing Suite will select the Router Id from IP Addresses on dummy interfaces in preference to other interface types. So with this method you do not need the explicit router_id configuration shown above.

flock@r01:~$ cat /etc/flockd/ospfv2.toml
area_id = ""
name = "^en"
name = "dummy0" # Add this line

flock@r01:~$ sudo systemctl restart flockd

For detailed configuration information see OSPFv2 Configuration.

Operational State Overview

Check OSPFv2 is enabled

Check OSPFv2 is listed in the enabled_protocols field.

flock@flocknet$ flockc system
"hostname": "flocknet"
"software": "Flock Networks Routing Suite"
"version": "20.2.0"
"model": "Multi-threaded"
"pid": 2423
"compile_mode": "Release"
"log_level": "info"
"uptime": Uptime { days: 0, hours: 0, mins: 0, secs: 19 }
"enabled_protocols": ["OSPFv2"]

Show OSPFv2 Overview

flock@r01:~$ flockc ospfv2

Show all neighbors (out of all interfaces, in all areas)

flock@r01:~$ flockc ospfv2 -n

Show Area 0 Link State Database

flock@flocknet:~$ flockc ospfv2 -a 0 -l

For detailed operational state information see OSPFv2 Operation.