- Implementing Cisco Networking Solutions
- Harpreet Singh
- 296字
- 2025-04-04 18:14:23
Virtual LANs
An Ethernet switch has multiple ports, and not all of them might be required for a LAN segment. As an example, consider that we have a 24-port switch model and we need to create two different LAN segments with 10 hosts in one segment and 12 in the other. Virtual LAN technology allows a switch to be partitioned into multiple virtual switches or Ethernet segments. The MAC table in a switch that allows VLANs has additional information in addition to the one seen earlier. Each VLAN is denoted by a number, and there can be 4094 theoretical VLANs using 12 bits. There are some reserved VLAN numbers for FDDI and token ring, and not all switches will support 4094 VLANs.
The following figure shows a physical switch with 24 ports numbered 1 through 24. The switch can be partitioned into two logical virtual switching domains defined by VLAN 10 and VLAN 20. Note that although we have shown 12 ports in each VLAN, this is purely a logical configuration, and any port can be assigned to any VLAN:

When VLANs are created on the switch, all ports in one VLAN are treated as one broadcast domain independent of the other ports on the switch. This helps to limit the number of broadcasts on the switch. The MAC table of the switch gets modified to include additional information, as shown in the table in the following figure:

Note in the preceding figure that the ports are preconfigured with the VLAN numbers, even though the MAC addresses are not known in advance. Also note that there are certain ports that have more than one VLAN associated with it and are called trunk ports as described next.