Lessons-2_Implementing VLAN Technologies in a Campus Network
Lessons-2_Implementing VLAN Technologies in a Campus Network
Implementing VLAN
Technologies in a
Campus Network
Switched Networks
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 1
Chapter 3
3.1 VLAN Segmentation
3.2 VLAN Implementation
3.3 VLAN Security and Design
3.4 Summary
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 2
Chapter 3: Objectives
Explain the purpose of VLANs in a switched network.
Analyze how a switch forwards frames based on VLAN configuration
in a multi-switched environment.
Configure a switch port to be assigned to a VLAN based on
requirements.
Configure a trunk port on a LAN switch.
Configure Dynamic Trunk Protocol (DTP).
Troubleshoot VLAN and trunk configurations in a switched network.
Configure security features to mitigate attacks in a VLAN-segmented
environment.
Explain security best practices for a VLAN-segmented environment.
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 3
3.1 VLAN Segmentation
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 4
Overview of VLANs
VLAN Definitions
A VLAN is a logical partition of a Layer 2 network.
Multiple partitions can be created, allowing for multiple VLANs to
co-exist.
Each VLAN is a broadcast domain, usually with its own IP network.
VLANs are mutually isolated and packets can only pass between
them via a router.
The partitioning of the Layer 2 network takes place inside a Layer
2 device, usually via a switch.
The hosts grouped within a VLAN are unaware of the VLAN’s
existence.
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 5
Virtual Local Area Network (VLAN)
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 6
End-to-End VLANs
Create local VLANs with physical boundaries in mind rather than job functions of
the users.
Local VLANs exist between the access and distribution layers.
Traffic from a local VLAN is routed at the distribution and core levels.
Switches are configured in VTP transparent mode.
One to three VLANs per access layer switch recommended.
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 8
VLAN Support on Catalyst Switches
Catalyst Switch Max VLANs VLAN ID Range
2940 4 1 - 1005
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 9
VLAN Ranges on Catalyst Switches
VLAN Range Range Usage Popagated via VTP?
0, 4095 Reserved For system use only. You cannot see n/a
or use these.
1002 – 1005 Normal Cisco defaults for FDDI and Token Yes
Ring. You cannot delete these.
1006 – 1024 Reserved For system use only. You cannot see n/a
or use these.
1025 - 4094 Reserved For Ethernet VLANs only. VTP v 3 only. Not
supported in VTP v1
or v2. Requires VTP
transparent mode for
configuration.
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 10
Overview of VLANs
Types of VLANs (cont.)
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 11
VLANs in a Multi-Switched Environment
VLAN Trunks
A VLAN trunk carries more than one VLAN.
A VLAN trunk is usually established between switches so same-
VLAN devices can communicate, even if physically connected to
different switches.
A VLAN trunk is not associated to any VLANs; neither is the trunk
ports used to establish the trunk link.
Cisco IOS supports IEEE802.1q, a popular VLAN trunk protocol.
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 12
VLAN Trunking
Trunks carry the traffic for multiple VLANs across a single
physical link (multiplexing).
Extends Layer 2 operations across an entire network.
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 13
VLAN Trunking with Inter-Switch Link (ISL)
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 14
VLAN Trunking with IEEE 802.1Q
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 15
VLANs in a Multi-Switched Environment
Native VLANs and 802.1Q Tagging
Frames that belong to the native VLAN are not tagged.
Frames received untagged remain untagged and are placed in the
native VLAN when forwarded.
If there are no ports associated to the native VLAN and no other
trunk links, an untagged frame is dropped.
In Cisco switches, the native VLAN is VLAN 1, by default.
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 16
3.2 VLAN Implementations
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 17
VLAN Assignment
VLAN Ranges on Catalyst Switches
Cisco Catalyst 2960 and 3560 Series switches support over 4,000
VLANs.
VLANs are split into two categories:
• Normal range VLANs
• VLAN numbers from 1 to 1,005
• Configurations stored in the vlan.dat (in the flash memory)
• VTP can only learn and store normal range VLANs
• Extended Range VLANs
• VLAN numbers from 1,006 to 4,096
• Configurations stored in the running configuration (NVRAM)
• VTP does not learn extended range VLANs
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 18
VLAN Assignment
Creating a VLAN
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 19
VLAN Assignment
Assigning Ports to VLANs
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 20
VLAN Assignment
Assigning Ports to VLANs (cont.)
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 21
VLAN Assignment
Changing VLAN Port Membership
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 22
VLAN Assignment
Changing VLAN Port Membership (cont.)
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 23
VLAN Assignment
Deleting VLANs
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 24
VLAN Assignment
Verifying VLAN Information
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 25
VLAN Assignment
Verifying VLAN Information (cont.)
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 26
VLAN Assignment
Configuring IEEE 802.1q Trunk Links
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 27
VLAN Assignment
Resetting the Trunk To Default State
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 28
VLAN Assignment
Resetting the Trunk To Default State (cont.)
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 29
VLAN Assignment
Verifying Trunk Configuration
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 30
Dynamic Trunking Protocol
Introduction to DTP
Switch ports can be manually configured to form trunks.
Switch ports can also be configured to negotiate and establish a
trunk link with a connected peer.
The Dynamic Trunking Protocol (DTP) manages trunk negotiation.
DTP is a Cisco proprietary protocol and is enabled, by default, in
Cisco Catalyst 2960 and 3560 switches.
If the port on the neighbor switch is configured in a trunk mode that
supports DTP, it manages the negotiation.
The default DTP configuration for Cisco Catalyst 2960 and 3560
switches is dynamic auto.
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 31
Dynamic Trunking Protocol
Negotiated Interface Modes
Cisco Catalyst 2960 and 3560 support the following trunk modes:
• Switchport mode dynamic auto
• Switchport mode dynamic desirable
• Switchport mode trunk
• Switchport nonegotiate
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 32
Troubleshooting VLANs and Trunks
IP Addressing Issues with VLAN
It is a common practice to associate a VLAN with an IP network.
Because different IP networks only communicate through a router,
all devices within a VLAN must be part of the same IP network to
communicate.
The figure displays that PC1 cannot communicate to the server
because it has a wrong IP address configured.
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 33
Troubleshooting VLANs and Trunks
Missing VLANs
If all the IP addresses mismatches have been solved, but the
device still cannot connect, check if the VLAN exists in the switch.
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 34
Troubleshooting VLANs and Trunks
Introduction to Troubleshooting Trunks
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 35
Troubleshooting VLANs and Trunks
Common Problems with Trunks
Trunking issues are usually associated with incorrect configurations.
The most common type of trunk configuration errors are:
1. Native VLAN mismatches
2. Trunk mode mismatches
3. Allowed VLANs on trunks
If a trunk problem is detected, the best practice guidelines
recommend to troubleshoot in the order shown above.
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 36
Troubleshooting VLANs and Trunks
Trunk Mode Mismatches
If a port on a trunk link is configured with a trunk mode that is
incompatible with the neighboring trunk port, a trunk link fails to
form between the two switches.
Use the show interfaces trunk command to check the status of the
trunk ports on the switches.
To fix the problem, configure the interfaces with proper trunk modes.
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 37
Troubleshooting VLANs and Trunks
Incorrect VLAN List
VLANs must be allowed in the trunk before their frames can be
transmitted across the link.
Use the switchport trunk allowed vlan command to specify which
VLANs are allowed in a trunk link.
Use the show interfaces trunk command to ensure the correct
VLANs are permitted in a trunk.
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 38
3.3 VTP (VLAN Trunking
Protocol)
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 39
0
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 40
1
http://www.cisco.com/warp/public/473/vtp_f
lash/ VTP
Message
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 41
2
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 43
4
Will the other switches receive the domain name in a VTP update?
We will see in a moment.
Hint: Switches transmit VTP messages only over 802.1Q and ISL trunks.
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 44
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 45