cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
37493
Views
15
Helpful
4
Replies

What does the command "Switchport Mode Access" do?

rwamstutz
Level 1
Level 1

What does the command "Switchport Mode Access" do? Is it needed on a server port where the config is:

description ServerNAME

switchport access vlan 192

switchport mode access

flowcontrol receive desired

spanning-tree portfast

Much appreciated? Do I want a server port to be a trunk port?

4 Replies 4

Hi,

Your config looks fine to me. If you have Vlans in a multi switch LAN, then the inter-connects between the switches will need to be configured "Switchport mode trunk".

But where a single device like a pc, printer or server is connected to a port, then you should use "switchport mode access" and switchport access vlan xxx, where xxx is the vlan number.

if you are looking to make some improvements to over come some performance issues, then you should fix the speed and duplex on the interface and on the server as well. Remember if you are fixing speed/duplex on the switchport, then you must fix speed/duplex on the server/pc/printer as well. Otherwise it will cause problems. But it is not necessary as usually auto speed and auto duplex works ok.

HTH

Shaheen

Edison Ortiz
Hall of Fame
Hall of Fame

It statically disables trunking on the port, which defaults to dynamic trunk.

IOW, if you plug a device that has no trunking capabilities, the port will be in access mode while if you plug a device that has trunking enabled, it will automatically trunk.

If the server has a NIC with dot1q support, you can configure such port as trunk. If you have multiple Vlans, the server will connect directly to such Vlans in Layer2 instead of going by the default gateway and connecting via Layer3.

In your case, you have Vlan192 and for this port to communicate with Vlan193 (for instance), it would have to go via its default gateway in Vlan192 in order to reach Vlan193.

In a trunk configuration, the server would reach Vlan193 directly. IPs for each Vlan would need to be assigned to this server.

jseibert81
Level 1
Level 1

If you are asking what the difference is between switchport access and switchport mode access, the switchport mode access command disallows trunking all together. The switchport access command would still allow for a switchport to be dynamically negotiated. So, if trunking was initiated on the other end of the port it would trunk. 

Josh732532
Level 1
Level 1

Why is this needed before "switchport access vlan xxx"? seems very unnecessary when the port is already otherwise correctly configured, but you cannot change the vlan on a port without "switchport mode access"

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: