Use of "switchport access mode"

Unanswered Question
Apr 25th, 2008
User Badges:

I have a 2960 switch with 2 vlans as 10 & 20.

ports from f0/1 to f0/10 belog to 10 vlan and from f0/11 to f0/23 belog to 20 vlan.

f0/24 is a trunk port

PCs connected to this switch get dhcp ips from a dhcp server(1841 router).

sample config of 2 switch ports of 2 vlans

interface f0/1

switchport access vlan 10

switchport mode access

interface f0/11

switchport access vlan 20

switchport mode access

My question is, the pcs get ips even without "switchport mode access"

The setup works even without that command line.

I understand that "switchport mode access" set the port into a access port.

But if the above set up works without that what is the real necessity of this command line. please explain.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
spremkumar Fri, 04/25/2008 - 02:51
User Badges:
  • Red, 2250 points or more


hope this helps

switchport access : Set the port to access mode (either static-access or dynamic-access depending on the setting of the switchport access vlan interface configuration command). 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.



This Discussion