Jeremy’s IT Lab lecture video:

Day 19 - DTP & VTP


Commands


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:
    1. switchport mode trunk
    2. switchport mode dynamic desirable
    3. 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:
    1. switchport mode trunk
    2. 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 ModeTrunkDynamic DesirableAccessDynamic Auto
TrunkTrunkTrunkN/ATrunk
Dynamic DesirableTrunkTrunkAccessTrunk
AccessN/AAccessAccessAccess
Dynamic AutoTrunkTrunkAccessAccess

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).

DTP negotiation can be disabled through:

  1. The switchport nonegotiate command
  2. 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:
    1. 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.
    2. 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.
    3. 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.

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:

  1. Changing the VTP domain to an unused domain.
  2. 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.