Configuring an IPv6 PBR Policy with an IPv6 Address as the Next Hop

The following steps configure an IPv6 address as the next hop in the route map in a policy. This task uses Access Control Lists (ACLs), which are explained in greater detail in the “ACLs” chapter.

  1. Enter the configure terminal command to enter global configuration mode.
    device# configure terminal
  2. Define the required IPv6 ACLs to be added to the route map.
    device(config)# ipv6 access-list acl8 
    device(config-ipv6-access-list ac18)# permit ipv6 2001:DB8:12d:1300::/64 any
    device(config-ipv6-access-list ac18)# exit
  3. Enter the route-map command to define the route and specify the match criteria and the resulting action if all the match clauses are met.
    device(config)# route-map test-route permit acl8
  4. Add IPv6 ACLs to match the IP address that is permitted by the ACL.
    device(config-routemap test-route)# match ipv6 address acl8
  5. Set the IPv6 address of the next hop to which the traffic that matches a match statement in the route map must be routed.
    device(config-routemap test-route)# set ipv6 next-hop 2001:DB8:12d:1300:1
  6. Enter the exit command to return to global configuration mode.
    device(config-routemap test-route)# exit
  7. Enable PBR by applying the route map globally or on an untagged interface or virtual interface.
    • Enable IPv6 PBR globally to apply the route map to all interfaces.
      device(config)# ipv6 policy route-map test-route
    • Enable IPv6 PBR locally by applying the route map on an interface.
      device(config)# interface ethernet 1/1/3
      device(config-if-e1000-1/1/3)# ipv6 policy route-map test-route
    • Enable IPv6 PBR locally by applying the route map on a virtual interface.
      device(config)# interface ve 1
      device(config-vif-1)# ipv6 policy route-map test-route

The following example shows the configuration steps to configure a PBR policy by setting an IPv6 address as the next hop in the route map.

device# configure terminal
device(config)# ipv6 access-list acl8 
device(config-ipv6-access-list ac18)# permit ipv6 2001:DB8:12d:1300::/64 any
device(config-ipv6-access-list ac18)# exit
device(config)# route-map test-route permit acl8
device(config-routemap test-route)# match ipv6 address acl8
device(config-routemap test-route)# set ipv6 next-hop 2001:DB8:12d:1300:1
device(config-routemap test-route)# exit
device(config)# interface ethernet 1/1/3
device(config-if-e1000-1/1/3)# ipv6 policy route-map test-route
device(config-if-e1000-1/1/3)# end