Chapter 10 Install and System Administration for FortiOS 5.0 : VLANs : VLAN switching and routing : VLAN layer-2 switching : Layer-2 VLAN example
  
Layer-2 VLAN example
To better understand VLAN operation, this example shows what happens to a data frame on a network that uses VLANs.
The network topology consists of two 8-port switches that are configured to support VLANs on a network. Both switches are connected through port 8 using an 802.1Q trunk link. Subnet 1 is connected to switch A, and subnet 2 is connected to switch B. The ports on the switches are configured as follows.
 
Table 69: How ports and VLANs are used on Switch A and B
Switch
Ports
VLAN
A
1 - 4
100
A
5 - 7
200
A & B
8
Trunk link
B
4 - 5
100
B
6
200
In this example, switch A is connected to the Branch Office and switch B to the Main Office.
1. A computer on port 1 of switch A sends a data frame over the network.
2. Switch A tags the data frame with a VLAN 100 ID tag upon arrival because port 1 is part of VLAN 100.
3. Switch A forwards the tagged data frame to the other VLAN 100 ports — ports 2 through 4. Switch A also forwards the data frame to the 802.1Q trunk link (port 8) so other parts of the network that may contain VLAN 100 groups will receive VLAN 100 traffic.
This data frame is not forwarded to the other ports on switch A because they are not part of VLAN 100. This increases security and decreases network traffic.
4. Switch B receives the data frame over the trunk link (port 8).
5. Because there are VLAN 100 ports on switch B (ports 4 and 5), the data frame is forwarded to those ports. As with switch A, the data frame is not delivered to VLAN 200.
If there were no VLAN 100 ports on switch B, the switch would not forward the data frame and it would stop there.
6. The switch removes the VLAN 100 ID tag before it forwards the data frame to an end destination.
The sending and receiving computers are not aware of any VLAN tagging on the data frames that are being transmitted. When any computer receives that data frame, it appears as a normal data frame.
See Also
VLAN layer-3 routing
VLANs