Config Lab: Data and Voice VLANs 1

Wendell Odom
By Wendell Odom September 3, 2021 11:05

Creating a VLAN is simple: just configure the vlan number command. However, even in a small network with four switches, like the one used in this next lab, a VLAN config lab can give you a few things to think about beyond just creating the VLAN. This next lab asks you to configure a couple of VLANs, one for data, and one for IP phones (a voice VLAN). As usual, if you’ve already seen the commands, this exercises should take you 5-10 minutes on paper. Enjoy!

All about Config Labs

The blog has a series of lab exercises called “Config Labs.” Each lab presents a topology with the relevant initial configuration for each device. The lab also lists new requirements, after which you should create the additional configuration to meet those requirements. You can do the lab on paper, in a text editor, or use software tools like Cisco Packet Tracer or Cisco Modeling Labs.

Once you have created your answer, you can click various tabs at the bottom of this post to see the lab answers, comments about the lab, and other helpful information.

The Lab Exercise

Requirements

The network uses four layer 2 switches: two distribution switches and two access switches. The access switch ports connect to two devices in succession in a typical user cubicle: first to an IP phone and then to a desktop computer.  Your job is to configure the two VLANs (a data VLAN and a voice VLAN), placing all phones in the voice VLAN and all PCs in the data VLAN. And you need to make the VLANs work so that they can send and receive traffic off-site through the WAN router shown at the top of the figure.

The specific rules for this lab are:

  • Assign the PCs in the figure to use VLAN 10 as their data VLAN.
  • Assign the IP Phones in the figure to use VLAN 20 as their voice VLAN.
  • Configure VLANs correctly so that traffic in both VLAN 10 and 20 can flow through all four switches and up to the router (which acts as their default gateway.)
  • Assumptions:
    • All device interfaces shown in the lab are up and working.
    • VLAN trunking is working between the switches.
    • VTP is in transparent mode or off.
    • All four switches are acting as layer 2 switches and not as layer 3 switches.
    • The WAN router is already configured for router-on-a-stick (see the initial configuration.)

 

Figure 1: Basic Switched IP Phone Topology

 

Initial Configuration

Examples 1, 2, 3, and 4 show the beginning configuration state of Dist1, Dist2, Access1, and Access2.

Example 1: Dist1 Config

 

Example 2: Dist2 Config

 

Example 3: Access1 Config

 

Example 4: Access2 Config

 

Example 5: (Relevant) WAN Router Config

Answer Options - Click Tabs to Reveal

You can learn a lot and strengthen real learning of the topics by creating the configuration – even without a router or switch CLI. In fact, these labs were originally built to be used solely as a paper exercise!

To answer, just think about the lab. Refer to your primary learning material for CCNA, your notes, and create the configuration on paper or in a text editor. Then check your answer versus the answer post, which is linked at the bottom of the lab, just above the comments section.

You can also implement the lab using the Cisco Packet Tracer network simulator. With this option, you use Cisco’s free Packet Tracer simulator. You open a file that begins with the initial configuration already loaded. Then you implement your configuration and test to determine if it met the requirements of the lab.

(Use this link for more information about Cisco Packet Tracer.)

Use this workflow to do the labs in Cisco Packet Tracer:

  1. Download the .pkt file linked below.
  2. Open the .pkt file, creating a working lab with the same topology and interfaces as the lab exercise.
  3. Add your planned configuration to the lab.
  4. Test the configuration using some of the suggestions below.

Download this lab’s Packet Tracer File

You can also implement the lab using Cisco Modeling Labs – Personal (CML-P). CML-P (or simply CML) replaced Cisco Virtual Internet Routing Lab (VIRL) software in 2020, in effect serving as VIRL Version 2.

If you prefer to use CML, use a similar workflow as you would use if using Cisco Packet Tracer, as follows:

  1. Download the CML file (filetype .yaml) linked below.
  2. Import the lab’s CML file into CML and then start the lab.
  3. Compare the lab topology and interface IDs to this lab, as they may differ (more detail below).
  4. Add your planned configuration to the lab.
  5. Test the configuration using some of the suggestions below.

Download this lab’s CML file!

 

Network Device Info:

This table lists the interfaces used in the lab exercise documentation that differ from those used in the sample CML file.

Device Lab Port  CML Port
Dist1 G1/1/1 G0/1
Dist1 G1/1/2 G0/2
Dist1 G1/1/3 G0/3
Dist1 G1/1/4 G1/0
Dist2 G1/1/1 G0/1
Dist2 G1/1/2 G0/2
Dist2 G1/1/3 G0/3
Access1 G1/1/1 G0/1
Access1 G1/1/2 G0/2
Access1 G1/1/3 G0/3
Access1 G1/1/4 G1/0
Access2 G1/1/1 G0/1
Access2 G1/1/2 G0/2
Access2 G1/1/3 G0/3
Access2 G1/1/4 G1/0

Lab Answers Below: Spoiler Alert

Lab Answers: Configuration (Click Tab to Reveal)

Answers

Figure 1: Basic Switched IP Phone Topology

Example 1: Dist1 Config

 

Example 2: Dist2 Config

 

Example 3: Access1 Config

 

Example 4: Access2 Config

Commentary, Issues, and Verification Tips (Click Tabs to Reveal)

Commentary

Most LAN designs which include IP phones and other endpoint devices, use both a data and a voice VLAN on a single switch port. The switch access port acts as a trunk and tags voice traffic with an 802.1q tag when configured in this way. The IP phone connected in line with the PC will strip the 802.1Q tag off any frames destined to the attached PC and pass the frames along to the PC.

This lab tasks you to create two new VLANs, 10 and 20, and assign all PCs into VLAN 10 and all IP phones into VLAN 20. But you also need to add those VLANs to the two distribution switches, because otherwise those distribution switches will not know of the existence of VLANs 10 and 20 and will not forward frames in those VLANs.

To create a VLAN, use the vlan vlan command in global configuration mode. Because all switches use VTP transparent mode, all four switches need this command to create each VLAN. Note that all four switches list both the vlan 10 command and the vlan 20 commands.

Switch Access1’s G1/1/3 and G1/1/4 interfaces connect to PC1 and PC2 and their respective IP phones. To configure PC1 and PC2’s data VLAN use the switchport access vlan 10 command. To configure the voice VLAN to be used by the IP phones, use the switchport voice vlan 20 command. Similarly, switch Access2’s G1/1/3 and G1/1/4 interfaces connect to PC3 and PC4 and their respective IP phones, and so Access2’s ports use the same two commands to assign the data and voice VLANs.

Known Issues in this Lab

This section of each Config Lab Answers post hopes to help with those issues by listing any known issues with Packet Tracer related to this lab. In this case, the issues are:

# Summary Detail
1 Phones testing requires more work. The lab asks you to configure the voice and data VLANs. However, to make the phones work in Packet Tracer, you need to configure Call Manager Express along with a DHCP server. See this sample answer for this lab, and look for the DHCP server config in the WAN router and the CME config in the CME router.

 

Why Would Cisco Packet Tracer Have Issues?

(Note: The below text is the same in every Config Lab.)

Cisco Packet Tracer (CPT) simulates Cisco routers and switches. However, CPT does not run the same software that runs in real Cisco routers and switches. Instead, developers wrote CPT to predict the output a real router or switch would display given the same topology and configuration – but without performing all the same tasks, an actual device has to do. On a positive note, CPT requires far less CPU and RAM than a lab full of devices so that you can run CPT on your computer as an app. In addition, simulators like CPT help you learn about the Cisco router/switch user interface – the Command Line Interface (CLI) – without having to own real devices.

CPT can have issues compared to real devices because CPT does not run the same software as Cisco devices. CPT does not support all commands or parameters of a command. CPT may supply output from a command that differs in some ways from what an actual device would give. Those differences can be a problem for anyone learning networking technology because you may not have experience with that technology on real gear – so you may not notice the differences. So this section lists differences and issues that we have seen when using CPT to do this lab.

Beyond comparing your answers to this lab’s Answers post, you can test in Cisco Packet Tracer (CPT) or Cisco Modeling Labs (CML). In fact, you can and should explore the lab once configured. For this lab, once you have completed the configuration, try these verification steps. 

Use the show interfaces interface switchport command on the access switches for the interfaces connected to the PCs and IP Phones. This command’s output will list the configured data and voice VLAN.

More Labs with Related Content!

Config Lab: VLAN Basics 3
Config Lab: Data and Voice VLAN 2
Wendell Odom
By Wendell Odom September 3, 2021 11:05
Write a comment

2 Comments

  1. Saheb Khanari Amei November 6, 03:25

    why you put pc 3 and pc 4,in the vlan 20 subnet in packet tracer file?

    Reply to this comment
View comments

Write a comment

Comment; Identify w/ Social Media or Email

Subscribe

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Search

Categories