BGP Tools
These tools report the BGP component of flockd: the instance, its VRFs and neighbors, its own routing tables, and what was exchanged with each neighbor.
BGP's tables hold every path BGP has for a prefix. The route the router forwards with, chosen from every protocol, is in the RIB: see rib_lookup.
bgp_overview
A router's BGP instance: its AS number and router id, whether it is a route reflector or route server, how many neighbors it has and how many are established, and its route counts. The same as flockc bgp overview.
| Argument | |
|---|---|
daemon | The router |
bgp_vrfs
The VRFs a router runs BGP in, each with its neighbors' addresses and, for an L3VPN, its route distinguisher and export route targets. The same as flockc bgp list-vrfs, or flockc bgp vrf <vrf> show for one.
| Argument | |
|---|---|
daemon | The router |
vrf | One VRF to report on, by name. Leave out to list every VRF |
bgp_neighbors
A router's BGP neighbors at a glance, one row each. This is the tool for finding sessions that are down. The same as flockc bgp list-neighbors.
| Argument | |
|---|---|
daemon | The router |
vrf | List only this VRF's neighbors. Leave out for every VRF's |
start_from | Go on from after this neighbor: the next of the answer before |
max_entries | The most entries to return: 100 unless given, and never over 1000 |
{
"entries": [
{
"vrf_name": "default",
"neigh_key": "10.0.12.2",
"hostname": "r2",
"asn": 65002,
"local_as": null,
"neigh_type": "External",
"state": "Established",
"last_session_state_change": "2026-11-22T17:16:07.192Z",
"last_notify_send": null,
"last_notify_recv": null,
"disabled": false,
"bfd_status": null,
"afis": {
"ipv4-unicast": {
"n_adj_rib_in_prefixes": 1,
"n_adj_rib_out_prefixes": 1
}
}
}
],
"finished": true
}
neigh_key is how the other BGP tools name the neighbor. It is the neighbor's address; for a link-local address, the address and interface, e.g. fe80::1%eth0; and where the neighbor is configured with a source address, a space and that address, e.g. 192.0.2.1 192.0.2.254.
bgp_neighbor
One BGP neighbor in full: its configuration as negotiated, both of its connections with their state and timers, its capabilities, and each address family's policies and counts. The same as flockc bgp vrf <vrf> neigh <neighbor> show.
| Argument | |
|---|---|
daemon | The router |
vrf | The VRF the neighbor is in. Leave out for the main VRF |
neighbor | The neighbor, whole as bgp_neighbors gives it in neigh_key |
stats | true to also return the neighbor's message and route counters |
bgp_rib
BGP's own routing tables, with every path for a prefix and which is best.
| Argument | |
|---|---|
daemon | The router |
table | The table: unicast unless given, or vpn, rtc or afi |
vrf | For unicast and afi: the VRF. Leave out for the main VRF |
afi | For afi: the address family, e.g. ipv4-unicast, ipv6-unicast, ipv4-mpls |
rd | For vpn: a route distinguisher, e.g. 65001:100 |
prefix | One route to look up, e.g. 10.1.0.0/16. For vpn, give rd too |
rtc_net | For rtc: one network to look up, either Default or origin_as:<asn>,route-target:<type>:<global>:<local> |
root | Walk the prefixes under this one. Leave out for every IPv4 prefix; ::/0 for every IPv6 prefix. For afi, leaving it out is every prefix of that family. Not for rtc |
show | stats for the counts of a unicast or vpn table instead of its routes |
start_from | Go on from after this entry: the next of the answer before |
max_entries | The most entries to return: 100 unless given, and never over 1000 |
The tables are:
table | Holds | As flockc |
|---|---|---|
unicast | A VRF's IPv4 and IPv6 unicast routes | bgp vrf <vrf> rib |
vpn | The L3VPN routes, each a route distinguisher and a prefix | bgp vpn-rib |
rtc | The route target constraint routes | bgp rtc-rib |
afi | A VRF's routes of one address family | bgp vrf <vrf> afi-rib <afi> |
With prefix, or rtc_net, one route is looked up. With show set to stats the table is counted. Otherwise the table is walked a part at a time.
For vpn, rd with no prefix walks or counts that route distinguisher's routes alone. Leaving rd out walks every route distinguisher's, in order. Either way, a vpn walk's next is a route distinguisher, a space and a prefix, e.g. 0:65001:100 10.1.0.0/24.
bgp_adj_rib
The BGP routes exchanged with one neighbor, in one direction:
inis what the neighbor sent, before import policy.outis what was advertised to the neighbor, after export policy.
| Argument | |
|---|---|
daemon | The router |
vrf | The VRF the neighbor is in. Leave out for the main VRF |
neighbor | The neighbor, whole as bgp_neighbors gives it in neigh_key |
direction | in or out |
table | The table: unicast unless given, or vpn, rtc or afi |
afi, rd, prefix, rtc_net, root, start_from, max_entries | As for bgp_rib |
The same as flockc bgp vrf <vrf> neigh <neighbor> adj-rib-unicast in and its like.
To find why a route from a neighbor is not in use, compare what the neighbor sent (bgp_adj_rib with in), what BGP holds for the prefix and which path it chose (bgp_rib), and what the router forwards with (rib_lookup).
bgp_evpn
BGP's EVPN routes, with every path for a route and which is best. The same as flockc bgp evpn rib.
| Argument | |
|---|---|
daemon | The router |
show | The table: rib, the only one. Need not be given |
rd | A route distinguisher, e.g. 65001:100 |
ip_addr | An IPv4 or IPv6 address to look up the routes for in rd |
start_from | Go on from after this entry: the next of the answer before |
max_entries | The most entries to return: 100 unless given, and never over 1000 |
An EVPN route is a route distinguisher and a route of one of the EVPN route types. It is written whole, each part in brackets:
[0:65001:100]:[3]:[0]:[192.0.2.1]
With rd and ip_addr, the routes of that route distinguisher for the address are looked up. The address matches:
- a MAC/IP Advertisement route (type 2) with that IP address;
- an Inclusive Multicast Ethernet Tag route (type 3) or Ethernet Segment route (type 4) originated by that router;
- an IP Prefix route (type 5) whose prefix contains the address.
Ethernet Auto-Discovery routes (type 1) are not found by an address: walk the route distinguisher for those.
Without ip_addr the routes are walked a part at a time: those of rd, or of every route distinguisher when rd is left out.