Jeremy’s IT Lab lecture video:
Commands
Commands List
DTP Commands
Link to original
- switchport mode type { access
/
trunk/
dynamic auto/
dynamic desirable }-->
Configures the switchport type for VLANsLink to original
- switchport nonegotiate
-->
Disables Dynamic Trunking Protocol (DTP) requests between switches (setting the switch to access mode does the same thing)VTP Commands
VTP
Link to original
- vtp mode type {server
/
client/
transparent}- vtp domain domain-name
- vtp version version-number (1
/
2/
3)
DTP and VTP are not on the CCNA exam topics anymore, but basic questions about them could be present on the exam.
DTP & VTP Info
Dynamic Trunking Protocol (DTP)
DTP is a Cisco proprietary protocol that allows Cisco switches to dynamically change their interface mode (access or trunk) without manual configuration.
- DTP is enabled by default on all Cisco switch interfaces.
- For security, it’s recommended to disable DTP and to manually configure switches.
Dynamic Trunking Protocol Modes
1. Dynamic Desirable
- A switchport in dynamic desirable mode will actively try to form a trunk with other Cisco switches.
- It will form a trunk if connected to another switchport in the following modes:
switchport mode trunk
switchport mode dynamic desirable
switchport mode dynamic auto
- Otherwise, it’ll be a static access port.
2. Dynamic Auto
- A switchport in dynamic auto mode won’t actively try to form a trunk with other Cisco switches, however, it will form a trunk if the switch connected to it is actively trying to form a trunk.
- It will form a trunk if connected to a switchport in the following modes:
switchport mode trunk
switchport mode dynamic desirable
- Otherwise, it’ll be a static access port.
What are static access ports?
Static access port means an access port that belongs to a single VLAN that doesn’t change (unless you configure a different VLAN).
DTP when connected to hosts
DTP will not form a trunk with end hosts (PCs, routers, and etc.), the switchport will be in access mode.
Administrative Mode | Trunk | Dynamic Desirable | Access | Dynamic Auto |
---|---|---|---|---|
Trunk | Trunk | Trunk | N/A | Trunk |
Dynamic Desirable | Trunk | Trunk | Access | Trunk |
Access | N/A | Access | Access | Access |
Dynamic Auto | Trunk | Trunk | Access | Access |
DTP - Default Settings
On older switches, switchport mode dynamic desirable is the default administrative mode.
On newer switches, switchport mode dynamic auto is the default administrative mode.
- Switches that support 802.1Q and ISL trunk encapsulations can also use DTP to negotiate the encapsulation method they will use.
- This negotiation is enabled by default, as the default trunk encapsulation mode is:
switchport trunk encapsulation negotiate
- ISL is favored over 802.1Q, so if both switches support ISL it’ll be automatically selected.
- DTP frames are sent in the VLAN1 when using ISL, and they’re sent in the native VLAN when using 802.1Q (the default native VLAN is VLAN1 on switches).
- This negotiation is enabled by default, as the default trunk encapsulation mode is:
DTP negotiation can be disabled through:
- The
switchport nonegotiate
command- Configuring an access port with switchport mode access
VLAN Trunking Protocol (VTP)
VLAN Trunking Protocol (VTP) is a protocol that allows you to configure VLANs on a central VTP server switch, and other switches (VTP clients) will synchronize their VLAN database to the server.
- For security, it’s recommended to disable VTP and to manually configure switches.
- Switches operate in VTP server mode by default.
- There are three VTP versions: 1, 2, 3.
- There are three VTP modes:
- Server
- Can add/modify/delete VLANs.
- Stores the VLAN database in non-volatile RAM (NVRAM).
- Will increase the revision number every time a VLAN is added/modified/deleted.
- Will advertise the latest version of the VLAN database on trunk interfaces, and the VTP clients will sync their VLAN database to it.
- VTP servers also function as VTP clients, where a VTP server will sync to another VTP server with a higher revision number.
- Client
- Cannot add/modify/delete VLANs.
- Does not store the VLAN database in NVRAM. (In VTP3, it does).
- Will sync their VLAN database to the server with the highest revision number in their VTP domain.
- Will advertise their VLAN database, and forward VTP advertisements over their trunk ports.
- Transparent
- Does not participate in the VTP domain.
- Can add/modify/delete VLANs, but they won’t be advertised.
- Stores the VLAN database in non-volatile RAM (NVRAM).
- Will forward VTP advertisements in the same domain as it.
- Server
Higher revision number
If a switch receives a VTP advertisement in the same VTP domain with a higher revision number, it will update its VLAN database to match.
Resetting the VTP Revision Number
Resetting the revision number to zero can be done in two ways:
- Changing the VTP domain to an unused domain.
- Changing the VTP mode to transparent.
VTP domain null & Automatic VTP domain joining
If a switch with no VTP domain (domain null) receives a VTP advertisement with a VTP domain name, it’ll automatically join that VTP domain.