Importing and exporting route maps

Route-maps configured using the route-map command can be applied to a VRF to provide filtering of VPNv4 or VPNv6 routes between PEs in a BGP or MPLS VPN. When a route-map is applied to a VRF, only VPNv4 routes are filtered. Other routes such as static routes, connected routes, OSPF VRF routes, or BGP CE side routes are not affected. Because the route map is applied to the VRF, it filters traffic to all connected PEs. This is in contrast to applying a route-map using the BGP neighbor. In that case, the route map applies to routes imported from or exported to the neighbor that is specified.

Route maps applied to a VRF can coexist with route maps that are applied to a BGP neighbor. The user can filter routes from being imported into a VRF using the import and export route commands. This allows the user to accept or deny the routes for one VRF without affecting the routes that are imported or exported from other VRFs. To do this, the user must define a route-map import or export command.

To configure a VRF to apply the import route map ImportOne, use the following command at the VPNv4 prompt.

(config)# vrf vrfone
(config-vrf-vrfone)# import map ImportOne
(config-vrf-vrfone)# exit-vrf
(config)#

To configure a VRF to apply the export route map ExportOne, use the following command at the VPNv4 prompt.

config)# vrf vrfone
(config-vrf-vrfone)# export map ExportOne
(config-vrf-vrfone)# exit-vrf
(config)#