Two most useful modes at which ports on switch can work is ‘access’ and ‘trunk’ mode.
Access mode – all incoming traffic tagged with VLAN tag by switch and processed further. Outgoing traffic for this port processed only for associated VLAN.
Trunk mode – allows VLAN/tagged incoming traffic and sort out incoming traffic basing on tags/VLANs. Outgoing traffic for this port processed only for associated VLANs.
In general: trunk mode for inter-switch connection (or connection switch-to-servers-what support trunking), access mode – connection to end devices.
Sample configurations.
Port in access mode:
interface Ethernet1/10
description To CoolPrinter
switchport
switchport access vlan 100
no shutdown
Port in trunk mode:
interface Ethernet1/11
description Link to AnotherCoolSwitch
switchport
switchport mode trunk
switchport trunk allowed vlan 100,200-300
no shutdown
Howto check port mode (is it in access or trunk mode):
show interface ethernet 1/54 | include Port