System Component

Configuration Overview

The system configuration is held under the top level system object in /etc/flockd/flockd.json. The system object must exist and it must contain an api object. The api object can be left empty.

flock@flocknet:~$ cat /etc/flockd/flockd.json
{
    "system": {
        "api": {}
    }
}
flock@flocknet:~$

Configuration in detail

Operations REST API Configuration

The Operations REST API is used to view flockd internal state. It is a 'read only' API. By design state can be viewed but cannot be changed using this API.

The Operations REST API is configured using the rest_api JSON object. The rest_api object is optional. If the object is not specified the Operations REST API will not be started.

This configuration will bind to all local IPv6 addresses.

"system": {
    "api": {
        "rest": {
            "bind_ip_addr": "::"
        }
    }
},

This configuration will bind to only the loopback IPv6 address. The Operations REST API will not be available from outside of the router.

"system": {
    "api": {
        "rest": {
            "bind_ip_addr": "::1"
        }
    }
},

By default a Linux host will operate as an IPv4/IPv6 dual stack node, meaning IPv4 requests will be serviced. If you only want to service IPv6 requests please see Bind IPv6 Only

This configuration will bind to all local IPv4 addresses.

"system": {
    "api": {
        "rest": {
            "bind_ip_addr": "0.0.0.0"
        }
    }
},

This configuration will bind to only the loopback IPv4 address. The Operations REST API will not be available from outside of the router.

"system": {
    "api": {
        "rest": {
            "bind_ip_addr": "127.0.0.1"
        }
    }
},

Filtering interfaces in system component

System component receives interfaces from the Linux kernel. Interfaces not used by any routing component can be filtered out at the system component level by using intf_denylist JSON object.

This configuration will ignore interface eth0 and all interfaces starting with en:

"system": {
    ...
    "intf_denylist": [
        # Specify the entire interface name i.e. "eth0"
        # or use ^ to match the start of interface names
        #   e.g. "^en" will match all interfaces that start with "en"
        # Multiple interface names and patterns can be used
        "eth0",
        "^en"
    ]
},

The intf_denylist object is optional. If it is not specified, all interfaces present in kernel will also be present in system component. The filtered out interfaces will not be present in the flockc system -i command output.

Operational State Overview

Check status of flockd

flock@flocknet$ flockc system
"hostname": "flocknet"
"software": "Flock Networks Routing Suite"
"version": "20.4.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": ["OSPFv2"]
flock@flocknet:~$

Show all system interfaces

flock@flocknet:~$ flockc system -i
{"name":"dummy0","id":7,"ip_prefixes":["60.0.20.61/32"],"state":"Up"}
{"name":"enp10s0","id":4,"ip_prefixes":[],"state":"Down"}
{"name":"enp1s0","id":2,"ip_prefixes":["90.0.93.61/24"],"state":"Up"}
{"name":"enp7s0","id":5,"ip_prefixes":[],"state":"Down"}
{"name":"enp8s0","id":6,"ip_prefixes":["60.0.60.61/24"],"state":"Up"}
{"name":"enp9s0","id":3,"ip_prefixes":["90.0.91.61/24"],"state":"Up"}
{"name":"lo","id":1,"ip_prefixes":["127.0.0.1/8"],"state":"Up"}
flock@flocknet:~$

Show single system interface

flock@flocknet:~$ flockc system -i enp1s0
{"name":"enp1s0","id":2,"ip_prefixes":["90.0.93.61/24"],"state":"Up"}
flock@flocknet:~$

Show all vrfs

flock@flocknet:~$ flockc system -v
{"vrf_id":0,"vrf_name":"default"}
{"vrf_id":11,"vrf_name":"blue","kernel_intf_name":"blue"}
{"vrf_id":12,"vrf_name":"pink","kernel_intf_name":"pink"}
flock@flocknet:~$

Show single vrf

flock@r70-deb11:~$ flockc system -v pink
{"vrf_id":12,"vrf_name":"pink","kernel_intf_name":"pink"}
flock@r70-deb11:~$

System Operation

Help

flockc system -h

Overview

flockc system

All system interfaces

flockc system -i

Single interface

flockc system -i <interface-name>

All vrfs

flockc system -v

Single vrf

flockc system -v <vrf-name>