Pcornel
Networking · Network & Protocols › BGP Protocol Reference

BGP Adj-RIB-In / Loc-RIB / Adj-RIB-Out Reference

Cheat sheet · https://pcornel.dk/topic.php?topic=248

Back to the Topic

Answer

A BGP route passes through stages inside a router: received from a neighbour, filtered by inbound policy, compared with other paths, installed in the routing table, filtered by outbound policy, and advertised. Each stage has its own table and show command.

Remember

received-routes needs soft-reconfiguration inbound. Only the best path is installed and advertised. A best path may still be kept out of the routing table by a route with lower administrative distance (RIB-failure). A path with an unreachable next hop is not a candidate.

First checks

  • show ip bgp neighbors <ip> received-routes — everything the neighbour sent, before policy.
  • show ip bgp neighbors <ip> routes — what was accepted.
  • show ip bgp <prefix> — all paths, the best one, and whom it is advertised to.
  • show ip route <prefix> and show ip bgp rib-failure — installed or not.
  • show ip bgp neighbors <ip> advertised-routes — what is sent on.

Commands

show bgp ipv4 unicast neighbors <ip> received-routes
show bgp ipv4 unicast neighbors <ip> routes
show bgp ipv4 unicast <prefix>
show ip route bgp
show ip cef <prefix>
show bgp ipv4 unicast neighbors <ip> advertised-routes
show ip bgp neighbors <ip> received-routes
show ip bgp neighbors <ip> routes
show ip bgp
show ip bgp <prefix>
show ip bgp neighbors <ip> advertised-routes
show ip bgp rib-failure
clear ip bgp <ip> soft in

Verify in this order

neighbour sends the prefix → inbound policy accepts → next hop reachable → best path selected → installed in the routing table (no RIB-failure) → outbound policy permits → advertised to the next neighbour

Where it usually breaks

underlay/interface reachability → protocol adjacency/session → received/originated state → policy → best path/RIB → FIB/adjacency → traffic path

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=248

Confirmation

Confirm action

Continue?