cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
270
Views
0
Helpful
4
Replies

What is final effect after putting access vlan # and trunk mode together under the same interface ?

wfqk
Level 5
Level 5

What is final effect after putting access vlan # and trunk mode together under the same interface ? I noticed some one put access vlan 2 and trunk mode together under the same interface. it looks like below. Thank you 

interface gigabitethernet 6/7
switchport access vlan 2
switchport trunk allowed vlan 10
switchport mode trunk trunk
channel-group 11 mode active

4 Replies 4

Reza Sharifi
Hall of Fame
Hall of Fame

The important command is "switchport mode trunk" this means the port is trunk and not an access port. So "switchport access vlan 2" has no effect.

HTH

Thank you so much for your reply. I think you are right. The difference between both is trunk mode allow all vlan pass through, while access mode just allow one vlan pass. Although the two commands get together, it still is trunk mode and allow all vlan pass, right ? 

In the port configuration you posted. There is this command:

switchport trunk allowed vlan 10

This means, only vlan 10 is allowed on the trunk and no other vlan.

If you did not have this command in the config, that would mean all vlans are allowed on the trunk.

The access port vlan command has no effect because the mode is trunk.

HTH

Excellent explanation ! Thank you

Review Cisco Networking products for a $25 gift card