Data and Voice VLANs 1

By certskills June 3, 2016 09: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). (And yes, that voice VLAN idea is part of the new exam topics; check here for all the blog posts about the changes in May 2016.) As usual, if you’ve already seen the commands, this exercises should take you 5-10 minutes on paper. Enjoy!


The network uses four layer 2 switches: two distribution switches, and two access switches. The access switches connect to a number of user desktops, with each desktop having an IP phone, which in turn connects to a desktop PC. 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 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 on Paper, or Maybe Test in Lab

Next, write your answer on paper. Or if you have some real gear, or other tools, configure the lab with those tools.

To test your solution if you happen to try it with VIRL or real gear, the easiest way to verify the configuration is to use the show interfaces interface switchport command on the access switches using the interfaces connected to the PCs and IP Phones. This command’s output will list the configured data and voice VLAN.


Do this Lab with Cisco’s VIRL

You can do these labs on paper and still get a lot out of the lab. As an extra help, we have added files for the Virtual Internet Routing Lab (VIRL) software as well. The .VIRL file found here is a file that when used with VIRL will load a lab topology similar to this lab’s topology, with the initial configuration shown in the lab as well. This section lists any differences between the lab exercise and the .VIRL file’s topology and configuration.

Download this lab’s VIRL file!

All interfaces in topology match the lab figure.

Network Device Info:

The switches used in the lab are Cisco IOS layer 2 switches. Note that if you happen to have a layer 3 switch, to use the initial configurations as shown in this lab, issue to no ip routing command on the switch. This command will disable the routing of IPv4 packets, making the layer 3 switch act only as a layer 2 switch.

Also, when using VIRL, the IOS layer 2 switch image supports both the older ISL and the preferred 802.1Q VLAN trunking protocols. As a result, to make VLAN trunks work, add the switchport trunk encapsulation dot1q command on each interface that should trunk, in addition to the initial configuration shown in this lab.

(The .VIRL file that you can download already has these commands added to the switch configurations.)

Host device info:

This lab includes four server hosts in the positions of PC1, PC2, PC3, and PC4 in the figure for this lab. It does not include any simulated IP phones. The PCs use the IP addresses listed in this table, pre-configured in VIRL. The information is not required in lab but may be useful to you.


Device IP Address User/password
PC1 cisco/cisco
PC2 cisco/cisco
PC3 cisco/cisco
PC4 cisco/cisco


Handy Host Commands:

To see PC IP address: ifconfig eth1

Ping example: ping -c 4

Trace example: tracepath

To connect to another node within the topology: telnet

Peering Back at the History of CCNA Routing and Switching
Answers: Data and Voice VLAN 1
By certskills June 3, 2016 09:05
Write a comment


  1. RN May 19, 16:10

    Hi Wendell,

    The design seems to be a little confusing.

    The router have to interfaces used, with two connections, but the router is configured as router-on-a-stick, with only one interface in use.

    Notice that in the configuration example you provided you only configured one interface.



    Reply to this comment
  2. kalpi July 22, 01:55

    hi wendell ,
    how can we know about the configurations to be made on the IP phone ?

    Reply to this comment
  3. Bav August 28, 07:44

    This design is a bit confusing Wendell. All the hosts are in the subnet. One of the ROAS sub interfaces is for a subnet Plus what’s happening on the 2nd interace to the WAN router?

    I’ve configured everything as per the answer config but can’t ping between PCs. PT tells me that because some of the ports on DIST are in a learning state it drops the ARP messages.

    Reply to this comment
    • CCENTSkills August 29, 11:14

      Hi Bav,
      Thanks for the feedback. Let me try and clear up the design questions you have at least. As for PT behavior, as a rule, I don’t attempt to troubleshoot how PT behaves.

      The subnet is the subnet for the IP phones. I think (looking back in time) that my intent was for you to see the router’s ROAS config, see the config of VLAN 20, and the fact that the subninterface is in subnet, and make that connection. But the lab certainly does not explicitly state that fact – maybe I should state that fact explicitly?

      As for the 2nd router interface (the one on the right in the figure), it’s not used for the lab. Maybe better to remove it?

      I think that was it for your questions – feel free to follow up.

      Reply to this comment
    • Carl Crockett June 6, 17:20

      I was having the same issues with this setup and spent a lot of time trying to establish coms between the devices, even checking thestatus of STP which has two ports blocked.

      Reply to this comment
View comments

Write a comment

Comment; Identify w/ Social Media or Email


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

Thank you for subscribing.

Something went wrong.