Configure VRF Route Leak On Cisco Nexus Switches
Configure VRF Route Leak On Cisco Nexus Switches
Switches
Contents
Introduction
Prerequisites
Requirements
Components Used
Limitations
Configure
Default VRF to VRF
VRF to VRF
VRF to Default VRF
Verify
Introduction
This document describes how to configure Route Leak on Cisco Nexus NX-OS based Switches.
Prerequisites
Requirements
Components Used
The information in this document is based on Cisco Nexus 7000 with NXOS version 7.3(0)D1(1)
The outputs in this document were taken from devices in a specific lab environment. All devices
used in this document started with a cleared (default) configuration. If your network is live, ensure
that you understand the potential impact of any command.
Limitations
Note: A BGP session from the Nexus cannot be established to a peer IP when routed through a
different VRF on the Nexus.
Configure
The leak between VRFs is performed at BGP process level. Because of this, it is necessary to add
the routes to the BGP process first, specifically in the BGP table.
Note: The terms Default VRF and Global Routing Table are used interchangeably in this
document.
In this case, Nexus has received two routes in its Default VRF via EIGRP. The configuration leaks
the routes in VRF BLUE.
For the purpose of this example, only the route 192.168.2.0/24 is leaked.
Note: In NX-OS, enable the features in Global Configuration Mode is required. In order to
enable BGP, the command is feature bgp.
●Step 1. Redistribute into BGP.
Redistribute the routes which exist in the Default VRF Routing Table in BGP.
Since the routes are in the Default VRF, the redistribute command in BGP goes under the global
address-family ipv4 unicast section.
Use the correct parameter for the redistribute command, this depends on how the routes are in
the Default VRF (directly connected, eigrp, ospf, etc).
Note: You can skip Step 1 in all scenarios if the routes to be leaked are installed as BGP
routes in the origin VRF. In this example the origin VRF is the Default VRF (Global Routing
Table).
These BGP routes in the VRF can now be redistributed in any other Routing Protocol that runs in
the same VRF.
In this case, Nexus has received two routes in its VRF called RED via EIGRP. The configuration
leaks the routes in VRF BLUE.
Since the routes are in the VRF RED, the redistribute command in BGP goes under the vrf RED
address-family ipv4 unicast section.
These BGP routes in the VRF can now be redistributed in any other Routing Protocol that runs in
the same VRF.
Use the set extcommunity rt parameter in the route-map in order to assign the Route-Target.
In the below example, only network 192.168.2.0/24 is exported with Route-Target 1:1 which is
later imported in VRF BLUE.
Note: On Nexus 7000 and Nexus 7700 family of Switches, this feature that supports the
export of IP prefixes to the global routing table (the default VRF) from any other VRF with the
use of the export vrf default map command was introduced in NX-OS release 7.3(0)D1(1)
Nexus has received two routes in its VRF called RED via EIGRP. The configuration leaks the
routes in the Default VRF.
For the purpose of this example, only the route 192.168.2.0/24 is leaked.
Since the routes are in the VRF RED, the redistribute command in BGP goes under the vrf RED
address-family ipv4 unicast section.
These BGP routes in the Default VRF can now be redistributed in any other Routing Protocol that
also runs in the Default VRF.
Verify
There are 4 phases in the vrf route leak process. Verification can be done in order:
In order to check the routes are correctly in the Routing Table, the command is:
Notice that the second command can be used interchangeably in order to show IPv4 Unicast
addresses in the BGP table.
slot 1
=======