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

Cisco xr show route vrf all #378

Merged

Conversation

Warsenius
Copy link
Contributor

ISSUE TYPE
  • New Template Pull Request
COMPONENT

cisco_xr_show_route_vrf_all
show route vrf all

SUMMARY

Added template for cisco ios-xr show route vrf all command.
Routes can be leaked from a different vrf (nexthop in vrf default), if so i put the destination vrf in the destination interface field with the word vrf.

I googled verbatim, stil dont know what it means :)

@Warsenius Warsenius marked this pull request as ready for review February 26, 2019 07:03
@Warsenius Warsenius force-pushed the cisco_xr_show_route_vrf_all branch from 3792ff6 to 24db406 Compare March 13, 2019 07:23
@canerturkaslan
Copy link

show route vrf all connected
show route vrf all static
show route vrf all ospf
it doesn't support pls fix them

@jmcgill298
Copy link
Contributor

@canerturkaslan can you please let us know how these commands are not working for you?

@jmcgill298
Copy link
Contributor

@FragmentedPacket I am curious how this is working today, as XR using show route format instead of show ip route, the index file should probably be modified to use the proper syntax

@Warsenius
Copy link
Contributor Author

Warsenius commented Jul 29, 2019

@canerturkaslan can you please let us know how these commands are not working for you?

I tested the commands on XRV. and the commands from canerturkaslan give the following output:

RP/0/0/CPU0:XRV1#  show route vrf all local 
Mon Jul 29 15:31:40.022 UTC
VRF: **nVSatellite
L    10.0.0.1/32 is directly connected, 00:14:21, nV-Loopback0
L    10.0.0.2/32 is directly connected, 00:14:21, nV-Loopback1

VRF: customerA
L    10.1.14.1/32 is directly connected, 00:14:04, GigabitEthernet0/0/0/1

RP/0/0/CPU0:XRV1#  show route vrf all connected 
Mon Jul 29 15:31:44.042 UTC

VRF: **nVSatellite
% No matching routes found

VRF: customerA
C    10.1.14.0/30 is directly connected, 00:14:08, GigabitEthernet0/0/0/1

This output does not have the

Codes: C - connected, S - static, R - RIP, B - BGP, (>) - Diversion path
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - ISIS, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, su - IS-IS summary null, * - candidate default
       U - per-user static route, o - ODR, L - local, G  - DAGR, l - LISP
       A - access/subscriber, a - Application route
       M - mobile route, r - RPL, (!) - FRR Backup path

part.
If i add this 'Codes:' part in between the output of these commands then i have a matched output (except on the '% No matching routes found' line).
Since this is not something specific to this pull request im not sure if this is moment to 'solve' this as you can work around this since the protocol is collected in the output.
So you can parse the main command and filter out the routes you are interested in.

I dont know how it is on the newest versons of ios-xr but on my routers 'show ip route [vrf all]' is still supported.

@canerturkaslan
Copy link

@jmcgill298 command is working but parser (template) not showing (vrf all local,vrf all static , vrf all ospf )
@Warsenius command is working like I said but parser not working for vrf all (custom filter)
thank you for quick response !

@Warsenius
Copy link
Contributor Author

@jmcgill298 command is working but parser (template) not showing (vrf all local,vrf all static , vrf all ospf )
@Warsenius command is working like I said but parser not working for vrf all (custom filter)
thank you for quick response !

I dont think this is specific to this pull request. as the current template also does not work for those commands.
And as i said, if you perform the base command all routes are parsed and you can filter the output based on the 'protocol' field to only see the routes you want. this way you only need to execute 1 command on the box aswell.

Copy link
Contributor

@jmcgill298 jmcgill298 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jmcgill298 jmcgill298 merged commit 8a11939 into networktocode:master Sep 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes_requested Waiting on user to address feedback enhancement PR Submitted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants