Inter-VLAN communication
VLAN technology is widely used to isolate Layer 2 packets. It divides a LAN into multiple virtual LANs
(VLANs) with each being a broadcast domain. Hosts within a VLAN can communicate with each other
directly, whereas hosts in different VLANs are isolated at Layer 2. To allow different VLANs to
communicate, Layer 3 routing must be used. You can configure the following methods to implement
VLAN communication:
•
Configuring VLAN interfaces on routers, as shown in
Configuring Layer 3 Ethernet subinterfaces on routers, as shown in
•
As shown in
you specify Host A's gateway IP address as 1.1.1.1/24 and Host B's gateway IP address as 1.1.2.1/24,
Host A and Host B can communicate at Layer 3 through VLAN interfaces or Layer 3 Ethernet
subinterfaces.
Figure 44 VLAN termination for inter-VLAN communication (through VLAN interfaces)
Figure 45 VLAN termination for inter-VLAN communication (through Layer 3 Ethernet subinterfaces)
LAN-WAN communication
Most packets sent out LANs carry VLAN tags, but some WAN protocols such as ATM, Frame Relay, and
PPP cannot recognize VLAN tagged packets. Therefore, before sending VLAN-tagged packets to a
Figure 44
and
Figure
45, Host A belongs to VLAN 2, and Host B belongs to VLAN 3. After
Figure
44.
120
Figure
45.