Trunking: The port settings and modes that define them
switchport mode dynamic
This allows the port to negotiate trunking automatically. The finishing syntax for this is either, desirable or auto. Desirable favors trunking, and if two interfaces are set to Auto then a trunk will never form. Auto requires the other side to start the trunking process.
Switchport mode trunk
This forces trunking on on the port, allows a port to create a trunk. To do this, you must: enable conf t int [fast/gig/etc] [0/x] switchport mode trunk
switchport mode
This is the base syntax for setting an interface into either access, trunk, or dynamic from the switch CLI. To use this command, you must be at the interface configuration level, thus having an interface selected.
DTP (dynamic trunking protocol)
This is the cisco proprietary protocol that allows the use of the dynamic trunking options. DTP also decides whether ISL or dot1q for a trunk and also whether a trunk will even be formed. If a port is set into nonegotiate, this disables DTP and means that a trunk using the dynamic features on one end will not be able to communicate with the network if the opposite device is not using DTP.
show int trunk
This is the command used to show any trunks and the ports assigned to them on a switch.
active dynamic trunking
This is the mode of trunking using dynamic desirable. This means that the port is automatically negotiating trunking, but favors trunking. If the opposite port is forced on, set to auto, or desirable then a trunk will form. To set this, you will need to use switchport mode dynamic desirable.
switchport nonegotiate
This is the mode that puts a port into permanent trunking mode, but dynamic trunking protocol frames are not sent across the trunk that is formed.
Switchport mode access
This sets the port into access mode, thus disabling trunking on that port. To do this, you must: enable conf t int [fast/gig/etc] [0/x] switchport mode access
passive dynamic trunking
This trunking mode also uses dynamic negotiating, however requires the opposite side to start the trunking process. If both interfaces used are set to auto, then a trunk will never form. The syntax for this is switchport mode dynamic auto.
Unconditional non-trunking
This trunking mode means that trunking is turned of via switchport mode access.
Unconditional trunking
This trunking mode means that you have a port set to trunk with switchport mode trunk. This forces trunking on on that port.
Trunk Ports
Trunk ports belong to all VLAN's and allow communication across 2 switches to communicate to a host belonging to a specific VLAN. These ports will not appear when running show vlan and show vlan brief.
Access Ports
Access ports belong to one and onle VLAN and an access port simply cannot trunk because, a trunk exists in all VLAN's. A cisco switch can either be an access port, or a trunk port, not both. When you see a port set to access, this means trunking is disabled for that port. Port membership for access ports can be viewed from show vlan and show vlan brief.