# DTP

DTP is a Cisco proprietary protocol that allows Cisco switches to dynamically determine their interface status (_**access**_ or _**trunk**_) without manual configuration.

DTP is enabled by default on all Cisco switch interfaces.

For security purposes, manual configuration is recommended. DTP should be disabled on all switchports.

## Modes

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
```

<figure><img src="https://1474932522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAgItg4KAZpnXjAFPWRf8%2Fuploads%2Fz9tlSZqLDlnWkf8MorDc%2F2022-10-02_22-57.png?alt=media&#x26;token=4d043a94-5cb6-43f2-a674-2fb99a48400b" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1474932522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAgItg4KAZpnXjAFPWRf8%2Fuploads%2FmfjGRt33vjWRDgek9wrB%2F2022-10-02_22-57.png?alt=media&#x26;token=60c1ea6c-b62f-4d15-b38d-2d093e3d6293" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1474932522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAgItg4KAZpnXjAFPWRf8%2Fuploads%2Fbp2qV2pI3mSse1nHGuG2%2F2022-10-02_22-57.png?alt=media&#x26;token=d391da76-a8c2-4af8-a0db-02f972547bd6" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1474932522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAgItg4KAZpnXjAFPWRf8%2Fuploads%2FHR1Y0BskjJzWHT8GZjvO%2F2022-10-02_22-57.png?alt=media&#x26;token=4b73e4ce-fc43-4511-a638-2c800a141d4f" alt=""><figcaption></figcaption></figure>

_**switch access** means an access port that belongs to a single VLAN that doesn't change (unless you configure a different VLAN)._

_There are also **dynamic access** ports, in which a server automatically assigns the VLAN depending on the MAC address of the connected device._

A switchport in _**dynamic auto**_ mode will **not** 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 with a switchport in the following modes:

```
switchport mode trunk
switchport mode dynamic desirable 
```

<figure><img src="https://1474932522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAgItg4KAZpnXjAFPWRf8%2Fuploads%2FRuDLswHzy5K8mqaeNopU%2F2022-10-02_22-57.png?alt=media&#x26;token=2750a8da-1b28-47b0-b6e6-fbf5ca60ce20" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1474932522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAgItg4KAZpnXjAFPWRf8%2Fuploads%2F7pOyHDlZcVqfICkAxtEf%2F2022-10-02_22-57.png?alt=media&#x26;token=af73ef24-ea20-4941-acd5-3aed0bd999cb" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1474932522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAgItg4KAZpnXjAFPWRf8%2Fuploads%2FOiiYFWacbxjBdf1pTwpL%2Fdtp%2Bmatrix.webp?alt=media&#x26;token=0100262f-0090-4db5-9b21-f466533abaa7" alt=""><figcaption></figcaption></figure>

DTP will not form a trunk with a router, PC, etc. The switchport will be in access mode.

## Disabling DTP

On older switches _**switchport mode dynamic desirable**_ is the default administrative mode.

On newer switches, _**switchport mode dynamic auto**_ is the default administrative mode.

You can disable DTP negotiation on an interface with this command: _**switchport nonegotiate**_

Configuring an access port with _**switchport mode access**_ also disables DTP negotiation on an interface.

It is recommended that you disable DTP on all switchport and manually configure them as access or trunk ports.

## Trunk Encapsulation Negotiation

Switches that support both **802.1Q** and **ISL** trunk encapsulations can use DTP to negotiate the encapsulation 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 will be selected.

DTP frames are sent in VLAN1 when using **ISL**, or in the native VLAN when using **802.1Q** (the default VLAN is VLAN1, however).

<figure><img src="https://1474932522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAgItg4KAZpnXjAFPWRf8%2Fuploads%2FKZ6wOscdpyp4CbKFAlvb%2Funknown.png?alt=media&#x26;token=265cfa6a-8ba8-43f7-bde3-5f41f5c447d1" alt=""><figcaption></figcaption></figure>
