• 12 hours
  • Medium

Free online content available in this course.

course.header.alt.is_video

course.header.alt.is_certifying

Got it!

Last updated on 6/30/22

Configure the VLANs

Create the VLANs

You’re now going to create your first VLANs. Firstly, let’s look at the Exec-Sales switch. And because I’m very kind, I’m going to give you the diagram with the interface names on it:

Illustration of the diagram of the Exec-Sales switch. The switch is in the middle of the picture and is connected to the equipment for the Executive department on one side, and to the equipment for the Sales department on the other.
Diagram of Exec-Sales switch

For the Exec-Sales switch, we need to create 5 VLANs:

Exec-Sales

 

VLAN ID

VLAN name

20

Executive

21

Sales

40

Printing

50

Telephony

100

Administration

To create VLANs, you need to enter the following commands:

Task

IOS command

Enter global configuration mode

Exec-Sales # configure terminal

Create a VLAN with a valid ID number

Exec-Sales(config)# vlan 20

Provide a unique name for the VLAN

Exec-Sales(config-vlan)# name Executive

Go back to privileged EXEC mode

Exec-Sales(config-vlan)# end

Right, I’m going to show you the full configuration for the Exec-Sales switch:

Exec-Sales# configure terminal 
Exec-Sales(config)# vlan 20 
Exec-Sales(config-vlan)# name Executive 
Exec-Sales(config-vlan)# exit 
Exec-Sales(config)# vlan 21 
Exec-Sales(config-vlan)# name Sales 
Exec-Sales(config-vlan)# exit 
Exec-Sales(config)# vlan 40 
Exec-Sales(config-vlan)# name Printing 
Exec-Sales(config-vlan)# exit 
Exec-Sales(config)# vlan 50 
Exec-Sales(config-vlan)# name Telephony 
Exec-Sales(config-vlan)# exit 
Exec-Sales(config)# vlan 100 
Exec-Sales(config-vlan)# name Administration 
Exec-Sales(config-vlan)# end

Okay, I’ll go through it in a video, too:

Now that you can do it on your own, I’ll leave you to do the other switches. But I’ll help you out by giving a list of VLANs for each switch:

HR-Acc

 

VLAN ID

VLAN name

22

HR

23

Accounting

40

Printing

50

Telephony

100

Administration

Ops-Mktg

 

VLAN ID

VLAN name

24

Operations

25

Marketing

40

Printing

50

Telephony

100

Administration

IT

 

VLAN ID

VLAN name

27

IT

40

Printing

50

Telephony

100

Administration

Assign the VLANs

To assign a VLAN to an interface, you need to enter the following commands:

Task

IOS command

Enter global configuration mode

Exec-Sales # configure terminal

Go into the interface

Exec-Sales(config)# int fa0/1

Configure VLAN access mode

Exec-Sales(config-if)# switchport mode access

Assign the VLAN to the interface

Exec-Sales(config-if)# switchport access vlan 20

Go back to privileged EXEC mode

Exec-Sales(config-if)# end

Right, I’m going to show you the full configuration for the Exec-Sales switch:

Exec-Sales (config)# interface fa0/1 
Exec-Sales(config-if)# switchport mode access 
Exec-Sales(config-if)# switchport access vlan 20 
Exec-Sales(config-if)# exit
Exec-Sales(config)# interface fa0/2 
Exec-Sales(config-if)# switchport mode access 
Exec-Salesconfig-if)# switchport access vlan 20 
Exec-Sales(config-if)# exit 
Exec-Sales(config)# interface fa0/3 
Exec-Salesconfig-if)# switchport mode access 
Exec-Salesconfig-if)# switchport access vlan 40 
Exec-Sales (config-if)# exit 
Exec-Sales(config)# interface fa0/4 
Exec-Salesconfig-if)# switchport mode access 
Exec-Sales(config-if)# switchport access vlan 21 
Exec-Sales(config-if)# exit 
Exec-Sales(config)# interface fa0/5 
Exec-Sales(config-if)# switchport mode access
Exec-Sales(config-if)# switchport access vlan 21 
Exec-Sales(config-if)# exit 
Exec-Sales(config)# interface fa0/6 
Exec-Sales(config-if)# switchport mode access
Exec-Sales(config-if)# switchport access vlan 40
Exec-Sales(config-if)# exit

This can also be found in the following video:

Assign VLANs to the various interfaces on the HR-Acc, Ops-Mktg and IT switches to match the following diagram:

Illustration of the diagram of the organization's network
Diagram of the organization's network with switches to configure and interface names

Add IP Telephony to Your Organization

Add IP Telephones in Cisco Packet Tracer

You’re now going to add IP telephony to your organization—but don’t hate me, because you’re going to look at that network diagram again! You'll need to add IP phones between your computers and the switch interface.

This is what the end devices connected to the Exec-Sales switch should look like.

End devices connected to the Exec-Sales switch. The switch is in the middle. To its left is the equipment for the executive department. To its right is the equipment for the Sales department.
End devices connected to the Exec-Sales switch

Don’t worry if you found it difficult. I’ll show you how to add your IP phones in this video:

So, by the end of it, your network diagram should look like this:

Illustration of the whole of the network diagram
Theobald Digital Agency IT network diagram

Configure IP Telephony on the Switches

Okay, cool, I’ve added my IP telephones. But if I test the comms (ping), it doesn't work anymore—even between machines on the same subnet!

Don't worry! You need to configure the switches to tell them that the voice VLAN must be configured on the ports where the IP telephones are connected.

Since you’ve already created the Telephony VLAN, you now need to:

  • enable Quality of Service on the interfaces. This ensures the correct conditions are applied to different traffic types.

  • assign a voice VLAN to each interface where an IP phone is connected. 

Here’s the full configuration for the Exec-Sales switch:

Exec-Sales(config)# int f0/1 
Exec-Sales(config-if)# mls qos trust cos 
Exec-Sales(config-if)# switchport voice vlan 50 
Exec-Sales(config-if)# exit 
Exec-Sales(config)# int f0/2 
Exec-Sales(config-if)# mls qos trust cos 
Exec-Sales(config-if)# switchport voice vlan 50 
Exec-Sales(config-if)# exit 
Exec-Sales(config)# int f0/4 
Exec-Sales(config-if)# mls qos trust cos 
Exec-Sales(config-if)# switchport voice vlan 50 
Exec-Sales(config-if)# exit 
Exec-Sales(config)# int f0/5 
Exec-Sales(config-if)# mls qos trust cos 
Exec-Sales(config-if)# switchport voice vlan 50 
Exec-Sales(config-if)# exit

And here’s the configuration in video form:

When you add IP telephones, don't forget to provide a power supply. We didn't do this before. To do this, select the power adapter by dragging it towards the power adapter port.

Screenshot of the Packet Tracer interface for the phone configuration
The power adapter is selected and attached to the power adapter port

Here’s a short video to show you how to attach VoIP telephones to a power supply.

Let's Recap!

In this chapter, you’ve seen that:

  • the command vlan VLAN_Number allows you to create a VLAN, while the command switchport access vlan VLAN_Number allows a VLAN to be assigned to a port.

  • the command switchport voice vlan VLAN_Number enables you to add VoIP telephones and configure switches to incorporate VLAN telephony.

Now you know a few different configurations. Let’s continue looking at VLAN parameters in the next chapter.

Example of certificate of achievement
Example of certificate of achievement