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

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
daemonThe router
vrfThe VRF to look in. Leave out for the main VRF
prefixA prefix to look up exactly, e.g. 10.1.0.0/16
addressAn 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
daemonThe router
vrfThe VRF to walk. Leave out for the main VRF
rootWalk the prefixes under this one. Leave out for every IPv4 prefix; ::/0 for every IPv6 prefix
originReturn only the prefixes that have a route from this protocol: bgp, connected, isis, ospfv2, ospfv3 or static
start_fromGo on from after this prefix: the next of the answer before
max_entriesThe 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
daemonThe router
labelOne label to look up. Leave out to walk the label RIB
showWith no label: walk for the entries, which is what is done if this is left out, or stats for how many there are
start_fromGo on from after this label: the next of the answer before
max_entriesThe most entries to return: 100 unless given, and never over 1000