Static Component

Configuration Overview

The static route configuration is held under the top level static object in /etc/flockd/flockd.json. If the static object exists static routes will be enabled and the static master thread will be spawned.

In the minimal configuration file below;

  • The network object is used to specify the static route prefix. The ip_prefix can be either IPv4 or IPv6.

  • The nhs object is used to specify a set of next-hop(s) for the static route

    • Each next-hop in the set can be either an ip-address (ip) of the next-hop or can be a combination of an ip-address as well as the outgoing interface name (intf_name).
  • The format is the same for both IPv4 and IPv6

      "static": {
          "static_routes": [
                  "ip_net": "",
                  "next_hops": [
                          "ip_addr": "",
                          "intf_name": "ens1"

Operational State Overview

Check Static is enabled

Check static is listed in the enabled_protocols field.

flock@flocknet$ flockc system
"hostname": "flocknet"
"software": "Flock Networks Routing Suite"
"version": "21.0.0"
"model": "Large"
"base_os": "Linux"
"pid": 2423
"compile_mode": "Release"
"log_level": "info"
"uptime": Uptime { days: 0, hours: 0, mins: 0, secs: 19 }
"enabled_protocols": ["Static"]

Show Static Overview

Shows the configured number of IPv4 and IPv6 static routes. It also shows the number of interfaces that the static component is aware of, these include both the system interfaces that are currently enabled as well as the interfaces that are not enabled in the system but are referred to by their names in the static route configuration.

flock@r01:~$ flockc static

Show all interfaces

Static tracks interfaces in the system. These include:

  • the interfaces that are enabled and have been assigned an interface ID by the kernel
  • the interfaces that are referred to by their names in the static routes but have not been assigned an interface ID by the kernel

Static shows the current interface state as follows:

  • the interface name
  • the interface id assigned by the kernel, if one exists
  • number of attached_routes referencing the interface

In the following example, ens4 interface has not been assigned an ID by the kernel

flock@r61:~$ flockc static -i

Show Static prefix's

Note that this is not the System RIB. The static routes show all the routes from the configuration. For an attached route, it is only programmed in the RIB once its interface has been assigned an ID by the kernel.

Show all prefix's.

flock@r01:~$ flockc static -p --af ipv4

Show a specific prefix.

flock@r61:~$ flockc static -p --af ipv4

ipv6 is the default AF type if the af option is not given