cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
960
Views
0
Helpful
2
Replies

Use of "switchport access mode"

prasanga123
Level 1
Level 1

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.

2 Replies 2

spremkumar
Level 9
Level 9

hi

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.

regds

thanks

Review Cisco Networking products for a $25 gift card