VLAN Trunking Protocol
In Figure
4-4, two VLANs extend over multiple switches using trunking. Because each
switch sharing trunks must support common VLAN information for the trunks to
function correctly, Cisco created the VLAN Trunking Protocol (VTP) for creating
and managing that VLAN information. It should be noted that any VLAN created on
a switch is in an inactive state until VTP is configured.
A collection of switches that are under the same administrative
control and will support the same range of configured VLANs are said to be in
the same VTP domain. A domain name is simply a unique identifier up
to 32 characters long used to identify the switches that will share the same VTP
information. The domain name is also case sensitive.
VTP packets are sent to destination address 01-00-0C-CC-CC-CC
with a SNAP type of 0x2003. Each switch can operate in one of three modes:
-
Server (default)
-
Client
-
Transparent
In server mode, the switch has a list of all the VLANs for that
domain. It can add, delete, or rename any VLAN, and the configuration
information is stored in nonvolatile random-access memory (NVRAM). In client
mode, the switch obtains its information for the VLAN database from a VTP
server, and it cannot make any modifications to it. The information learned by
the client switch is not stored in NVRAM. If the client switch is rebooted, the
switch must dynamically learn all the VLAN information again from a VTP server.
In transparent mode, a switch does not participate in VTP; it merely passes the
VTP advertisements to other switches. In transparent mode, the switch can be
configured to add, delete, and modify, and the information is stored in NVRAM.
Certain requirements must be met before VTP can be used to
manage a domain and distribute VLAN information. Each switch must have a
configured trunk port, use the same domain name, and be directly connected. As
noted earlier, the trunk port is used to send the VTP information to the
adjacent switch. VTP can automatically distribute VLAN information to all other
switches in the same domain through a trunk port, or allow manually for each
switch to be configured. The dynamic process using server/client mode is
administratively palatable because it is easy to implement; a server switch is
configured with VLANs, and the rest of the switches in that domain receive that
information. On the other hand, server/client mode can pose potential risks on
the network, which will be discussed in this section shortly. Transparent mode
requires manually configuring each switch.
VTP has four types of messages:
-
Summary advertisements (0x01)
-
Subset advertisement (0x02)
-
Advertisement requests (0x03)
-
Join (0x04)
The two types of VTP versions, version 1 and version 2, have
some major differences. Version 2 has support for Token Ring. In version 2,
switches running in transparent mode forward VTP advertisements they receive
regardless of VTP version or domain name; switches configured for VTP version 1
ignore VTP advertisements with a different VTP domain name than the one
configured. Cisco switches default to version 1.