cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
815
Views
5
Helpful
3
Replies

bgp neighbors vs global routing

franklaszlo
Level 1
Level 1

A simple question : how can I list bgp neighbors for global routing only ? I am working on a script that should be able to collect them.

 

The command "show ip bgp vpnv4 vrf xyz summary" lists the neighbors for the xyz vrf only, which is fair enough.

 

On the other hand, "show ip bgp summary" or "show ip bgp neighbors" list all bgp neighbors regardless what vrf they belong to. On top of this, no vrf information is present in the output, so it is impossible to tell the vrf for a peering (at least on IOSv) from this command.

 

Eventually, a bgp peering for vrf xyz is listed by both commands. So the only way I can imagine is to poll all existing vrf names, then all bgp neighbors for these vrfs, then compare this list to the list presented by "show ip bgp summary". However, this is very inefficient and I am pretty sure there must be a way to gather neighbors for global routing only.

 

Any ideas please ?

 

3 Replies 3

Harold Ritter
Level 12
Level 12

Hi Frank,

 

You can use "show bgp ipv4 unicast summary" or "show bgp ipv6 unicast summary" to list the global neighbors.

 

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Hello Harold, thanks for quick reply and the suggested solution, which I will check later on.

 

At the same time, I also wanted to add, that I was checking the same on an ISR4331 running IOS-XE, and it behaves differently.

On this IOS, the "show ip bgp summary" only lists the neighbors for global routing. So maybe the issue I am facing with pertains to IOSv only, not sure about this.

Hi Frank,

 

Bear in mind that "show ip bgp summary" is part of the legacy CLI. The current CLI uses the following format; "show bgp <address-family> <sub-address-family>". It is recommended to use the current CLI.

 

Regards,

 

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
Review Cisco Networking for a $25 gift card