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 but can be left empty.
flock@flocknet:~$ cat /etc/flockd/flockd.json
{
"system": {}
}
flock@flocknet:~$
Configuration in detail
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 sys list-interfaces output.
Draining traffic for maintenance
Setting maintenance_mode tells OSPF to advertise this router as
undesirable transit, so traffic drains away from it before the work
starts. OSPF raises the metric of its transit links and of the external
prefixes it originates (RFC 6987), leaving the prefixes local to the
router reachable. BGP does not yet act on the setting beyond
re-advertising its routes unchanged:
"system": {
...
"maintenance_mode": true
},
The key is optional and defaults to false. It is configuration rather
than a command so that a router left draining is still draining after a
restart. flockd reloads flockd.json without a restart, so clearing
it puts the router back into service.
flockc sys overview reports the current setting as maintenance_mode.
gRPC API endpoint
The optional api.grpc object sets the address and port flockd serves its gRPC API on, which flockc and other gRPC clients connect to. Both fields default to the values shown. flockd reads api.grpc only when it starts, so a change to it takes effect the next time flockd starts:
"system": {
...
"api": {
"grpc": {
"bind_ip_addr": "::1",
"bind_port": 50051
}
}
},
Operational State Overview
Check status of flockd
flock@r70:~$ flockc sys overview
{"host_info":{"hostname":"r70", ...},"system_info":{"name":"flockd","description":"The Flock Networks Ltd Routing Suite Daemon","profile":"Release", ...},"pid":1234,"log_level":"info","uptime":"days: 0, hours: 0, mins: 0, secs: 19","enabled_protocols":["BGPv4","OSPFv2","Static"],"software_errors":0, ...}
Show all system interfaces
flock@r70:~$ flockc sys list-interfaces
[{"base":{"intf_name":"lo","intf_id":1, ...,"intf_type":"loopback","intf_mtu":65536,"intf_mac":null,"intf_state":"up", ...},"ip_prefixes":["127.0.0.1/8","70.0.100.70/32","::1/128"]},{"base":{"intf_name":"r70-n70","intf_id":125675, ...,"intf_type":"broadcast","intf_mtu":1500,"intf_mac":"52:54:00:70:00:70","intf_state":"up", ...},"ip_prefixes":["70.0.70.70/24","fc00:46:46::46/64", ...]}, ...]
Show single system interface
flock@r70:~$ flockc sys interface r70-n70
{"base":{"intf_name":"r70-n70","intf_id":125675, ...,"intf_state":"up", ...},"ip_prefixes":["70.0.70.70/24", ...]}
Show all vrfs
flock@r70:~$ flockc sys list-vrfs
[{"vrf_id":254,"vrf_name":"default","underlay_vrf_name":null,"kernel_intf_name":null, ...}]
Show single vrf
flock@r70:~$ flockc sys vrf default
{"vrf_id":254,"vrf_name":"default","underlay_vrf_name":null,"kernel_intf_name":null, ...}
System Operation
Help
flockc sys --help
Overview
flockc sys overview
All system interfaces
flockc sys list-interfaces
Single interface
flockc sys interface <interface-name>
All vrfs
flockc sys list-vrfs
Single vrf
flockc sys vrf <vrf-name>