Technology: Switching
Area: VLANs
Vendor: Cisco
Software: 12.X , 15.X
Platform: Catalyst platforms, Nexus platforms
Ethernet interfaces can be configured either as access ports or a trunk ports, as follows:
- An access port can have only one VLAN configured on the interface; it can carry traffic for only one VLAN.
- A trunk port can have more VLANs configured on the interface; it can carry traffic for many VLANs simultaneously.
An access port transmits packets on only one VLAN (traffic is not tagged on this type of port).
To set FastEthernet 1/10 as an Ethernet access port that carries traffic for VLAN 5 only:
switch#configure terminal
switch(config)#interface FastEthernet 0/10
switch(config-if)#switchport mode access
switch(config-if)#switchport access vlan 5
There is also method to set “user/host-facing” port with one handy command for setting few features at once. Switchport host command makes: the port an access port, sets the Spanning Tree portfast feature, disables port-channel.
switch#configure terminal
switch(config)#interface FastEthernet 0/1
switch(config-if)#switchport host
switch(config-if)#switchport access vlan 5
Check how to configure trunk port.
Author: Marcin Bialy