Configuring switch C for PBR-based routing
Procedure
-
Configure the Tunnel endpoint for Switch C
The tunnel endpoint for Switch C is configured with a mode, source and destination, and an IPv6 address.
Switch(config)# interface tunnel 1 Switch(tunnel-1)# tunnel mode 6in4 Switch(tunnel-1)# tunnel source 30.0.0.1 Switch(tunnel-1)# tunnel destination 20.0.0.1 Switch(tunnel-1)# ipv6 address 5000::2/64
-
Configure VLAN 2 for the IPv6 Hosts on the 4000::/64 Network
This step is performed in VLAN context.
Switch(config)# vlan 2 Switch(vlan-2)# ipv6 address 4000::1/64
-
Configure the VLAN Used to Reach the First Hop Router in the IPv4 Network
This step is performed in VLAN context.
Switch(vlan-2)# ip address 30.0.0.1/24
-
Configure the IPv4 Default Gateway and Enable Unicast Routing
Switch(config)# ip default-gateway 30.0.0.2 Switch(config)# ipv6 unicast routing
-
Configure IPv6 PBR-Based Routing
Execute these steps to configure the IPv6 PBR-based routing to route into the tunnel, and apply it to the inbound VLAN.
Switch(config)# class ipv6 PBR_Class Switch(config-class)# match ipv6 any 3000::/64 Switch(config-class)# exit Switch(config)# policy pbr PBR_Policy Switch(policy-pbr)# class ipv6 PBR_Class Switch(policy-pbr)# action interface tunnel 1 Switch(policy-pbr)# exit Switch(config)# vlan 2 Switch(vlan-2)# service-policy PBR_Policy in