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

Hi, What is final effect after putting access mode 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

interface gigabitethernet 6/7
switchport access vlan 2
switchport trunk allowed vlan 10
switchport mode trunk trunk
channel-group 11 mode active
eemoonAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

JustInCaseCommented:
Interface works as trunk.

This is when host is plugged into port (host have no traffic):
interface FastEthernet2
 switchport access vlan 10
 switchport mode trunk
 no ip address
 spanning-tree portfast

#sh vlan-switch

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active
10   VLAN0010                         active    Fa0, Fa1
20   VLAN0020                         active    Fa3
30   VLAN0030                         active

#sh int trunk

Port      Mode         Encapsulation  Status        Native vlan
Fa2       on           802.1q         trunking      1

Port      Vlans allowed on trunk
Fa2       1-4094

Port      Vlans allowed and active in management domain
Fa2       1,10,20,30

Port      Vlans in spanning tree forwarding state and not pruned
Fa2       1,10,20,30

Open in new window


But when host is not plugged:

#sh vlan-switch

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active
10   VLAN0010                         active    Fa0, Fa1, Fa2
20   VLAN0020                         active    Fa3
30   VLAN0030                         active

Open in new window

Looks like port is part of VLAN, although when host is attached is in trunk mode. Interesting situation. :)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Craig BeckCommented:
When a port is configured with an access VLAN but the switchport is in trunk mode, the access VLAN parameter is ignored.  The interface trunks just as it is configured to do.
0
eemoonAuthor Commented:
Thanks for your fast reply! I just tested it. If configured the port first and then plug in cable, it still looks like for one vlan. but after rebooting, the port become trunk port.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Switches / Hubs

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.