Documentation
Name
bgp router show rib - show the best BGP routes of one BGP router
Synopsis
rib
[--output=]
<prefix|address|*>
Arguments
- --output=
- optional output file
- prefix|address|*
- destination to show
Description
This command shows the routes installed into the Loc-RIB of one router. The command takes one parameter to filter the output. The filter can be an IP address, an IP prefix or a wildcard (*). If the filter parameter is an IP address, the result will contain the routes that match the address (best-match). If the filter is an IP prefix, the result will only contain the routes towards the specified prefic (exact-match). Finally, if a wildcard is given, all the routes will be dumped.
The output format depends on the current mode, specified with the bgp options show-mode. We show only examples in the CISCO-like output format.
CISCO-like output format:
<flags> <prefix> <peer> <pref> <metric> <AS-Path> <origin>
where the flags field can contain the following items:
Flags | Description |
---|---|
* | the route's next-hop is reachable. |
> | the route is a best route (installed in the Loc-RIB). |
i | the route is local (installed with the bgp router add network command). |
Origin | Description |
---|---|
i | the route was learned through an bgp router add network statement. |
e | the route was learned from an EGP protocol. |
? | the route was learned through redistribution from another protocol. |
Note: since the only way to learn a BGP route in C-BGP is currently through the bgp router add network statement, the origin field will always be i.
Example:
cbgp> bgp router 0.0.0.1 show rib *
i> 0.0.0.1/32 0.0.0.1 0 0 null i
*> 0.1.0.1/32 0.2.0.2 0 0 2 1 i
*> 0.2.0.1/32 0.2.0.2 0 0 2 i
*> 0.2.0.2/32 0.2.0.2 0 0 2 i