Listen to this Post
A network switch connects devices in a LAN and uses MAC addresses to forward frames. It operates at Layer 2 (Data Link) and makes forwarding decisions using the MAC address table.
Key Functions:
- MAC learning β Stores MAC addresses of connected devices.
- Forwarding & filtering β Directs traffic only to the relevant port.
- Loop prevention (STP) β Uses Spanning Tree Protocol to avoid network loops.
- VLAN support β Segments networks logically for better management.
Switch = Smart device for efficient LAN traffic management!
You Should Know:
1. Viewing MAC Address Table on Cisco Switches
To check the MAC address table:
show mac address-table
To clear dynamically learned MAC addresses:
clear mac address-table dynamic
2. Configuring VLANs
Create a VLAN:
vlan 10 name SALES
Assign a port to a VLAN:
interface GigabitEthernet0/1 switchport mode access switchport access vlan 10
3. Enabling Spanning Tree Protocol (STP)
Check STP status:
show spanning-tree
Set STP mode (Rapid PVST+ recommended):
spanning-tree mode rapid-pvst
4. Port Security to Prevent Unauthorized Access
Enable port security on an interface:
interface GigabitEthernet0/2 switchport port-security switchport port-security maximum 2 switchport port-security violation restrict
5. Saving Switch Configuration
Save running config to startup:
write memory
Or:
copy running-config startup-config
What Undercode Say
Switches are fundamental in network infrastructure, ensuring efficient traffic management. Mastering VLANs, STP, and MAC filtering is crucial for network security and performance. Always verify configurations using `show` commands and enforce port security to prevent unauthorized access.
Expected Output:
- MAC address table entries.
- VLAN configurations.
- STP status and loop prevention logs.
- Port security violations (if any).
NetworkingBasics Switching LAN Cisco MACAddress STP VLAN CCNA
References:
Reported By: Sumit Kashyap – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass β



