2

In Cisco IOS-XE if I want to see a specific VRF's bgp connections summary I would do:

show bgp vpnv4 unicast vrf VRF_ID summary

and the result would be as below example:

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.0.17    4         3549       0       0        1    0    0 42w6d    Active
192.168.214.2   4        65000  785893  785882 10816927    0    0 6w4d           89

This works great if you have couple of VRFs but if you have tens of them this will be a tedious way to check all of them. Is there any way that I can list all bgp connections summary with VRFs IDs in it? I'm interested to have VRF's ID in the output with its connections to neighbors.

Thanks

1

The command 'show ip bgp all summary' will display BGP neighbor status for all address families:

show ip bgp all summary

The command 'show bgp vpnv4 unicast all neighbors' will display BGP neighbor status for VPNv4 family, including VRF information.

show bgp vpnv4 unicast all neighbors

However its output is quite verbose. Of course one can write an output parser for extracting the view you need from the output of 'show bgp vpnv4 unicast all neighbors'. For example, see https://github.com/udhos/cisco-vrf-bgp-neigh

Sample output:

C:\tmp\devel\cisco-vrf-bgp-neigh>go run src\main.go < output2.txt
2016/01/19 15:41:10 main: reading from stdin
2016/01/19 15:41:10 main: reading from stdin: done: 1755 lines
2016/01/19 15:41:10 main: found 16 neighbors
Neighbor        VRF            ASN    State       Uptime  Prefixes
1.1.1.1         --             11111  Idle        ?            0
1.1.1.1         --             11111  Established 27w3d      236
1.1.1.1         --             11111  Established 1y8w      4715
1.1.1.1         --             11111  Established 9w4d        94
1.1.1.1         --             11111  Established 42w5d        2
1.1.1.1         --             11111  Idle        ?            0
1.1.1.1         --             11111  Established 1y8w        10
1.1.1.1         --             11111  Established 26w2d     3450
1.1.1.1         --             11111  Established 42w5d       25
1.1.1.1         --             11111  Established 14w2d       78
1.1.1.1         --             11111  Established 44w0d      110
1.1.1.1         --             11111  Established 1y46w       61
1.1.1.1         --             11111  Established 2y38w       77
1.1.1.1         --             11111  Established 19w1d      416
1.1.1.1         --             11111  Established 1y46w      157
1.1.1.1         --             11111  Established 13w0d     3451

C:\tmp\devel\cisco-vrf-bgp-neigh>
  • Correct but this doesn't give me VRFs IDs. I have many VRFs that use the same neighbor IP address (overlapping IP spaces) so this is not very helpful. ASR1001 routers are aggregation devices and yet I don't know why there is not a simple way to check all VRFs link status. – Fanttazio Jan 18 '16 at 13:24
  • Well, your question includes: bgp neigh status, vrf interface status, vrf id (RD:route distinguisher?). 'show ip bgp all summary' -> [bgp neigh status] 'show ip vrf' -> [vrf interface status] 'show ip vrf interfaces' -> [vrf rd] Do you need all this information from a single command? – Everton Jan 18 '16 at 13:49
  • What is need is something similar to 'show bgp vpnv4 unicast vrf VRF_Name summary' but for all VRFs not just one. – Fanttazio Jan 19 '16 at 10:48
  • @Fanttazio The command 'show bgp vpnv4 unicast all neighbors' will display BGP neighbor status for VPNv4 family, including VRF information. However its output is verbose. Added to answer. – Everton Jan 19 '16 at 13:52
  • @Fanttazio Of course one can write an output parser for extracting the view you need from the output of 'show bgp vpnv4 unicast all neighbors'. For example, see github.com/udhos/cisco-vrf-bgp-neigh – Everton Jan 19 '16 at 17:58
0
show ip bgp ipv4 vrf

To display entries in the IP version 4 (IPv4) Border Gateway Protocol (BGP) routing table, use the show ip bgp ipv4 command in privileged EXEC mode.

show ip bgp ipv4 {mdt {all | rd | vrf} | multicast | tunnel | unicast}

http://www.cisco.com/c/en/us/td/docs/ios/iproute_bgp/command/reference/irg_book/irg_bgp5.html

Just a guess, try it and see.. I don't get to run commands at my job =/

  • I don't have vrf option for show ip bgp ipv4 or at least on the IOS that I'm working on. I can run show ip bgp vpnv4 all summary but it wont give me vrf's IDs. – Fanttazio Jan 18 '16 at 10:12
  • I looked at some other recources online and that was the best one I could come up with, I can ask out network engineers and get back with you tomorrow. – Levi Jan 18 '16 at 10:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.