Strange interface config - what will happen?

Unanswered Question
Sep 24th, 2009
User Badges:

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

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Collin Clark Thu, 09/24/2009 - 08:14
User Badges:
  • Purple, 4500 points or more

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.


Collin Clark Thu, 09/24/2009 - 08:18
User Badges:
  • Purple, 4500 points or more

Correction to my previous post. It is NOT explicitly set for access mode. To set it, use the command-


switchport mode access

Scott Pickles Thu, 09/24/2009 - 08:36
User Badges:

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.

Collin Clark Thu, 09/24/2009 - 08:48
User Badges:
  • Purple, 4500 points or more

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.

Actions

This Discussion