07-18-2017 01:14 AM
Hi, I'm looking to get detail of a BGP prefix on IOS-XR router using netconf/yang similar to what the CLI "show bgp 1.1.1.1/32" achieves. So far I can't do that.
If I use the filter below
<bgp xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-bgp-oper">
<instances>
<instance>
<instance-name>default</instance-name>
<instance-active>
<default-vrf>
<afs>
<af>
<af-name>ipv4-unicast</af-name>
<networks>
<network>
<network>1.1.1.1/32<network/>
<network>
</networks>
</af>
</afs>
</default-vrf>
</instance-active>
</instance>
</instances>
</bgp>
I get back all BGP ipv4 prefixes without detail on them.
If I use the filter below
<bgp xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-bgp-oper">
<instances>
<instance>
<instance-name>default</instance-name>
<instance-active>
<default-vrf>
<afs>
<af>
<af-name>ipv4-unicast</af-name>
<networks>
</networks>
</af>
</afs>
</default-vrf>
</instance-active>
</instance>
</instances>
</bgp>
I get all prefixes with detail of them.
Is there a way to retrieve detail of a single BGP prefix?
thanks
Hung
Solved! Go to Solution.
07-31-2017 02:01 PM
The network filter currently needs full key specification as shown below. We have a ddts (CSCvf05647) to support prefix filter with partial key in request.
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get>
<filter type="subtree">
<bgp xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-bgp-oper">
<instances>
<instance>
<instance-name>default</instance-name>
<instance-active>
<default-vrf>
<afs>
<af>
<af-name>ipv4-unicast</af-name>
<networks>
<network>
<rd>0000000000000000</rd>
<network>192.168.28.5</network>
<prefix-length>32</prefix-length>
<af-name>ipv4</af-name>
<process-instance-id>0</process-instance-id>
</network>
</networks>
</af>
</afs>
</default-vrf>
</instance-active>
</instance>
</instances>
</bgp>
</filter>
</get>
07-24-2017 09:54 AM
We have asked the responsible team about this and will get back to you shortly.
07-31-2017 02:01 PM
The network filter currently needs full key specification as shown below. We have a ddts (CSCvf05647) to support prefix filter with partial key in request.
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get>
<filter type="subtree">
<bgp xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-bgp-oper">
<instances>
<instance>
<instance-name>default</instance-name>
<instance-active>
<default-vrf>
<afs>
<af>
<af-name>ipv4-unicast</af-name>
<networks>
<network>
<rd>0000000000000000</rd>
<network>192.168.28.5</network>
<prefix-length>32</prefix-length>
<af-name>ipv4</af-name>
<process-instance-id>0</process-instance-id>
</network>
</networks>
</af>
</afs>
</default-vrf>
</instance-active>
</instance>
</instances>
</bgp>
</filter>
</get>
07-31-2017 02:30 PM
Thanks Santiago. I couldn't get the full key spec filter to work, but understand there's a pending DDTS to make the partial key work so will wait until the fix is available.
thanks
Hung
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide