A virtual LAN (VLAN) is a broadcast domain created by switches. VLANs are a convenient way to connect ports from different switches and different buildings onto the same network and broadcast domain, preventing the need for a complex system of subnets.

Learn how to configure a VLAN in this step-by-step, automated, 15-minute demo. Expert David Davis walks you through the steps you'll need to configure your routers and switches, set up and assign the trunk ports, and perform the necessary tests to get traffic moving across your VLAN successfully. (Click the play button to begin the video.) You can view the configuration commands David uses in the video at the bottom of this page.

sample VLAN network

More screencasts from David Davis
Hardening your router: Increasing security with ACLs

Upgrading the Cisco IOS

Free Cisco how-to videos

Configuration commands

Router commands
Interface fastethernet 4.1
Encapsulation dot1q 10

Interface fastethernet 4.2
Encapsulation dot1q 20

Interface fastethernet 4
No shutdown

Show ip interface brief
Show vlans

Switch commands
Interface fastethernet 2/0
Switchport access vlan 10
No shutdown

Interface fastethernet 5/0
Switchport access vlan 20
No shutdown

Interface vlan 10
Ip address x.x.x.x y.y.y.y
No shutdown

Interface vlan 20
Ip address x.x.x.x y.y.y.y
No shutdown

Show vlan brief
Show interfaces switchport
Show ip interface brief
Show int trunk

About the speaker: 

David DavisDavid Davis

David Davis (CCIE #9369, CWNA, MCSE, CISSP, Linux+, CEH) has served as an IT Manager for over 15 years. He has a number of certifications including CCIE #9369, MCSE & VCP. Additionally, David has authored over one hundred articles, a number of video training courses including Windows XP, Wireless Networking, Linux Administration, Microsoft Virtual Server, VMware Server & Workstation, and VMware ESX Server. David writes a blog, David's Cisco Networking Blog, on the IT Knowledge Exchange and publishes publishes Cisco networking how-to articles and videos at his website, HappyRouter.com.


This was first published in November 2007

Join the conversation Comment



    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.