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.
- Enter the
configure terminalcommand to enter global configuration mode. - Define the required IPv6 ACLs to be added to the route map.
- Enter the
route-mapcommand to define the route and specify the match criteria and the resulting action if all the match clauses are met. - Add IPv6 ACLs to match the IP address that is permitted by the ACL.
- Set the IPv6 address of the next hop to which the traffic that matches a match statement in the route map must be routed.
- Enter the
exitcommand to return to global configuration mode. - 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 globally to apply the route map to all interfaces.
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