05-14-2020 04:01 AM
Hello Everybody,
I am trying to get the BGP network table via netconf, something like I would get from a simple "show ip bgp" on CLI.
cannot find any documentation or examples on internet, I tried with yang-explorer to query in any way Cisco-IOS-XE-bgp-oper openconfig-bgp or openconfig-rib-bgp, receive empty answer.
I can get the routing table via ietf-routing, for example.
trying with IOS-XE on Cat9500 with IOS-XE 16.9.5 , tried also on ASR1K IOS-XE 16.9.5 same thing.
does anybody has a working example?
thx.
05-14-2020 04:40 AM
G'Day nick_cisco,
Good question! I'm just looking through my GitHub to see if I have anything of use to you.
One thing you can check is if there is a BGP compatibility tag that the device sends you during the hello/exchange stage of the netconf connection?
05-14-2020 05:29 AM
05-14-2020 05:27 AM
05-18-2020 10:24 AM
Thanks! I'll have a little play and see what I can find.
09-04-2022 11:33 AM
Hi
BGP tables are available via Cisco-IOS-XE-bgp-oper. In order to get the default vrf IPv4 bgp table (show ip bgp), the following filter can be used:
<filter>
<bgp-state-data xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-bgp-oper">
<bgp-route-vrfs>
<bgp-route-vrf>
<vrf>default</vrf>
<bgp-route-afs>
<bgp-route-af>
<afi-safi>ipv4-unicast</afi-safi>
</bgp-route-af>
</bgp-route-afs>
</bgp-route-vrf>
</bgp-route-vrfs>
</bgp-state-data>
</filter>
HTH
Marcel
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: