Using VLANIF Interfaces to Implement Inter-VLAN Layer 3 Connectivity
VLANIF interfaces are used to implement inter-VLAN Layer 3 connectivity when devices are connected to the same Layer 3 switch or different Layer 3 switches.
Inter-VLAN Layer 3 Connectivity Between Devices Connected to the Same Layer 3 Switch
In Figure 4-19, departments 1 and 2 of a small-scale company belong to VLAN 2 and VLAN 3, respectively, and connect to a Layer 3 switch (Switch) through Layer 2 switches. Packets exchanged between the two departments need to pass the Layer 3 switch.
Assign VLANs on Switch_1 and Switch_2, configure Switch_1 and Switch_2 to transparently transmit VLAN packets to the Layer 3 switch, and configure a VLANIF interface for each VLAN on the Layer 3 switch to allow communication between VLAN 2 and VLAN 3.
Inter-VLAN Layer 3 Connectivity Between Devices Connected to Different Layer 3 Switches
In Figure 4-20, departments 1 and 2 of a medium- or large-scale company are connected across two or more Layer 3 switches, and belong to VLAN 2 and VLAN 3 respectively. Packets exchanged between the two departments need to pass the Layer 3 switches.
Assign VLANs on the Layer 2 switches, and configure the Layer 2 switches to transparently transmit VLAN packets to Layer 3 switches. Configure a VLANIF interface for each user VLAN and interconnected VLANs on Switch_1 and Switch_2, and configure VLANIF interfaces for interconnected VLANs on other Layer 3 devices. In addition, configure static routes or a dynamic routing protocol between Switch_1 and Switch_2 (a dynamic routing protocol is recommended when devices are connected across more than two Layer 3 switches).