Switching Trunks vs. Access

Answered Question
Jan 10th, 2008

Greetings and happy new year...

Just started a new position and am wondering about the way some interfaces were set up. Here is an example:

interface GigabitEthernet12/23

description Uplink>SM_MDN

switchport

switchport access vlan 918

switchport trunk native vlan 918

switchport trunk allowed vlan 918,919

no ip address

I am not sure why they are using the trunk command and the access command at the same time, shouldnt a link be one or the other? If the link is configed as so what config trumps the other trunk or access?

I have this problem too.
0 votes
Correct Answer by Edison Ortiz about 8 years 10 months ago

You are correct. Often, you see these commands implemented (access along with trunk) as a fall-back method if the switchport fails to negotiate a trunk.

By default, the switchport is set to trunk (dynamic mode is desirable or auto, depending on the switch).

You can verify what status the switch is under by typing show interface g12/23 switchport. Please post that output here.

HTH,

__

Edison.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Correct Answer
Edison Ortiz Thu, 01/10/2008 - 12:58

You are correct. Often, you see these commands implemented (access along with trunk) as a fall-back method if the switchport fails to negotiate a trunk.

By default, the switchport is set to trunk (dynamic mode is desirable or auto, depending on the switch).

You can verify what status the switch is under by typing show interface g12/23 switchport. Please post that output here.

HTH,

__

Edison.

faze1sari Fri, 01/11/2008 - 07:37

Thanks for the info and clearing it up for me. I can see the port is running trunk:

Name: Gi12/23

Switchport: Enabled

Administrative Mode: dynamic desirable

Operational Mode: trunk

Administrative Trunking Encapsulation: negotiate

Operational Trunking Encapsulation: dot1q

Negotiation of Trunking: On

Access Mode VLAN: 918 (SM+BQ-MDN-NetManagement)

Trunking Native Mode VLAN: 918 (SM+BQ-MDN-NetManagement)

Voice VLAN: none

Administrative private-vlan host-association: none

Administrative private-vlan mapping: none

Administrative private-vlan trunk native VLAN: none

Administrative private-vlan trunk encapsulation: dot1q

Administrative private-vlan trunk normal VLANs: none

Administrative private-vlan trunk private VLANs: none

Operational private-vlan: none

Trunking VLANs Enabled: 918,919

Pruning VLANs Enabled: 2-1001

Capture Mode Disabled

Capture VLANs Allowed: ALL

keegan.holley Thu, 01/10/2008 - 17:26

the switchport access command causes the port to be a member of vlan 918 if it is in access mode. The switchport trunk command configures the it to send and recieve traffic on vlans 918 and 919 if it is trunking mode. Neither command however causes the port to choose one of these modes. By default switchports will try to negiotiate trunking and favor trunking over non-trunking depending on what the other side is configured for. Enter sh int g12/23 switchport to see the operational status of the port and sh int trunk to list all the ports currently in trunking mode. Also, do sh spantree for the two vlans. This will give you a better idea of what the ports intended use is.

Actions

This Discussion