Application Scenario
On the network shown in Figure 6-1, PC1 in VLAN 2 and PC2 in VLAN 3 need to communicate with each other.
Switch-vlan can be configured on SwitchA to implement inter-VLAN communication. After switch-vlan is configured, user packets are forwarded along the specified path. SwitchA is configured to change VLAN 2 in packets received by Port2 to VLAN 3 and send them through Port3, and to change VLAN 3 in packets received by Port3 to VLAN 2 and send them through Port2. In this manner, switch-vlan implements communication between VLAN 2 and VLAN 3.
If SwitchA is a Layer 3 switch, you can also use a VLANIF interface to implement inter-VLAN communication. If SwitchA is a Layer 2 switch, you can only use switch-vlan to implement inter-VLAN communication.