RIB Tools
These tools report the RIB component of flockd: the routes the router has chosen from every protocol, which are those it forwards with, and its label RIB.
To see why BGP offered a route, or what a neighbor sent, use the BGP tools.
rib_lookup
Looks one route up: either an exact prefix, or the longest prefix that matches an address. The same as flockc rib vrf <vrf> lookup <prefix> and flockc rib vrf <vrf> lpm <address>.
| Argument | |
|---|---|
daemon | The router |
vrf | The VRF to look in. Leave out for the main VRF |
prefix | A prefix to look up exactly, e.g. 10.1.0.0/16 |
address | An address to find the longest matching prefix for, e.g. 10.1.2.3 |
Give prefix or address, not both. address answers the question "where does this router send traffic for this destination ?".
The answer has the prefix and, for each protocol that has a route for it, its administrative distance, metric and next hops:
{
"prefix": "198.51.100.0/24",
"entry": {
"protos": [
{
"admin_dist": 20,
"origin": "Bgp",
"route_type": { "Bgp": "External" },
"ip_nhs": [
{
"RecursiveNh": {
"vrf": { "vrf_id": 254, "vrf_name": "default" },
"ip_addr": "10.0.12.2",
...
}
}
],
...
}
],
...
}
}
rib_walk
Walks the RIB in prefix order, a part at a time. The same as flockc rib vrf <vrf> walk <root>.
| Argument | |
|---|---|
daemon | The router |
vrf | The VRF to walk. Leave out for the main VRF |
root | Walk the prefixes under this one. Leave out for every IPv4 prefix; ::/0 for every IPv6 prefix |
origin | Return only the prefixes that have a route from this protocol: bgp, connected, isis, ospfv2, ospfv3 or static |
start_from | Go on from after this prefix: the next of the answer before |
max_entries | The most entries to return: 100 unless given, and never over 1000 |
lrib
The label RIB: the router's MPLS label table. The same as flockc lrib.
| Argument | |
|---|---|
daemon | The router |
label | One label to look up. Leave out to walk the label RIB |
show | With no label: walk for the entries, which is what is done if this is left out, or stats for how many there are |
start_from | Go on from after this label: the next of the answer before |
max_entries | The most entries to return: 100 unless given, and never over 1000 |