For the test I will configure ports on Cisco Catalyst 6509-E.
I’ll give an example of setting Access of the port (the traffic goes only over one specified vlan without a tag):
interface GigabitEthernet1/1 description TEXT switchport switchport access vlan 226 switchport mode access no shutdown
Now I’ll give an example of setting Trunk of the port (traffic goes through one or several vlan with a tag only):
interface GigabitEthernet1/2 description TEXT switchport switchport trunk encapsulation dot1q switchport trunk allowed vlan 207,228 switchport mode trunk no shutdown
And the third option, Hybrid port (traffic goes only on one vlan without a tag and on one or several vlan with a tag):
interface GigabitEthernet1/3 description TEXT switchport switchport trunk encapsulation dot1q switchport trunk native vlan 226 switchport trunk allowed vlan 207,226 switchport mode trunk no shutdown
To specify parameters for several ports at once:
interface range GigabitEthernet1/1-24
We prohibit automatic switching of the port to access or trunk mode:
interface range GigabitEthernet1/1-24 switchport nonegotiate exit
See also my article – Configuring link aggregation on the Cisco Catalyst 6500