Sie sind auf Seite 1von 4

4/13/2016

[CCNA]CiscoCommandsCheatSheet#2|BoubakrTech

Configuringportsecurity:
Maketheswitchinterfaceasaccessport:
1

SW1(configif)#switchportmodeaccess
Enableportsecurityontheinterface:

SW1(configif)#switchportportsecurity
SpecifythemaximumnumberofallowedMACaddresses:

SW1(configif)#switchportportsecuritymaximum1
Definetheactiontotakewhenviolationoccurs:

SW1(configif)#switchportportsecurityviolationshutdown!options:shutdown,protect,re
SpecifytheallowedMACaddresses:

ThestickykeywordisusedtolettheinterfacedynamicallylearnsandconfigurestheMACaddressesofthecurrently
connectedhosts.
1

SW1(configif)#switchportportsecuritymacaddress68b5.9965.1195!options:H.H.H,sticky

Verifyandtroubleshootportsecurity:
Showstheentriesofthemacaddresstable:
1

SW1#showmacaddresstable
Overviewofportsecurityofallinterfaces:

SW1#showportsecurity
Showsdetailedinformationaboutportsecurityonthespecifiedinterface:

SW1#showportsecurityinterfacefa0/5

ConfiguringVLANs:
CreateanewVLANandgiveitaname:
1
2

SW1(config)#vlan10
SW1(configvlan)#nameSALES
AssignanaccessinterfacetoaccessaspecificVLAN:

1
2
3

SW1(config)#interfacefastEthernet0/5
SW1(configif)#switchportmodeaccess
SW1(configif)#switchportaccessvlan10

ConfiguringanauxiliaryVLANforciscoIPphones:
https://boubakr92.wordpress.com/2013/09/19/ccnacheatsheetpart2/

1/4

4/13/2016

1
2
3
4

[CCNA]CiscoCommandsCheatSheet#2|BoubakrTech

SW1(config)#interfacefastEthernet0/5
!accessingvlan10(data)and12(VoIP)
SW1(configif)#switchportaccessvlan10
SW1(configif)#switchportvoicevlan12

ConfiguringTrunks:
1
2
3

SW1(config)#interfacefastEthernet0/1
SW1(configif)#switchportmodetrunk!options:access,trunk,dynamicauto,dynamicdesira
SW1(configif)#switchporttrunkallowedvlanadd10!options:add,remove,all,except

SecuringVLANsandTrunking:
Administrativelydisableunusedinterfaces:
1

SW1(configif)#shutdown
Preventtrunkingbydisablingautonegotiationontheinterface:

1
2

SW1(configif)#nonegotiate!orhardcodetheportasanaccessport
SW1(configif)#switchportmodeaccess
AssigntheporttoanunusedVLAN:

SW1(configif)#switchportaccessvlan222

ConfiguringVTP:
ConfigureVTPmode:
ThetransparentVTPmodeisusedwhenanengineerwantstodeactivateVTPonaparticularswitch
1

SW1(config)#vtpmodeserver!options:server,client,transparent
ConfigureVTPdomainname:

SW1(config)#vtpdomainEXAMPLE!casesensitive
ConfigureVTPpassword(optional):

SW1(config)#vtppasswordcisco!casesensitive
ConfigureVTPpruning(optional):

SW1(config)#vtppruning!onlyworksonVTPservers
EnableVTPversion2(optional):

SW1(config)#vtpversion2

VerifyandtroubleshootVLANsandVTP:
Listsinformationaboutadministrativesettingandoperationstatusofinterface:
1

SW1#showinterfacesifswitchport

https://boubakr92.wordpress.com/2013/09/19/ccnacheatsheetpart2/

2/4

4/13/2016

[CCNA]CiscoCommandsCheatSheet#2|BoubakrTech

ListsallthetrunkportsonaswitchincludingthetrunkallowedVLANs:
1

SW1#showinterfacestrunk
ListsinformationabouttheVLANs:

SW1#showvlan{brief|id|name|summary}
ListsVTPconfiguration(mode,domainname,version,etc)andrevisionnumber:

SW1#showvtpstatus
ShowstheVTPpassword:

SW1#showvtppassword

STPoptimization:
Hardcodingtherootbridge(changingbridgepriority):
1
2
3
4

SW1(config)#spanningtreevlan1rootprimary
SW1(config)#spanningtreevlan1rootsecondary
!Prioritymustbeamultiplyof4096
SW1(config)#spanningtree[vlan1]priority8192
ChangingtheSTPmode:

SW1(config)#spanningtreemoderapidpvst!options:mst,pvst,rapidpvst
EnablingportfastandBPDUguardonaninterface:

PortfastandBPDUguardareenabledonlyoninterfacesconnectedtoenduserhosts
1
2

SW1(configif)#spanningtreeportfast
SW1(configif)#spanningtreebpduguardenable
Changingportcost:

SW1(configif)#spanningtree[vlan1]cost25
Bundlinginterfacesintoanetherchannel:

SW1(configif)#channelgroup1modeon!options:auto,desirable,on

STPverificationandtroubleshooting:
ShowsdetailedinfoaboutSTPstate:
1

SW1#showspanningtree
ShowsSTPinfoonlyonaspecificport:

SW1#showspanningtreeinterfacefa0/2
ShowsSTPinfoonlyforaspecificVLAN:

SW1#showspanningtreevlan1

https://boubakr92.wordpress.com/2013/09/19/ccnacheatsheetpart2/

3/4

4/13/2016

[CCNA]CiscoCommandsCheatSheet#2|BoubakrTech

Showsinfoabouttherootswitch:
1

SW1#showspanningtree[vlan1]root
Showsinfoaboutthelocalswitch:

SW1#showspanningtree[vlan1]bridge
Showthestateoftheetherchannels:

SW1#showetherchannel1
ProvidesinformationalmessagesaboutthechangesintheSTPtopology:

SW1#debugspanningtreeevents

EnablingordisablingCDP:
EnablingCDPgloballyonaswitch:
1

SW1(config)#cdprun
DisablingCDPonagiveninterface:

SW1(configif)#nocdpenable

UsingCDPfornetworkverificationandtroubleshooting:
ShowsglobalinformationaboutCDPitself:
1

SW1#showcdp
ShowsinformationaboutCDPonaspecificinterface:

SW1#showcdpinterfacefa0/2
Showsinformationaboutthedirectlyconnectedciscodevicesincludinginterfacesnamescapabilities:

SW1#showcdpneighbors
ShowsdetailedinformationabouttheneighboringciscodevicesincludingdeviceaddressandversionofIOS
theyrun:

1
2
3

SW1#showcdpneighborsdetail
!OR
SW1#showcdpentry*
Showsdetailedinformationaboutthespecifiedentryonly:

SW1#showcdpentrySW2

https://boubakr92.wordpress.com/2013/09/19/ccnacheatsheetpart2/

4/4

Das könnte Ihnen auch gefallen