Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

Switchport Access VLAN 123

All, what happens if a port is configured as:

interface GigabitEthernet1/0/21

switchport access vlan 100

spanning-tree portfast

but does not have switchport mode access?

is the switchport mode access command needed?

5 REPLIES
Hall of Fame Super Bronze

Re: Switchport Access VLAN 123

If you connect another switch on this port, it may trunk if you don't set the switchport mode access.

By entering the switchport mode access, you are forcing the port to only use access mode.

You can view the current switchport mode by typing:

show int g1/0/21 switchport

New Member

Re: Switchport Access VLAN 123

so it really doesnt hurt anything by not having the command, but without it, if someone were to plug a switch into that port, it would go into trunking mode?

Hall of Fame Super Bronze

Re: Switchport Access VLAN 123

It may go into trunking mode, yes.

In a secure environment, it's always recommended to enter the switchport mode access command.

Can you post the 'show int g1/0/21 switchport' output ?

New Member

Re: Switchport Access VLAN 123

This is the output on a port without the switchport mode access command:

BOSTON#sh int g4/0/12 switchport

Name: Gi4/0/12

Switchport: Enabled

Administrative Mode: dynamic auto

Operational Mode: static access

Administrative Trunking Encapsulation: negotiate

Operational Trunking Encapsulation: native

Negotiation of Trunking: On

Access Mode VLAN: 101 (VLAN0101)

Trunking Native Mode VLAN: 1 (default)

Administrative Native VLAN tagging: enabled

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 Native VLAN tagging: enabled

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

Unknown unicast blocked: disabled

Unknown multicast blocked: disabled

Appliance trust: none

Hall of Fame Super Bronze

Re: Switchport Access VLAN 123

As you can see:

BOSTON#sh int g4/0/12 switchport

Name: Gi4/0/12

Switchport: Enabled

Administrative Mode: dynamic auto

Operational Mode: static access

Administrative Trunking Encapsulation: negotiate

_____________

Administrative mode is set to dynamic auto, if you connect a switch with dynamic mode desirable, it will form a trunk. A switch with dynamic mode auto, won't form a trunk. So, it depends on the type of switch you connect here.

Currently, the port is running:

Operational Mode: static access

because that's what it sensed from the workstation connection.

You should be fine under this config but I wanted to point out, the 'what if' ..

332
Views
0
Helpful
5
Replies
CreatePlease to create content