# Configure Ten-GigabitEthernet1/1/12 as a hybrid port to forward packets from VLAN 200
tagged.
[DeviceC] interface ten-gigabitethernet 1/1/12
[DeviceC-Ten-GigabitEthernet1/1/12] port link-type hybrid
[DeviceC-Ten-GigabitEthernet1/1/12] port hybrid vlan 200 tagged
[DeviceC-Ten-GigabitEthernet1/1/12] quit
# Associate Ten-GigabitEthernet 1/1/5 with IP subnet-based VLANs 100 and 200.
[DeviceC] interface ten-gigabitethernet 1/1/5
[DeviceC-Ten-GigabitEthernet1/1/5] port link-type hybrid
[DeviceC-Ten-GigabitEthernet1/1/5] port hybrid vlan 100 200 untagged
[DeviceC-Ten-GigabitEthernet1/1/5] port hybrid ip-subnet-vlan vlan 100
[DeviceC-Ten-GigabitEthernet1/1/5] port hybrid ip-subnet-vlan vlan 200
[DeviceC-Ten-GigabitEthernet1/1/5] quit
2.
Configure Device A and Device B to allow packets from VLANs 100 and 200 to pass through,
respectively. (Details not shown.)
Verifying the configuration
# Verify the IP subnet-based VLAN configuration on Device C.
[DeviceC] display ip-subnet-vlan vlan all
VLAN ID: 100
Subnet index
0
VLAN ID: 200
Subnet index
0
# Verify the IP subnet-based VLAN configuration on Ten-GigabitEthernet 1/1/5 of Device C.
[DeviceC] display ip-subnet-vlan interface ten-gigabitethernet 1/1/5
Interface: Ten-GigabitEthernet1/1/5
VLAN ID
100
200
Protocol-based VLAN configuration example
Network requirements
As shown in
The majority of hosts in a lab environment run the IPv4 protocol.
•
The other hosts run the IPv6 protocol for teaching purposes.
•
To avoid interference, isolate IPv4 traffic and IPv6 traffic at Layer 2.
IP address
192.168.5.0
IP address
192.168.50.0
Subnet index
IP address
0
192.168.5.0
0
192.168.50.0
Figure
42:
Subnet mask
255.255.255.0
Subnet mask
255.255.255.0
Subnet mask
255.255.255.0
255.255.255.0
147
Status
Active
Active