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

template request: show ip bgp neighbors x.x.x.x advertised-routes #639

Closed
ghost opened this issue Apr 1, 2020 · 12 comments · Fixed by #674 or #709
Closed

template request: show ip bgp neighbors x.x.x.x advertised-routes #639

ghost opened this issue Apr 1, 2020 · 12 comments · Fixed by #674 or #709

Comments

@ghost
Copy link

ghost commented Apr 1, 2020

ISSUE TYPE
  • Feature Idea
@FragmentedPacket
Copy link
Contributor

Do you mind providing more information for this? OS, raw output, etc? This may just need to be updated in an existing template, but not much information to go off of to address it.

@ghost
Copy link
Author

ghost commented Apr 30, 2020

image

Hi @FragmentedPacket something like this. the blue marker is a network address like: 192.168.11.0/24 it was the prefix advertised to your bgp neighbor. Thanks

@ghost
Copy link
Author

ghost commented May 1, 2020

Dummy Router#show ip bgp neighbors 172.17.55.13 advertised-routes
BGP table version is 143173748, local router ID is 192.168.88.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
t secondary path,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

 Network          Next Hop            Metric LocPrf Weight Path

*> 113.55.45.0/24 0.0.0.0 32768 i
*> 113.55.48.0/24 0.0.0.0 32768 i
*> 113.55.50.0/24 0.0.0.0 32768 i
*> 113.55.51.0/24 0.0.0.0 32768 i
*> 113.55.53.0/24 0.0.0.0 32768 i
*> 113.55.54.0/24 0.0.0.0 32768 i
*> 113.55.58.0/24 0.0.0.0 32768 i

Total number of prefixes 7
Dummy Router#

@FragmentedPacket
Copy link
Contributor

Do you get structured data parsing this with show_ip_bgp?

@ghost
Copy link
Author

ghost commented May 1, 2020

I tried the command show ip bgp but it takes forever to load maybe because of the thousands of routes. i tried the show ip bgp neighbors but i did not get the structured data. see the output below.
image

@FragmentedPacket
Copy link
Contributor

Ok no problem. I'll have to take a look at some point to see what the differences are and whether it's worth another template or adding any use cases that don't already exist in that template.

@ghost
Copy link
Author

ghost commented May 1, 2020

@FragmentedPacket Again, Thank you for the efforts and for making all of the templates.

@FragmentedPacket
Copy link
Contributor

@asoltes I submitted a new PR for this. So i'll have Jacob review it and if everything looks good we'll merge it.

@ghost
Copy link
Author

ghost commented May 19, 2020

@FragmentedPacket I saw that the templates is now merged and I am able to update/download the new template but I am not able to parse the data.
see the image below. I am using nornir and netmiko and I am able to parsed the data in command "show ip int br"
but when i tested the show ip bgp x.x.xx. neig advertised-routes its not working. Thanks

def show_adv_routes(task):
    adv_routes = task.run(netmiko_send_command, command_string="show ip bgp neighbors 172.17.32.165 advertised-routes",use_textfsm=True)
    task.host['adv_routes'] = adv_routes.result
    print_result(adv_routes)

image

/ntc-templates/templates/cisco_ios_show_ip_bgp_neighbors_advertised_routes.textfsm

@FragmentedPacket
Copy link
Contributor

@asoltes I just submitted PR to fix this- #709 . It was the index file that was not correct. Please test though before I merge it in.

@ghost
Copy link
Author

ghost commented May 20, 2020

@FragmentedPacket woah that was awesome. I am now able to get the parsed data. Thank you, It will help us a lot in automating our network. stay safe and have a good day :)

image

@FragmentedPacket
Copy link
Contributor

@asoltes I didn't catch that the tests weren't passing. I had to make some changes to the template names and index file as well.

Do you mind testing again and letting me know? I will merge it once tested and be cutting a new release hopefully this week.

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