# DTP (Dynamic Trunking Protocol)

There are 2 ways to configure a Trunk Port. 1. Statically using (#switchport mode trunk) & another is dynamically using DTP (Dynamic Trunking Protocol).

* DTP auto negotiates between the two trunk ports to form a trunk port. There are 2 modes in DTP. DTP mode auto & DTP mode desirable.&#x20;
* In DTP Desirable mode Switch asks first to the other end to form a trunk or else it becomes an Access port.&#x20;
* In DTP Auto mode it waits until the other end Switch asks first or else it becomes an Access port. &#x20;

  **Trunk configuration:**
* **Select the type of Trunking (802.1Q/ISL/Negotiate (using DTP)):**
  * Command is (# switchport trunk encapsulation ([dot1q ](https://app.gitbook.com/@mudassirs46/s/network-fundamentals/~/drafts/-MRZ8l67L5MHnaQIEh9W/trunking-protocol-802.1q)/isl/negotiate)
* **Select the Administrative Mode:**
  * **Always use Trunk (Statically)**
    * Command is (# switchport mode trunk)
  * **Always not use Trunk**
    * Command is (# switchport mode access)
  * **Negotiate (Dynamically using DTP)**
    * Command is (# switchport mode desirable)

      (asks (negotiates with) the other end to trunk & if negotiation success then it forms a Trunk or else it becomes an access port)
    * Command is (# switchport mode auto)

      (wait until the other end asks (negotiates) to be a trunk or else it becomes an access port)
* To check Trunk port settings (#show interfaces gigabitEthernet 0/1 switchport)

#### The individual combinations of port settings lead to following results:

* dynamic auto + dynamic auto = access
* dynamic auto + dynamic desirable = trunk
* dynamic desirable + dynamic desirable = trunk
* dynamic auto or dynamic desirable + trunk = trunk
* dynamic auto or dynamic desirable + access = access

## Reference:

* CCNA 200-301 OCG, Volume 1, Pg. 180-183 - Wendell Odom.&#x20;
* <https://community.cisco.com/t5/switching/why-dtp-is-used/td-p/1377495>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mudassirs46.gitbook.io/network-fundamentals/dtp-dynamic-trunking-protocol.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
