Switchport mode access

Answered Question
Oct 16th, 2006
User Badges:

Hi

when we create vlan and port assign in vlan , we give a command switchport mode access.


like:


interface fastethernet0/1

switchport mode access

switchport access vlan 10


if we not give switchport mode access then what happend.


pls anyone clear to me ?.


thanks

biplob

Correct Answer by ankbhasi about 10 years 7 months ago

Hi Biplob,


1) "switchport mode access" in a layer 2 physical interface command and no matter it is 2950 or 3550 switch if you configure any physical interface and you want the interface to work as an access link and not a trunk link you will configure this command.


Even if you have layer 3 switch like 3550 you will create a vlan interface which is layer 3 interface for routing purpose but to bind any physical port to that layer 3 interface you need to have same vlan at layer 2 configured on some physical port so you use this command on layer 2 physical interface only.


2) If you want your link to work only as an access link and not a trunk link you have to use this command.


Now what happen if you do not use this command. Suppose you have another networkdevice which supports trunking connected to this interface but you want this interface to work only as an access link for single vlan what happens on cisco switch is like all the physical layer 2 interfaces are in dynamic desirable mode and they will try to form a trunk if the device conneted to this supports trunking and want to form a trunk. But if you configure "switchport mode access" command this interface will unconditionally form an access link working for only one vlan.


If you do not cofnigure this command it is not necessary that it will form a trunk it will TRY to form a trunk if the remote device is configured for trunking and supports trunking.


HTH


Ankur

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
ankbhasi Mon, 10/16/2006 - 22:33
User Badges:
  • Cisco Employee,

Hi Biplob,


Bydefault the switchport are in dynamic desirable mode and it will try to form a trunk depending upon the config on the remote switch to which this switch is connected.


By default it is dynamic desirable it will set the interface trunking mode dynamic parameter to desirable to specify that the interface actively attempt to convert the link to a trunk link


And if you configure it mode access the port is set to access unconditionally and operates as a nontrunking, single VLAN interface that sends and receives nonencapsulated (non-tagged) frames. An access port can be assigned to only one VLAN.


HTH


Ankur



iqbalkhan Mon, 10/16/2006 - 23:09
User Badges:

Hi Ankur


thanks your replay. but my confusion is


1. when i configure vlan in layer 2 device like 2950 switch then i need also use this command ?. or this command use when i configure vlan in layer 3 device like 3550 switch.


2.when enter this command within interface then what is benefit and if i not configure comannd port then it works as trunk port ??


thanks

biplob

Correct Answer
ankbhasi Mon, 10/16/2006 - 23:21
User Badges:
  • Cisco Employee,

Hi Biplob,


1) "switchport mode access" in a layer 2 physical interface command and no matter it is 2950 or 3550 switch if you configure any physical interface and you want the interface to work as an access link and not a trunk link you will configure this command.


Even if you have layer 3 switch like 3550 you will create a vlan interface which is layer 3 interface for routing purpose but to bind any physical port to that layer 3 interface you need to have same vlan at layer 2 configured on some physical port so you use this command on layer 2 physical interface only.


2) If you want your link to work only as an access link and not a trunk link you have to use this command.


Now what happen if you do not use this command. Suppose you have another networkdevice which supports trunking connected to this interface but you want this interface to work only as an access link for single vlan what happens on cisco switch is like all the physical layer 2 interfaces are in dynamic desirable mode and they will try to form a trunk if the device conneted to this supports trunking and want to form a trunk. But if you configure "switchport mode access" command this interface will unconditionally form an access link working for only one vlan.


If you do not cofnigure this command it is not necessary that it will form a trunk it will TRY to form a trunk if the remote device is configured for trunking and supports trunking.


HTH


Ankur

Actions

This Discussion