428
IPv6 PBR configuration examples
Packet type-based IPv6 local PBR configuration example
Network requirements
As shown in
Figure 97
, configure IPv6 PBR on Router A to forward all TCP packets to the next hop 1::2.
Router A forwards other packets according to the routing table.
Figure 97
Network diagram
Configuration procedure
1.
Configure Router A:
# Configure IPv6 addresses for the interfaces.
<RouterA> system-view
[RouterA] interface gigabitethernet 1/0
[RouterA-GigabitEthernet1/0] ipv6 address 1::1 64
[RouterA-GigabitEthernet1/0] quit
[RouterA] interface gigabitethernet 2/0
[RouterA-GigabitEthernet2/0] ipv6 address 2::1 64
[RouterA-GigabitEthernet2/0] quit
# Configure ACL 3001 to match TCP packets.
[RouterA] acl ipv6 number 3001
[RouterA-acl6-adv-3001] rule permit tcp
[RouterA-acl6-adv-3001] quit
# Configure Node 5 for policy
aaa
to forward TCP packets to next hop 1::2.
[RouterA] ipv6 policy-based-route aaa permit node 5
[RouterA-pbr6-aaa-5] if-match acl 3001
[RouterA-pbr6-aaa-5] apply next-hop 1::2
[RouterA-pbr6-aaa-5] quit
# Configure IPv6 local PBR by applying policy
aaa
to Router A.
[RouterA] ipv6 local policy-based-route aaa
2.
On Router B, configure an IPv6 address for the interface.
<RouterB> system-view
[RouterB] interface gigabitethernet 1/0
[RouterB-GigabitEthernet1/0] ipv6 address 1::2 64
3.
On Router C, configure an IPv6 address for the interface.
<RouterC> system-view
[RouterC] interface gigabitethernet 2/0
[RouterC-GigabitEthernet2/0] ipv6 address 2::2 64