Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Installation

The Flock Networks Routing Suite is shipped as a Debian package. However the Routing Suite can run on any Linux system. Besides the Linux Kernel API (Sockets, Netlink, etc), the binaries need only the GNU C library (libc6) and the GCC runtime library (libgcc-s1). The Debian package also depends on systemd, which runs flockd as a service. The following instructions are for installing on a Debian based Linux distribution (Debian, Ubuntu, Mint, etc). To install on other systems, see Manual Install. The Flock Networks Routing Suite can also be used as a drop in replacement on the SONiC Network Operating System, see SONiC.

Download the latest Debian package.

Install the application from the Debian package (as root or using sudo);

# dpkg -i flockd_<version>_amd64.deb

The Flock Routing Suite Client flockc is copied to;

/usr/bin/flockc

The Flock Routing Suite Daemon flockd is copied to;

/usr/sbin/flockd

All Flock Routing Suite flockd configuration is stored in a single file;

/etc/flockd/flockd.json

flockd refuses a file holding a key it does not recognise, so a misspelt setting is reported rather than left at its default. The error names the key, except inside a static route's next hop, where it reports that the next hop matches none of the forms a next hop takes. On a reload the refused file changes nothing and flockd carries on with the configuration it is running. A file flockd reads but cannot act on is refused the same way, such as one naming a key file it cannot read: the whole file is checked before any of it is applied.

Only flockd.json itself is watched. A key file it names, such as a BGP TCP-MD5 password or an OSPF or IS-IS authentication key, is read as the file is applied, so rotating a key takes effect the next time flockd.json changes; touching it is enough.

Each component has a section of its own, such as bgp or ospfv2. Leaving a section out of the file means the same as writing it empty, as in "bgp": {}: flockd reads the component as having no configuration. On a reload, that unconfigures the component, whichever of the two ways its section says it, and a VRF a section no longer names is unconfigured with it.

flockd is controlled by systemd;

$ systemctl status flockd
# systemctl start flockd
# systemctl stop flockd

logging can be viewed via journalctl;

# journalctl -u flockd --boot

Example successful installation

# dpkg -i flockd_<version>_amd64.deb
Selecting previously unselected package flockd.
(Reading database ... 27695 files and directories currently installed.)
Preparing to unpack flockd_<version>_amd64.deb ...
Unpacking flockd ...
Setting up flockd ...

# systemctl start flockd

# systemctl status flockd
● flockd.service - Flock Networks Routing Suite Daemon
Loaded: loaded (/lib/systemd/system/flockd.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2020-01-24 12:39:24 GMT; 6s ago
Main PID: 368 (flockd)
    Tasks: 1 (limit: 1150)
Memory: 3.2M
CGroup: /system.slice/flockd.service
        └─785 /usr/sbin/flockd
Nov 17 15:39:15 debian10-clean systemd[1]: Started Flock Networks Routing Suite Daemon.
Nov 17 15:39:15 debian10-clean flockd[368]: [INFO  flockd::sys::sys_inst] System Up: version=<version> model="Multi-threaded" pid=3

$ flockc sys overview
{"host_info":{"hostname":"flocknet", ...},"system_info":{"name":"flockd", ...,"version":"<version>", ...},"pid":368,"log_level":"info","uptime":"days: 0, hours: 0, mins: 0, secs: 14","enabled_protocols":["Static"],"software_errors":0, ...,"maintenance_mode":false}

Troubleshooting Installation

flockd fails to start

  • flockd exits during start-up

If flockd cannot start, for example because /etc/flockd/flockd.json is missing, cannot be parsed, or holds a key flockd does not recognise, it logs the reason and exits with a failure status. systemd restarts it after 5 seconds, so systemctl status flockd shows activating (auto-restart). Find the reason in the log.

# journalctl -u flockd --boot
  • systemd PolicyKit / polkit failure

PolicyKit / polkit is the "sudo of systemd". If you have PolicyKit / polkit active on the install host, and you want to start flockd as an unprivileged user, you will need to add PolicyKit / polkit configuration for flockd. Alternatively you can just run systemctl start flockd as root or under sudo.

$ systemctl start flockd
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start 'flockd.service'.
Authenticating as: www-data
Password:
Failed to start flockd.service: Connection timed out
See system logs and 'systemctl status flockd.service' for details.
polkit-agent-helper-1: pam_authenticate failed: Authentication failure