These are the tables the exam asks about and the ones you check when a trunk or a port-channel will not come up. Each one is written for Cisco IOS.
Which ports become a trunk (DTP)
This end ↓ / other end →
Dynamic auto
Dynamic desirable
Trunk
Access
Dynamic auto
Access
Trunk
Trunk
Access
Dynamic desirable
Trunk
Trunk
Trunk
Access
Trunk
Trunk
Trunk
Trunk
Mismatch: limited connectivity
Access
Access
Access
Mismatch: limited connectivity
Access
Two dynamic auto ports both wait for the other, so the link stays an access link. Many switches ship in dynamic auto.
Set trunks by hand (switchport mode trunk) and turn DTP off with switchport nonegotiate: a port that negotiates can be talked into trunking by anything plugged into it.
EtherChannel modes
Protocol
Mode
Forms a channel with
LACP (IEEE 802.3ad, now 802.1AX)
active
active or passive
LACP
passive
active only
PAgP (Cisco)
desirable
desirable or auto
PAgP
auto
desirable only
None
on
on only: no negotiation, so a mistake can loop the network
Every member must match: speed and duplex, access or trunk mode, the access VLAN or the allowed list and native VLAN. Do not mix Fast Ethernet and Gigabit ports. Shutting the ports while you add them to the channel avoids half-built bundles.
interface range GigabitEthernet0/1 - 2
shutdown
channel-group 1 mode active
no shutdown
interface Port-channel1
switchport mode trunk
switchport trunk allowed vlan 10,20
LACP detail
Value
Timer (lacp rate)
normal sends a LACPDU every 30 s (the default); fast every second
System priority
lacp system-priority, default 32768; the lower value decides which ports are active
Port priority
lacp port-priority, default 32768; lower is preferred when there are more ports than can be active
Ports
Up to 16 in a channel: 8 active and 8 hot standby
Load sharing
port-channel load-balance src-dst-ip (global); each flow stays on one link, so one flow never goes faster than one link
Checks
show etherchannel summary, show lacp neighbor, show etherchannel load-balance
Spanning tree: costs and priorities
Link speed
Short cost (802.1D-1998, IOS default)
Long cost (802.1t, spanning-tree pathcost method long)
10 Mbps
100
2,000,000
100 Mbps
19
200,000
1 Gbps
4
20,000
10 Gbps
2
2,000
100 Gbps
not defined
200
Bridge priority goes from 0 to 61440 in steps of 4096; the default is 32768. The bridge ID adds the VLAN number to it (the extended system ID), which is why show spanning-tree shows 32778 for VLAN 10.
spanning-tree vlan 10 root primary sets 24576, or 4096 below the current root if that is already lower; root secondary sets 28672.
Port priority goes from 0 to 240 in steps of 16; the default is 128. A port cost can be set from 1 to 200,000,000 with spanning-tree cost.
Per-VLAN priorities (PVST+) let one switch be root for some VLANs and the other for the rest, so both uplinks carry traffic.
Three ways to route between VLANs
Design
How
Watch out
Router on a stick
One trunk to a router; a subinterface per VLAN with encapsulation dot1Q 10 before its address
Every routed packet crosses the one trunk twice
SVIs on a Layer 3 switch
ip routing, then interface vlan 10 with an address and no shutdown
An SVI is up only while the VLAN exists and has an active port
Routed ports
no switchport on a physical port, then an address
Used for links to routers or between Layer 3 switches
interface GigabitEthernet0/0.10
encapsulation dot1Q 10
ip address 192.168.10.1 255.255.255.0
interface GigabitEthernet0/0
no shutdown