BGP – Let’s read the Routing Table

glitchlist Uncategorized Leave a Comment

Routing table represent all the information the bgp protocol collect from his peers to build the IP Routing table.

# Cisco
show ip bgp vpnv4 vrf mpls-lab

# Huawei
display bgp vpnv4 vpn-instance mpls-lab routing-table

      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn

 *>i  0.0.0.0            10.10.9.2     0          100        0      65001?
 * i                     10.10.9.1     0          100        0      65001?
 *>i  10.2.50.144/28  172.31.236.1     0          100        0      65001i
 *>   10.99.99.76/32  172.31.201.1                           0      65005 65230i

On these examples you can find small details that are useful for troubleshooting.

Of course every time you type the display bgp routing-table command you have a little codes legend:

Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete

But dig a little bit:

Status codes are the very firsts characters you find in the output of the command,

* = valid route

> = best path = this entry will be inserted in the IP Routing table!

d = damped = strange network that flap more and more time that cause connectivity loss.

h = old route of which the router no longer has a path.

i = internal, this route is declared somewhere with the command network x.x.x.x xx under bgp conf.

s = suppressed

S = Stale

Origin is an attribute carried around by the route,

i = route coming from an IGP protocol.

e = route coming from an EGP protocol, not used anymore.

? = route coming from another source like a static redistribution.

Another useful command for troubleshooting is display bgp vpnv4 all peer that permit a quick view of the peer like how many prefixes you receive or the state of the peer.

# Cisco
show bgp peer

# Huawei

display bgp vpnv4 vpn-instance mpls-lab peer         

 BGP local router ID : 10.98.4.4
 Local AS number : 65002

 VPN-Instance mpls-lab, Router ID 10.98.4.4:
 Total number of peers : 1                Peers in established state : 1

  Peer            V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State PrefRcv

  172.17.17.9   4       65001   594832   594673     0 9911h39m Established      4

PrefRcv = Prefixes received, how many network I received in my bgp routing table.

But the command I prefere is…

display bgp vpnv4 routing-table peer [peer-IP]

With this, I can check if my networks are correctly advertised to my remote peer!

.glitchlist crew

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.