Configuring a route map for BGP4+ prefixes

Route maps can be applied to IPv6 unicast address prefixes either as the inbound or outbound routing policy for neighbors under the specified address family.
  1. Enter the configure terminal command to access global configuration mode.
    device# configure terminal
  2. Enter the ipv6 prefix-list command and enter a name to configure an IPv6 prefix list.
    device(config)# ipv6 prefix-list myprefixlist seq 10 permit 2001:db8::/32
    The prefix list name, sequence number, and permits packets are specified.
  3. Enter the route-map command with the permit keyword, and specify a route map name, to define the route map and enter route map configuration mode.
    device(config)# route-map myroutemap permit 10
  4. Enter the match ipv6 address command and specify the name of a prefix list.
    device(config-route-map-myroutemap)# match ipv6 address prefix-list myprefixlist
  5. Enter the exit command to return to global configuration mode.
    device(config-route-map-myroutemap)# exit
  6. Enter the router bgp command to enable BGP routing.
    device(config)# router bgp
  7. Enter the local-as command to configure the autonomous system number (ASN) in which your device resides.
    device(config-bgp-router)# local-as 1000
  8. Enter the neighbor remote-as command, specifying an IPv6 address, to specify the ASN in which the remote neighbor resides.
    device(config-bgp-router)# neighbor fe80:4398:ab30:45de::1 remote-as 1001
  9. Enter the address-family ipv6 unicast command to enter IPv6 address family configuration mode.
    device(config-bgp-router)# address-family ipv6 unicast
  10. Enter the neighbor activate command to enable the exchange of information with the neighbor.
    device(config-bgp-ipv6u)# neighbor fe80:4398:ab30:45de::1 activate
  11. Enter the neighbor route-map command and specify the out keyword to apply a route map to outgoing routes.
    device(config-bgp-ipv6u)# neighbor fe80:4398:ab30:45de::1 route-map out myroutemap

The following example applies a route map, “myroutemap”, as the outbound routing policy for a neighbor.

device# configure terminal
device(config)# ipv6 prefix-list myprefixlist seq 10 permit 2001:db8::/32
device(config)# route-map myroutemap permit 10
device(config-route-map-myroutemap)# match ipv6 address prefix-list myprefixlist
device(config-route-map-myroutemap)# exit
device(config)# router bgp
device(config-bgp-router)# local-as 1000
device(config-bgp-router)# neighbor fe80:4398:ab30:45de::1 remote-as 1001
device(config-bgp-router)# address-family ipv6 unicast
device(config-bgp-ipv6u)# neighbor fe80:4398:ab30:45de::1 activate
device(config-bgp-ipv6u)# neighbor fe80:4398:ab30:45de::1 route-map out myroutemap