Solved

configuring an interface to vlan on switch

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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Cisco 3560 Switch with Multiple Gateways 10 90
Patch panel 7 63
QoS on Cisco router 10 54
GBIC "Gi0/25 notconnect 1auto auto unknown" 3 76
If you’re like me and you like peace and quiet, saving money, and pretty lights, then this article is for you. For financial reasons, I buy all the Cisco equipment for my home lab second-hand. The first thing to wear out is usually one of the coo…
Hi there, This article summarizes what you need if you are going to set up your home or small business Network Attached Storage (NAS) to be accessible from the internet. Of course there are configuration differences based on your NAS or router ma…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

738 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