Solved

configuring an interface to vlan on switch

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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…
#Citrix #Citrix Netscaler #HTTP Compression #Load Balance
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

746 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

15 Experts available now in Live!

Get 1:1 Help Now