dslreports logo
site
 
    All Forums Hot Topics Gallery
spc

spacer




how-to block ads


Search Topic:
uniqs
16
share rss forum feed


TomS_
Git-r-done
Premium,MVM
join:2002-07-19
London, UK
kudos:5

2 edits
reply to JDmailNY

Re: [CCNA] switchport mode access : Command Question : Why use i

said by JDmailNY:

Why does this command do [switchport mode access]. and why would I need to use it ?????
There are two types of switch port modes: access and trunk

Access ports are what you would typically plug a server, PC/laptop, printer, etc into. An access port is configured to be within a particular VLAN. Ethernet frames that exit an access port (i.e. towards the device plugged into the port) will have any VLAN headers/tags stripped. Ethernet frames that enter an access port will have a VLAN tag added to identify which VLAN the ethernet frame belongs to.

Trunk ports are what you would typically plug a router into for inter-VLAN routing, or another switch in order to "share" VLANs between switches. Unlike access ports, ethernet frames that exit a trunk port will maintain any VLAN headers/tags that are present so that the receiving device is able to appropriately handle the frame.

Using the "switchport mode access" command you are, as mentioned by others, forcing the port to be an access port, no exceptions. A device plugged into this port will only be able to communicate with other devices that are in the same VLAN.

Using the "switchport mode trunk" command you force the port to be a trunk.

By forcing the port into a particular configuration you will have predictable outcomes when you plug devices into those ports. Security wise its a good idea.

JDmailNY

join:2007-12-02
Pearl River, NY
This was taken from figure 9.10
If you have Todd L CCNA book.
Page 576.

What does this configuration NOT use
switchport access mode when configuring VLANS.?????

2960# Config t
2960(config)#int f0/1
2960(config-if)#switchport mode trunk
2960(config-if)#int f0/2
2960(config-if)#switchport access vlan 1
2960(config-if)#int f0/3
2960(config-if)#switchport access vlan 1
2960(config-if)#int f0/4
2960(config-if)#switchport access vlan 3
2960(config-if)#int f0/5
2960(config-if)#switchport access vlan 3
2960(config-if)#int f0/6
2960(config-if)#switchport access vlan 2