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

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

Reply to
Ned
Loading thread data ...

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

Reply to
Sam Wilson

Thanks, it all makes sense to me now.

Sam Wils> >

Reply to
Ned

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.