Configure switch port VLAN modes to control how traffic is handled - access mode for single VLAN or trunk mode for multiple VLANs.
Step 1: Configure access port for single VLAN Set a port to access mode to assign it to one specific VLAN for end devices like PCs or printers.
|
|
Step 2: Configure trunk port for multiple VLANs Set a port to trunk mode to carry traffic for multiple VLANs, typically used for inter-switch links or connections to routers.
|
|
Step 3: Configure dynamic desirable mode (optional) Allow the port to negotiate trunking with the connected device using DTP (Dynamic Trunking Protocol).
|
|
Step 4: Verify the configuration
|
|
Key Points:
- Access ports strip VLAN tags before sending to end devices
- Trunk ports use 802.1Q tags to identify VLAN membership
- Native VLAN traffic travels untagged on trunk links
- Use
switchport nonegotiateon trunk ports to disable DTP for security - Always verify with
show interfaces switchportbefore putting into production