0% found this document useful (0 votes)
27 views2 pages

Cheatsheet VLANs Cheat Sheet

This document is a cheatsheet for configuring VLANs on Cisco switches, detailing commands for basic VLAN setup, port assignments, trunk configurations, and VTP settings. It includes useful show commands for monitoring VLANs and configurations. An example of a full VLAN setup is also provided for reference.

Uploaded by

maxmaxincorrect
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views2 pages

Cheatsheet VLANs Cheat Sheet

This document is a cheatsheet for configuring VLANs on Cisco switches, detailing commands for basic VLAN setup, port assignments, trunk configurations, and VTP settings. It includes useful show commands for monitoring VLANs and configurations. An example of a full VLAN setup is also provided for reference.

Uploaded by

maxmaxincorrect
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

# 🟦 VLAN Command Cheatsheet – Cisco Switches

## 🔧 Basic VLAN Configuration

| Task | Command |
|------|---------|
| Enter Global Configuration Mode | `Switch> enable`<br>`Switch# configure terminal`
|
| Create a VLAN and Enter VLAN Configuration Mode | `Switch(config)# vlan <vlan-id>`
|
| Name a VLAN (Optional) | `Switch(config-vlan)# name <vlan-name>` |
| Exit VLAN Configuration | `Switch(config-vlan)# exit` |
| Show VLAN Information | `Switch# show vlan brief` |

## 🧵 Assigning Ports to VLANs

| Task | Command |
|------|---------|
| Enter Interface Configuration Mode | `Switch(config)# interface
<interface-id>`<br>(e.g., `interface fa0/1`) |
| Set Interface Mode to Access | `Switch(config-if)# switchport mode access` |
| Assign Interface to a VLAN | `Switch(config-if)# switchport access vlan <vlan-id>`
|
| Shutdown/Enable Interface | `Switch(config-if)# shutdown` / `no shutdown` |
| Exit Interface Mode | `Switch(config-if)# exit` |

## 🌐 Trunk Port Configuration

| Task | Command |
|------|---------|
| Set Interface as Trunk | `Switch(config-if)# switchport mode trunk` |
| Optionally Specify Allowed VLANs on Trunk | `Switch(config-if)# switchport trunk
allowed vlan <vlan-list>`<br>e.g., `10,20,30` or `10-20` |
| Set Native VLAN (Optional) | `Switch(config-if)# switchport trunk native vlan
<vlan-id>` |
| Verify Trunk Configuration | `Switch# show interfaces trunk` |

## 📋 VLAN Trunking Protocol (VTP) [Optional Advanced]

| Task | Command |
|------|---------|
| Set VTP Domain Name | `Switch(config)# vtp domain <domain-name>` |
| Set VTP Mode (Server/Client/Transparent) | `Switch(config)# vtp mode server` /
`client` / `transparent` |
| Set VTP Password (Optional) | `Switch(config)# vtp password <password>` |
| Show VTP Status | `Switch# show vtp status` |

## 💾 Save Configuration

| Task | Command |
|------|---------|
| Save Running Config to Startup Config | `Switch# copy running-config
startup-config` |

## 🕵♂ Useful Show Commands

| Command | Description |
|---------|-------------|
| `show vlan brief` | Displays all VLANs and their assigned ports |
| `show interfaces trunk` | Shows configured trunk ports and VLANs allowed |
| `show mac address-table` | Shows MAC addresses learned by the switch |
| `show running-config` | Displays current configuration |
| `show vtp status` | Shows VTP configuration and statistics |

## ✅ Example: Full VLAN Setup

```bash
Switch> enable
Switch# configure terminal
Switch(config)# vlan 10
Switch(config-vlan)# name Sales
Switch(config-vlan)# exit
Switch(config)# interface fa0/1
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 10
Switch(config-if)# no shutdown
Switch(config-if)# exit
Switch(config)# end
Switch# copy running-config startup-config

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy