Types of Switch Ports

Network devices connect to a switch through its switch ports. Switch Ports which are physical opening where data cables are plugged in to connect the devices. Switch port type should be configured according to the requirement considering the factors like network architecture, speed and functionality.

Switch ports can be classified in following types based on network architecture :

1. Access Port : 

  • Access port is a connection on a switch that transmits data to and from a specific VLAN.
  • It is used to connect switches to host devices such as desktops, laptops, printers etc., only available in access link.
  • It sends and receives Ethernet frames in untagged form from access VLAN.
  • It can only be member of single VLAN i.e. the access VLAN, and discards all frames that are not classified to the access VLAN.

2. Trunk Port :

  • Trunk port is a connection on a switch that transmits data to and from multiple VLANs.
  • It is used to connect switches to other switches, routers and servers available in trunk link.
  • Frames are marked with unique identifying tags when they move between switches so that they can be directed to their designated VLANs.
  • It can manage
  • traffic for numerous VLANs at the same time.

3. Hybrid Port :

  • Hybrid port is a connection on a switch that transmits data to and from one or multiple VLANs.
  • It is used to connect network devices (like switches) as well as user devices (like laptops).
  • It support both tagged and untagged frames from VLANs.
  • It can receive frames from one or more VLANs at the same time.

Switch ports can be classified in following types based on the functionality :

1. Combo Port :

  • It is a compound port which can support two different physical ports with same switch fabric and port number but both the ports can’t be used simultaneously.
  • It is used to configure the switch according to the application requirements.

2. Stack Port :

  • It is a special functional port which is used to connect with other stackable switches of the same model, brand and software version to operate as a single stackable switch with port capacity equal to the sum of the combined switches.
  • It is used for making long distance connections.

3. PoE (Power over Ethernet) Port :

  • It allows a single network cable to carry data and power simultaneously.
  • It is used in devices such as wireless network repeaters or IP security cameras which use a single Ethernet cable for voice, data and power.

Switch ports can be classified in following types based on the functionality :

1. RJ45 Port :

  • Registered Jack 45 (RJ45) is an Ethernet style network port which is used to interact or communicate with other devices where Ethernet networking is required.
  • It supports up to 100 Mbps speed.
  • It is used in data centers for server switching, LANs, uplinks from desktop switches, etc.

2. SFP Port :

  • Small form-factor pluggable (SFP) port are a slot on a network device into which SFP transceivers are inserted.
  • It enables Gigabit switches to connect to a wide variety of fiber and Ethernet cables in order to extend switching functionality throughout the network. 
  • It supports up to 1 Gbps speed.
  • It enables a gigabit switch to achieve fiber uplinks over longer distances or short-range copper uplinks.

3. SFP+ Port :

  • SFP+ port is an advanced version of SFP port which supports higher data rates.
  • It supports up to 10 Gbps speed.
  • SFP+ transceiver can’t be plugged into SFP port because SFP+ does not support speeds less than 1Gbps.

4. SFP28 Port :

  • SFP28 is enhanced version of SFP+ designed for 25G signal transmission.
  • It supports up to 25 Gbps speed.
  • It is used for networking upgrade.

5. QSFP+ Port :

  • Quad small form factor +(QSFP+) port have 4 lanes which support speed 4 times their corresponding SFP( here, SFP+).   
  • It supports up to 40 Gbps speed.
  • It have four-channel 10 Gbps SFP+ interfaces.

6. QSFP28 Port :

  • Quad small form factor 28 (QSFP28) port have 4 lanes which support speed 4 times their corresponding SFP( here, SFP28).   
  • It supports up to 100 Gbps speed.
  • It have four-channel 25 Gbps SFP28 interfaces.

Access Ports and Trunk Port

In computer networking, access ports and trunk ports are two types of switch ports used to control how VLAN traffic is handled. They are mainly used in managed switches in company, campus, and enterprise networks to separate and manage network traffic efficiently.

Access Port (in detail)

An access port is a switch port that is configured to carry traffic for only one VLAN. It is mainly used to connect end devices such as computers, laptops, printers, IP phones, CCTV cameras, and wireless access points. Access ports send and receive untagged frames, meaning the connected device does not need to understand VLAN tagging. Internally, the switch associates all traffic coming from that port with a specific VLAN ID. Access ports help in network segmentation by assigning different departments or user groups to different VLANs, such as HR, Finance, and Students, which improves security and reduces unnecessary broadcast traffic. Access ports can also use security features like Port Security and 802.1X authentication to restrict unauthorized devices from connecting to the network.

Trunk Port (in detail)

A trunk port is a switch port that is configured to carry traffic for multiple VLANs at the same time. Trunk ports are mainly used to connect network devices such as switch-to-switch links, switch-to-router links, or switch-to-firewall links. Trunk ports use VLAN tagging (IEEE 802.1Q) to identify which VLAN each data frame belongs to. When a frame travels through a trunk port, a VLAN tag is added to the Ethernet frame so that the receiving device knows which VLAN the data belongs to. Trunk ports allow different VLANs to extend across multiple switches, which is essential in large networks where devices from the same VLAN may be connected to different switches.

Key Differences (simple points)

Access Port:

  • Carries traffic for only one VLAN
  • Sends untagged frames
  • Used for end devices (PC, printer, IP phone)
  • Simple and secure for users

Trunk Port:

  • Carries traffic for multiple VLANs
  • Uses VLAN tagging (802.1Q)
  • Used between switches, routers, and firewalls
  • Supports large and scalable networks

Conclusion

In a company or campus network, access ports are used to connect user devices and keep departments separated through VLANs, while trunk ports are used to interconnect network devices and transport multiple VLANs across the network infrastructure. Together, access and trunk ports form the backbone of VLAN-based network design, ensuring better security, performance, and network management.

Access and Trunk Ports
Switch ports are Layer 2 interfaces that are used to carry layer 2 traffic. A single switch port can carry single VLAN traffic. Frames are handled differently according to the type of link they are traversing. 

Note: All switch ports are assigned VLAN 1 by default (VLAN 1 cannot be modified or deleted). 

There are 2 different types of ports in a switched environment: 

Access Ports  

These switch ports belong to carry the traffic of only one VLAN. By default, it will carry the traffic of native VLAN (VLAN 1) . If the switch ports are assigned as access ports then they can be considered as the switch ports belongs to a single broadcast domain. Any traffic arriving on these switch ports is considered as it belongs to the VLAN assigned to the port. 

Example:

Access and Trunk Ports
Switch ports are Layer 2 interfaces that are used to carry layer 2 traffic. A single switch port can carry single VLAN traffic. Frames are handled differently according to the type of link they are traversing. 

Note: All switch ports are assigned VLAN 1 by default (VLAN 1 cannot be modified or deleted). 

There are 2 different types of ports in a switched environment: 

Access Ports  

These switch ports belong to carry the traffic of only one VLAN. By default, it will carry the traffic of native VLAN (VLAN 1) . If the switch ports are assigned as access ports then they can be considered as the switch ports belongs to a single broadcast domain. Any traffic arriving on these switch ports is considered as it belongs to the VLAN assigned to the port. 

Example:

Here is a simple topology in which 2 switches are connected and only the default VLAN (VLAN 1)is configured on both switches i.e all the switch ports of both switches belong to a single broadcast domain. 

Now, note that the link between the switches has to be configured as an access port because only a single VLAN (VLAN 1) data has to be exchanged. Now after assigning an IP address to PC1-192.168.1.1/24, PC2-192.168.1.2/24, PC3-192.168.1.3/24, PC3-192.168.1.4/24, the user shall configure the link between the 2 switches as an access port.

				
					Switch1(config)#interface fa0/0
Switch1(config-if)#switchport mode access
				
			

Here, there is no need to assign VLAN to the ports as all the switch ports on both switches are configured as VLAN 1 by default.

Advantages:

  • Access ports are used to connect end devices, such as PCs, printers, and servers, to the switch. These ports are simple to configure and provide a direct connection to the network. 
  • Access ports are typically configured to carry traffic for a single VLAN, which provides a layer of security by segregating traffic between different VLANs. 
  • Access ports are less complex than trunk ports, which makes them easier to configure and troubleshoot.

Disadvantages:

  • Access ports can only carry traffic for a single VLAN, which can limit network flexibility and scalability. If a device needs to communicate with devices on another VLAN, it must go through a router or Layer 3 switch. 
  • Access ports are susceptible to VLAN hopping attacks, where an attacker can gain access to another VLAN by exploiting weaknesses in the network.

Trunk ports Access Port:

These switch ports belong to and carry the traffic of more than one VLAN. This is a great advantage as to carry the traffic of a group of VLAN, a single switch port can be used. These are of great use if the user wants to exchange traffic between more than one switch having more than one VLAN configured. To identify traffic belongs to VLAN, the VLAN identification method (802.1q or ISL) is used. Also, to carry traffic between more than one VLAN, then inter VLAN routing is required, in which the link between router and switch is configured as trunk as the link has to carry the traffic of more than one VLAN (in case of a router on a stick configuration not in inter VLAN routing by layer 3 switches). 

Note: Trunk links can carry the traffic of different VLANs across them but by default, if the links between switches are not trunk then only information from the configured access VLAN will be exchanged. 

Example: 

Here is a simple topology in which 2 switches are connected and VLANs 2 and 3 are configured on both switches as shown. 

Note – A user has not assigned any VLANs to other ports of switches, therefore, the other ports will be in VLAN 1 by default. 

Now, note that the link between the switches has to be configured as a trunk port because here more than one VLAN (VLAN 1, 2, 3) frame has to be exchanged between the switches. Now assigning IP address to PC1-12.168.1.1/24, PC2-192.168.2.1/24, PC3-192.168.1.2/24, PC3-192.168.2.2/24. 

Now, the first user has to make VLANs on both switches. 

				
					Switch1(config)#vlan 2
Switch1(config)#vlan 3
Switch2(config)#vlan 2
Switch2(config)#vlan 3
				
			

Now, a user has more than one VLAN configured on both switches. Therefore, users have to assign the VLANs to their respective ports on Switch1.

				
					Switch1(config)#interface fa0/1
Switch1(config-if)#switchport access vlan 2
Switch1(config)#interface fa0/2
Switch1(config-if)#switchport access vlan 3
				
			

Now, configure VLANs on their respective ports on Switch2. 

				
					Switch2(config-if)#interface fa0/1
Switch2(config-if)#switchport access vlan 2
Switch2(config)#interface fa0/2
Switch2(config-if)#switchport access vlan 3
				
			

Now, configure the link between 2 switches as a trunk port. 

				
					Switch1#interface fa0/0
Switch1#switchport trunk encapsulation dot1q
Switch1#switchport mode trunk
				
			

As a result of this, now the user can carry more than one VLAN traffic from one switch to another switch (here, only configuration of switch ports are shown not the configuration of the router is shown. To perform inter VLAN routing, a configuration of the router is also needed).

Advantages:

  • Trunk ports are used to connect switches to each other, which allows for the creation of a larger, more flexible network. 
  • Trunk ports can carry traffic for multiple VLANs, which provides greater flexibility and scalability. This allows devices on different VLANs to communicate with each other without the need for a router or Layer 3 switch. 
  • Trunk ports provide a more efficient use of bandwidth by allowing multiple VLANs to share the same physical link. 

Disadvantages:

  • Trunk ports are more complex to configure than access ports, which can make them more difficult to troubleshoot. 
  • Trunk ports are more susceptible to security threats, such as VLAN hopping and misconfiguration, which can potentially compromise the entire network.

One-line difference (exam answer):

Access Port: Works with one VLAN and sends untagged frames to end devices.
Trunk Port: Works with multiple VLANs and sends tagged frames between network devices.

ParametersTrunk PortAccess Port
VLAN assignmentIt supports multiple VLANs.It supports a single VLAN.
TagsMultiple VLANs are allowed to traverse and add tags.Single VLAN is allowed to traverse and removes tags.
PurposeIt connects switches or routers together.It connects end devices to the network.
Protocols

It uses encapsulation protocol which are

  • ISL 
  • 802.1Q

It uses only one encapsulation protocol-

  • IEEE 802.1Q.
VLAN taggingIt supports VLAN tagging.It does not support VLAN tagging.
BandwidthIn Trunk Port, bandwidth is high.In Access Port, bandwidth is low as compared to Trunk Port.
Broadcast domainIt allows segmentation into separate broadcast domains.Traffic is part of the same broadcast domain.
Voice VLANVoice VLAN is a feature that is not supported in Trunk Port.Voice VLAN is the feature that is supported in Access Port.
FramesIt supports tagged framesIt supports untagged frames.
Ideal forIt is ideal for larger networks with multiple VLANs that are basically used to connect between the switches.It is ideal for connecting end-user devices to the network and is used to connect laptops, printers, computers, etc.

Access Ports and Trunk Port QNA

1. What is an Access Port?

An access port is a switch port that carries traffic for only one VLAN and connects end devices like PC, printer, or IP phone. It sends and receives untagged frames.


2. What is a Trunk Port?

A trunk port is a switch port that carries traffic for multiple VLANs between network devices such as switch-to-switch or switch-to-router links using VLAN tagging (802.1Q).


3. What is the main difference between access port and trunk port?

An access port supports only one VLAN and sends untagged traffic, while a trunk port supports multiple VLANs and sends tagged traffic.


4. Which devices are connected to access ports?

End devices like computers, laptops, printers, CCTV cameras, and IP phones are connected to access ports.


5. Which devices are connected to trunk ports?

Network devices like switches, routers, and firewalls are connected using trunk ports.


6. Does an access port use VLAN tagging?

No. Access ports send and receive untagged frames.


7. Does a trunk port use VLAN tagging?

Yes. Trunk ports use 802.1Q VLAN tagging to identify VLAN traffic.


8. Can one access port carry traffic for two VLANs?

No. An access port can belong to only one VLAN at a time.


9. Why is trunk port needed in large networks?

Trunk ports allow multiple VLANs to pass between switches, helping to expand VLANs across many switches in large networks.


10. What is the native VLAN in trunk port?

The native VLAN is the VLAN whose traffic is sent without a tag on a trunk port (default is VLAN 1).


11. Which protocol is used for trunking?

The standard protocol is IEEE 802.1Q.


12. Can a trunk port be connected to a PC?

Normally no, because PCs do not understand VLAN tags (unless specially configured for VLAN tagging).


13. Is security higher on access port or trunk port?

Access ports are more secure for users because they support features like Port Security and 802.1X. Trunk ports must be carefully configured to avoid VLAN hopping attacks.


14. What happens if trunk port is misconfigured as access port?

Only one VLAN will pass, and other VLAN traffic will be blocked, causing network communication failure.


15. What happens if access port is misconfigured as trunk port?

The end device may not understand VLAN tags, causing network connectivity issues.


16. Where are access ports mostly used?

In offices, schools, and companies for user devices.


17. Where are trunk ports mostly used?

Between switches, routers, and firewalls in enterprise networks.


18. Which port type reduces broadcast traffic?

Access ports reduce broadcast traffic by separating users into VLANs.


19. What is VLAN? (related question)

VLAN is a logical network segmentation method that divides one physical network into multiple virtual networks.


20. One-line difference (exam answer):

Access Port: One VLAN, untagged traffic, used for end devices.
Trunk Port: Multiple VLANs, tagged traffic, used for network devices.