R1#configure terminal | Enter configure mode. |
R1(config)#feature pbr | Enable PBR support |
R1(config)#hardware-profile filter ingress- ipv6 enable | Enable Ingress IPv6 group for PBR support |
R1(config)# ipv6 access-list 123 | Create ipv6 access-list named 123 |
R1(config-ipv6-acl)#10 permit any 101::/64 202::/64 | Create an access rule to permit IPv6 packets with source 101::/64 and destination 202::/64 |
R1(config-ipv6-acl)#commit | Commit the candidate configuration to the running configuration. |
R1(config-ipv6-acl)#exit | Exit access-list mode |
R1(config)#route-map 123 permit 10 | Configure route-map with name 123 and sequence number 10 |
R1(config-route-map)# match ipv6 address 123 | Match ip address with ACL 123 |
R1(config-route-map)#set ipv6 next-hop 6111::2 | Set next-hop to forward the matching IP packets |
R1(config-route-map)#commit | Commit the candidate configuration to the running configuration. |
R1(config-route-map)#exit | Exit route-map mode |
R1(config)#interface lo | Enter interface mode. |
R1(config-if)#ip address 1.1.1.1/32 | Configure the IPv6 address of the interface. |
R1(config-if)#exit | Exit interface mode. |
R1(config)#router ipv6 ospf 100 | Creating OSPFv3 routing instance |
R1(config-router)#exit | Exit router mode. |
R1(config)#interface eth1 | Enter interface mode. |
R1(config-if)#ipv6 address 2111::1/64 | Configure the IPv6 address of the interface. |
R1(config-if)#ipv6 router ospf area 0.0.0.0 tag 100 | Enable OSPFv3 routing on an interface, and assign the Area ID 0. |
R1(config-if)#exit | Exit interface mode. |
R1(config)#interface eth2 | Enter interface mode. |
R1(config-if)#ipv6 address 6111::1/64 | Configure the IPv6 address of the interface. |
R1(config-if)#ipv6 router ospf area 0.0.0.0 tag 100 | Enable OSPFv3 routing on an interface, and assign the Area ID 0. |
R1(config-if)# ipv6 ospf cost 2 | Configuring ospf cost as 2 |
R1(config-if)#exit | Exit interface mode. |
R1(config)#interface eth3 | Enter interface mode. |
R1(config-if)#ipv6 address 1311::1/64 | Configure the IPv6 address of the interface. |
R1(config-if)#ipv6 router ospf area 0.0.0.0 tag 100 | Enable OSPFv3 routing on an interface, and assign the Area ID 0. |
R1(config-if)# ipv6 ospf cost 3 | Configuring ospf cost as 3 |
R1(config-if)#exit | Exit interface mode. |
R1(config)#interface eth4 | Enter interface mode. |
R1(config-if)#ipv6 router ospf area 0.0.0.0 tag 100 | Enable OSPFv3 routing on an interface, and assign the Area ID 0. |
R1(config-if)#ipv6 address 101::2/64 | Configure the IPv6 address of the interface. |
R1(config-if)#ipv6 policy route-map 123 | Attach PBR on the ingress interface |
R1(config-if)#commit | Commit the candidate configuration to the running configuration. |
R1(config-if)#exit | Exit interface mode. |
R2#configure terminal | Enter configure mode. |
R2(config)#interface lo | Enter interface mode. |
R2(config-if)#ip address 2.2.2.2/32 | Configure the IPv6 address of the interface. |
R2(config-if)#exit | Exit interface mode. |
R2(config)#router ipv6 ospf 100 | Creating OSPFv3 routing instance |
R2(config-router)#exit | Exit router mode. |
R2(config)#interface eth1 | Enter interface mode. |
R2(config-if)#ipv6 address 2111::2/64 | Configure the IPv6 address of the interface. |
R2(config-if)#ipv6 router ospf area 0.0.0.0 tag 100 | Enable OSPFv3 routing on an interface, and assign the Area ID 0. |
R2(config-if)#exit | Exit interface mode. |
R2(config)#interface eth2 | Enter interface mode. |
R2(config-if)#ipv6 address 1011::1/64 | Configure the IPv6 address of the interface. |
R2(config-if)#ipv6 router ospf area 0.0.0.0 tag 100 | Enable OSPFv3 routing on an interface, and assign the Area ID 0. |
R2(config-if)#commit | Commit the candidate configuration to the running configuration. |
R2(config-if)#exit | Exit interface mode. |
R3#configure terminal | Enter configure mode. |
R3(config)#router ipv6 ospf 100 | Creating OSPFv3 routing instance |
R3(config-router)#exit | Exit router mode. |
R3(config)#interface lo | Enter interface mode. |
R3(config-if)#ip address 3.3.3.3/32 | Configure the IPv6 address of the interface. |
R3(config-if)#exit | Exit interface mode. |
R3(config)#interface eth1 | Enter interface mode. |
R3(config-if)#ipv6 address 6111::2/64 | Configure the IPv6 address of the interface. |
R3(config-if)#ipv6 router ospf area 0.0.0.0 tag 100 | Enable OSPFv3 routing on an interface, and assign the Area ID 0. |
R2(config-router)#exit | Exit router mode. |
R3(config)#interface eth2 | Enter interface mode. |
R3(config-if)#ipv6 address 1211::1/64 | Configure the IPv6 address of the interface. |
R3(config-if)#ipv6 router ospf area 0.0.0.0 tag 100 | Enable OSPFv3 routing on an interface, and assign the Area ID 0. |
R2(config-if)#commit | Commit the candidate configuration to the running configuration. |
R3(config-if)#exit | Exit interface mode. |
R4#configure terminal | Enter configure mode. |
R4(config)#router ipv6 ospf 100 | Creating OSPFv3 routing instance |
R4(config-router)#exit | Exit router mode. |
R4(config)#interface lo | Enter interface mode. |
R4(config-if)#ip address 4.4.4.4/32 | Configure the IPv6 address of the interface. |
R4(config-if)#exit | Exit interface mode. |
R4(config)#interface eth1 | Enter interface mode. |
R4(config-if)#ipv6 address 1311::2/64 | Configure the IPv6 address of the interface. |
R4(config-if)#ipv6 router ospf area 0.0.0.0 tag 100 | Enable OSPFv3 routing on an interface, and assign the Area ID 0. |
R4(config-if)#exit | Exit interface mode. |
R4(config)#interface eth2 | Enter interface mode. |
R4(config-if)#ipv6 address 1511::1/64 | Configure the IPv6 address of the interface. |
R4(config-if)#ipv6 router ospf area 0.0.0.0 tag 100 | Enable OSPFv3 routing on an interface, and assign the Area ID 0. |
R4(config-if)#commit | Commit the candidate configuration to the running configuration. |
R4(config-if)#exit | Exit interface mode. |
R5#configure terminal | Enter configure mode. |
R5(config)#router ipv6 ospf 100 | Creating OSPFv3 routing instance |
R5(config-router)#exit | Exit router mode. |
R5(config)#interface lo | Enter interface mode. |
R5(config-if)#ip address 5.5.5.5/32 | Configure the IPv6 address of the interface. |
R5(config-if)#exit | Exit interface mode. |
R5(config)#interface eth1 | Enter interface mode. |
R5(config-if)#ipv6 address 1011::2/64 | Configure the IPv6 address of the interface. |
R5(config-if)#ipv6 router ospf area 0.0.0.0 tag 100 | Enable OSPFv3 routing on an interface, and assign the Area ID 0. |
R5(config-if)#exit | Exit interface mode. |
R5(config)#interface eth2 | Enter interface mode. |
R5(config-if)#ipv6 address 1211::2/64 | Configure the IPv6 address of the interface. |
R5(config-if)#ipv6 router ospf area 0.0.0.0 tag 100 | Enable OSPFv3 routing on an interface, and assign the Area ID 0. |
R5(config-if)#exit | Exit interface mode. |
R5(config)#interface eth3 | Enter interface mode. |
R5(config-if)#ipv6 address 1511::2/64 | Configure the IPv6 address of the interface. |
R5(config-if)#ipv6 router ospf area 0.0.0.0 tag 100 | Enable OSPFv3 routing on an interface, and assign the Area ID 0. |
R5(config-if)#exit | Exit interface mode. |
R5(config)#interface eth4 | Enter interface mode. |
R5(config-if)#ipv6 address 202::2/64 | Configure the IPv6 address of the interface. |
R5(config-if)#ipv6 router ospf area 0.0.0.0 tag 100 | Enable OSPFv3 routing on an interface, and assign the Area ID 0. |
R5(config-if)#commit | Commit the candidate configuration to the running configuration. |
R5(config-if)#exit | Exit interface mode. |