Featured image of post Configuring VLANs: Cisco Switch and Router Setup Guide

Configuring VLANs: Cisco Switch and Router Setup Guide

Learn the essentials of VLAN configuration on Cisco devices with this step-by-step guide. Covering Layer 2 and Layer 3 switches and Router-on-a-Stick setups, this post provides practical instructions and tips for efficient VLAN implementation and management.

# Introduction

Setting up VLANs (Virtual Local Area Networks) on Cisco devices is a critical skill for network administrators. This guide walks you through the VLAN configuration process for Cisco Layer 2 switches, Layer 3 switches, and routers (using the Router-on-a-Stick method). Each step is explained, from entering various modes to checking the configurations, ensuring a comprehensive understanding of the process.

# Cisco Layer 2 Switch VLAN Configuration

Enter Privileged EXEC Mode:

1
enable

Global Configuration Mode:

1
configure terminal

Create VLAN:

1
vlan [VLAN_ID]
1
name [VLAN_NAME]   # Optional

Assign Ports to VLAN:

1
interface [INTERFACE_TYPE][PORT_NUMBER]
1
switchport mode access
1
switchport access vlan [VLAN_ID]
1
no shutdown

Save Configuration:

1
write memory

Check VLAN Configuration:

1
show vlan brief

# Cisco Layer 3 Switch VLAN and Inter-VLAN Routing

Create VLANs and Assign SVIs:

1
vlan [VLAN_ID]
1
interface vlan [VLAN_ID]
1
ip address [IP_ADDRESS] [SUBNET_MASK]
1
no shutdown

Enable IP Routing:

1
ip routing

Configure Trunk Ports:

1
interface [INTERFACE_TYPE][PORT_NUMBER]
1
switchport mode trunk
1
switchport trunk allowed vlan [VLAN_LIST]

Save Configuration:

1
write memory

Check Configuration:

1
show ip interface brief 
1
show ip route

# Cisco Router VLAN Configuration (Router-on-a-Stick)

Create Sub-Interfaces for VLANs:

1
interface [INTERFACE_TYPE][PHYSICAL_INTERFACE].[VLAN_ID]
1
encapsulation dot1Q [VLAN_ID]
1
ip address [IP_ADDRESS] [SUBNET_MASK]

Repeat for each VLAN. Save Configuration:

1
write memory

Check Router Configuration:

1
show ip interface brief 
1
show running-config

# Conclusion

Configuring VLANs on Cisco devices enhances network segmentation, security, and management. Whether you’re working with Layer 2 or Layer 3 switches or implementing a Router-on-a-Stick setup, this guide provides clear instructions to ensure a successful VLAN configuration. Remember, always verify your settings and ensure that your Cisco device supports these configurations.

comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy