09-24-2009 08:05 AM - edited 03-06-2019 07:52 AM
I came across this config on a switch recently and was confused:
interface FastEthernet0/1
description Local Clients
switchport access vlan 15
switchport trunk native vlan 326
What will happen when a client is plugged in? By default a switch port is in access mode, and I would think trunk commands are ignored if not in trunk mode. So is this just sloppy config work or is this an intended configuration? If it's valid, what happens and why?
Regards,
Scott
09-24-2009 08:14 AM
Scott-
The switchport is configured for access only. The switchport trunk native vlan 326 is used when the port is configured for trunking. It takes untagged packets and puts them in VLAN 326. This will not turn on trunking. It looks like leftover configuration or it can be in there for security purposes. If it's for security, typically the VLAN (326 in your case) would be a null VLAN. Is that valid VLAN in your environment?
Hope that helps.
09-24-2009 08:18 AM
Correction to my previous post. It is NOT explicitly set for access mode. To set it, use the command-
switchport mode access
09-24-2009 08:36 AM
Right - so that's where I'm confused. Without a mode command to define whether it's a trunk or access, what will happen? It has supporting commands for the access mode (defining the access VLAN) and the trunk mode (defining the native VLAN), but without specifying 'switchport mode access' or 'switchport mode trunk' I'm not sure what will happen. I'm going to try it on one of my switches.
09-24-2009 08:48 AM
It depends on the connected device and what model of switch you have. If the other end wants to trunk, some switches will trunk out of the box. Most of the newer switches require trunking to be configured however.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide