Solved

configuring an interface to vlan on switch

Posted on 2013-02-05
3
383 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

Superior storage. Superior surveillance.

WD Purple drives are built for 24/7, always-on, high-definition security systems. With support for up to 8 hard drives and 32 cameras, WD Purple drives are optimized for surveillance.

Question has a verified solution.

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

Suggested Solutions

Do you have a computer or other electronic gear that is attached to a rat nest of cables, or alternatively have your cables all bundled nice at neat?  If so then read this post to sidstep common pitfalls. When I was a student at DeVry University,…
This article is a how to to configure a UCS Ethernet-uplink portchannel via the console. It is easy to do and can be done quite quickly. In certain versions of the UCS manager the portchannel has issues coming up and this is a workaround. I am…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

932 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now