Chapter2 VLAN Networks
Chapter2 VLAN Networks
VLAN Networks
Module Switched Networks
3rd Year
2021/2022
1
Part 1
Overview of VLANs
2
Local Area Network (LAN)
A set of communicating entities
belonging to the same organization or
Enterprise.
The enterprise usually consists of
different departments, services, teams,
etc.
All machines share the same broadcast
domain
Sale
Network overload resulting in low IT RH
s
throughput.
Risk of network congestion due to
multiple broadcasts.
A Single Broadcast Domain
3
LAN Segmentation (1/2)
Objective: To create multiple broadcast
domains to reduce network overload and
RH
improve network performance.
Solution 1 : Physical Segmentation
The VLANs
Virtual Local Area Network
6
Benefits of a VLAN Design
Benefits Description
Smaller Broadcast Domains Dividing the LAN reduces the number of broadcast domains
Improved Security Only users in the same VLAN can communicate together
Improved IT Efficiency VLANs can group devices with similar requirements, e.g. faculty vs. students
7
Types of VLAN (1/3)
Default VLAN
• If no VLANs are configured, all ports on a switch belong to the default VLAN.
• The default VLAN for Cisco switches is VLAN 1.
Data VLAN
• Dedicated to user-generated traffic (email and web traffic).
• VLAN 1 is the default data VLAN because all interfaces are assigned to this VLAN .
Native VLAN
• This is used for trunk links only.
• All frames are tagged on an 802.1Q trunk link except for those on the native VLAN.
Management VLAN
• This is used for SSH/Telnet VTY traffic and should not be carried with end user traffic.
• Typically, the VLAN that is the SVI for the Layer 2 switch.
8
Types of VLAN (2/3)
Voice VLAN
• A separate VLAN is required because Voice traffic
requires:
Assured bandwidth
High QoS priority
Ability to avoid congestion
Delay less that 150 ms from source to
destination
• The entire network must be designed to support voice.
9
Types of VLAN (3/3)
Default VLAN : VLAN 1
• The default Native VLAN
• Default Management VLAN
• Can not be deleted or renamed
10
Part 2
VLAN Configuration
11
VLAN Ranges
Catalyst switches 2960 and 3650 support
over 4000 VLANs.
12
VLAN Creation Commands
VLAN details are stored in the vlan.dat file. You create VLANs in the global
configuration mode.
13
VLAN Creation Example
• If the Student PC is going to be in VLAN
20, we will create the VLAN first and
then name it.
If you do not name it, the Cisco IOS will
give it a default name, the four digit
number of the VLAN.
For example : vlan0020 for VLAN 20
Prompt Commande
S1# Configure terminal
S1(config)# vlan 20
S1(config-vlan)# name student
S1(config-vlan)# end
14
Checking the creation of VLANs
You can check that the vlan has been created using the following command:
Switch# show vlan brief
15
Verify VLAN Information
Use the show vlan command. The complete syntaxe is:
Switch# show vlan [brief | id vlan-id | name vlan-name ]
Display VLAN name, status, and its ports one VLAN per line. brief
Display information about the identified VLAN name. The vlan-name is an ASCII string
name vlan-name
from 1 to 32 characters.
16
Port Assignment (Access Mode)
Access Mode:
A port in "access"
mode is a port that
belongs to a single
vlan
17
VLAN Port Assignment Commands
Once the VLAN is created, we can then assign it to the correct interfaces.
Task Command
Enter global configuration mode. Switch# configure terminal
18
VLAN Port Assignment Example
We can assign the port interface to the
VLAN.
• Once the device is assigned the VLAN,
then the end device will need the IP
address information for that VLAN
• Here, Student PC receives 172.17.20.22
Prompt Command
S1# Configure terminal
S1(config)# Interface fa0/18
S1(config-if)# Switchport mode access
S1(config-if)# Switchport access vlan 20
S1(config-if)# end
19
Checking VLAN Port Assignment
You can check that the port has been assigned to the correct VLAN by using the :
Switch# show vlan brief
20
Change VLAN Port Membership
21
Part 3
VLAN Trunks
22
Ports Assignment (Trunk mode)
23
Defining VLAN Trunk
A trunk is a point-to-point link between two network devices.
24
VLAN Identification
The IEEE 802.1Q header is 4 Bytes
When the tag is created the FCS must be recalculated.
When sent to end devices, this tag must be removed
and the FCS recalculated back to its original number.
Both ends of a trunk link must be configured with the same native VLAN.
26
Trunk Configuration Command
Configure and verify VLAN trunks. Trunks are layer 2 and carry traffic for all
VLANs
Task IOS Command
Enter global configuration mode. Switch# configure terminal
Set the port to permanent trunking mode. Switch(config-if)# switchport mode trunk
28
Verify Trunk Configuration
Notice the result of the command
Switch#show interface fa0/1 switchport
• Is set to trunk administratively
• Is set as trunk operationally (functioning) On
• Encapsulation is dot1q
• Native VLAN set to VLAN 99
• All VLANs created on the switch will pass traffic
on this trunk
29
Reset the Trunk to the Default State (1/2)
30
Reset the Trunk to the Default State (2/2)
31
Delete VLAN
Delete VLANs with the command no vlan vlan-id.
Caution: Before deleting a VLAN, reassign all member ports to a different VLAN.
Delete all VLANs with the delete flash:vlan.dat or delete vlan.dat commands.
Reload the switch when deleting all VLANs.
32
Part 4
DTP Protocol (Dynamic Trunking Protocol)
33
Introduction to DTP protocol
Dynamic Trunking Protocol (DTP) is a proprietary Cisco protocol.
DTP characteristics are as follows:
• On by default on Catalyst 2960 and 2950 switches
• Dynamic-auto is default on the 2960 and 2950 switches
• May be turned off with the nonegotiate command
• May be turned back on by setting the interface to dynamic-auto
• Setting a switch to a static trunk or static access will avoid negotiation issues with the
switchport mode trunk or the switchport mode access commands.
34
Negotiated Interface Modes
The switchport mode command has additional options.
Use the switchport nonegotiate interface configuration command to stop DTP
negotiation.
Option Description
Permanent access mode and negotiates to convert the neighboring link into an
Access
access link
Will becomes a trunk interface if the neighboring interface is set to trunk or
Dynamic auto
desirable mode
Actively seeks to become a trunk by negotiating with other auto or desirable
Dynamic desirable
interfaces
Permanent trunking mode and negotiates to convert the neighboring link into a
Trunk
trunk link
35
Results of a DTP configuration
The configuration options for the DTP protocol are:
Port1 Option
Dynamic Auto Dynamic Desirable Trunk Access
Port2 Option
Dynamic Auto Access Trunk Trunk Access
36
Example of DTP configuration (1/3)
By Default
37
Example of DTP configuration (2/3)
Configuration of the F0/1 interface of switch S2 in dynamic desirable mode :
38
Example of DTP configuration (3/3)
Checking the port mode :
39
End chapter 2
40