Using switchport mode access vlan x and switchport mode trunk on the same interface

Jul 27, 2006 2 Replies

I'm new to Cisco IOS and I'm trying to configure a 4507. I've been configuring trunks using the syntax below without the "switchport access vlan" command. I use the "switchport access vlan" command to make interfaces members of a vlan but never for trunks. Today I accidentally entered it on a trunk interface and the IOS did not complain. I was wondering if anyone could tell me what this command might do when used on a trunk interface.



Thanks Ned


interface GigabitEthernet2/1 switchport access vlan 800 switchport trunk encapsulation dot1q switchport trunk native vlan 50 switchport trunk allowed vlan 50,60,800 switchport mode trunk



It sets the port VLAN for when the port is in access mode. If you set the mode to access (switchport mode access) then the port VLAN would switch to 800 from 50; if you switch to one of the sensing modes (switchport mode dynamic ...) then the state the port negotiates into will determine the port VLAN.

Sam

Thanks, it all makes sense to me now.

Sam Wils> >

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required