Home > Virtual Local Area Network VLAN Tutorial

Virtual Local Area Network VLAN Tutorial

July 20th, 2011 Go to comments

Now to the configuration part ^^, in this part I use the “building” topology with two switches at the 1st & 3rd floors and one Main Sw.

VLAN Configuration

Creating VLAN

1st_Floor_Switch#configure terminal
1st_Floor_Switch(config)#vlan 2
1st_Floor_Switch(config-vlan)#name SALES
1st_Floor_Switch(config-vlan)#vlan 3
1st_Floor_Switch(config-vlan)#name TECH
1st_Floor_Switch(config-vlan)#vlan 10
1st_Floor_Switch(config-vlan)#name LEADER

Notice that we don’t need to exit out of “Vlan mode” to create another VLAN.

We also use the above configuration for 3rd_Floor_Switch & Main Sw.

Set VLAN Membership

Assign VLAN to each port:

1st_Floor_Switch(config)#interface f0/0
1st_Floor_Switch(config-if)#switchport access vlan 2
1st_Floor_Switch(config-if)#interface f0/1
1st_Floor_Switch(config-if)#switchport access vlan 3

Notice that for port connecting to host we must configure it as access port.

Create Trunk Ports:

+ On 2950 & 2960 Switches: Switches 2950 & 2960 only have 802.1q encapsulation so to turn it on we simply use this command:

Main_Sw(config-if)#switchport mode trunk

+ On 3550 & 3560 Switches: There are two encapsulation types in 3550 & 3560 Cisco switch: 802.1q and ISL but there are 3 encapsulation methods: 802.1q, ISL and negotiate.The default encapsulation is negotiate. This method signals between the trunk ports to choose an encapsulation method. ISL is preferred over 802.1q so we have to configure to “dot1q” if we want to use this standard.

Main_Sw(config-if)#switchport trunk encapsulation dot1q
Main_Sw(config-if)#switchport mode trunk

In fact, if you use VLAN Trunking Protocol (VTP) then you only need to configure VLAN on the Main Sw, set the Main Sw to “Server” mode and 2 other switches to “Client” mode. To learn more about VTP, please read my VTP tutorial.

VLAN Summaries:

+ VLANs are used to create logical broadcast domains and Layer 3 segments in a given network
+ A VLAN is considered a logical segment because the traffic it carries may traverse multiple physical network segments

Cisco switches support two different trunking protocols, Inter-Switch Link (ISL) and IEEE 802.1q. In 802.1q, native VLAN frames are untagged.

The benefits of VLANs

1. Segment networks into multiple smaller broadcast domains without Layer 3 network devices such as routers. VLANs make switched Ethernet networks more bandwidth-efficient through this segmentation of broadcast domains.

2. Group users together according to function rather than physical location. In a traditional network, users in a given work area are on the same network segment regardless of their job description or department. Using VLANs, however, you could have one salesperson in each work area of the building sitting next to engineers in their work area, yet on a separate logical network segment.

3. The ability to reconfigure ports logically without the need to unplug wires and move them around. If a user takes his or her computer to a new work area, no cables need to be swapped on the switch, just access the switch and issue commands to change the VLAN assignments for the old and new ports. VLANs thus simplify the process of adding, moving, and deleting users on the network. They also improve network security by avoiding cabling mishaps that can arise when users are moved in traditional Ethernet networks.

If you want to learn about VTP, please read my VTP tutorial.
If you want to find out how different VLANs can communicate, please read my InterVLAN Routing tutorial.

Comments (43) Comments
Comment pages
1 2 3 4 711
  1. Mursal
    August 21st, 2015


  2. SAM
    September 14th, 2015

    Thank you

  3. waleedsabour
    December 27th, 2015

    Hey can you please send me the latest questions please. I am planning on taking my CCNA Cert on March. Please send me the latest and old questions! Thank You!

    {email not allowed}

  4. waleedsabour
    December 27th, 2015

    my contact info is {email not allowed}

  5. Anonymous
    January 16th, 2016

    plse state of vlan

  6. Anonymous
    February 21st, 2016


  7. Rohit Jaswal
    March 2nd, 2016

    Thank for Brief #its very simple..

  8. Gladsome
    March 5th, 2016

    This is a nice tutorial. Thank You

  9. salem
    March 19th, 2016

    thanks to all 9tut team for this tutoriel

  10. Sajib
    May 29th, 2016

    This is a nice tutorial. Thank You

  11. buy fifa 17 coins
    June 5th, 2016

    You are looking sharp !
    buy fifa 17 coins https://diigo.com/08l9pe

  12. Ahmad
    June 22nd, 2016

    i copy your tutorial

    booking onlin http://walanja.com

  13. RAJ
    June 26th, 2016


  14. man
    July 9th, 2016

    nice explanation.

  15. Anonymous
    August 2nd, 2016

    this is very useful for me….

  16. suresh reddy
    August 2nd, 2016

    this blog is excellent for preparing CCNA

  17. Kelvin
    August 3rd, 2016

    Writing my CCNA on monday next week kindly assist with any new dumps. {email not allowed}

  18. Deju
    August 20th, 2016

    I have a plan to take new CCNA exam on next september kindly assist with any dumps

  19. Anonymous
    September 26th, 2016

    CCNA ( Routing & Switching )

    CCNA Routing and Switching provides comprehensive coverage of network topics from fundamental to advanced applications and services, with opportunities for hands on practical experience and career skills development.

    Prerequisite :
    Basic Knowledge of Computer/ Network

  20. Anonymous
    September 26th, 2016

    CCNA ( Routing & Switching )

    CCNA Routing and Switching provides comprehensive coverage of network topics from fundamental to advanced applications and services, with opportunities for hands on practical experience and career skills development.

    Prerequisite :
    Basic Knowledge of Computer/ Network
    Further details we can discuss on call or whatsapp


  21. zukko
    December 1st, 2016


  22. fascinator turquoise
    January 2nd, 2017

    Good – I should definitely pronounce, impressed with your web site. I had no trouble navigating through all tabs and related information ended up being truly easy to do to access. I recently found what I hoped for before you know it in the least. Reasonably unusual. Is likely to appreciate it for those who add forums or anything, site theme . a tones way for your client to communicate. Excellent task.


  23. AdjougAlleree
    January 25th, 2017


  24. Natty
    January 31st, 2017

    Thanks alot.
    Learnt quite much

  25. Anonymous
    February 22nd, 2017

    Good Tutorial

  26. importar mercadorias dos eua
    April 9th, 2017

    Sou animado descobrir neste web site . Queria Obrigado ⲣara sеu temрo por isso particularmente maravilhoso ler!!!!
    Еu definitivamente saboreado сada pouco ⅾe – e eս também tê-lo marcados
    para verificar noѵo coisas na seu local. http://www.mrsthailand.com/mobile/home.php?mod=space&uid=1086065&do=profile&from=space

  27. Shea Schuele
    April 18th, 2017

    This is the best search engine in the planet


  28. Winfred Spagna
    April 19th, 2017

    Very smooth blog post . I absolutely like this website. Thanks!


  29. Jon Slotnick
    April 19th, 2017

    Very good blog post . I certainly love your site. Thanks!


  30. Renee Rachar
    April 22nd, 2017

    Very good post. I certainly like this site . Keep writing!


  31. maskicabbicle
    May 2nd, 2017
  32. lilac fascinators for weddings
    May 11th, 2017

    I do consider all of the concepts you’ve introduced to your post. They’re very convincing and can certainly work. Nonetheless, the posts are very short for beginners. May you please lengthen them a bit from subsequent time? Thanks for the post.


  33. cutebridal
    July 6th, 2017

    How easy is it to open a Vanguard IRA? Currently I have two IRAs with my local bank earning a paltry APY and considering opening a 5-year 2% Discover IRA for 2015 tax

  34. KR
    August 12th, 2017

    I feel enriched with knowledge! Thank you 9tut!

  35. Flowers In This Attic
    August 20th, 2017

    Is it showing up for you? It was on the front page of this sub an hour ago but now it isn’t

  36. Erwin
    December 5th, 2017

    Passed with the 552q dumps, all questions were from there.

  37. Harikrishnan A
    December 25th, 2017

    Hi Erwin
    could you please send the dumps to my email id.I am planning to do ccna by coming january 25th.
    My email id: {email not allowed}

  38. prthap
    March 5th, 2018

    very good article

  39. Hello CCNA lover
    March 18th, 2018

    I currently finished the CCNA course and planning for CCNP. Any recommendation for CCNP online course?


  40. Abrahim Satti
    April 18th, 2018

    Nice Tutorial thank you

  41. Subhendu Giri
    February 11th, 2019

    Nice one. Thanks.

  42. Aika
    June 20th, 2019

    Where are the quizes?

Comment pages
1 2 3 4 711
Add a Comment