Users Guide

Enter the VRF instance to which you want to leak routes in CONFIGURATION mode.
ip vrf destination-vrf-name
Import routes from another VRF instance in VRF-CONFIGURATION mode using the same route target.
ip route-import route-target route-map route-map-name
Or
ipv6 route-import route-target route-map route-map-name
Use any of the supported match or set attributes as required.
Export routes from the second VRF instance to the first VRF instance in VRF-CONFIGURATION mode using a different
route target.
ip route-import route-target route-map route-map-name
Or
ipv6 route-import route-target route-map route-map-name
Use any of the supported match or set attributes as required.
Import routes to the first VRF instance from the second VRF instance in VRF-CONFIGURATION mode using the same route
target that you use to export from the second VRF instance.
ip route-import route-target route-map route-map-name
Or
ipv6 route-import route-target route-map route-map-name
Use any of the supported match or set attributes as required.
Example - Leak only IPv4 OSPF routes
In the following example, a route map exports only the external Type 2 OSPF routes from vrf1 and is received by vrf2.
OS10(config)# route-map export_ospf
OS10(config-route-map)# match source-protocol ospf
OS10(config-route-map)# match route-type external type-2
OS10(config)# ip vrf vrf1
OS10(conf-vrf)# ip route-export 1:1 route-map export_ospf
OS10(conf-vrf)# ip route-import 2:2
OS10(conf-vrf)# exit
OS10(config)# ip vrf vrf2
OS10(conf-vrf)# ip route-import 1:1
OS10(conf-vrf)# ip route-export 2:2 route-map export_ospf
Example - Leak only IPv6 OSPF routes
In the following example, a route map exports only the OSPF routes from vrf1 and is received by vrf2.
OS10(config)# route-map export_ospf
OS10(config-route-map)# match source-protocol ospf
OS10(config-route-map)# match route-type external type-2
OS10(config)# ip vrf vrf1
OS10(conf-vrf)# ipv6 route-export 1:1 route-map export_ospf
OS10(conf-vrf)# ipv6 route-import 2:2
OS10(conf-vrf)# exit
OS10(config)# ip vrf vrf2
OS10(conf-vrf)# ipv6 route-import 1:1
OS10(conf-vrf)# ipv6 route-export 2:2 route-map export_ospf
Example - Leak only IPv4 static routes
Layer 3
737