switport access and trunking

Answered Question
Feb 6th, 2009
User Badges:

Hi all, I came accross a configuration in one of the ports of a 6509 switch running ios (s72033_rp-JK9SV-M), Version 12.2(18)SXD3. I thought you can have a port configured either switchport access or switchport trunk but not both.


interface FastEthernet2/21

no ip address

speed 100

duplex full

switchport

switchport access vlan 130

switchport trunk encapsulation dot1q

switchport mode trunk

rmon collection stats 6068 owner monitor

spanning-tree portfast

end


Any input would be appreciate it.


Cheers!

Correct Answer by Edison Ortiz about 8 years 3 months ago

If a server is connecting to this switchport, more than likely is using Vlan 1 as the native/access Vlan.


As Glen pointed out, the mode is set to trunk unconditionally, so regardless the remote connection, the operational state will remain as trunk.


If Vlan 130 is the Vlan for 10.10.10.30/26, then you either need to change the native Vlan in the trunk from Vlan 1 to Vlan 130 with the command, switchport trunk native vlan 130 or change the mode from trunk to access with the command switchport mode access


Again, the command I gave you before should've informed you about the native Vlan.


HTH,


__


Edison.

Correct Answer by Edison Ortiz about 8 years 3 months ago

The mode is what counts, in your case the switchport is set to trunk.


The switchport access is there just in case the remote device does not negotiate the trunk connection.


You can verify the operational state in the interface with the command show interface fa2/21 switchport


HTH,


__


Edison.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.7 (3 ratings)
Loading.
glen.grant Fri, 02/06/2009 - 16:39
User Badges:
  • Purple, 4500 points or more

In that case the access statement means nothing because the trunk command is forced on , so it will uncondtionally try to trunk , it cannot be access port unless you remove the switchport mode trunk command.

Correct Answer
Edison Ortiz Fri, 02/06/2009 - 16:41
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

The mode is what counts, in your case the switchport is set to trunk.


The switchport access is there just in case the remote device does not negotiate the trunk connection.


You can verify the operational state in the interface with the command show interface fa2/21 switchport


HTH,


__


Edison.

mguzman4158 Fri, 02/06/2009 - 17:00
User Badges:

Thank you all for replying, one last questions, will the switchport access vlan statement create any anomalies? like routing issues or things like that?


Thank you again!!!

Cheers!

Edison Ortiz Fri, 02/06/2009 - 17:01
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

No, it shouldn't create any problems.


Are you experiencing any?


__


Edison.

mguzman4158 Fri, 02/06/2009 - 17:04
User Badges:

yes I am, there is a server plugged in to that port, the server has an ip of (example) 10.10.10.30/26 the vlan hrsp vip is 10.10.10.60/26 - folks from another branch can ping the vip accross the wan, but can not ping the device 10.10.10.30

Correct Answer
Edison Ortiz Fri, 02/06/2009 - 17:10
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

If a server is connecting to this switchport, more than likely is using Vlan 1 as the native/access Vlan.


As Glen pointed out, the mode is set to trunk unconditionally, so regardless the remote connection, the operational state will remain as trunk.


If Vlan 130 is the Vlan for 10.10.10.30/26, then you either need to change the native Vlan in the trunk from Vlan 1 to Vlan 130 with the command, switchport trunk native vlan 130 or change the mode from trunk to access with the command switchport mode access


Again, the command I gave you before should've informed you about the native Vlan.


HTH,


__


Edison.

Actions

This Discussion