Ad space (banner)
📡Networking Lessons
Lesson 16 / 39

Setting the Port Type with switchport mode

When you need to declare whether a port connects a PC or another switch, use switchport mode. It sets the port type: an access port carrying a single VLAN, or a trunk port carrying several.

The syntax is switchport mode access or switchport mode trunk, inside interface configuration mode.

Running switchport mode access makes the port behave as an access port belonging to exactly one VLAN — the right choice for end devices such as PCs and printers.

A common stumble is setting access mode on a switch-to-switch link, which blocks the traffic of all but one VLAN. Links between switches should normally be trunks.

In real work, access for end devices and trunk for the backbone links between switches is the basic pattern of network design.

Networking
Try it (type this into the pseudo terminal)
switchport mode access

🧑‍💻 You can type this command into the Networking pseudo terminal to try it yourself (this page itself has no interactive terminal).

Ad space (banner)
Ad space (in-article)