Switches are intelligent Layer 2 devices that forward Ethernet frames using MAC addresses. They reduce collision domains and improve network efficiency.
Command Example:
Switch(config)# mac address-table static aaaa.bbbb.cccc vlan 10 interface fa0/1
VLANs isolate broadcast traffic by logically segmenting the network. Each VLAN creates a separate Layer 2 broadcast domain.
Switch(config)# vlan 10 Switch(config-vlan)# name SALES
Trunk ports allow multiple VLANs across a single physical link using tags. 802.1Q inserts a VLAN tag inside Ethernet frames.
Switch(config-if)# switchport trunk encapsulation dot1q Switch(config-if)# switchport mode trunk
STP prevents broadcast loops in Layer 2 networks. It elects a root bridge and places redundant links in a blocking state to break loops.
Switch(config)# spanning-tree vlan 1 priority 4096
EtherChannel provides fault-tolerant, aggregated links using PAgP or LACP. It avoids STP blocking and increases bandwidth.
Switch(config)# interface range fa0/1 - 2 Switch(config-if-range)# channel-group 1 mode active
Concept | Description |
---|---|
VLAN | Separates broadcast domains |
Trunking | Transports multiple VLANs via tagging (802.1Q) |
STP | Prevents Layer 2 loops |
EtherChannel | Aggregates links to increase bandwidth |