Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bgp_neighbors issue #1231

Closed
1 task done
expbits opened this issue May 29, 2020 · 7 comments
Closed
1 task done

bgp_neighbors issue #1231

expbits opened this issue May 29, 2020 · 7 comments
Milestone

Comments

@expbits
Copy link

expbits commented May 29, 2020

Description of Issue/Question

Hi, I'm new to automation and trying to get 'bgp_neighbor' stats and ran into some issue. I have 2 ASR 1001-x running IOS-XE on the same code version on the same network with identical config setup. I’m getting a Traceback error when getting ‘bgp_neighbors’ to Router1 but on Router2 it works fine. I’m using ‘ios’ for the platform in my host file. Any idea how to fix this? Thanks in advance.

Here’s the Traceback error:

RTR-01 ** changed : False ***************************************
vvvv napalm_get ** changed : False vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ERROR
Traceback (most recent call last):
File “C:\Users\user1\AppData\Local\Programs\Python\Python37-32\lib\site-packages\nornir\core\task.py”, line 85, in start
r = self.task(self, **self.params)
File “C:\Users\user1\AppData\Local\Programs\Python\Python37-32\lib\site-packages\nornir\plugins\tasks\networking\napalm_get.py”, line 61, in napalm_get
result[g] = method(**options)
File “C:\Users\user1\AppData\Local\Programs\Python\Python37-32\lib\site-packages\napalm\ios\ios.py”, line 1867, in get_bgp_neighbors
assert afi not in existing[“address_family”]
AssertionError

Did you follow the steps from https://github.com/napalm-automation/napalm#faq

(Place an x between the square brackets where applicable)

  • Yes
  • [] No

Setup

napalm version

(Paste verbatim output from pip freeze | grep napalm between quotes below)

napalm==3.0.1
napalm-inspector==1.0.0

Network operating system version

(Paste verbatim output from show version - or equivalent - between quotes below)

 'os_version': 'ASR1000 Software '
                           '(X86_64_LINUX_IOSD-UNIVERSALK9-M), Version '
                           '15.4(3)S3, RELEASE SOFTWARE (fc1)',

Steps to Reproduce the Issue

Error Traceback

(Paste the complete traceback of the exception between quotes below)

RTR-01 ** changed : False ***************************************
vvvv napalm_get ** changed : False vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ERROR
Traceback (most recent call last):
File “C:\Users\user1\AppData\Local\Programs\Python\Python37-32\lib\site-packages\nornir\core\task.py”, line 85, in start
r = self.task(self, **self.params)
File “C:\Users\user1\AppData\Local\Programs\Python\Python37-32\lib\site-packages\nornir\plugins\tasks\networking\napalm_get.py”, line 61, in napalm_get
result[g] = method(**options)
File “C:\Users\user1\AppData\Local\Programs\Python\Python37-32\lib\site-packages\napalm\ios\ios.py”, line 1867, in get_bgp_neighbors
assert afi not in existing[“address_family”]
AssertionError
@network-shark
Copy link
Contributor

Can you provide "show bgp all summary" from both devices ?

@expbits
Copy link
Author

expbits commented Jun 15, 2020

@network-shark , there is one peer in one of the address-family that is down in R1 but not shutdown. R2 doesnt have any down peers and was able to pull all peer state for each address-family.

@mirceaulinic
Copy link
Member

@expbits are you able to share the output as @network-shark suggested?

@expbits
Copy link
Author

expbits commented Jul 1, 2020

@mirceaulinic and @network-shark

Sorry for the delayed response, got stuck at work. Here is the output for reference. I notice that i have 1 neighbor that is part of 2 VRFs. 1 is down and 1 is UP.

RTR-01#show bgp all summary
For address family: IPv4 Unicast
BGP router identifier 10.10.100.13, local AS number 10000
BGP table version is 1, main routing table version 1

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.10.100.193 4 10000 184092 126379 1 0 0 11w2d 0
10.10.100.194 4 10000 175451 126432 1 0 0 11w2d 0
10.10.100.195 4 10000 170685 126378 1 0 0 11w2d 0

For address family: VPNv4 Unicast
BGP router identifier 10.10.100.13, local AS number 10000
BGP table version is 283229, main routing table version 283229
5508 network entries using 1410048 bytes of memory
16517 path entries using 1982040 bytes of memory
196/184 BGP path/bestpath attribute entries using 51744 bytes of memory
66 BGP rrinfo entries using 2640 bytes of memory
75 BGP AS-PATH entries using 2724 bytes of memory
65 BGP community entries using 1688 bytes of memory
4 BGP extended community entries using 96 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 3450980 total bytes of memory
10 received paths for inbound soft reconfiguration
BGP activity 10912/5404 prefixes, 155537/139020 paths, scan interval 60 secs

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.10.20.33 4 14002 126372 126403 283229 0 0 11w2d 1
10.10.100.193 4 10000 184092 126379 283229 0 0 11w2d 5497
10.10.100.194 4 10000 175451 126432 283229 0 0 11w2d 5497
10.10.100.195 4 10000 170685 126378 283229 0 0 11w2d 5497
10.30.30.186 4 14083 114807 160469 283229 0 0 11w2d 2
10.30.30.190 4 14083 114805 160425 283229 0 0 11w2d 2
10.30.30.202 4 14083 114803 154350 283229 0 0 11w2d 1
10.30.30.206 4 14083 114803 154302 283229 0 0 11w2d 1
10.30.40.250 4 14083 114801 154333 283229 0 0 11w2d 1
10.30.40.254 4 14083 0 0 1 0 0 never Idle <<<<< part of VRF1
10.30.40.254 4 14083 114800 154428 283229 0 0 11w2d 1 <<<<< part of VRF2
10.90.5.82 4 14392 126393 126340 283229 0 0 11w2d 1

RTR-02# show bgp all summary
For address family: IPv4 Unicast
BGP router identifier 10.10.100.141, local AS number 20000
BGP table version is 1, main routing table version 1

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.10.100.129 4 20000 89027 60797 1 0 0 5w3d 0
10.10.100.130 4 20000 176517 126388 1 0 0 11w2d 0
10.10.100.131 4 20000 170989 126409 1 0 0 11w2d 0

For address family: VPNv4 Unicast
BGP router identifier 10.10.100.141, local AS number 20000
BGP table version is 385061, main routing table version 385061
7215 network entries using 1847040 bytes of memory
18170 path entries using 2180400 bytes of memory
197/185 BGP path/bestpath attribute entries using 52008 bytes of memory
21 BGP rrinfo entries using 840 bytes of memory
74 BGP AS-PATH entries using 2928 bytes of memory
55 BGP community entries using 1480 bytes of memory
4 BGP extended community entries using 96 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 4084792 total bytes of memory
10 received paths for inbound soft reconfiguration
BGP activity 23999/16784 prefixes, 247902/229732 paths, scan interval 60 secs

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.10.20.161 4 14002 60821 60811 385061 0 0 5w3d 1
10.10.100.129 4 20000 89027 60797 385061 0 0 5w3d 5470
10.10.100.130 4 20000 176517 126388 385061 0 0 11w2d 5470
10.10.100.131 4 20000 170989 126409 385061 0 0 11w2d 5470
10.30.30.194 4 14083 114810 160827 385061 0 0 11w2d 2
10.30.30.198 4 14083 114810 160807 385061 0 0 11w2d 2
10.30.30.210 4 14083 114808 154904 385061 0 0 11w2d 1
10.30.30.214 4 14083 114808 154873 385061 0 0 11w2d 1
10.60.10.202 4 14083 114806 154873 385061 0 0 11w2d 1
10.60.10.206 4 14083 114805 154947 385061 0 0 11w2d 1
10.90.5.86 4 14392 60809 60791 385061 0 0 5w3d 1

@jtishey
Copy link
Contributor

jtishey commented Sep 13, 2022

Think this is the same as #1497. I've had this issue as well for a while and I'll see if I can put together a PR for it.

@jtishey
Copy link
Contributor

jtishey commented Sep 13, 2022

Submitted PR #1751 for review to fix this.

mirceaulinic added a commit that referenced this issue Mar 21, 2024
IOS get_bgp_neighbors same IP different VRF - Fix #1497 #1231
@mirceaulinic
Copy link
Member

Resolved via #1751.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants