Can someone please explain the difference between access ports and trunk ports on a switch? I'm starting to learn networking, and my understanding is that access ports are used to connect endpoints (e.g. computers and printers) to the switch and trunk ports are used to connect two switches together. Any help will be greatly appreciated. Thanks!
An access port sends and receives untagged frames (i.e. all frames are in the same VLAN), while a trunk port supports tagged frames and thus allows to switch multiple VLANs.
For what it's worth, in my experience, both other answers (Oliver's and Ignacio V-A's) are correct, despite being different.
(Edit: I notice that Ignacio has since deleted his answer; the upshot of his answer was that trunk ports were higher-bandwidth-lower-latency ports on a switch, possibly better connected to the backplane, into which I read the suggestion that they were for inter-switch communication. I add this note only because, without it, my answer will make no sense to people without the rep. to see deleted answers.)
My old-time experience is that trunk ports are what Oliver says, that is, ports which will accept 802.1q VLAN-tagged packets, and switch them accordingly.
However, at least one switch I've used recently (the HP Pro Curve 1810G) uses "trunk port" to mean "a port which will be combined with one or more other ports for the purpose of a multiple-parallel-cable high-bandwidth link, usually to another switch"), as IVA does. Where trunk is used in this sense, the chassis may have dedicated trunk ports for inter-switch connection, and in at least some cases, these may have a preferential path through the backplane.
And yes, this overloading of the term "trunk" meant that it took me a whole day to set up an eight-port switch, when I was expecting the VLAN setup to take about 90 minutes. Why do you ask?
A
Trunk
is typically a link between 2 switches. though it can also be used between a switch and a router, and between a switch and a server. ATrunk
, unlike anaccess port
which is assigned to a singleVlan
, can carry data from multiple VLANs. This means you can have let's say 4 VLANs on a switch, but do not have to connect a cable to the router [or another switch] for each VLAN, just one link for all the VLANs. Imagine if you had 100 VLANs on dozens of switches and you needed to route between them...a Trunk would allow you to aggregate them to a single Trunk link between each set of switches and a single Trunk to the router.Trunk port is used to connect between switches and access port is used to connect to computers lap top printers etc, you cannnot extend the data from one switch to other switch access ports through trunk port. it can only extended through access port of switch.