switchport question

Answered Question
Apr 23rd, 2008
User Badges:

Hi,


Ive been looking at the config on a cisco 4506 (not one that ive setup). And i noticed that several of the interfaces have both "switchport access vlan 10" and "switchport mode trunk" configured. I thought that this wasnt possible. I thought the switchport could only be "access" or "trunk". e.g.


interface GigabitEthernet2/20

switchport access vlan 10

switchport trunk encapsulation dot1q

switchport trunk native vlan 10

switchport mode trunk

switchport nonegotiate


This shows as a trunk link in "sh int status" so im guessing the "trunk" overrides "access"?


Can anyone help explain why the ports might have been configured like this?


Appreciate any help


Thanks

Correct Answer by Collin Clark about 9 years 1 month ago

Let's say someone decided to unplug the cable and plug their laptop into the port. The port would come up as an access port and be in VLAN 10, which should have no access (since VLAN 10 is also the native VLAN I am assuming there is no L3 gateway for vlan 10). Some see this as a security enhancement, locking the port in a secure vlan.


Hope that helps.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4 (2 ratings)
Loading.
Correct Answer
Collin Clark Wed, 04/23/2008 - 07:16
User Badges:
  • Purple, 4500 points or more

Let's say someone decided to unplug the cable and plug their laptop into the port. The port would come up as an access port and be in VLAN 10, which should have no access (since VLAN 10 is also the native VLAN I am assuming there is no L3 gateway for vlan 10). Some see this as a security enhancement, locking the port in a secure vlan.


Hope that helps.

Kevin Dorrell Wed, 04/23/2008 - 08:26
User Badges:
  • Green, 3000 points or more

Because you have the port hard-configured as a trunk, and furthermore you do not even negotiate, the switchport access vlan 10 will be ignored.


If you had the situation where the trunk status was negotiated then the command would be relevant whenever it fell back to access mode.


Kevinn Dorrell

Luxembourg


Actions

This Discussion