Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

configuring an interface to vlan on switch

Posted on 2013-02-05
3
Medium Priority
?
400 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 3

Assisted Solution

by:bedind
bedind earned 668 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 664 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 668 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

Looking for the Wi-Fi vendor that's right for you?

We know how difficult it can be to evaluate Wi-Fi vendors, so we created this helpful Wi-Fi Buyer's Guide to help you find the Wi-Fi vendor that's right for your business! Download the guide and get started on our checklist today!

Question has a verified solution.

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

In this tutorial I will show you with short command examples how to obtain a packet footprint of all traffic flowing thru your Juniper device running ScreenOS. I do not know the exact firmware requirement, but I think the fprofile command is availab…
I see many questions here on Experts Exchange regarding switch port configurations and trunks. This article is meant for beginners in the subject to help to get basic knowledge about Virtual Local Area Network (VLAN (http://en.wikipedia.org/wiki/Vir…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

730 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