Читать книгу CCNP Enterprise Certification Study Guide: Implementing and Operating Cisco Enterprise Network Core Technologies - Ben Piper, David Higby Clinton - Страница 58
Dynamic Trunking
ОглавлениеConnected switches can form a trunk between themselves automatically using the Dynamic Trunking Protocol (DTP). DTP can operate in one of two modes:
Desirable—DTP actively attempts to negotiate a trunk with the switch on the other end. An easy way to remember this is that the switch desires to form a trunk.
Auto—DTP will not attempt to form a trunk but will respond to the other switch's request to form a trunk. This is the default mode.
You can configure the DTP mode using the switchport mode dynamic interface command:
SW4(config-if)#switchport mode dynamic ? auto Set trunking mode dynamic negotiation parameter to AUTO desirable Set trunking mode dynamic negotiation parameter to DESIRABLE
If the dynamic option is set to auto on both ends, the switches won't form a trunk. Instead, each switch's interface will fall back to static access mode for VLAN 1, unless you explicitly configure a different VLAN using the switchport access vlan interface command.
Cisco switches support two encapsulation protocols: 802.1Q and the Cisco-proprietary ISL. You should be using 802.1Q whenever possible, since it's standard and interoperates with pretty much every other piece of networking equipment out there. But be aware that Cisco switches still support ISL (for compatibility reasons, of course), so you may still encounter it.
You can explicitly set the encapsulation type or have the switches negotiate it. If both sides have the negotiate option set, they'll negotiate ISL. To ensure that they settle on 802.1Q, be sure to specify the dot1q option:
SW4(config-if)#switchport trunk encapsulation ? dot1q Interface uses only 802.1q trunking encapsulation when trunking isl Interface uses only ISL trunking encapsulation when trunking negotiate Device will negotiate trunking encapsulation with peer on Interface
Let's look at a quick example of an interface that's configured as dynamic desirable and has the encapsulation type set to 802.1Q:
SW4#show interfaces gi0/0 switchport Name: Gi0/0 Switchport: Enabled Administrative Mode: dynamic desirable Operational Mode: trunk Administrative Trunking Encapsulation: dot1q Operational Trunking Encapsulation: dot1q Negotiation of Trunking: On ! Output truncated
Administrative Mode and Administrative Trunking Encapsulation refer to the interface configuration. Operational Mode and Operational Trunking Encapsulation refer to what the switch has negotiated with its peer. In this case, both switches have negotiated an 802.1Q trunk. The operational parameters of the trunk can also be viewed using the following command:
SW4#show interfaces gigabitEthernet 0/0 trunk Port Mode Encapsulation Status Native vlan Gi0/0 desirable 802.1q trunking 1