What does the command "Switchport Mode Access" do?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2007 06:28 AM - edited 03-05-2019 06:16 PM
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?
- Labels:
-
Other Switching

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2007 06:43 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2007 06:44 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2016 02:31 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2023 07:52 AM - edited 05-11-2023 07:53 AM
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"
