Вы находитесь на странице: 1из 6

4/13/2016

[CCNA]CiscoCommandsCheatSheet#3|BoubakrTech

Routerbasicconfiguration:
ThissectionincludesIOScommandsthatareabsolutelyidenticalonbothroutersandswitches,exceptthepartofline
aux0whichisconfiguredonlyonrouterbecauseswitchesdonothaveanauxiliaryport.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

Router(config)#hostnameR1
R1(config)#enablesecretcisco
R1(config)#linecon0
R1(configline)#passwordcisco
R1(configline)#login
R1(configline)#loggingsynchronous
R1(configline)#exectimeout300
R1(configline)#exit
R1(config)#linevty04
R1(configline)#passwordcisco
R1(configline)#login
R1(configline)#loggingsynchronous
R1(configline)#exectimeout300
R1(configline)#exit
R1(config)#lineaux0
R1(configline)#passwordcisco
R1(configline)#login
R1(configline)#loggingsynchronous
R1(configline)#exectimeout300
R1(configline)#exit
R1(config)#bannermotd$
================
UNAUTHORIZEDACCESSISPROHIBITED
================
$
R1(config)#aliasexeccconfigureterminal
R1(config)#aliasexecsshowipinterfacebrief
R1(config)#aliasexecsrshowrunningconfig
R1(config)#noipdomainlookup
R1(config)#servicepasswordencryption
R1(config)#ipdomainnameexample.com
R1(config)#usernameadminpasswordcisco
R1(config)#cryptokeygeneratersa
Howmanybitsinthemodulus[512]:1024
R1(config)#ipsshversion2
R1(config)#linevty04
R1(configline)#loginlocal
R1(configline)#transportinputtelnetssh

Configuringrouterinterfaces:
ClockrateissetonlyontheDCEside,typicallytheISPside.OnyourrouterwhichisDTEyoudontneedtoset
clocking.
1
2
3
4
5
6
7
8
9
10

R1(config)#interfacefastEthernet0/0
R1(configif)#descriptionLINKTOLOCALLANTHROUGHSW1
R1(configif)#ipaddress172.16.1.1255.255.255.0
R1(configif)#noshutdown
R1(configif)#exit
R1(config)#interfaceserial0/1/0
R1(configif)#descriptionWANCONNECTIONTOR2
R1(configif)#ipaddress10.1.1.1255.255.255.252
R1(configif)#clockrate128000
R1(configif)#noshutdown

https://boubakr92.wordpress.com/2013/09/23/ccnacheatsheetpart3/

1/6

4/13/2016

[CCNA]CiscoCommandsCheatSheet#3|BoubakrTech

ConfiguringRouterOnStickforvlanrouting:
1
2
3
4
5
6
7
8

R1(config)#interfacefastEthernet0/0
R1(configif)#noshutdown
R1(config)#interfacefastEthernet0/0.10
R1(configsubif)#encapsulationdot1q10
R1(configsubif)#ipaddress192.168.10.1255.255.255.0
R1(configsubif)#interfacefastEthernet0/0.20
R1(configsubif)#encapsulationdot1q20
R1(configsubif)#ipaddress192.168.20.1255.255.255.0

Staticroute:
Usingnexthop:
1

R1(config)#iproute10.1.2.0255.255.255.010.1.128.1
Usingexitinterface:

1
2

R1(config)#iproute10.1.2.0255.255.255.0Serial0/0
*Note:Exitinterfacecanbeusedinpointtopointseriallinks.

DefaultRoute:
1

R1(config)#iproute0.0.0.00.0.0.0199.1.1.1

RIPv2Configuration:
1
2
3
4
5

R1(config)#routerrip
R1(configrouter)#version2
R1(configrouter)#network10.0.0.0!writtenasanoriginalclassA
R1(configrouter)#noautosummary
R1(configrouter)#passiveinterfaceserial0/0

RIPv2Verification:
Showsinformationabouttherunningroutingprotocolprocess:
1

R1#showipprotocols
Showstheentireroutingtable:

R1#showiproute
ShowsrouteslearnedviaRIPonly:

R1#showiprouterip
Showsdetailedinformationabouttheroutetothespecifieddestinationnetwork:

R1#showiproute10.1.1.1

OSPFConfiguration:
EnterOSPFrouterconfigurationmode:
https://boubakr92.wordpress.com/2013/09/23/ccnacheatsheetpart3/

2/6

4/13/2016

[CCNA]CiscoCommandsCheatSheet#3|BoubakrTech

R1(config)#routerospf10!10=processID
ConfigureoneormorenetworkcommandstoidentifywhichinterfaceswillrunOSPF:

1
2
3

R1(configrouter)#network10.0.0.00.255.255.255area0
R1(configrouter)#network172.16.8.00.0.7.255area0
R1(configrouter)#network192.168.1.2540.0.0.0area1
ConfigurerouterIDeither(Optional):

Usingrouteridospfsubcommand:
1

R1(configrouter)#routerid1.1.1.1

ConfiguringanIPaddressonaloopbackinterface:
1
2

R1(config)#interfaceloopback0
R1(configif)#ipaddress1.1.1.1255.255.255.255
ChangeHelloandDeadintervalsperinterface(Optional):

1
2

R1(configif)#ipospfhellointerval2
R1(configif)#ipospfdeadinterval6
Impactroutingchoicesbytuninginterfacecostusingoneofthefollowingways(Optional):

Changinginterfacecost:
1

R1(configif)#ipospfcost55

Changinginterfacebandwidth:
1

R1(configif)#bandwidth128!inKbps

ChangingthereferencebandwidththatusedbyOSPFtocalculatethecost:
1

R1(configrouter)#autocostreferencebandwidth1000!inMbps
DisablingOSPFonacertaininterface(Optional):

R1(configrouter)#passiveinterfaceserial0/0
ConfiguringOSPFauthentication(Optional):

Type0authentication(none):
1

R1(configif)#ipospfauthenticationnull

Type1authentication(cleartext):
1
2

R1(configif)#ipospfauthentication
R1(configif)#ipospfauthenticationkeycisco

Type2authentication(md5):
1
2

R1(configif)#ipospfauthenticationmessagedigest
R1(configif)#ipospfmessagedigestkey1md5cisco
Configuremaximumequalcostpaths(Optional):

R1(configrouter)#maximumpaths6

https://boubakr92.wordpress.com/2013/09/23/ccnacheatsheetpart3/

3/6

4/13/2016

[CCNA]CiscoCommandsCheatSheet#3|BoubakrTech

OSPFverification:
Showsinformationabouttherunningroutingprotocolprocess:
1

R1#showipprotocols
Showstheentireroutingtable:

R1#showiproute
ShowsrouteslearnedviaOSPFonly:

R1#showiprouteospf
Showsallneighboringroutersalongwiththeirrespectiveadjacencystate:

R1#showipospfneighbors
ShowsalltheinformationcontainedintheLSDB:

R1#showipospfdatabase
ShowsdetailedinformationaboutOSPFrunningonaspecificinterface:

R1#showipospfinterfacesserial0/0

EIGRPConfiguration:
EnterEIGRPconfigurationmodeanddefineASnumber:
1

R1(config)#routereigrp121!121=ASnumber
ConfigureoneormorenetworkcommandstoenableEIGRPonthespecifiedinterfaces:

1
2
3
4

R1(configrouter)#network10.0.0.0
R1(configrouter)#network172.16.0.00.0.3.255
R1(configrouter)#network192.168.1.10.0.0.0
R1(configrouter)#network0.0.0.0255.255.255.255
Disableautosummarization(Optional):

R1(configrouter)#noautosummary
DisableEIGRPonaspecificinterface(Optional):

R1(configrouter)#passiveinterfaceserial0/0
Configureloadbalancingparameters(Optional):

1
2

R1(configrouter)#maximumpaths6
R1(configrouter)#variance4
ChangeinterfaceHelloandHoldtimers(Optional):

1
2

R1(configif)#iphellointervaleigrp1213
R1(configif)#ipholdtimeeigrp12110
ImpactingmetriccalculationsbytuningBWanddelayoftheinterface(Optional):

R1(configif)#bandwidth265!inKbps)

2
R1(configif)#delay120!tensofmicroseconds
https://boubakr92.wordpress.com/2013/09/23/ccnacheatsheetpart3/

4/6

4/13/2016

[CCNA]CiscoCommandsCheatSheet#3|BoubakrTech

R1(configif)#delay120!tensofmicroseconds

EIGRPAuthentication:
Thekeystringvalueandthemodemustbethesameonbothrouters.Lifetimeoptionsofthekeysrequirestheclock
oftherouterstobesetcorrectly,betteruseNTP,oritcancauseproblems
Createanauthenticationkeychainasfollows:
Createakeychainandgiveitaname:
1

R1(config)#keychainMY_KEYS

Createoneormorekeysgivingthemnumbers:
1

R1(configkeychain)#key1

Definethekeyvalue:
1

R1(configkeychainkey)#keystring1stKEY

Definethelifetimeofthekeys(optional):
1
2

R1(configkeychainkey)#sendlifetime[starttime][endtime]
R1(configkeychainkey)#acceptlifetime[starttime][endtime]
Enablemd5authenticationmodeforEIGRPontheinterface:

R1(configif)#ipauthenticationmodeeigrp121md5
Refertothecorrectkeychaintobeusedontheinterface:

R1(configif)#ipauthenticationkeychaineigrp121MY_KEYS

EIGRPVerification:
ShowsrouteslearnedviaEIGRPonly:
1

R1#showiprouteeigrp
ShowsEIGRPneighborsandstatus:

R1#showipeigrpneighbors
ShowsEIGRPtopologytable,includingsuccessorandfeasiblesuccessor:

R1#showipeigrptopology
ShowsinterfacesthatrunEIGRP:

R1#showipeigrpinterfaces
ListsstatisticsonnumbersofEIGRPmessagessentandreceivedbytherouter:

R1#showipeigrptraffic

Enjoy!
https://boubakr92.wordpress.com/2013/09/23/ccnacheatsheetpart3/

5/6

4/13/2016

[CCNA]CiscoCommandsCheatSheet#3|BoubakrTech

https://boubakr92.wordpress.com/2013/09/23/ccnacheatsheetpart3/

6/6

Вам также может понравиться