How to Configure Access Port and Trunk Port?

Access ports are typically used to connect devices like PCs and workstations to the network. Trunk ports are used to connect two switches together, or a switch to a router. Access ports carry traffic for only a single VLAN and do not tag traffic. Trunk ports carry traffic for multiple VLANs and tag traffic with 802.1Q headers.

Here are some key points to remember about access and trunk ports:

  • Access ports carry traffic for only a single VLAN.
  • Trunk ports carry traffic for multiple VLANs.
  • Access ports do not tag traffic.
  • Trunk ports tag traffic with 802.1Q headers.
  • Access ports are typically used to connect devices like PCs and workstations to the network.
  • Trunk ports are used to connect two switches together, or a switch to a router.
How to Configure Access Port and Trunk Port

How to Configure Access Port?

To configure an access port, you need to do the following:

  • Set the port mode to access.
  • Select the VLAN that you want the port to be a member of.

Command:

Switch(config)# interface fastEthernet 0/1

switch(config-if)# switchport mode access

switch(config-if)# switchport access VLAN 10

In the above example, we are configuring Fast Ethernet port 0/1 as an access port. We are also setting the port to be a member of VLAN 10.

How to Configure Trunk Port?

To configure a trunk port, you need to do the following:

  • Set the port mode to the trunk.
  • Select the Native VLAN.
  • Select the allowed VLANs.

Command:

Switch(config)# interface fastEthernet 0/1

switch(config-if)# switchport mode trunk

switch(config-if)# switchport trunk native VLAN 10

switch(config-if)# switchport trunk allowed VLANs 1,10,20,30,40,50

In the above example, we are configuring Fast Ethernet port 0/1 as a trunk port. We are also setting the Native VLAN to VLAN 10. Lastly, we are allowing traffic from VLANs 1, 10, 20, 30, 40, and 50 to pass through the trunk port.

Common Issue with Access Port and Trunk Port in Network

One common issue that can occur with access ports and trunk ports is incorrect port configuration. This can happen if the port mode is set to the wrong value, or if the port is not a member of the correct VLAN. Another common issue is mismatched Native VLANs on trunk ports. This can cause traffic from the Native VLAN to be tagged, which can cause problems on the receiving end.

To fix these issues, you will need to check the port configuration and make sure that the port is set to the correct mode and VLAN. You will also need to check the trunk Native VLAN configuration and make sure that it matches both sides of the link.

How to Troubleshoot Access Port and Trunk Port?

To troubleshoot an access port or a trunk port, you can use the following commands:

#show interfaces switchport

#show VLAN

#show running-config

#debug interface

These commands will provide you with information about the port configuration, VLAN membership, and any errors that might be occurring.

Leave a Comment