B 1610 Vlan 9500 CG
B 1610 Vlan 9500 CG
B 1610 Vlan 9500 CG
x (Catalyst
9500 Switches)
Americas Headquarters
Cisco Systems, Inc.
170 West Tasman Drive
San Jose, CA 95134-1706
USA
http://www.cisco.com
Tel: 408 526-4000
800 553-NETS (6387)
Fax: 408 527-0883
© 2018 Cisco Systems, Inc. All rights reserved.
CONTENTS
VTP Version 3 5
VTP Pruning 6
VTP and Device Stacks 7
VTP Configuration Guidelines 8
VTP Configuration Requirements 8
VTP Settings 8
Domain Names for Configuring VTP 8
Passwords for the VTP Domain 9
VTP Version 9
How to Configure VTP 10
Configuring VTP Mode 10
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
iii
Contents
Monitoring VTP 20
Configuration Examples for VTP 21
Example: Configuring a Switch as the Primary Server 21
Where to Go Next 21
Additional References 22
Feature History and Information for VTP 23
Deleting a VLAN 33
Monitoring VLANs 38
Additional References 39
Feature History and Information for VLANs 39
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
iv
Contents
Trunking Overview 43
Trunking Modes 43
Layer 2 Interface Modes 43
Allowed VLANs on a Trunk 44
Load Sharing on Trunk Ports 44
Network Load Sharing Using STP Priorities 44
Network Load Sharing Using STP Path Cost 45
Feature Interactions 45
How to Configure VLAN Trunks 45
Configuring an Ethernet Interface as a Trunk Port 46
Configuring a Trunk Port 46
Where to Go Next 59
Additional References 59
Feature History and Information for VLAN Trunks 60
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
v
Contents
Where to Go Next 67
Additional References 68
Feature History and Information for Voice VLAN 69
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
vi
Contents
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
vii
Contents
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
viii
CHAPTER 1
Configuring VTP
• Finding Feature Information, on page 1
• Prerequisites for VTP, on page 1
• Restrictions for VTP, on page 2
• Information About VTP, on page 2
• How to Configure VTP, on page 10
• Monitoring VTP, on page 20
• Configuration Examples for VTP, on page 21
• Where to Go Next, on page 21
• Additional References, on page 22
• Feature History and Information for VTP, on page 23
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
1
Configuring VTP
Restrictions for VTP
You can enable or disable VTP per port by entering the [no] vtp interface configuration command. When
you disable VTP on trunking ports, all VTP instances for that port are disabled. You cannot set VTP to off
for the MST database and on for the VLAN database on the same port.
When you globally set VTP mode to off, it applies to all the trunking ports in the system. However, you can
specify on or off on a per-VTP instance basis. For example, you can configure the device as a VTP server for
the VLAN database but with VTP off for the MST database.
Because trunk ports send and receive VTP advertisements, you must ensure that at least one trunk port is
configured on the device or device stack and that this trunk port is connected to the trunk port of another
device. Otherwise, the device cannot receive any VTP advertisements.
Caution Before adding a VTP client device to a VTP domain, always verify that its VTP configuration revision number
is lower than the configuration revision number of the other devices in the VTP domain. Devices in a VTP
domain always use the VLAN configuration of the device with the highest VTP configuration revision number.
If you add a device that has a revision number higher than the revision number in the VTP domain, it can
erase all VLAN information from the VTP server and VTP domain.
VTP Domain
A VTP domain (also called a VLAN management domain) consists of one device or several interconnected
devices under the same administrative responsibility sharing the same VTP domain name. A device can be
in only one VTP domain. You make global VLAN configuration changes for the domain.
By default, the device is in the VTP no-management-domain state until it receives an advertisement for a
domain over a trunk link (a link that carries the traffic of multiple VLANs) or until you configure a domain
name. Until the management domain name is specified or learned, you cannot create or modify VLANs on a
VTP server, and VLAN information is not propagated over the network.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
2
Configuring VTP
VTP Modes
If the device receives a VTP advertisement over a trunk link, it inherits the management domain name and
the VTP configuration revision number. The device then ignores advertisements with a different domain name
or an earlier configuration revision number.
When you make a change to the VLAN configuration on a VTP server, the change is propagated to all devices
in the VTP domain. VTP advertisements are sent over all IEEE trunk connections, including IEEE 802.1Q.
VTP dynamically maps VLANs with unique names and internal index associates across multiple LAN types.
Mapping eliminates excessive device administration required from network administrators.
If you configure a device for VTP transparent mode, you can create and modify VLANs, but the changes are
not sent to other devices in the domain, and they affect only the individual device. However, configuration
changes made when the device is in this mode are saved in the device running configuration and can be saved
to the device startup configuration file.
VTP Modes
Table 1: VTP Modes
VTP server In VTP server mode, you can create, modify, and
delete VLANs, and specify other configuration
parameters (such as the VTP version) for the entire
VTP domain. VTP servers advertise their VLAN
configurations to other devices in the same VTP
domain and synchronize their VLAN configurations
with other devices based on advertisements received
over trunk links.
VTP server is the default mode.
In VTP server mode, VLAN configurations are saved
in NVRAM. If the device detects a failure while
writing a configuration to NVRAM, VTP mode
automatically changes from server mode to client
mode. If this happens, the device cannot be returned
to VTP server mode until the NVRAM is functioning.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
3
Configuring VTP
VTP Advertisements
VTP Advertisements
Each device in the VTP domain sends periodic global configuration advertisements from each trunk port to
a reserved multicast address. Neighboring devices receive these advertisements and update their VTP and
VLAN configurations as necessary.
Because trunk ports send and receive VTP advertisements, you must ensure that at least one trunk port is
configured on the switch stack and that this trunk port is connected to the trunk port of another switch.
Otherwise, the switch cannot receive any VTP advertisements.
VTP advertisements distribute this global domain information:
• VTP domain name
• VTP configuration revision number
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
4
Configuring VTP
VTP Version 2
VTP advertisements distribute this VLAN information for each configured VLAN:
• VLAN IDs (including IEEE 802.1Q)
• VLAN name
• VLAN type
• VLAN state
• Additional VLAN configuration information specific to the VLAN type
In VTP version 3, VTP advertisements also include the primary server ID, an instance number, and a start
index.
VTP Version 2
If you use VTP in your network, you must decide which version of VTP to use. By default, VTP operates in
version 1.
VTP version 2 supports these features that are not supported in version 1:
• Token Ring support—VTP version 2 supports Token Ring Bridge Relay Function (TrBRF) and Token
Ring Concentrator Relay Function (TrCRF) VLANs.
• Unrecognized Type-Length-Value (TLV) support—A VTP server or client propagates configuration
changes to its other trunks, even for TLVs it is not able to parse. The unrecognized TLV is saved in
NVRAM when the device is operating in VTP server mode.
• Version-Dependent Transparent Mode—In VTP version 1, a VTP transparent device inspects VTP
messages for the domain name and version and forwards a message only if the version and domain name
match. Although VTP version 2 supports only one domain, a VTP version 2 transparent device forwards
a message only when the domain name matches.
• Consistency Checks—In VTP version 2, VLAN consistency checks (such as VLAN names and values)
are performed only when you enter new information through the CLI or SNMP. Consistency checks are
not performed when new information is obtained from a VTP message or when information is read from
NVRAM. If the MD5 digest on a received VTP message is correct, its information is accepted.
VTP Version 3
VTP version 3 supports these features that are not supported in version 1 or version 2:
• Enhanced authentication—You can configure the authentication as hidden or secret. When hidden, the
secret key from the password string is saved in the VLAN database file, but it does not appear in plain
text in the configuration. Instead, the key associated with the password is saved in hexadecimal format
in the running configuration. You must reenter the password if you enter a takeover command in the
domain. When you enter the secret keyword, you can directly configure the password secret key.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
5
Configuring VTP
VTP Pruning
• Support for extended range VLAN (VLANs 1006 to 4094) database propagation—VTP versions 1 and
2 propagate only VLANs 1 to 1005.
Note VTP pruning still applies only to VLANs 1 to 1005, and VLANs 1002 to 1005
are still reserved and cannot be modified.
Note VTP versions 1 and 2 are capable of publishing only standard VLANs (VLANs
1 to 1001) and extended VLANs (VLANs 1006 to 4094) are stored locally in the
flash drive or the running configuration. VTP version 3 is capable of publishing
extended VLANs to the entire VTP domain and extended VLANs are not stored
locally.
VTP Pruning
VTP pruning increases network available bandwidth by restricting flooded traffic to those trunk links that the
traffic must use to reach the destination devices. Without VTP pruning, a device floods broadcast, multicast,
and unknown unicast traffic across all trunk links within a VTP domain even though receiving devices might
discard them. VTP pruning is disabled by default.
VTP pruning blocks unneeded flooded traffic to VLANs on trunk ports that are included in the pruning-eligible
list. Only VLANs included in the pruning-eligible list can be pruned. By default, VLANs 2 through 1001 are
pruning eligible device trunk ports. If the VLANs are configured as pruning-ineligible, the flooding continues.
VTP pruning is supported in all VTP versions.
Figure 1: Flooding Traffic without VTP Pruning
VTP pruning is disabled in the switched network. Port 1 on Device A and Port 2 on Device D are assigned
to the Red VLAN. If a broadcast is sent from the host connected to Device A, Device A floods the broadcast
and every device in the network receives it, even though Devices C, E, and F have no ports in the Red VLAN.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
6
Configuring VTP
VTP and Device Stacks
VTP pruning is enabled in the switched network. The broadcast traffic from Device A is not forwarded to
Devices C, E, and F because traffic for the Red VLAN has been pruned on the links shown (Port 5 on Device
B and Port 4 on Device D).
With VTP versions 1 and 2, when you enable pruning on the VTP server, it is enabled for the entire VTP
domain. In VTP version 3, you must manually enable pruning on each device in the domain. Making VLANs
pruning-eligible or pruning-ineligible affects pruning eligibility for those VLANs on that trunk only (not on
all devices in the VTP domain).
VTP pruning takes effect several seconds after you enable it. VTP pruning does not prune traffic from VLANs
that are pruning-ineligible. VLAN 1 and VLANs 1002 to 1005 are always pruning-ineligible; traffic from
these VLANs cannot be pruned. Extended-range VLANs (VLAN IDs higher than 1005) are also
pruning-ineligible.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
7
Configuring VTP
VTP Configuration Guidelines
VTP version 3 functions the same on a standalone device or a stack except when the device stack is the primary
server for the VTP database. In this case, the MAC address of the active switch is used as the primary server
ID. If the active device reloads or is powered off, a new active switch is elected.
• If you do not configure the persistent MAC address feature, when the new active device is elected, it
sends a takeover message using the current stack MAC address.
VTP Settings
The VTP information is saved in the VTP VLAN database. When VTP mode is transparent, the VTP domain
name and mode are also saved in the device running configuration file, and you can save it in the device
startup configuration file by entering the copy running-config startup-config privileged EXEC command.
You must use this command if you want to save VTP mode as transparent, even if the device resets.
When you save VTP information in the device startup configuration file and reboot the device, the device
configuration is selected as follows:
• If the VTP mode is transparent in the startup configuration and the VLAN database and the VTP domain
name from the VLAN database matches that in the startup configuration file, the VLAN database is
ignored (cleared), and the VTP and VLAN configurations in the startup configuration file are used. The
VLAN database revision number remains unchanged in the VLAN database.
• If the VTP mode or domain name in the startup configuration do not match the VLAN database, the
domain name and VTP mode and configuration for VLAN IDs 1 to 1005 use the VLAN database
information.
Note If the NVRAM and DRAM storage is sufficient, all devices in a VTP domain should be in VTP server mode.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
8
Configuring VTP
Passwords for the VTP Domain
Caution Do not configure a VTP domain if all devices are operating in VTP client mode. If you configure the domain,
it is impossible to make changes to the VLAN configuration of that domain. Make sure that you configure at
least one device in the VTP domain for VTP server mode.
Caution When you configure a VTP domain password, the management domain does not function properly if you do
not assign a management domain password to each device in the domain.
VTP Version
Follow these guidelines when deciding which VTP version to implement:
• All devices in a VTP domain must have the same domain name, but they do not need to run the same
VTP version.
• A VTP version 2-capable device can operate in the same VTP domain as a device running VTP version
1 if version 2 is disabled on the version 2-capable device (version 2 is disabled by default).
• If a device running VTP version 1, but capable of running VTP version 2, receives VTP version 3
advertisements, it automatically moves to VTP version 2.
• If a device running VTP version 3 is connected to a device running VTP version 1, the VTP version 1
device moves to VTP version 2, and the VTP version 3 device sends scaled-down versions of the VTP
packets so that the VTP version 2 device can update its database.
• A device running VTP version 3 cannot move to version 1 or 2 if it has extended VLANs.
• Do not enable VTP version 2 on a device unless all of the devices in the same VTP domain are
version-2-capable. When you enable version 2 on a device, all of the version-2-capable devices in the
domain enable version 2. If there is a version 1-only device, it does not exchange VTP information with
devices that have version 2 enabled.
• Cisco recommends placing VTP version 1 and 2 devices at the edge of the network because they do not
forward VTP version 3 advertisements.
• If there are TrBRF and TrCRF Token Ring networks in your environment, you must enable VTP version
2 or version 3 for Token Ring VLAN switching to function properly. To run Token Ring and Token
Ring-Net, disable VTP version 2.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
9
Configuring VTP
How to Configure VTP
• VTP version 1 and version 2 do not propagate configuration information for extended range VLANs
(VLANs 1006 to 4094). You must configure these VLANs manually on each device. VTP version 3
supports extended-range VLANs and support for extended range VLAN database propagation.
• When a VTP version 3 device trunk port receives messages from a VTP version 2 device, it sends a
scaled-down version of the VLAN database on that particular trunk in VTP version 2 format. A VTP
version 3 device does not send VTP version 2-formatted packets on a trunk unless it first receives VTP
version 2 packets on that trunk port.
• When a VTP version 3 device detects a VTP version 2 device on a trunk port, it continues to send VTP
version 3 packets, in addition to VTP version 2 packets, to allow both kinds of neighbors to coexist on
the same trunk.
• A VTP version 3 device does not accept configuration information from a VTP version 2 or version 1
device.
• Two VTP version 3 regions can only communicate in transparent mode over a VTP version 1 or version
2 region.
• Devices that are only VTP version 1 capable cannot interoperate with VTP version 3 devices.
• VTP version 1 and version 2 do not propagate configuration information for extended range VLANs
(VLANs 1006 to 4094). You must manually configure these VLANs on each device.
When you configure a domain name, it cannot be removed; you can only reassign a device to a different
domain.
SUMMARY STEPS
1. enable
2. configure terminal
3. vtp domain domain-name
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
10
Configuring VTP
Configuring VTP Mode
DETAILED STEPS
Device> enable
Step 3 vtp domain domain-name Configures the VTP administrative-domain name. The name
can be 1 to 32 characters. All devices operating in VTP
Example:
server or client mode under the same administrative
responsibility must be configured with the same domain
Device(config)# vtp domain eng_group
name.
This command is optional for modes other than server mode.
VTP server mode requires a domain name. If the device
has a trunk connection to a VTP domain, the device learns
the domain name from the VTP server in the domain.
You should configure the VTP domain before configuring
other VTP parameters.
Step 4 vtp mode {client | server | transparent | off} {vlan | mst Configures the device for VTP mode (client, server,
| unknown} transparent, or off).
Example: • vlan—The VLAN database is the default if none are
configured.
Device(config)# vtp mode server
• mst—The multiple spanning tree (MST) database.
• unknown—An unknown database type.
Step 5 vtp password password (Optional) Sets the password for the VTP domain. The
password can be 8 to 64 characters. If you configure a VTP
Example:
password, the VTP domain does not function properly if
you do not assign the same password to each device in the
Device(config)# vtp password mypassword
domain.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
11
Configuring VTP
Configuring a VTP Version 3 Password
Device(config)# end
Step 7 show vtp status Verifies your entries in the VTP Operating Mode and the
VTP Domain Name fields of the display.
Example:
Step 8 copy running-config startup-config (Optional) Saves the configuration in the startup
configuration file.
Example:
Only VTP mode and domain name are saved in the device
Device# copy running-config startup-config running configuration and can be copied to the startup
configuration file.
SUMMARY STEPS
1. enable
2. configure terminal
3. vtp version 3
4. vtp password password [hidden | secret]
5. end
6. show vtp password
7. copy running-config startup-config
DETAILED STEPS
Device> enable
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
12
Configuring VTP
Configuring a VTP Version 3 Primary Server
Step 4 vtp password password [hidden | secret] (Optional) Sets the password for the VTP domain. The
password can be 8 to 64 characters.
Example:
• (Optional) hidden—Saves the secret key generated
Device(config)# vtp password mypassword hidden from the password string in the nvram:vlan.dat file. If
you configure a takeover by configuring a VTP
primary server, you are prompted to reenter the
password.
• (Optional) secret—Directly configures the password.
The secret password must contain 32 hexadecimal
characters.
Device(config)# end
Step 6 show vtp password Verifies your entries. The output appears like this:
Example: VTP password: 89914640C8D90868B6A0D8103847A733
Step 7 copy running-config startup-config (Optional) Saves your entries in the configuration file.
Example:
SUMMARY STEPS
1. vtp version 3
2. vtp primary [vlan | mst] [force]
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
13
Configuring VTP
Enabling the VTP Version
DETAILED STEPS
Step 2 vtp primary [vlan | mst] [force] Changes the operational state of a device from a secondary
server (the default) to a primary server and advertises the
Example:
configuration to the domain. If the device password is
configured as hidden, you are prompted to reenter the
Device# vtp primary vlan force
password.
• (Optional) vlan—Selects the VLAN database as the
takeover feature. This is the default.
• (Optional) mst—Selects the multiple spanning tree
(MST) database as the takeover feature.
• (Optional) force—Overwrites the configuration of any
conflicting servers. If you do not enter force, you are
prompted for confirmation before the takeover.
Caution VTP version 1 and VTP version 2 are not interoperable on devices in the same
VTP domain. Do not enable VTP version 2 unless every device in the VTP domain
supports version 2.
• In TrCRF and TrBRF Token Ring environments, you must enable VTP version 2 or VTP version 3 for
Token Ring VLAN switching to function properly. For Token Ring and Token Ring-Net media, disable
VTP version 2.
•
Caution In VTP version 3, both the primary and secondary servers can exist on an instance
in the domain.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
14
Configuring VTP
Enabling the VTP Version
SUMMARY STEPS
1. enable
2. configure terminal
3. vtp version {1 | 2 | 3}
4. end
5. show vtp status
6. copy running-config startup-config
DETAILED STEPS
Device> enable
Step 3 vtp version {1 | 2 | 3} Enables the VTP version on the device. The default is VTP
version 1.
Example:
Device(config)# end
Step 5 show vtp status Verifies that the configured VTP version is enabled.
Example:
Step 6 copy running-config startup-config (Optional) Saves your entries in the configuration file.
Example:
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
15
Configuring VTP
Enabling VTP Pruning
To configure VTP pruning on an interface, use the switchport trunk pruning vlan interface configuration
command. VTP pruning operates when an interface is trunking. You can set VLAN pruning-eligibility, whether
or not VTP pruning is enabled for the VTP domain, whether or not any given VLAN exists, and whether or
not the interface is currently trunking.
SUMMARY STEPS
1. enable
2. configure terminal
3. vtp pruning
4. end
5. show vtp status
DETAILED STEPS
Device> enable
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
16
Configuring VTP
Configuring VTP on a Per-Port Basis
Device(config)# end
Step 5 show vtp status Verifies your entries in the VTP Pruning Mode field of the
display.
Example:
SUMMARY STEPS
1. enable
2. configure terminal
3. interface interface-id
4. vtp
5. end
6. show running-config interface interface-id
7. show vtp status
DETAILED STEPS
Device> enable
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
17
Configuring VTP
Adding a VTP Client to a VTP Domain
Device(config-if)# vtp
Device(config)# end
Step 6 show running-config interface interface-id Verifies the change to the port.
Example:
SUMMARY STEPS
1. enable
2. show vtp status
3. configure terminal
4. vtp domain domain-name
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
18
Configuring VTP
Adding a VTP Client to a VTP Domain
5. end
6. show vtp status
7. configure terminal
8. vtp domain domain-name
9. end
10. show vtp status
DETAILED STEPS
Device> enable
Step 2 show vtp status Checks the VTP configuration revision number.
Example: If the number is 0, add the device to the VTP domain.
If the number is greater than 0, follow these substeps:
Device# show vtp status
• Write down the domain name.
• Write down the configuration revision number.
• Continue with the next steps to reset the device
configuration revision number.
Step 4 vtp domain domain-name Changes the domain name from the original one displayed
in Step 1 to a new name.
Example:
Step 6 show vtp status Verifies that the configuration revision number has been
reset to 0.
Example:
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
19
Configuring VTP
Monitoring VTP
Step 8 vtp domain domain-name Enters the original domain name on the device
Example:
Device(config)# end
Step 10 show vtp status (Optional) Verifies that the domain name is the same as
in Step 1 and that the configuration revision number is 0.
Example:
Monitoring VTP
This section describes commands used to display and monitor the VTP configuration.
You monitor VTP by displaying VTP configuration information: the domain name, the current VTP revision,
and the number of VLANs. You can also display statistics about the advertisements sent and received by the
device.
Command Purpose
show vtp counters Displays counters about VTP messages that have been
sent and received.
show vtp devices [conflict] Displays information about all VTP version 3 devices
in the domain. Conflicts are VTP version 3 devices
with conflicting primary servers. The show vtp
devices command does not display information when
the device is in transparent or off mode.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
20
Configuring VTP
Configuration Examples for VTP
Command Purpose
show vtp interface [interface-id] Displays VTP status and configuration for all
interfaces or the specified interface.
show vtp password Displays the VTP password. The form of the password
displayed depends on whether or not the hidden
keyword was entered and if encryption is enabled on
the device.
Where to Go Next
After configuring VTP, you can configure the following:
• VLANs
• VLAN trunking
• Voice VLANs
• Private VLANs
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
21
Configuring VTP
Additional References
Additional References
Related Documents
Additional configuration commands and procedures. Command Reference (Catalyst 9500 Series
Switches)
Description Link
To help you research and resolve system https://www.cisco.com/cgi-bin/Support/Errordecoder/index.cgi
error messages in this release, use the Error
Message Decoder tool.
Standard/RFC Title
RFC 1573 Evolution of the Interfaces Group of MIB-II
RFC 2021 SNMPv2 Management Information Base for the Transmission Control Protocol using SMIv2
MIBs
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
22
Configuring VTP
Feature History and Information for VTP
Technical Assistance
Description Link
The Cisco Support website provides extensive online resources, including http://www.cisco.com/support
documentation and tools for troubleshooting and resolving technical issues
with Cisco products and technologies.
To receive security and technical information about your products, you can
subscribe to various services, such as the Product Alert Tool (accessed from
Field Notices), the Cisco Technical Services Newsletter, and Really Simple
Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website requires a Cisco.com user
ID and password.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
23
Configuring VTP
Feature History and Information for VTP
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
24
CHAPTER 2
Configuring VLANs
• Prerequisites for VLANs, on page 25
• Restrictions for VLANs, on page 25
• Information About VLANs, on page 26
• How to Configure VLANs, on page 30
• Monitoring VLANs, on page 38
• Additional References, on page 39
• Feature History and Information for VLANs, on page 39
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
25
Configuring VLANs
Information About VLANs
• If a switch has 8 trunk ports (200 active VLANs on each trunk) and 40 access ports, the number of
STP virtual ports on this switch would be: 8 * 200 + 40 = 1,640
For information about the supported scalability of STP virtual ports, see the Cisco Catalyst 9500 Series
Switches Data Sheet.
• The device supports IEEE 802.1Q trunking methods for sending VLAN traffic over Ethernet ports.
• The interface VLAN already has an MAC address assigned by default. You can override the interface
VLAN MAC address by using thee mac-address command. If this command is configured on a single
SVI or router port that requires Layer 3 injected packets, all other SVIs or routed ports on the device also
must be configured with the same first four most significant bits (4MSB) of the MAC address. For
example, if you set the MAC address of any SVI to xxxx.yyyy.zzzz, set the MAC address of all other
SVIs to start with xxxx.yyyy. If Layer 3 injected packets are not used, this restriction does not apply.
Note This applies to all Layer 3 ports, SVIs, and routed ports. This does not apply to
GigabitEthernet0/0 port.
• When deploying Cisco StackWise Virtual, ensure that VLAN ID 4094 is not used anywhere on the
network. All inter-chassis system control communication between stack members is carried over the
reserved VLAN ID 4094 from the global range.
• Once a range of interfaces has been bundled, any VLAN interface configuration change must be done
only on a port channel. Otherwise, the interfaces will get suspended.
Logical Networks
A VLAN is a switched network that is logically segmented by function, project team, or application, without
regard to the physical locations of the users. VLANs have the same attributes as physical LANs, but you can
group end stations even if they are not physically located on the same LAN segment. Any device port can
belong to a VLAN, and unicast, broadcast, and multicast packets are forwarded and flooded only to end
stations in the VLAN. Each VLAN is considered a logical network, and packets destined for stations that do
not belong to the VLAN must be forwarded through a router or a device supporting fallback bridging. In a
switch stack, VLANs can be formed with ports across the stack. Because a VLAN is considered a separate
logical network, it contains its own bridge Management Information Base (MIB) information and can support
its own implementation of spanning tree.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
26
Configuring VLANs
Supported VLANs
VLANs are often associated with IP subnetworks. For example, all the end stations in a particular IP subnet
belong to the same VLAN. Interface VLAN membership on the device is assigned manually on an
interface-by-interface basis. When you assign device interfaces to VLANs by using this method, it is known
as interface-based, or static, VLAN membership.
Traffic between VLANs must be routed.
The device can route traffic between VLANs by using device virtual interfaces (SVIs). An SVI must be
explicitly configured and assigned an IP address to route traffic between VLANs.
Supported VLANs
The device supports VLANs in VTP client, server, and transparent modes. VLANs are identified by a number
from 1 to 4094. VLAN 1 is the default VLAN and is created during system initialization.
You can configure up to 4094 VLANs on the device. However, not all VLANs can be active simultaneously.
In the MSTP mode, you can configure 1000 active VLANs at any point in time.
VLAN IDs 1002 through 1005 are reserved for Token Ring and FDDI VLANs. All of the VLANs except
1002 to 1005 are available for user configuration.
There are 3 VTP versions: VTP version 1, version 2, and version 3. All VTP versions support both normal
and extended range VLANs, but only with VTP version 3, does the device propagate extended range VLAN
configuration information. When extended range VLANs are created in VTP versions 1 and 2, their
configuration information is not propagated. Even the local VTP database entries on the device are not updated,
but the extended range VLANs configuration information is created and stored in the running configuration
file.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
27
Configuring VLANs
VLAN Configuration Files
When a port belongs to a VLAN, the device learns and manages the addresses associated with the port on a
per-VLAN basis.
Static-access A static-access port can belong to VTP is not required. If you do not
one VLAN and is manually want VTP to globally propagate
assigned to that VLAN. information, set the VTP mode to
transparent. To participate in VTP,
there must be at least one trunk port
on the device or the device stack
connected to a trunk port of a
second device or device stack.
Trunk (IEEE 802.1Q) : A trunk port is a member of all VTP is recommended but not
VLANs by default, including required. VTP maintains VLAN
• IEEE 802.1Q—
extended-range VLANs, but configuration consistency by
Industry-standard trunking
membership can be limited by managing the addition, deletion,
encapsulation.
configuring the allowed-VLAN list. and renaming of VLANs on a
You can also modify the network-wide basis. VTP
pruning-eligible list to block exchanges VLAN configuration
flooded traffic to VLANs on trunk messages with other devices over
ports that are included in the list. trunk links.
Voice VLAN A voice VLAN port is an access VTP is not required; it has no effect
port attached to a Cisco IP Phone, on a voice VLAN.
configured to use one VLAN for
voice traffic and another VLAN for
data traffic from a device attached
to the phone.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
28
Configuring VLANs
Normal-Range VLAN Configuration Guidelines
• If the VTP mode or domain name in the startup configuration does not match the VLAN database, the
domain name and VTP mode and configuration for the VLAN IDs 1 to 1005 use the VLAN database
information.
• In VTP versions 1 and 2, if VTP mode is server, the domain name and VLAN configuration for VLAN
IDs 1 to 1005 use the VLAN database information. VTP version 3 also supports VLANs 1006 to 4094.
Note Ensure that you delete the vlan.dat file along with the configuration files before you reset the switch
configuration using write erase command. This ensures that the switch reboots correctly on a reset.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
29
Configuring VLANs
Extended-Range VLAN Configuration Guidelines
• When a device joins a stack or when stacks merge, VTP information (the vlan.dat file) on the new device
will be consistent with the active device.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
30
Configuring VLANs
Creating or Modifying an Ethernet VLAN
You can cause inconsistency in the VLAN database if you attempt to manually delete the vlan.dat file. If you
want to modify the VLAN configuration, follow the procedures in this section.
SUMMARY STEPS
1. configure terminal
2. vlan vlan-id
3. name vlan-name
4. media { ethernet | fd-net | fddi | tokenring | trn-net }
5. end
6. end
7. show vlan {name vlan-name | id vlan-id}
DETAILED STEPS
Step 2 vlan vlan-id Enters a VLAN ID, and enters VLAN configuration mode.
Enter a new VLAN ID to create a VLAN, or enter an
Example:
existing VLAN ID to modify that VLAN.
Device(config)# vlan 20
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
31
Configuring VLANs
Creating or Modifying an Ethernet VLAN
Step 3 name vlan-name (Optional) Enters a name for the VLAN. If no name is
entered for the VLAN, the default is to append the vlan-id
Example:
value with leading zeros to the word VLAN. For example,
VLAN0004 is a default VLAN name for VLAN 4.
Device(config-vlan)# name test20
The following additional VLAN configuration command
options are available:
• are—Sets the maximum number of All Router
Explorer (ARE) hops for the VLAN.
• backupcrf—Enables or disables the backup
concentrator relay function (CRF) mode for the VLAN.
• bridge—Sets the value of the bridge number for the
FDDI net or Token Ring net type VLANs.
• exit—Applies changes, bumps the revision number,
and exits.
• media—Sets the media type of the VLAN.
• no—Negates the command or default.
• parent—Sets the value of the ID for the parent VLAN
for FDDI or Token Ring type VLANs.
• remote-span—Configures a remote SPAN VLAN.
• ring—Sets the ring number value for FDDI or Token
Ring type VLANs.
• said—Sets the IEEE 802.10 SAID value.
• shutdown—Shuts down the VLAN switching.
• state—Sets the operational VLAN state to active or
suspended.
• ste—Sets the maximum number of Spanning Tree
Explorer (STE) hops for the VLAN.
• stp—Sets the Spanning Tree characteristics of the
VLAN.
You cannot shut down or suspend the state for the default
VLAN or VLANs 1006 to 4094
Step 4 media { ethernet | fd-net | fddi | tokenring | trn-net } Configures the VLAN media type. Command options
include:
Example:
• ethernet—Sets the VLAN media type as Ethernet.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
32
Configuring VLANs
Deleting a VLAN
Device(config)# end
Device(config)# end
Deleting a VLAN
When you delete a VLAN from a device that is in VTP server mode, the VLAN is removed from the VLAN
database for all devices in the VTP domain. When you delete a VLAN from a device that is in VTP transparent
mode, the VLAN is deleted only on that specific device or a device stack.
You cannot delete the default VLANs for the different media types: Ethernet VLAN 1 and FDDI or Token
Ring VLANs 1002 to 1005.
Caution When you delete a VLAN, any ports assigned to that VLAN become inactive. They remain associated with
the VLAN (and thus inactive) until you assign them to a new VLAN.
SUMMARY STEPS
1. enable
2. configure terminal
3. no vlan vlan-id
4. end
5. show vlan brief
6. copy running-config startup-config
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
33
Configuring VLANs
Assigning Static-Access Ports to a VLAN
DETAILED STEPS
Device> enable
Step 3 no vlan vlan-id Removes the VLAN by entering the VLAN ID.
Example:
Device(config)# no vlan 4
Device(config)# end
Step 6 copy running-config startup-config (Optional) Saves your entries in the configuration file.
Example:
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
34
Configuring VLANs
Assigning Static-Access Ports to a VLAN
SUMMARY STEPS
1. enable
2. configure terminal
3. interface interface-id
4. switchport mode access
5. switchport access vlan vlan-id
6. end
7. show running-config interface interface-id
8. show interfaces interface-id switchport
9. copy running-config startup-config
DETAILED STEPS
Device> enable
Step 4 switchport mode access Defines the VLAN membership mode for the port (Layer
2 access port).
Example:
Step 5 switchport access vlan vlan-id Assigns the port to a VLAN. Valid VLAN IDs are 1 to
4094.
Example:
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
35
Configuring VLANs
How to Configure Extended-Range VLANs
Device(config-if)# end
Step 7 show running-config interface interface-id Verifies the VLAN membership mode of the interface.
Example:
Step 8 show interfaces interface-id switchport Verifies your entries in the Administrative Mode and the
Access Mode VLAN fields of the display.
Example:
Step 9 copy running-config startup-config (Optional) Saves your entries in the configuration file.
Example:
SUMMARY STEPS
1. enable
2. configure terminal
3. vlan vlan-id
4. remote-span
5. exit
6. end
7. show vlan id vlan-id
8. copy running-config startup-config
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
36
Configuring VLANs
Creating an Extended-Range VLAN
DETAILED STEPS
Device> enable
Device(config-vlan)# remote-span
Device(config-vlan)# exit
Device(config)#
Device(config)# end
Step 7 show vlan id vlan-id Verifies that the VLAN has been created.
Example:
Step 8 copy running-config startup-config (Optional) Saves your entries in the configuration file.
Example:
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
37
Configuring VLANs
Monitoring VLANs
Monitoring VLANs
Table 4: Privileged EXEC show Commands
Command Purpose
show interfaces [vlan vlan-id] Displays characteristics for all interfaces or for the specified VLAN
configured on the device .
show vlan [ access-map name | Displays parameters for all VLANs or the specified VLAN on the
brief | dot1q { tag native } | filter device. The following command options are available:
[ access-map | vlan ] | group [
• access-map—Displays the VLAN access-maps.
group-name name ] | id vlan-id |
ifindex | mtu | name name | • brief—Displays VTP VLAN status in brief.
private-vlan remote-span |
summary ] • dot1q—Displays the dot1q parameters.
• filter—Displays VLAN filter information.
• group—Displays the VLAN group with its name and the connected
VLANs that are available.
• id—Displays VTP VLAN status by identification number.
• ifindex—Displays SNMP ifIndex.
• mtu—Displays VLAN MTU information.
• name—Displays the VTP VLAN information by specified name.
• private-vlan—Displays private VLAN information.
• remote-span–Displays the remote SPAN VLANs.
• summary—Displays a summary of VLAN information.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
38
Configuring VLANs
Additional References
Additional References
Related Documents
Standard/RFC Title
RFC 1573 Evolution of the Interfaces Group of MIB-II
RFC 2021 SNMPv2 Management Information Base for the Transmission Control Protocol using SMIv2
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
39
Configuring VLANs
Feature History and Information for VLANs
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
40
CHAPTER 3
Configuring VLAN Trunks
• Finding Feature Information, on page 41
• Prerequisites for VLAN Trunks, on page 41
• Restrictions for VLAN Trunks, on page 42
• Information About VLAN Trunks, on page 43
• How to Configure VLAN Trunks, on page 45
• Where to Go Next, on page 59
• Additional References, on page 59
• Feature History and Information for VLAN Trunks, on page 60
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
41
Configuring VLAN Trunks
Restrictions for VLAN Trunks
• Disabling spanning tree on the native VLAN of an IEEE 802.1Q trunk without disabling spanning tree
on every VLAN in the network can potentially cause spanning-tree loops. We recommend that you leave
spanning tree enabled on the native VLAN of an IEEE 802.1Q trunk or disable spanning tree on every
VLAN in the network. Make sure your network is loop-free before disabling spanning tree.
• If you try to enable IEEE 802.1x on a trunk port, an error message appears, and IEEE 802.1x is not
enabled. If you try to change the mode of an IEEE 802.1x-enabled port to trunk, the port mode is not
changed.
• A port in dynamic mode can negotiate with its neighbor to become a trunk port. If you try to enable IEEE
802.1x on a dynamic port, an error message appears, and IEEE 802.1x is not enabled. If you try to change
the mode of an IEEE 802.1x-enabled port to dynamic, the port mode is not changed.
• Dynamic Trunking Protocol (DTP) is not supported on tunnel ports.
• The device does not support Layer 3 trunks; you cannot configure subinterfaces or use the encapsulation
keyword on Layer 3 interfaces. The device does support Layer 2 trunks and Layer 3 VLAN interfaces,
which provide equivalent capabilities.
Because subinterfaces are not supported on Cisco Catalyst 9500 Series Switches, these cannot be used
as an Application Centric Infrastructure (ACI) Interpod Network (IPN) device. You also cannot use a
switch virtual interface (SVI) because Interpod spine switches reuse the same MAC address; which
causes flapping of MAC address in the IPN Layer 2 network.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
42
Configuring VLAN Trunks
Information About VLAN Trunks
Trunking Modes
Ethernet trunk interfaces support different trunking modes. You can set an interface as trunking or nontrunking
or to negotiate trunking with the neighboring interface. To autonegotiate trunking, the interfaces must be in
the same VTP domain.
Trunk negotiation is managed by the Dynamic Trunking Protocol (DTP), which is a Point-to-Point Protocol
(PPP). However, some internetworking devices might forward DTP frames improperly, which could cause
misconfigurations.
Mode Function
switchport mode access Puts the interface (access port) into permanent nontrunking mode and negotiates
to convert the link into a nontrunk link. The interface becomes a nontrunk
interface regardless of whether or not the neighboring interface is a trunk
interface.
switchport mode dynamic Makes the interface able to convert the link to a trunk link. The interface
auto becomes a trunk interface if the neighboring interface is set to trunk or desirable
mode. . The default switchport mode for all Ethernet interfaces is dynamic
auto for C9500-12Q-E, C9500-12Q-A, C9500-24Q-E, C9500-24Q-A,
C9500-40X-E, and C9500-40X-A models of the Cisco Catalyst 9500 Series
Switches.
switchport mode dynamic Makes the interface actively attempt to convert the link to a trunk link. The
desirable interface becomes a trunk interface if the neighboring interface is set to trunk,
desirable, or auto mode.
The default switchport mode for all Ethernet interfaces is dynamic desirable
for C9500-32C, C9500-32QC, C9500-48Y4C, and C9500-24Y4C models of
the Cisco Catalyst 9500 Series Switches
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
43
Configuring VLAN Trunks
Allowed VLANs on a Trunk
Mode Function
switchport mode trunk Puts the interface into permanent trunking mode and negotiates to convert the
neighboring link into a trunk link. The interface becomes a trunk interface even
if the neighboring interface is not a trunk interface.
switchport nonegotiate Prevents the interface from generating DTP frames. You can use this command
only when the interface switchport mode is access or trunk. You must manually
configure the neighboring interface as a trunk interface to establish a trunk link.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
44
Configuring VLAN Trunks
Network Load Sharing Using STP Path Cost
Feature Interactions
Trunking interacts with other features in these ways:
• A trunk port cannot be a secure port.
• Trunk ports can be grouped into EtherChannel port groups, but all trunks in the group must have the
same configuration. When a group is first created, all ports follow the parameters set for the first port to
be added to the group. If you change the configuration of one of these parameters, the device propagates
the setting that you entered to all ports in the group:
• Allowed-VLAN list.
• STP port priority for each VLAN.
• STP Port Fast setting.
• Trunk status:
If one port in a port group ceases to be a trunk, all ports cease to be trunks.
• If you try to enable IEEE 802.1x on a trunk port, an error message appears, and IEEE 802.1x is not
enabled. If you try to change the mode of an IEEE 802.1x-enabled port to trunk, the port mode is not
changed.
• A port in dynamic mode can negotiate with its neighbor to become a trunk port. If you try to enable IEEE
802.1x on a dynamic port, an error message appears, and IEEE 802.1x is not enabled. If you try to change
the mode of an IEEE 802.1x-enabled port to dynamic, the port mode is not changed.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
45
Configuring VLAN Trunks
Configuring an Ethernet Interface as a Trunk Port
SUMMARY STEPS
1. enable
2. configure terminal
3. interface interface-id
4. switchport mode {dynamic {auto | desirable} | trunk}
5. switchport access vlan vlan-id
6. switchport trunk native vlan vlan-id
7. end
8. show interfaces interface-id switchport
9. show interfaces interface-id trunk
10. copy running-config startup-config
DETAILED STEPS
Device> enable
Step 3 interface interface-id Specifies the port to be configured for trunking, and enters
interface configuration mode.
Example:
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
46
Configuring VLAN Trunks
Configuring a Trunk Port
Step 4 switchport mode {dynamic {auto | desirable} | trunk} Configures the interface as a Layer 2 trunk (required only
if the interface is a Layer 2 access port or tunnel port or to
Example:
specify the trunking mode).
Device(config-if)# switchport mode dynamic • dynamic auto—Sets the interface to a trunk link if
desirable the neighboring interface is set to trunk or desirable
mode. This is the default.
• dynamic desirable—Sets the interface to a trunk link
if the neighboring interface is set to trunk, desirable,
or auto mode.
• trunk—Sets the interface in permanent trunking
mode and negotiate to convert the link to a trunk link
even if the neighboring interface is not a trunk
interface.
Step 5 switchport access vlan vlan-id (Optional) Specifies the default VLAN, which is used if
the interface stops trunking.
Example:
Step 6 switchport trunk native vlan vlan-id Specifies the native VLAN for IEEE 802.1Q trunks.
Example:
Device(config)# end
Step 8 show interfaces interface-id switchport Displays the switch port configuration of the interface in
the Administrative Mode and the Administrative Trunking
Example:
Encapsulation fields of the display.
Device# show interfaces gigabitethernet1/0/2
switchport
Step 9 show interfaces interface-id trunk Displays the trunk configuration of the interface.
Example:
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
47
Configuring VLAN Trunks
Defining the Allowed VLANs on a Trunk
Step 10 copy running-config startup-config (Optional) Saves your entries in the configuration file.
Example:
SUMMARY STEPS
1. enable
2. configure terminal
3. interface interface-id
4. switchport mode trunk
5. switchport trunk allowed vlan { word | add | all | except | none | remove} vlan-list
6. end
7. show interfaces interface-id switchport
8. copy running-config startup-config
DETAILED STEPS
Device> enable
Step 3 interface interface-id Specifies the port to be configured, and enters interface
configuration mode.
Example:
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
48
Configuring VLAN Trunks
Changing the Pruning-Eligible List
Step 5 switchport trunk allowed vlan { word | add | all | except (Optional) Configures the list of VLANs allowed on the
| none | remove} vlan-list trunk.
Example: The vlan-list parameter is either a single VLAN number
from 1 to 4094 or a range of VLANs described by two
Device(config-if)# switchport trunk allowed vlan VLAN numbers, the lower one first, separated by a hyphen.
remove 2 Do not enter any spaces between comma-separated VLAN
parameters or in hyphen-specified ranges.
All VLANs are allowed by default.
Device(config)# end
Step 7 show interfaces interface-id switchport Verifies your entries in the Trunking VLANs Enabled field
of the display.
Example:
Step 8 copy running-config startup-config (Optional) Saves your entries in the configuration file.
Example:
SUMMARY STEPS
1. enable
2. configure terminal
3. interface interface-id
4. switchport trunk pruning vlan {add | except | none | remove} vlan-list [,vlan [,vlan [,,,]]
5. end
6. show interfaces interface-id switchport
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
49
Configuring VLAN Trunks
Changing the Pruning-Eligible List
DETAILED STEPS
Device> enable
Step 3 interface interface-id Selects the trunk port for which VLANs should be pruned,
and enters interface configuration mode.
Example:
Step 4 switchport trunk pruning vlan {add | except | none | Configures the list of VLANs allowed to be pruned from
remove} vlan-list [,vlan [,vlan [,,,]] the trunk.
For explanations about using the add, except, none, and
remove keywords, see the command reference for this
release.
Separate non-consecutive VLAN IDs with a comma and
no spaces; use a hyphen to designate a range of IDs. Valid
IDs are 2 to 1001. Extended-range VLANs (VLAN IDs
1006 to 4094) cannot be pruned.
VLANs that are pruning-ineligible receive flooded traffic.
The default list of VLANs allowed to be pruned contains
VLANs 2 to 1001.
Device(config)# end
Step 6 show interfaces interface-id switchport Verifies your entries in the Pruning VLANs Enabled field
of the display.
Example:
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
50
Configuring VLAN Trunks
Configuring the Native VLAN for Untagged Traffic
SUMMARY STEPS
1. enable
2. configure terminal
3. interface interface-id
4. switchport trunk native vlan vlan-id
5. end
6. show interfaces interface-id switchport
7. copy running-config startup-config
DETAILED STEPS
Device> enable
Step 3 interface interface-id Defines the interface that is configured as the IEEE 802.1Q
trunk, and enters interface configuration mode.
Example:
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
51
Configuring VLAN Trunks
Configuring Trunk Ports for Load Sharing
Device(config-if)# end
Step 6 show interfaces interface-id switchport Verifies your entries in the Trunking Native Mode VLAN
field.
Example:
Step 7 copy running-config startup-config (Optional) Saves your entries in the configuration file.
Example:
SUMMARY STEPS
1. enable
2. configure terminal
3. vtp domain domain-name
4. vtp mode server
5. end
6. show vtp status
7. show vlan
8. configure terminal
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
52
Configuring VLAN Trunks
Configuring Load Sharing Using STP Port Priorities
9. interface interface-id
10. switchport mode trunk
11. end
12. show interfaces interface-id switchport
13. Repeat the above steps on Device A for a second port in the device or device stack.
14. Repeat the above steps on Device B to configure the trunk ports that connect to the trunk ports configured
on Device A.
15. show vlan
16. configure terminal
17. interface interface-id
18. spanning-tree vlan vlan-range port-priority priority-value
19. exit
20. interface interface-id
21. spanning-tree vlan vlan-range port-priority priority-value
22. end
23. show running-config
24. copy running-config startup-config
DETAILED STEPS
Device> enable
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
53
Configuring VLAN Trunks
Configuring Load Sharing Using STP Port Priorities
Device(config)# end
Step 6 show vtp status Verifies the VTP configuration on both Device A and
Device B.
Example:
In the display, check the VTP Operating Mode and the
Device# show vtp status VTP Domain Name fields.
Step 7 show vlan Verifies that the VLANs exist in the database on Device
A.
Example:
Step 9 interface interface-id Defines the interface to be configured as a trunk, and enters
interface configuration mode.
Example:
Device(config-if)# end
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
54
Configuring VLAN Trunks
Configuring Load Sharing Using STP Port Priorities
Step 17 interface interface-id Defines the interface to set the STP port priority, and enters
interface configuration mode.
Example:
Step 18 spanning-tree vlan vlan-range port-priority Assigns the port priority for the VLAN range specified.
priority-value Enter a port priority value from 0 to 240. Port priority
values increment by 16.
Example:
Device(config-if)# exit
Step 20 interface interface-id Defines the interface to set the STP port priority, and enters
interface configuration mode.
Example:
Step 21 spanning-tree vlan vlan-range port-priority Assigns the port priority for the VLAN range specified.
priority-value Enter a port priority value from 0 to 240. Port priority
values increment by 16.
Example:
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
55
Configuring VLAN Trunks
Configuring Load Sharing Using STP Path Cost
Device(config-if)# end
Step 24 copy running-config startup-config (Optional) Saves your entries in the configuration file.
Example:
SUMMARY STEPS
1. enable
2. configure terminal
3. interface interface-id
4. switchport mode trunk
5. exit
6. Repeat Steps 2 through 4 on a second interface in Device A or in Device A stack.
7. end
8. show running-config
9. show vlan
10. configure terminal
11. interface interface-id
12. spanning-tree vlan vlan-range cost cost-value
13. end
14. Repeat Steps 9 through 13 on the other configured trunk interface on Device A, and set the spanning-tree
path cost to 30 for VLANs 8, 9, and 10.
15. exit
16. show running-config
17. copy running-config startup-config
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
56
Configuring VLAN Trunks
Configuring Load Sharing Using STP Path Cost
DETAILED STEPS
Device> enable
Step 3 interface interface-id Defines the interface to be configured as a trunk, and enters
interface configuration mode.
Example:
Device(config-if)# exit
Device(config)# end
Step 8 show running-config Verifies your entries. In the display, make sure that the
interfaces are configured as trunk ports.
Example:
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
57
Configuring VLAN Trunks
Configuring Load Sharing Using STP Path Cost
Step 11 interface interface-id Defines the interface on which to set the STP cost, and
enters interface configuration mode.
Example:
Step 12 spanning-tree vlan vlan-range cost cost-value Sets the spanning-tree path cost to 30 for VLANs 2 through
4.
Example:
Device(config-if)# end
Device(config)# exit
Step 16 show running-config Verifies your entries. In the display, verify that the path
costs are set correctly for both trunk interfaces.
Example:
Step 17 copy running-config startup-config (Optional) Saves your entries in the configuration file.
Example:
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
58
Configuring VLAN Trunks
Where to Go Next
Where to Go Next
After configuring VLAN trunks, you can configure the following:
• VLANs
• Voice VLANs
• Private VLANs
Additional References
Related Documents
Description Link
To help you research and resolve system https://www.cisco.com/cgi-bin/Support/Errordecoder/index.cgi
error messages in this release, use the Error
Message Decoder tool.
Standard/RFC Title
RFC 1573 Evolution of the Interfaces Group of MIB-II
RFC 2021 SNMPv2 Management Information Base for the Transmission Control Protocol using SMIv2
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
59
Configuring VLAN Trunks
Feature History and Information for VLAN Trunks
MIBs
Technical Assistance
Description Link
The Cisco Support website provides extensive online resources, including http://www.cisco.com/support
documentation and tools for troubleshooting and resolving technical issues
with Cisco products and technologies.
To receive security and technical information about your products, you can
subscribe to various services, such as the Product Alert Tool (accessed from
Field Notices), the Cisco Technical Services Newsletter, and Really Simple
Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website requires a Cisco.com user
ID and password.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
60
CHAPTER 4
Configuring Voice VLANs
• Finding Feature Information, on page 61
• Prerequisites for Voice VLANs, on page 61
• Restrictions for Voice VLANs, on page 62
• Information About Voice VLAN, on page 62
• How to Configure Voice VLAN, on page 64
• Monitoring Voice VLAN, on page 67
• Where to Go Next, on page 67
• Additional References, on page 68
• Feature History and Information for Voice VLAN, on page 69
Note Trunk ports can carry any number of voice VLANs, similar to regular VLANs.
The configuration of voice VLANs is not supported on trunk ports.
• Before you enable voice VLAN, enable QoS on the device by entering the trust device cisco-phone
interface configuration command. If you use the auto QoS feature, these settings are automatically
configured.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
61
Configuring Voice VLANs
Restrictions for Voice VLANs
• You must enable CDP on the device port connected to the Cisco IP Phone to send the configuration to
the phone. (CDP is globally enabled by default on all device interfaces.)
Note In all configurations, the voice traffic carries a Layer 3 IP precedence value (the default is 5 for voice traffic
and 3 for voice control traffic).
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
62
Configuring Voice VLANs
Voice VLAN Configuration Guidelines
• In trusted mode, all traffic received through the access port on the Cisco IP Phone passes through the
phone unchanged.
• In untrusted mode, all traffic in IEEE 802.1Q or IEEE 802.1p frames received through the access port
on the Cisco IP Phone receive a configured Layer 2 CoS value. The default Layer 2 CoS value is 0.
Untrusted mode is the default.
Note Untagged traffic from the device attached to the Cisco IP Phone passes through the phone unchanged, regardless
of the trust state of the access port on the phone.
• The Cisco IP Phone and a device attached to the phone cannot communicate if they are in the same
VLAN and subnet but use different frame types because traffic in the same subnet is not routed (routing
would eliminate the frame type difference).
• Voice VLAN ports can also be these port types:
• Dynamic access port.
• IEEE 802.1x authenticated port.
Note If you enable IEEE 802.1x on an access port on which a voice VLAN is configured
and to which a Cisco IP Phone is connected, the phone loses connectivity to the
device for up to 30 seconds.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
63
Configuring Voice VLANs
How to Configure Voice VLAN
• Protected port.
• A source or destination port for a SPAN or RSPAN session.
• Secure port.
Note When you enable port security on an interface that is also configured with a voice
VLAN, you must set the maximum allowed secure addresses on the port to two
plus the maximum number of secure addresses allowed on the access VLAN.
When the port is connected to a Cisco IP Phone, the phone requires up to two
MAC addresses. The phone address is learned on the voice VLAN and might
also be learned on the access VLAN. Connecting a PC to the phone requires
additional MAC addresses.
SUMMARY STEPS
1. configure terminal
2. interface interface-id
3. trust device cisco-phone
4. switchport voice vlan {vlan-id | dot1p | none | untagged}
5. end
6. Use one of the following:
• show interfaces interface-id switchport
• show running-config interface interface-id
7. copy running-config startup-config
DETAILED STEPS
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
64
Configuring Voice VLANs
Configuring Cisco IP Phone Voice Traffic
Step 2 interface interface-id Specifies the interface connected to the phone, and enters
interface configuration mode.
Example:
Step 3 trust device cisco-phone Configures the interface to trust incoming traffic packets
for the Cisco IP phone.
Example:
Device(config-if)# trust device cisco-phone
Step 4 switchport voice vlan {vlan-id | dot1p | none | untagged} Configures the voice VLAN.
Example: • vlan-id—Configures the phone to forward all voice
traffic through the specified VLAN. By default, the
Device(config-if)# switchport voice vlan dot1p Cisco IP Phone forwards the voice traffic with an IEEE
802.1Q priority of 5. Valid VLAN IDs are 1 to 4094.
• dot1p—Configures the device to accept voice and data
IEEE 802.1p priority frames tagged with VLAN ID 0
(the native VLAN). By default, the device drops all
voice and data traffic tagged with VLAN 0. If
configured for 802.1p the Cisco IP Phone forwards
the traffic with an IEEE 802.1p priority of 5.
• none—Allows the phone to use its own configuration
to send untagged voice traffic.
• untagged—Configures the phone to send untagged
voice traffic.
Device(config-if)# end
Step 6 Use one of the following: Verifies your voice VLAN entries or your QoS and voice
VLAN entries.
• show interfaces interface-id switchport
• show running-config interface interface-id
Example:
or
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
65
Configuring Voice VLANs
Configuring the Priority of Incoming Data Frames
Step 7 copy running-config startup-config (Optional) Saves your entries in the configuration file.
Example:
SUMMARY STEPS
1. enable
2. configure terminal
3. interface interface-id
4. switchport priority extend {cos value | trust}
5. end
6. show interfaces interface-id switchport
7. copy running-config startup-config
DETAILED STEPS
Device> enable
Step 3 interface interface-id Specifies the interface connected to the Cisco IP Phone,
and enters interface configuration mode.
Example:
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
66
Configuring Voice VLANs
Monitoring Voice VLAN
Step 4 switchport priority extend {cos value | trust} Sets the priority of data traffic received from the Cisco IP
Phone access port:
Example:
• cos value—Configures the phone to override the
Device(config-if)# switchport priority extend trust priority received from the PC or the attached device
with the specified CoS value. The value is a number
from 0 to 7, with 7 as the highest priority. The default
priority is cos 0.
• trust—Configures the phone access port to trust the
priority received from the PC or the attached device.
Device(config-if)# end
Step 7 copy running-config startup-config (Optional) Saves your entries in the configuration file.
Example:
Where to Go Next
After configuring voice VLANs, you can configure the following:
• VLANs
• VLAN Trunking
• VTP
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
67
Configuring Voice VLANs
Additional References
• Private VLANs
Additional References
Related Documents
Description Link
To help you research and resolve system https://www.cisco.com/cgi-bin/Support/Errordecoder/index.cgi
error messages in this release, use the Error
Message Decoder tool.
Standard/RFC Title
RFC 1573 Evolution of the Interfaces Group of MIB-II
RFC 2021 SNMPv2 Management Information Base for the Transmission Control Protocol using SMIv2
MIBs
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
68
Configuring Voice VLANs
Feature History and Information for Voice VLAN
Technical Assistance
Description Link
The Cisco Support website provides extensive online resources, including http://www.cisco.com/support
documentation and tools for troubleshooting and resolving technical issues
with Cisco products and technologies.
To receive security and technical information about your products, you can
subscribe to various services, such as the Product Alert Tool (accessed from
Field Notices), the Cisco Technical Services Newsletter, and Really Simple
Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website requires a Cisco.com user
ID and password.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
69
Configuring Voice VLANs
Feature History and Information for Voice VLAN
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
70
CHAPTER 5
Configuring Private VLANs
• Finding Feature Information, on page 71
• Prerequisites for Private VLANs, on page 71
• Restrictions for Private VLANs, on page 71
• Information About Private VLANs, on page 72
• How to Configure Private VLANs, on page 81
• Monitoring Private VLANs, on page 90
• Configuration Examples for Private VLANs, on page 91
• Where to Go Next, on page 93
• Additional References, on page 93
Note In some cases, the configuration is accepted with no error messages, but the commands have no effect.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
71
Configuring Private VLANs
Information About Private VLANs
• Do not configure a remote SPAN (RSPAN) VLAN as a primary or a secondary VLAN of a private-VLAN.
• Do not configure private VLAN ports on interfaces configured for these other features:
• Dynamic-access port VLAN membership
• Dynamic Trunking Protocol (DTP)
• IPv6 Security Group (SG)
• Port Aggregation Protocol (PAgP)
• Link Aggregation Control Protocol (LACP)
• Multicast VLAN Registration (MVR)
• Voice VLAN
• Web Cache Communication Protocol (WCCP)
• You can configure IEEE 802.1x port-based authentication on a private-VLAN port, but do not configure
802.1x with port security, voice VLAN, or per-user ACL on private-VLAN ports.
• A private-VLAN host or promiscuous port cannot be a SPAN destination port. If you configure a SPAN
destination port as a private-VLAN port, the port becomes inactive.
• If you configure a static MAC address on a promiscuous port in the primary VLAN, you need not add
the same static address to all associated secondary VLANs. Similarly, if you configure a static MAC
address on a host port in a secondary VLAN, you need not add the same static MAC address to the
associated primary VLAN. Also, when you delete a static MAC address from a private-VLAN port, you
do not have to remove all instances of the configured MAC address from the private VLAN.
Note Dynamic MAC addresses learned in the secondary VLAN of a private VLAN
are replicated to the primary VLANs. All MAC entries are learnt on secondary
VLANs, even if the traffic ingresses from primary VLAN. If a MAC address is
dynamically learnt in the primary VLAN, it is not replicated in the associated
secondary VLANs.
• Configure Layer 3 VLAN interfaces (switch value interfaces) only for primary VLANs.
• Private VLAN configured with MACsec or Virtual Private LAN Services (VPLS) or Cisco
Software-Defined Access solution on the same VLAN does not work.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
72
Configuring Private VLANs
Secondary VLANs
• When running the Network Essentials or Network Advantage, the device supports up to 4094 active
VLANs. If a service provider assigns one VLAN per customer, this limits the numbers of customers the
service provider can support.
• To enable IP routing, each VLAN is assigned a subnet address space or a block of addresses, which can
result in wasting the unused IP addresses, and cause IP address management problems.
Using private VLANs addresses the scalability problem and provides IP address management benefits for
service providers and Layer 2 security for customers. Private VLANs partition a regular VLAN domain into
subdomains. A subdomain is represented by a pair of VLANs: a primary VLAN and a secondary VLAN. A
private VLAN can have multiple VLAN pairs, one pair for each subdomain. All VLAN pairs in a private
VLAN share the same primary VLAN. The secondary VLAN ID differentiates one subdomain from another.
Secondary VLANs
There are two types of secondary VLANs:
• Isolated VLANs—Ports within an isolated VLAN cannot communicate with each other at the Layer 2
level.
• Community VLANs—Ports within a community VLAN can communicate with each other but cannot
communicate with ports in other communities at the Layer 2 level.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
73
Configuring Private VLANs
Private VLANs in Networks
• Isolated—An isolated port is a host port that belongs to an isolated secondary VLAN. It has complete
Layer 2 separation from other ports within the same private VLAN, except for the promiscuous ports.
Private VLANs block all traffic to isolated ports except traffic from promiscuous ports. Traffic received
from an isolated port is forwarded only to promiscuous ports.
• Community—A community port is a host port that belongs to a community secondary VLAN. Community
ports communicate with other ports in the same community VLAN and with promiscuous ports. These
interfaces are isolated at Layer 2 from all other interfaces in other communities and from isolated ports
within their private VLAN.
Note Trunk ports carry traffic from regular VLANs and also from primary, isolated, and community VLANs.
A promiscuous port can serve only one primary VLAN, one isolated VLAN, and multiple community VLANs.
Layer 3 gateways are typically connected to the device through a promiscuous port. With a promiscuous port,
you can connect a wide range of devices as access points to a private VLAN. For example, you can use a
promiscuous port to monitor or back up all the private VLAN servers from an administration workstation.
You can extend private VLANs across multiple devices by trunking the primary, isolated, and community
VLANs to other devices that support private VLANs. To maintain the security of your private VLAN
configuration and to avoid other use of the VLANs configured as private VLANs, configure private VLANs
on all intermediate devices, including devices that have no private VLAN ports.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
74
Configuring Private VLANs
IP Addressing Scheme with Private VLANs
These problems are reduced by using private VLANs, where all members in the private VLAN share a common
address space, which is allocated to the primary VLAN. Hosts are connected to secondary VLANs, and the
DHCP server assigns them IP addresses from the block of addresses allocated to the primary VLAN. Subsequent
IP addresses can be assigned to customer devices in different secondary VLANs, but in the same primary
VLAN. When new devices are added, the DHCP server assigns them the next available address from a large
pool of subnet addresses.
As with regular VLANs, private VLANs can span multiple devices. A trunk port carries the primary VLAN
and secondary VLANs to a neighboring device. The trunk port treats the private VLAN as any other VLAN.
A feature of private VLANs across multiple devices is that traffic from an isolated port in Device A does not
reach an isolated port on Device B.
Private VLANs are supported in transparent mode for VTP 1, 2 and 3. Private vlan is also supported on server
mode for VTP 3. If we have a server client setup using VTP 3, private vlans configured on the server should
be reflected on the client.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
75
Configuring Private VLANs
Private-VLAN Interaction with Other Features
Multicast traffic is routed or bridged across private VLAN boundaries and within a single community VLAN.
Multicast traffic is not forwarded between ports in the same isolated VLAN or between ports in different
secondary VLANs.
Private VLAN multicast forwarding supports the following:
• Sender can be outside the VLAN and the Receivers can be inside the VLAN domain.
• Sender can be inside the VLAN and the Receivers can be outside the VLAN domain.
• Sender and Receiver can both be in the same community vlan.
When the primary VLAN is associated with and mapped to the secondary VLAN, any configuration on the
primary VLAN is propagated to the secondary VLAN SVIs. For example, if you assign an IP subnet to the
primary VLAN SVI, this subnet is the IP subnet address of the entire private VLAN.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
76
Configuring Private VLANs
Private VLANs and Device Stacks
• In this device, the user does not need to replicate the mac address to the associated VLAN. For the above
example, user has to configure only
mac-address static A vlan 101 interface G1/0/1
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
77
Configuring Private VLANs
Private VLANs and HA Support
After layer-2 forward lookup, proper egress VLAN mapping happens and all the egress VLAN based feature
processing happens in the egress VLAN context.
When a frame in Layer-2 is forwarded within a private VLAN, the VLAN map is applied at the ingress side
and at the egress side. When a frame is routed from inside a private VLAN to an external port, the private-VLAN
map is applied at the ingress side. Similarly, when the frame is routed from an external port to a Private VLAN,
the private-VLAN is applied at the egress side. This is applicable to both bridged and routed traffic.
Bridging:
• For upstream traffic from secondary VLAN to primary VLAN, the MAP of the secondary VLAN is
applied on the ingress side and the MAP of the primary VLAN is applied on the egress side.
• For downstream traffic from primary VLAN to secondary VLAN, the MAP of the primary VLAN is
applied in the ingress direction and the MAP of the secondary VLAN is applied in the egress direction.
Routing
If we have two private VLAN domains - PV1 (sec1, prim1) and PV2 (sec2, prim2). For frames routed from
PV1 to PV2:
• The MAP of sec1 and L3 ACL of prim1 is applied in the ingress port.
• The MAP of sec2 and L3 ACL of prim2 is applied in the egress port.
For packets going upstream or downstream from isolated host port to promiscuous port, the isolated VLAN’s
VACL is applied in the ingress direction and primary VLAN’s VACL is applied in the egress direction. This
allows user to configure different VACL for different secondary VLAN in a same primary VLAN domain.
Note 2-way community VLAN is now not required as the private VLANS on this device are always bi-directional.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
78
Configuring Private VLANs
Secondary and Primary VLAN Configuration
• With VTP version 1 or 2, after you have configured private VLANs, use the copy running-config startup
config privileged EXEC command to save the VTP transparent mode configuration and private-VLAN
configuration in the device startup configuration file. Otherwise, if the device resets, it defaults to VTP
server mode, which does not support private VLANs. VTP version 3 does support private VLANs.
• VTP version 1 and 2 do not propagate private-VLAN configuration. You must configure private VLANs
on each device where you want private-VLAN ports unless the devices are running VTP version 3, as
VTP3 propagate private vlans.
• You cannot configure VLAN 1 or VLANs 1002 to 1005 as primary or secondary VLANs. Extended
VLANs (VLAN IDs 1006 to 4094) can belong to private VLANs.
• A primary VLAN can have one isolated VLAN and multiple community VLANs associated with it. An
isolated or community VLAN can have only one primary VLAN associated with it.
• Although a private VLAN contains more than one VLAN, only one Spanning Tree Protocol (STP)
instance runs for the entire private VLAN. When a secondary VLAN is associated with the primary
VLAN, the STP parameters of the primary VLAN are propagated to the secondary VLAN.
• When copying a PVLAN configuration from a tftp server and applying it on a running-config, the PVLAN
association will not be formed. You will need to check and ensure that the primary VLAN is associated
to all the secondary VLANs.
You can also use configure replace flash:config_file force instead of copy flash:config_file
running-config.
• You can enable DHCP snooping on private VLANs. When you enable DHCP snooping on the primary
VLAN, it is propagated to the secondary VLANs. If you configure DHCP on a secondary VLAN, the
configuration does not take effect if the primary VLAN is already configured.
• When you enable IP source guard on private-VLAN ports, you must enable DHCP snooping on the
primary VLAN.
• We recommend that you prune the private VLANs from the trunks on devices that carry no traffic in the
private VLANs.
• You can apply different quality of service (QoS) configurations to primary, isolated, and community
VLANs.
• Note the following considerations for sticky ARP:
• Sticky ARP entries are those learned on SVIs and Layer 3 interfaces. These entries do not age out.
• The ip sticky-arp global configuration command is supported only on SVIs belonging to private
VLANs.
• The ip sticky-arp interface configuration command is only supported on:
• Layer 3 interfaces
• SVIs belonging to normal VLANs
• SVIs belonging to private VLANs
For more information about using the ip sticky-arp global configuration and the ip sticky-arp
interface configuration commands, see the command reference for this release.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
79
Configuring Private VLANs
Private VLAN Port Configuration
• You can configure VLAN maps on primary and secondary VLANs. However, we recommend that you
configure the same VLAN maps on private-VLAN primary and secondary VLANs.
• PVLANs are bidirectional. They can be applied at both the ingress and egress sides.
When a frame inLayer-2 is forwarded within a private VLAN, the VLAN map is applied at the ingress
side and at the egress side. When a frame is routed from inside a private VLAN to an external port, the
private-VLAN map is applied at the ingress side. Similarly, when the frame is routed from an external
port to a Private VLAN, the private-VLAN is applied at the egress side.
Bridging
• For upstream traffic from secondary VLAN to primary VLAN, the MAP of the secondary VLAN
is applied on the ingress side and the MAP of the primary VLAN is applied on the egress side.
• For downstream traffic from primary VLAN to secondary VLAN, the MAP of the primary VLAN
is applied in the ingress direction and the MAP of the secondary VLAN is applied in the egress
direction.
Routing
If we have two private VLAN domains - PV1 (sec1, prim1) and PV2 (sec2, prim2). For frames routed
from PV1 to PV2:
• The MAP of sec1 and L3 ACL of prim1 is applied in the ingress port .
• The MAP of sec1 and L3 ACL of prim2 is applied in the egress port.
• For packets going upstream or downstream from isolated host port to promiscuous port, the isolated
VLAN’s VACL is applied in the ingress direction and primary VLAN’S VACL is applied in the
egress direction. This allows user to configure different VACL for different secondary VLAN in a
same primary VLAN domain.
To filter out specific IP traffic for a private VLAN, you should apply the VLAN map to both the primary
and secondary VLANs.
• You can apply router ACLs only on the primary-VLAN SVIs. The ACL is applied to both primary and
secondary VLAN Layer 3 traffic.
• Although private VLANs provide host isolation at Layer 2, hosts can communicate with each other at
Layer 3.
• Private VLANs support these Switched Port Analyzer (SPAN) features:
• You can configure a private-VLAN port as a SPAN source port.
• You can use VLAN-based SPAN (VSPAN) on primary, isolated, and community VLANs or use
SPAN on only one VLAN to separately monitor egress or ingress traffic.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
80
Configuring Private VLANs
How to Configure Private VLANs
• Do not configure ports that belong to a PAgP or LACP EtherChannel as private VLAN ports. While a
port is part of the private VLAN configuration, any EtherChannel configuration for it is inactive.
• Enable Port Fast and BPDU guard on isolated and community host ports to prevent STP loops due to
misconfigurations and to speed up STP convergence. When enabled, STP applies the BPDU guard feature
to all Port Fast-configured Layer 2 LAN ports. Do not enable Port Fast and BPDU guard on promiscuous
ports.
• If you delete a VLAN used in the private VLAN configuration, the private VLAN ports associated with
the VLAN become inactive.
• Private VLAN ports can be on different network devices if the devices are trunk-connected and the
primary and secondary VLANs have not been removed from the trunk.
Note Private vlans are supported in transparent mode for VTP 1, 2 and 3. Private VLANS are also supported on
server mode with VTP 3.
SUMMARY STEPS
1. Set VTP mode to transparent.
2. Create the primary and secondary VLANs and associate them.
3. Configure interfaces to be isolated or community host ports, and assign VLAN membership to the host
port.
4. Configure interfaces as promiscuous ports, and map the promiscuous ports to the primary-secondary
VLAN pair.
5. If inter-VLAN routing will be used, configure the primary SVI, and map secondary VLANs to the primary.
6. Verify private-VLAN configuration.
DETAILED STEPS
Step 2 Create the primary and secondary VLANs and associate them.
See the Configuring and Associating VLANs in a Private VLAN, on page 82
Note If the VLAN is not created already, the private-VLAN configuration process creates it.
Step 3 Configure interfaces to be isolated or community host ports, and assign VLAN membership to the host port.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
81
Configuring Private VLANs
Configuring and Associating VLANs in a Private VLAN
See the Configuring a Layer 2 Interface as a Private VLAN Host Port, on page 85
Step 4 Configure interfaces as promiscuous ports, and map the promiscuous ports to the primary-secondary VLAN pair.
See the Configuring a Layer 2 Interface as a Private VLAN Promiscuous Port, on page 87
Step 5 If inter-VLAN routing will be used, configure the primary SVI, and map secondary VLANs to the primary.
See the Mapping Secondary VLANs to a Primary VLAN Layer 3 VLAN Interface, on page 89
SUMMARY STEPS
1. enable
2. configure terminal
3. vtp mode transparent
4. vlan vlan-id
5. private-vlan primary
6. exit
7. vlan vlan-id
8. private-vlan isolated
9. exit
10. vlan vlan-id
11. private-vlan community
12. exit
13. vlan vlan-id
14. private-vlan community
15. exit
16. vlan vlan-id
17. private-vlan association [add | remove] secondary_vlan_list
18. end
19. show vlan private-vlan [type] or show interfaces status
20. copy running-config startup config
DETAILED STEPS
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
82
Configuring Private VLANs
Configuring and Associating VLANs in a Private VLAN
Device> enable
Step 3 vtp mode transparent Sets VTP mode to transparent (disable VTP).
Example: Note For VTP3, you can set mode to either server or
transparent mode
Device(config)# vtp mode transparent
Step 4 vlan vlan-id Enters VLAN configuration mode and designates or creates
a VLAN that will be the primary VLAN. The VLAN ID
Example:
range is 2 to 1001 and 1006 to 4094.
Device(config)# vlan 20
Device(config-vlan)# exit
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
83
Configuring Private VLANs
Configuring and Associating VLANs in a Private VLAN
Device(config-vlan)# exit
Device(config-vlan)# exit
Device(config-vlan)# exit
Step 16 vlan vlan-id Enters VLAN configuration mode for the primary VLAN
designated in Step 4.
Example:
Device(config)# vlan 20
Step 17 private-vlan association [add | remove] Associates the secondary VLANs with the primary VLAN.
secondary_vlan_list It can be a single private-VLAN ID or a hyphenated range
of private-VLAN IDs.
Example:
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
84
Configuring Private VLANs
Configuring a Layer 2 Interface as a Private VLAN Host Port
Device(config)# end
Step 19 show vlan private-vlan [type] or show interfaces status Verifies the configuration.
Example:
Step 20 copy running-config startup config Saves your entries in the device startup configuration file.
Example:
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
85
Configuring Private VLANs
Configuring a Layer 2 Interface as a Private VLAN Host Port
SUMMARY STEPS
1. enable
2. configure terminal
3. interface interface-id
4. switchport mode private-vlan host
5. switchport private-vlan host-association primary_vlan_id secondary_vlan_id
6. end
7. show interfaces [interface-id] switchport
8. copy running-config startup-config
DETAILED STEPS
Device> enable
Step 3 interface interface-id Enters interface configuration mode for the Layer 2 interface
to be configured.
Example:
Step 4 switchport mode private-vlan host Configures the Layer 2 port as a private-VLAN host port.
Example:
Step 5 switchport private-vlan host-association primary_vlan_id Associates the Layer 2 port with a private VLAN.
secondary_vlan_id
Note This is a required step to associate the PVLAN
Example: to a Layer 2 interface.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
86
Configuring Private VLANs
Configuring a Layer 2 Interface as a Private VLAN Promiscuous Port
Device(config)# end
Step 8 copy running-config startup-config (Optional) Saves your entries in the configuration file.
Example:
SUMMARY STEPS
1. enable
2. configure terminal
3. interface interface-id
4. switchport mode private-vlan promiscuous
5. switchport private-vlan mapping primary_vlan_id {add | remove} secondary_vlan_list
6. end
7. show interfaces [interface-id] switchport
8. copy running-config startup config
DETAILED STEPS
Device> enable
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
87
Configuring Private VLANs
Configuring a Layer 2 Interface as a Private VLAN Promiscuous Port
Step 3 interface interface-id Enters interface configuration mode for the Layer 2 interface
to be configured.
Example:
Step 4 switchport mode private-vlan promiscuous Configures the Layer 2 port as a private VLAN promiscuous
port.
Example:
Step 5 switchport private-vlan mapping primary_vlan_id {add Maps the private VLAN promiscuous port to a primary
| remove} secondary_vlan_list VLAN and to selected secondary VLANs.
Example: • The secondary_vlan_list parameter cannot contain
spaces. It can contain multiple comma-separated items.
Device(config-if)# switchport private-vlan mapping Each item can be a single private VLAN ID or a
20 add 501-503 hyphenated range of private VLAN IDs.
• Enter a secondary_vlan_list, or use the add keyword
with a secondary_vlan_list to map the secondary
VLANs to the private VLAN promiscuous port.
• Use the remove keyword with a secondary_vlan_list
to clear the mapping between secondary VLANs and
the private VLAN promiscuous port.
Device(config)# end
Step 8 copy running-config startup config Saves your entries in the device startup configuration file.
Example:
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
88
Configuring Private VLANs
Mapping Secondary VLANs to a Primary VLAN Layer 3 VLAN Interface
Follow these steps to map secondary VLANs to the SVI of a primary VLAN to allow Layer 3 switching of
private VLAN traffic:
SUMMARY STEPS
1. enable
2. configure terminal
3. interface vlan primary_vlan_id
4. private-vlan mapping [add | remove] secondary_vlan_list
5. end
6. show interface private-vlan mapping
7. copy running-config startup config
DETAILED STEPS
Device> enable
Step 3 interface vlan primary_vlan_id Enters interface configuration mode for the primary VLAN,
and configures the VLAN as an SVI. The VLAN ID range
Example:
is 2 to 1001 and 1006 to 4094.
Device(config)# interface vlan 20
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
89
Configuring Private VLANs
Monitoring Private VLANs
Device(config)# end
Step 7 copy running-config startup config Saves your entries in the device startup configuration file.
Example:
Command Purpose
show interfaces status Displays the status of interfaces, including the VLANs
to which they belongs.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
90
Configuring Private VLANs
Configuration Examples for Private VLANs
Command Purpose
show vlan private-vlan [type] Displays the private VLAN information for the
Device.
show interface private-vlan mapping Displays information about the private VLAN
mapping for VLAN SVIs.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
91
Configuring Private VLANs
Example: Configuring an Interface as a Private VLAN Promiscuous Port
<output truncated>
Use the show vlan private-vlan or the show interface status privileged EXEC command to display primary
and secondary VLANs and private-VLAN ports on the Device.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
92
Configuring Private VLANs
Example: Monitoring Private VLANs
Where to Go Next
You can configure the following:
• VTP
• VLANs
• VLAN trunking
• Voice VLANs
Additional References
Related Documents
Standard/RFC Title
RFC 1573 Evolution of the Interfaces Group
of MIB-II
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
93
Configuring Private VLANs
Additional References
MIBs
• CISCO-CDP-MIB
• CISCO-PAGP-MIB
• CISCO-PRIVATE-VLAN-MIB
• CISCO-LAG-MIB
• CISCO-L2L3-INTERFACE-CONFIG-MIB
• CISCO-MAC-NOTIFICATION-MIB
• CISCO-STP-EXTENSIONS-MIB
• CISCO-VLAN-IFTABLE-RELATIONSHIP-MIB
• CISCO-VLAN-MEMBERSHIP-MIB
• CISCO-VTP-MIB
• IEEE8023-LAG-MIB
• IF-MIB (RFC 1573)
• RMON-MIB (RFC 1757)
• RMON2-MIB (RFC 2021)
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
94
CHAPTER 6
Configuring Layer 3 Subinterfaces
This module describes how to configure the dot1q VLAN subinterfaces on a Layer 3 interface, which forwards
IPv4 and IPv6 packets to another device using static or dynamic routing protocols. You can use Layer 3
interfaces for IP routing and inter-VLAN routing of Layer 2 traffic.
• Restrictions for Configuring Layer 3 Subinterfaces, on page 95
• Information About Layer 3 Subinterfaces, on page 96
• How to Configure Layer 3 Subinterfaces, on page 97
• Example: Configuring Layer 3 Subinterfaces, on page 97
• Additional References, on page 98
• Feature Information for Layer 3 Subinterfaces, on page 98
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
95
Configuring Layer 3 Subinterfaces
Information About Layer 3 Subinterfaces
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
96
Configuring Layer 3 Subinterfaces
How to Configure Layer 3 Subinterfaces
• Services—Network Address Translation (NAT) IPv4, Security Group Access Control List (SGACL)
enforcement, DHCP Server/Relay, SGT Exchange Protocol (SXP), and NetFlow.
SUMMARY STEPS
1. enable
2. configure terminal
3. interface {type switch / slot / port.subinterface}
4. encapsulation dot1q vlan-id [native]
5. end
DETAILED STEPS
Step 3 interface {type switch / slot / port.subinterface} Selects an interface and enters subinterface configuration
mode. (To remove an interface, use the no form of this
Example:
command.)
Device(config)# interface HundredGigabitEthernet
1/0/33.201
Step 4 encapsulation dot1q vlan-id [native] Configures 802.1Q encapsulation for the subinterface. The
range is from 1 to 4000. (To remove 802.1Q encapsulation
Example:
for the subinterface, use the no form of this command.)
Device(config-subif)# encapsulation dot1q 33 native
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
97
Configuring Layer 3 Subinterfaces
Additional References
Device> enable
Device# configure terminal
Device(config)# interface HundredGigabitEthernet 1/0/33.201
Device(config-subif)# encapsulation dot1q 33 native
Device(config-subif)# end
Additional References
Related Documents
Technical Assistance
Description Link
The Cisco Support website provides extensive online resources, including http://www.cisco.com/support
documentation and tools for troubleshooting and resolving technical issues
with Cisco products and technologies.
To receive security and technical information about your products, you can
subscribe to various services, such as the Product Alert Tool (accessed from
Field Notices), the Cisco Technical Services Newsletter, and Really Simple
Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website requires a Cisco.com user
ID and password.
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
98
Configuring Layer 3 Subinterfaces
Feature Information for Layer 3 Subinterfaces
Layer 3 Subinterfaces Cisco IOS XE Gibraltar Layer 3 interfaces forward IPv4 and IPv6 packets
16.10.1 to another device using static or dynamic routing
protocols. You can use Layer 3 interfaces for IP
routing and inter-VLAN routing of Layer 2 traffic.
This feature was introduced on Cisco Catalyst 9500
Series High Performance Switches.
Layer 3 Subinterfaces Cisco IOS XE Gibraltar This feature was introduced on Cisco Catalyst 9500
16.12.1 Series Switches.
EtherChannel and Cisco IOS XE Gibraltar These features were introduced on Layer 3
Multiprotocol Label 16.12.1 subinterfaces.
Switching
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
99
Configuring Layer 3 Subinterfaces
Feature Information for Layer 3 Subinterfaces
VLAN Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9500 Switches)
100