489
# Configure the IPv6 address of VLAN-interface 20.
[SwitchC] interface vlan-interface 20
[SwitchC-Vlan-interface20] ipv6 address 2::2 64
Verifying the configuration
# Telnet to Switch B on Switch A. The operation succeeds.
# Telnet to Switch C on Switch A. The operation fails.
# Ping Switch C from Switch A. The operation succeeds.
Telnet uses TCP and ping uses ICMP. The results show the following:
• All TCP packets sent from Switch A are forwarded to the next hop 1::2.
• Other packets are forwarded through VLAN-interface 20.
• The IPv6 local PBR configuration is effective.
Packet type-based IPv6 interface PBR configuration example
Network requirements
As shown in Figure 116, Switch B and Switch C cannot reach each other. Configure IPv6 PBR on
Switch A to forward all TCP packets received on VLAN-interface 11 to the next hop 1::2. Switch A
forwards other IPv6 packets according to the routing table.
Figure 116 Network diagram
Configuration procedure
1. Configure Switch A:
# Create VLAN 10 and VLAN 20.
<SwitchA> system-view
[SwitchA] vlan 10
[SwitchA-vlan10] quit
[SwitchA] vlan 20
Switch A
Vlan-int11
10::2/64
Vlan-int10
1::1/64
Vlan-int20
2::1/64
Subnet
10::1/64
Vlan-int10
1::2/64
Vlan-int20
2::2/64
Switch B Switch C
Host A Host B
10::3/64
Gateway: 10::2/64