Solved

configuring an interface to vlan on switch

Posted on 2013-02-05
3
387 Views
Last Modified: 2013-02-06
Dear experts,

I was looking at Lab scenario and I notice that the solution given to configure an interface to vlan was below.

SwA(config)# interface f0/10
swA(config-if)#switchport access vlan 10

but as per cisco documentation i seen this additional command.

SwA(config-if)#switchport mode access
SwA(config-if)Switchport access vlan 10

My question is which is correct or are both correct?
0
Comment
Question by:Zak
3 Comments
 
LVL 3

Assisted Solution

by:bedind
bedind earned 167 total points
ID: 38858107
You will still need the first line, ie.
SwA(config)# interface f0/10

Then you *should* add the 2 lines:
SwA(config-if)#switchport mode access
SwA(config-if)Switchport access vlan 10

yes, without switchport mode access being defined it should still work, but not best practice
0
 
LVL 18

Assisted Solution

by:Akinsd
Akinsd earned 166 total points
ID: 38858114
Both are the same


SwA(config)# interface f0/10
SwA(config-if)#switchport mode access
SwA(config-if)Switchport access vlan 10

the interface command gets you into the interface
0
 
LVL 50

Accepted Solution

by:
Don Johnston earned 167 total points
ID: 38859217
By default, Cisco Catalyst switches have their ports in DTP dynamic mode (switchport mode dynamic desirable). This will allow a port to automatically become a trunk port when connected to another Cisco switch.

So if the port is connected to a PC, then it will be an access port since the PC doesn't do DTP.

But... It is possible to spoof DTP negotiation from a PC. Which would then make that port a trunk and allow someone to have access to all VLANs.

Which is why, as bedind stated, it's not best practice.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will step through configuring a SonicWALL appliance to utilize an internal DHCP server for Global VPN Client (GVC) hosts.  There are times when using an external (external to the SonicWALL) DHCP server, such as Windows Servers, isn’t pr…
When posting a question about a Cisco ASA, Cisco Router or Cisco Switch, it can aid diagnosis if a suitably sanitised copy of the config is provided. It is much better to leave as much of the configuration as original as possible, as it could be tha…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question