VPNv6 routes can be exported from the BGP RIB of an IPv6 VRF to the global IPv6 BGP RIB based on policy by means of a route map and the global export map command.
For example, if you have a mixed IPv4 and IPv6 VPN configuration, but want only the IPv6 VPN routes to be exported from the IPv6 VRF into the global IPv6 RIB, you can use a route map that matches on IPv6 access-lists (IPv6 prefix-lists). You can have the route map disallow IPv4 VPN routes by matching on IPv4 access lists that filter out IPv4 prefixes.
The following commands illustrate this behavior.
- host1(config)#ipv6 access-list everything-v6
permit any any
- host1(config)#access-list nothing-v4 deny
ip any any
- host1(config)#route-map export-only-v6
- host1(config-route-map)#match ip address nothing-v4
- host1(config-route-map)#match ipv6 address
everything-v6
- host1(config-route-map)#set local-preference
444
- host1(config-route-map)#exit
- host1(config)#ip vrf foo
- host1(config-route-vrf)#global export map
export-only-v6
If you need to export both IPv4 and IPv6 VPN routes from the IPv4/IPv6 VRF to the global IPv4 BGP RIB and to the global IPv6 BGP RIB, then configure a route map that permits both IPv4 and IPv6 prefixes.