cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
15188
Views
30
Helpful
3
Replies

Access Mode VLAN

matt_ccna
Level 1
Level 1

Hi,

I'm trying to understand VLANs and trunking.

This (screenshot) is a working router-on-stick example with 4 VLANs.
V40 is native Vlan 40 (ADMIN, manage)

All gig1/1 & gig1/2 interfaces are trunks.

My question is about the output of S1#sh int gig1/1 switch (same output on the other interfaces and switches)

S1#sh int gig1/1 switch
Name: Gig1/1
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 40 (ADMIN)
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: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Appliance trust: none


It's about this part
*********
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 40 (ADMIN)
************


If I would add switchport access vlan 40 to all gig interfaces. I have this output:

*********
Access Mode VLAN: 40 (default)
Trunking Native Mode VLAN: 40 (ADMIN)
************

But I can't see any differences in the working example and on the other command outputs.

Can anybody explain what the differences are?

THX.

3 Replies 3

glen.grant
VIP Alumni
VIP Alumni

  Not really sure what your question , when you add the switchport access command all you are doing is saying if the line is not a trunk it will be an access port in vlan 1 . If the port is hardcoded as a trunk the switchport access command really has no meaning and does not need to be there .

Kevin Dorrell
Level 10
Level 10

The swtchport can be in access mode or in trunking mode.

If it is in access mode, then the command switchport access vlan n determines which VLAN it is on. If that command is absent, then it is on VLAN 1. Any command starting switchport trunk ... is ignored because we are not in trunking mode.

If the switchport is in trunking mode, packets have to be tagged to say which VLAN they are for, except if they are on the native VLAN.  The native VLAN is determined by the command switchport trunk native vlan n.  If that command is absent, the native is VLAN 1. Any command starting with switchport access ... is ignored because we are not in access mode.

In your output above, te "Access Mode VLAN" is the one the port would be on if it were in access mode. But that is irrelevant, because it is not in access mode; it is in trunk mode.

Hope that helps.

Kevin Dorrell

Luxembourg

In your output above, te "Access Mode VLAN" is the one the port would be on if it were in access mode. But that is irrelevant, because it is not in access mode; it is in trunk mode.

That is all I needed to know. It's clear to me now.

Thx a lot.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card