Trunk Port : A trunk port is a specific type of port on a network switch that allows data to flow across a network node for multiple virtual local area networks or VLANs. A trunk port of a switch is that port that can pass multiple VLANs and VLAN traffic through it. Usually the uplink port of a switch is configured as a trunk. Trunk ports are also used to extend a network connecting VLANs with same VLAN id that is configured on multiple switches.
Access Port : An access port is a switch port that is dedicated to a specific network. An access port transports traffic to and from only the specified VLAN allotted to it. Unlike a trunk port, it will not deliver exclusive identifying tags (either 802.1Q or ISL tags) because the VLAN intended for it is pre-assigned.
Usually, an access port will only have a single VLAN set up on the interface and it carries traffic for just a single VLAN. If the VLAN for an access port is not configured, the interface can carry traffic using only the default VLAN, which is usually VLAN 1 (native VLAN).
It is possible to configure Ethernet interfaces as either access ports or trunk ports, but they are unable to function as both types of port at the same time.
Configuring Trunk and access ports on a SonicWall switch while using in Standalone configuration :
TIP: SonicWall uses the terminology as ‘tagged’ ports and ‘untagged’ ports for trunk ports and access ports respectively .
Now let us suppose that we need to create a VLAN 2 and make the ports 1-20 a part of that VLAN. Port 48 is used as an uplink port that connects to the upstream firewall or router that has VLAN 2 configurations along with other VLAN configurations as well. That means we have to configure ports 1-20 as access ports of VLAN 2 and port 48 as the trunk port which will pass VLAN 2 traffic along with the other VLANs traffic as well
So we will add a VLAN to the switch and tag port 48in it and untag ports 1-20 in it


TIP: We can tag a same port is as many VLANs as we want but we cannot untag a port in more that one VLAN. That means a port can be a trunk port and pass as many VLANs as it is tagged in but it can be an access port of only a particular VLAN.