Cool trick with NXOS and VRFs

Cool trick with NXOS and VRFs

Warning: Undefined variable $match_no_and in /home/kennie/www/www/wordpress/wp-content/plugins/crp-taxonomy/includes/filters.php on line 245

Sharing is caring!

Today I learned that you can actually use the NXOS Cli to change the vrf your commands are running on.  By default the system has two vrf’s or context. These two are management and default.  Default VRF is the context everything is put in by…you guessed it… default.   This is also where any of the normal commands are processed like show ip route.  If we create a new vrf like customera, then to show the routing table for this vrf we would normally have to prepend the command.  For example this:

show ip route vrf customera

What I just found out is you can change this default behavior.  This might not work with all versions and hardware of NXOS.  To modify the vrf being used use the command routing-context vrf (VRF NAME).  So in the above scenario we would use the following

config t

routing-context vrf customera

show ip route

Pretty simple and easy to use!

Leave a Reply

Your email address will not be published. Required fields are marked *