An engineer requires a switch interface to actively attempt to establish a trunk link with a neighbor switch.
What command must be configured?
The correct answer to the question is B. switchport mode dynamic desirable.
When connecting switches together, the link between them must be configured as a trunk link to allow multiple VLANs to pass through the same physical interface. To configure a trunk link, the two switches must negotiate and agree on the trunking parameters.
Cisco switches use Dynamic Trunking Protocol (DTP) to negotiate trunking. DTP is enabled by default on all Cisco switch interfaces, and it allows the switch to dynamically negotiate the trunking mode (access or trunk) with the connected device.
There are three DTP modes available on a Cisco switch interface:
The switchport mode dynamic desirable command sets the interface to dynamic mode and makes the interface actively attempt to convert the link into a trunk link by sending DTP messages. If the neighboring switch interface is configured as either a trunk or a dynamic desirable interface, it will respond to the DTP messages, and the link will become a trunk link.
Switchport mode dynamic auto is another dynamic mode, but it only negotiates the link as a trunk link if the neighboring switch interface is configured as a trunk interface.
Switchport mode trunk forces the interface to be a trunk link and disables DTP messages.
Switchport nonegotiate disables DTP messages and sets the interface to trunk mode, but it does not actively attempt to negotiate the trunk link with the neighboring switch.
In summary, the switchport mode dynamic desirable command is the best choice for actively attempting to establish a trunk link with a neighbor switch.