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

Netconf query timeout when querying prefixes in vrf

nkhambal10
Beginner
Beginner

Hi,

Running this query results in a timeout. I queried with or without neighbor element, however, results are the same. Any workaround to not time out? Route scale is about 12K routes inside the VRF table.

Neighbors Configured: 6 Established: 5

Address-Family Prefixes Paths PathElem Prefix Path PathElem
Memory Memory Memory
IPv4 Unicast 12609 24999 12609 1.78MB 2.10MB 1.29MB
Imported 24171 2.03MB
IPv6 Unicast 12883 26808 12883 1.97MB 2.25MB 1.31MB
Imported 24769 2.08MB
------------------------------------------------------------------------------
Total 25492 51807 25492 3.75MB 4.35MB 2.60MB
 <filter>
<bgp xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-bgp-oper">
<instances>
<instance>
<instance-active>
<vrfs>
<vrf>
<vrf-name>XXXVRF</vrf-name>
<afs>
<af>
<af-name>ipv4-unicast</af-name>
<networks/>
</af>
</afs>
<neighbors>
<neighbor>
<neighbor-address>XXX.0.20.193</neighbor-address>
</neighbor>
</neighbors>
</vrf>
</vrfs>
</instance-active>
</instance>
</instances>
</bgp>
</filter>
5 Replies 5

Wondering with so many routes, this is timing out - might be worth looking at setting the netconf session values https://www.cisco.com/c/en/us/td/docs/routers/asr9000/software/asr9k-r6-2/sysman/command/reference/b-system-management-cr-asr9000-62x/b-sysman-cr-asr9k-61x_chapter_010011.html - i think there is no default set up. Anything in the device logs?

 

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

Marcel Zehnder
Spotlight
Spotlight

Hi 

I had a similar issue in a Python script with ncclient - for ncclient there's a timeout parameter - should also be the case for any other library/tool:

 

with manager.connect(
 host=dev.get("host"),
 port=830,
 username=dev.get("user"), 
 password=dev.get("password"),
 hostkey_verify=False,
 timeout=300, # in seconds for large transitions
) as m:

 

 

nkhambal10
Beginner
Beginner

I have 600 secs (10 mins) timeout configured for netconf session and it seems I am able to get response almost always consistently in 8 mins.. I wonder why it takes so long and if there is a better query to fetch the data that doesn't take so long. I am trying to query the received routes for a BGP neighbor. I couldn't find the appropriate query to fetch per-neighbor table. So I have to fetch the full table and parse it to find out the routes received from neighbor and are marked as the best. A bit of a long winded approach. Anyone knows any better query to do the job?

 

conn = manager.connect(host=host,
port=830,
username=uName,
password=uPassWd,
allow_agent=False,
look_for_keys=False,
hostkey_verify=False,
timeout=600,
device_params={'name':'iosxr',"timeout": 300})
 

 

Marcel Zehnder
Spotlight
Spotlight

I've tested this in my lab and I'm able to get the networks on a per neighbor basis with the following filter (neighbor=192.168.84.2/vrf=TEST):

 <bgp xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-bgp-oper">
        <instances>
          <instance>
            <instance-active>
              <vrfs>
                <vrf>
                  <vrf-name>TEST</vrf-name>
                  <afs>
                    <af>
                      <af-name>ipv4-unicast</af-name>
                      <path-table>
                        <path>
                          <neighbor-address>192.168.84.2</neighbor-address>
                        </path>
                      </path-table>
                    </af>
                  </afs>
                </vrf>
              </vrfs>
            </instance-active>
          </instance>
        </instances>
      </bgp>

I tried this query on my lab router but I get a time out after waiting for 10 mins (session timeout value). It seems it still scans the whole RIB for the vrf to pick and send the routes with certain neighbor value. 

Getting Started

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: