Modes of a Switch Port

Can anybody link me to a tutorial here at networklessons, regarding the switch port modes regarding.

  1. Why so many modes?
  2. Function of each mode & issues?
SW-2(config-if)#switchport mode ?
  access        Set trunking mode to ACCESS unconditionally
  dot1q-tunnel  set trunking mode to TUNNEL unconditionally
  private-vlan  Set private-vlan mode
  trunk         Set trunking mode to TRUNK unconditionally

I was going through Port security tutorial and i faced error that port should be in access mode. Kindly mention it in the tutorial. https://networklessons.com/cisco/ccna-routing-switching-icnd1-100-105/how-to-configure-port-security-on-cisco-switch/

Found the following article for help and clearing some concepts:

Hello Saad

Here is a small review of the options available depending on the platform and IOS version along with links to lessons that further describe them:

switchport mode access - this is the mode where the port is configured to carry only a single VLAN. Typically, hosts and end devices are connected to access ports and sometimes switches that are to carry only a single VLAN.

switchport mode trunk - a trunk is typically a link between two switches or a switch and a router. This allows multiple VLANs to traverse the interface using what are called tags. This command will make the interface unconditionally a trunk.

switchport mode dynamic - this enables Dynamic Trunking Protocol or DTP and is used to allow trunks or access ports to be configured using a negotiation procedure executed between switches. More on this in the link below:

switchport mode dot1q-tunnel - this mode enables a feature called QinQ which allows multiple VLANs to be placed within a single VLAN. More on this here:

switchport mode private-vlan - this mode enables a security feature that allows you to create private VLANs, that is, a feature that can isolate particular devices from communicating with other devices. More on this here:

I hope this has been helpful!

Laz