Cisco Router Configuration Tutorial

Post on 27-Oct-2015

186 views 1 download

Tags:

description

Cisco Router Configuration Tutorial

Transcript of Cisco Router Configuration Tutorial

Contents

1. What's covered2. Getting started3. Cisco RouterConfiguration3.1 Global configuration3.2 Configuring interfaces3.3 Routing3.4 IPv6 configurationwith IOS3.5 Saving yourconfiguration3.6 Example configuration4. Troubleshooting5. References6. More information

This work is licensedunder a CreativeCommons License.

PDF versionnow available.

Cisco Router ConfigurationTutorialJosh Gentry, jgentry@swcp.comv.1.4, 14 May, 2011

This document covers basic Cisco router IP configuration using thecommand-line interface

AcknowledgmentsThe following sources where extremely useful:

Leinwand, Pinsky, and Culpepper. Cisco Router Configuration.Indianapolis, Indiana: Cisco Press, 1998.Cisco Systems, Inc., http://www.cisco.com

DisclaimerThis document carries no explicit or implied warranty. Nor is there anyguarantee that the information contained in this document is accurate. It isoffered in the hopes of helping others, but you use it at your own risk. Theauthor will not be liable for any damages that occur as a result of using thisdocument.

ConventionsImportant terms and concepts, when they are introduced, may be displayed inbold. Commands included in the body of the text will be displayed in this

font. All names and addresses used in examples are just that, examples, andshould not be used on your network. Do not type them in verbatim whenconfiguring your system. Finally, in some examples where the commandrquires an IP address as an argument, the IP address may be represented inthis way, xx.xx.xx.xx, or aa.bb.cc.dd. You will never actually use these stringswhen configuring your system. They are mearly a convention of thisdocument to specify that you should substitute the appropriate IP address atthat point.

Cisco Configuration tool

Free Configuration Management toolfor Cisco Routers Switches Firewall

ManageEngine.com/DeviceExpert

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

1 of 60 10-12-2012 17:03

1. What this documentcovers

There are several methods available forconfiguring Cisco routers. It can bedone over the network from a TFTPserver. It can be done through themenu interface provided at bootup, andit can be done from the menu interfaceprovided by using the command setup.This tutorial does not cover thesemethods. It covers configuration fromthe IOS command-line interface only.Useful for anyone new to Ciscorouters, and those studying for CCNA.

Note that this tutorial does not coverphysically connecting the router to thenetworks it will be routing for. Itcovers operating system configurationonly.

1.1 Reasons for using thecommand-line

The main reason for using thecommand-line interface instead of amenu driven interface is speed. Onceyou have invested the time to learn thecommand-line commands, you canperform many operations much morequickly than by using a menu. This isbasically true of all command-line vs.menu interfaces. What makes itespecially efficient to learn thecommand-line interface of the CiscoIOS is that it is standard across allCisco routers. Also, some questions onthe CCNA exam require you to knowcommand-line commands.

2. Getting started withCisco

Initially you will probably configureyour router from a terminal. If therouter is already configured and atleast one port is configured with an IPaddress, and it has a physicalconnection to the network, you mightbe able to telnet to the router andconfigure it across the network. If it isnot already configured, then you willhave to directly connect to it with a

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

2 of 60 10-12-2012 17:03

terminalandaserialcable.WithanyWindowsboxyoucanuseHyperterminaltoeasilyconnecttotherouter.Plugaserialcableintoaserial(COM)portonthePCandtheotherendintotheconsoleportontheCiscorouter.StartHyperterminal,tellitwhichCOMporttouseandclickOK.Setthespeed

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

3 of 60 10-12-2012 17:03

oftheconnectionto9600baud

andclickOK.Iftherouterisnoton,turniton.

IfyouwishtoconfiguretherouterfromaLinuxbox,eitherSeyonorMinicomshouldwork.Atleastoneofthem,andmaybeboth,willcomewithyourLinuxdistribution.

OftenyouwillneedtohittheEnter

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

4 of 60 10-12-2012 17:03

keytoseethepromptfromtherouter.Ifitisunconfigureditwilllooklikethis:

Router>

Ifithasbeenpreviouslyconfiguredwithahostname,itwilllooklikethis:

hostnameofrouter>

Ifyouhavejustturnedontherouter,afteritbootsitwillaskyouifyouwishtobegininitial

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

5 of 60 10-12-2012 17:03

configuration.Sayno.Ifyousayyes,itwillputyouinthemenuinterface.Sayno.

2.1Modes

TheCiscoIOScommand-lineinterfaceisorganizedaroundtheideaofmodes.Youmoveinandoutofseveraldifferentmodeswhileconfiguringarouter,andwhichmodeyouareindetermineswhatcommandsyoucanuse.

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

6 of 60 10-12-2012 17:03

Eachmodehasasetofcommandsavailableinthatmode,andsomeofthesecommandsareonlyavailableinthatmode.Inanymode,typingaquestionmarkwilldisplayalistofthecommandsavailableinthatmode.

Router>?

2.2Unprivilegedandprivilegedmodes

Whenyoufirstconnecttotherouterandprovide

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

7 of 60 10-12-2012 17:03

thepassword(ifnecessary),youenterEXECmode,thefirstmodeinwhichyoucanissuecommandsfromthecommand-line.Fromhereyoucanusesuchunprivilegedcommandsasping,telnet,and

rlogin.

Youcanalsousesomeoftheshow

commandstoobtaininformationaboutthesystem.Inunprivilegedmodeyouusecommandslike,show

version

todisplay

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

8 of 60 10-12-2012 17:03

theversionoftheIOStherouterisrunning.Typingshow

?

willdiplayalltheshow

commandsavailableinthemodeyouarepresentlyin.

Router>show?

Youmustenterprivilegedmodetoconfiguretherouter.Youdothisbyusingthecommandenable.Privilegedmodewillusuallybepasswordprotectedunlesstherouterisunconfigured.

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

9 of 60 10-12-2012 17:03

Youhavetheoptionofnotpasswordprotectingprivilegedmode,butitisHIGHLYrecommendedthatyoudo.Whenyouissuethecommandenable

andprovidethepassword,youwillenterprivilegedmode.

Tohelptheuserkeeptrackofwhatmodetheyarein,thecommand-linepromptchangeseachtimeyouenteradifferentmode.When

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

10 of 60 10-12-2012 17:03

youswitchfromunprivilegedmodetoprivilegedmode,thepromptchangesfrom:

Router>

to

Router#

Thiswouldprobablynotbeabigdealiftherewerejusttwomodes.Thereare,infact,numerousmodes,andthisfeatureisprobablyindispensable.Paycloseattentiontothepromptatalltimes.

Withinprivilegedmodethere

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

11 of 60 10-12-2012 17:03

aremanysub-modes.InthisdocumentIdonotcloselyfollowCiscoterminologyforthishierarchyofmodes.Ithinkthatmyexplanationisclearer,frankly.Ciscodescribestwomodes,unprivilegedandprivileged,andthenahierarchyofcommandsusedinprivilegedmode.Ireasonthatitismuchclearertounderstandifyoujustconsiderthereto

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

12 of 60 10-12-2012 17:03

bemanysub-modesofprivilegedmode,whichIwillalsocallparentmode.Onceyouenterprivilegedmode(parentmode)thepromptendswithapoundsign(#).Therearenumerousmodesyoucanenteronlyafterenteringprivilegedmode.Eachofthesemodeshasapromptoftheform:

Router(arguments)#

Theystillallendwith

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

13 of 60 10-12-2012 17:03

thepoundsign.Theyaresubsumedwithinprivilegedmode.Manyofthesemodeshavesub-modesoftheirown.Onceyouenterpriligedmode,youhaveaccesstoalltheconfigurationinformationandoptionstheIOSprovides,eitherdirectlyfromtheparentmode,orfromoneofitssubmodes.

3.ConfiguringyourCiscoRouter

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

14 of 60 10-12-2012 17:03

Ifyouhavejustturnedontherouter,itwillbecompletelyunconfigured.Ifitisalreadyconfigured,youmaywanttoviewitscurrentconfiguration.Evenifithasnotbeenpreviouslyconfigured,youshouldfamiliarizeyourselfwiththeshow

commandsbeforebeginningtoconfiguretherouter.Enterprivilegedmodebyissuingthecommandenable,then

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

15 of 60 10-12-2012 17:03

issueseveralshow

commandstoseewhattheydisplay.Remember,thecommandshow

?

willdisplayalltheshowcommandsaavailableinthecurrentmode.Definatelytryoutthefollowingcommands:

Router#showinterfacesRouter#showipprotocolsRouter#showipv6protocolsRouter#showiprouteRouter#showipv6routeRouter#showiparpRouter#showipv6neighbors

Whenyouenterprivilegedmodebyusingthecommandenable,you

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

16 of 60 10-12-2012 17:03

areinthetop-levelmodeofprivilegedmode,alsoknowninthisdocumentas"parentmode."Itisinthistop-levelorparentmodethatyoucandisplaymostoftheinformationabouttherouter.Asyounowknow,youdothiswiththeshow

commands.Hereyoucanlearntheconfigurationofinterfacesandwhethertheyare

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

17 of 60 10-12-2012 17:03

upordown.YoucandisplaywhatIPprotocolsareinuse,suchasdynamicroutingprotocols.YoucanviewtherouteandARPtables,andthesearejustafewofthemoreimportantoptions.

Asyouconfiguretherouter,youwillentervarioussub-modestosetoptions,thenreturntotheparentmodetodisplay

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

18 of 60 10-12-2012 17:03

theresultsofyourcommands.Youalsoreturntotheparentmodetoenterothersub-modes.Toreturntotheparentmode,youhitctrl-z.Thisputsanycommandsyouhavejustissuedintoaffect,andreturnsyoutoparentmode.

3.1Globalconfiguration(config)

Toconfigureanyfeatureoftherouter,youmustenter

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

19 of 60 10-12-2012 17:03

configurationmode.Thisisthefirstsub-modeoftheparentmode.Intheparentmode,youissuethecommandconfig.

Router#configRouter(config)#

Asdemonstratedabove,thepromptchangestoindicatethemodethatyouarenowin.

Inconnfigurationmodeyoucansetoptionsthatapplysystem-wide,alsoreferedtoas"globalconfigurations."Forinstance,it

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

20 of 60 10-12-2012 17:03

isagoodideatonameyourroutersothatyoucaneasilyidentifyit.Youdothisinconfigurationmodewiththehostname

command.

Router(config)#hostnameExampleNameExampleName(config)#

Asdemonstratedabove,whenyousetthenameofthehostwiththehostname

command,thepromptimmediatelychangesbyreplacingRouter

withExampleName.(Note:Itisagood

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

21 of 60 10-12-2012 17:03

ideatonameyourrouterswithanorganizednamingscheme.)

AnotherusefulcommandissuedfromconfigmodeisthecommandtodesignatetheDNSservertobeusedbytherouter:

ExampleName(config)#ipname-serveraa.bb.cc.ddExampleName(config)#ctrl-ZExampleName#

Thisisalsowhereyousetthepasswordforprivilegedmode.

ExampleName(config)#enablesecretexamplepasswordExampleName(config)#ctrl-ZExampleName#

Untilyouhitctrl-Z

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

22 of 60 10-12-2012 17:03

(ortypeexit

untilyoureachparentmode)yourcommandhasnotbeenputintoaffect.Youcanenterconfigmode,issueseveraldifferentcommands,thenhitctrl-Z

toactivatethemall.Eachtimeyouhitctrl-Z

youreturntoparentmodeandtheprompt:

ExampleName#

Hereyouuseshow

commandstoverifytheresultsofthe

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

23 of 60 10-12-2012 17:03

commandsyouissuedinconfigmode.Toverifytheresultsoftheip

name-server

command,issuethecommandshow

host.

3.2ConfiguringCiscorouterinterfaces

Ciscointerfacenamingisstraightforward.Individualinterfacesarereferredtobythisconvention:

mediatypeslot#/port#

"Mediatype"referstothetypeofmediathattheportisaninterface

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

24 of 60 10-12-2012 17:03

for,suchasEthernet,TokenRing,FDDI,serial,etc.Slotnumbersareonlyapplicableforroutersthatprovideslotsintowhichyoucaninstallmodules.Thesemodulescontainseveralportsforagivenmedia.The7200seriesisanexample.Thesemodulesareevenhot-swapable.Youcanremoveamodulefromaslotandreplaceitwitha

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

25 of 60 10-12-2012 17:03

differentmodule,withoutinterruptingserviceprovidedbytheothermodulesinstalledintherouter.Theseslotsarenumberedontherouter.

Portnumberreferstotheportinreferencetotheotherportsinthatmodule.Numberingisleft-to-right,andallnumberingstartsat0,notatone.

Forexample,aCisco7206isa

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

26 of 60 10-12-2012 17:03

7200seriesrouterwithsixslots.TorefertoaninterfacethatisthethirdportofanEthernetmoduleinstalledinthesixthslot,itwouldbeinterfaceethernet6/2.Therefor,todisplaytheconfigurationofthatinterfaceyouusethecommand:

ExampleName#showinterfaceethernet6/2

Ifyourrouterdoesnothaveslots,likea1600,

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

27 of 60 10-12-2012 17:03

thentheinterfacenameconsistsonlyof:

mediatypeport#

Forexample:

ExampleName#showinterfaceserial0

HereisanexampleofconfiguringaserialportwithanIPaddress:

ExampleName#configExampleName(config)#interfaceserial1/1ExampleName(config-if)#ipaddress192.168.155.2255.255.255.0ExampleName(config-if)#ipv6addressfe80::230:1bff:fe80:b8ea/64ExampleName(config-if)#ipv6enableExampleName(config-if)#noshutdownExampleName(config-if)#ctrl-ZExampleName#

Thentoverifyconfiguration:

ExampleName#showinterface

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

28 of 60 10-12-2012 17:03

serial1/1

Notetheno

shutdown

command.Aninterfacemaybecorrectlyconfiguredandphysicallyconnected,yetbe"administrativelydown."Inthisstateitwillnotfunction.Thecommandforcausinganinterfacetobeadministrativelydownisshutdown.

ExampleName(config)#interfaceserial1/1ExampleName(config-if)#shutdownExampleName(config-if)#ctrl-ZExampleName#showinterfaceserial1/1

IntheCiscoIOS,thewaytoreverseor

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

29 of 60 10-12-2012 17:03

deletetheresultsofanycommandistosimplyputno

infrontofit.Forinstance,ifwewantedtounassigntheIPaddresswehadassignedtointerfaceserial1/1:

ExampleName(config)#interfaceserail1/1ExampleName(config-if)#noipaddress192.168.155.2255.255.255.0ExampleName(config-if)ctrl-ZExampleName#showinterfaceserial1/1

ConfiguringmostinterfacesforLANconnectionsmightconsistonlyofassigninganetworklayer

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

30 of 60 10-12-2012 17:03

addressandmakingsuretheinterfaceisnotadministrativelyshutdown.Itisusuallynotnecessarytostipulatedata-linklayerencapsulation.Notethatitisoftennecessarytostipulatetheappropriatedata-linklayerencapsulationforWANconnections,suchasframe-relayandATM.SerialinterfacesdefaulttousingHDLC.Adiscussionofdata-linkprotocolsisoutsidethescopeofthis

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

31 of 60 10-12-2012 17:03

document.YouwillneedtolookuptheIOScommandencapsulation

formoredetails.

3.3ConfiguringCiscoRouting

IProutingisautomaticallyenabledonCiscorouters.Ifithasbeenpreviouslydisabledonyourrouter,youturnitbackoninconfigmodewiththecommandiprouting.

ExampleName(config)#iproutingExampleName(config)#ctrl-Z

ToenableIPv6routing,

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

32 of 60 10-12-2012 17:03

usethecommandipv6unicast-routing.

ExampleName(config)#ipv6unicast-routingExampleName(config)#ctrl-Z

Therearetwomainwaysarouterknowswheretosendpackets.Theadministratorcanassignstaticroutes,ortheroutercanlearnroutesbyemployingadynamicroutingprotocol.

Staticroutesaregenerallyusedinverysimplenetworksorinparticularcasesthatnecessitatetheiruse.

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

33 of 60 10-12-2012 17:03

Tocreateastaticroute,theadministratortellstherouteroperatingsystemthatanynetworktrafficdestinedforaspecifiednetworklayeraddressshouldbeforwardedtoasimiliarlyspecifiednetworklayeraddress.IntheCiscoIOSthisisdonewiththeip

route

andipv6routecommands.

ExampleName#configExampleName(config)#iproute172.16.0.0255.255.255.0192.168.150.1ExampleName(config)#ctrl-ZExampleName#showiproute

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

34 of 60 10-12-2012 17:03

ExampleName#configExampleName(config)#ipv6routefe80::230:1bff:fe80::/64fe80::230:1bff:fe80::1ExampleName(config)#ctrl-ZExampleName#showipv6route

Twothingstobesaidaboutthisexample.First,thepacketdestinationaddressmustincludethesubnetmaskforthatdestinationnetwork.Second,theaddressitistobeforwardedtoisthespecifiedaddresofthenextrouteralongthepathtothedestination.Thisisthemostcommon

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

35 of 60 10-12-2012 17:03

wayofsettingupastaticroute,andtheonlyonethisdocumentcovers.Beaware,however,thatthereareothermethods.

Dynamicroutingprotocols,runningonconnectedrouters,enablethoserouterstoshareroutinginformation.Thisenablesrouterstolearntheroutesavailabletothem.Theadvantageofthismethodisthatroutersareableto

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

36 of 60 10-12-2012 17:03

adjusttochangesinnetworktopologies.Ifarouteisphysicallyremoved,oraneighborroutergoesdown,theroutingprotocolsearchesforanewroute.Routingprotocolscanevendynamicallychoosebetweenpossibleroutesbasedonvariablessuchasnetworkcongestionornetworkreliability.

Therearemanydifferentroutingprotocols,andtheyallusedifferentvariables,

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

37 of 60 10-12-2012 17:03

knownas"metrics,"todecideuponappropriateroutes.Unfortunately,arouterneedstoberunningthesameroutingprotocolsasitsneighbors.Manyrouterscan,however,runmutlipleprotocols.Also,manyprotocolsaredesignedtobeabletopassroutinginformationtootherroutingprotocols.Thisiscalled"redistribution."

Routingprotocolsareacomplextopicandthis

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

38 of 60 10-12-2012 17:03

documentcontainsonlythissuperficialdescriptionofthem.Thereismuchtolearnaboutthem,andtherearemanysourcesofinformationaboutthemavailable.AnexcelentsourceofinformationonthistopicisCisco'swebsite,http://www.cisco.com.

3.4IPv6configurationwithIOS

ThisisaseperatesectionbecauseIPv6isnewtomostpeople,and

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

39 of 60 10-12-2012 17:03

theywillbelookingspecificallyforinformationaboutconfiguringIPv6.ExamplesofconfiguringIPv6areincludedthroughoutthedocument,however,alongsideIPv4.ThatisamoreaccuratereflectionofhowyouwillworkwithIPv6onaday-to-daybasis.OncethenewnessofIPv6passes,itwillbeonemorepieceinthefamiliarpuzzle.

Theimportant

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

40 of 60 10-12-2012 17:03

concepttounderstandwhenconfiguringIPv6isthatIPv4andIPv6existinparrallel.Oneisnotareplacementfortheother,atleastnotinthewayitistreatedbytheoperatingsystem.Atermforthisisdualstack.AninterfacecanhaveanIPv4addressandnoIPv6address.OranIPv6addressand

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

41 of 60 10-12-2012 17:03

noIPv4address.OrbothanIPv4addressandanIPv6address.Examples:

IPv4only

!interfaceFastEthernet0/0ipaddress192.168.1.138255.255.255.0!

IPv6only

!interfaceFastEthernet0/0ipv6addressfe80::230:1bff:fe80::/64ipv6enable!

IPv4andIPv6

!interfaceFastEthernet0/0ipaddress192.168.1.138255.255.255.0ipv6addressfe80::230:1bff:fe80::/64ipv6enable!

Noticethatthereareseperatebutsimiliarcommandsfor

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

42 of 60 10-12-2012 17:03

IPv4andIPv6.ToassignanIPv4address,

ExampleName(config-if)#ipaddress192.168.1.138255.255.255.0

ToassignanIPv6address,

ExampleName(config-if)#ipv6addressfe80::230:1bff:fe80::/64

TherearesomebiggerdifferencesbetweenIPv4andIPv6IOScommands.Forexample,theIPv6equivilantofshowip

arp,isshowipv6

neighbors.

3.5SavingyourCiscoRouterconfiguration

Onceyou

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

43 of 60 10-12-2012 17:03

haveconfiguredroutingontherouter,andyouhaveconfiguredindividualinterfaces,yourroutershouldbecapableofroutingtraffic.Giveitafewmomentstotalktoitsneighbors,thenissuethecommandsshowip

route

andshowip

arp.Thereshouldnowbeentriesinthesetableslearnedfromtheroutingprotocol.

Ifyouturnedthe

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

44 of 60 10-12-2012 17:03

routeroffrightnow,andturneditonagain,youwouldhavetostartconfigurationoveragain.Yourrunningconfigurationisnotsavedtoanyperminentstoragemedia.Youcanseethisconfigurationwiththecommandshowrunning-

config.

ExampleName#showrunning-config

Youdowanttosaveyoursuccessfulrunningconfiguration.Issuethecommandcopyrunning-configstartup-

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

45 of 60 10-12-2012 17:03

config.

ExampleName#copyrunning-configstartup-config

Yourconfigurationisnowsavedtonon-volatileRAM(NVRAM).Issuethecommandshowstartup-

config.

ExampleName#showstartup-config

Nowanytimeyouneedtoreturnyourroutertothatconfiguration,issuethecommandcopystartup-configrunning-

config.

ExampleName#copystartup-configrunning-config

3.6ExampleCiscoRouterconfiguration

Router>enable1.

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

46 of 60 10-12-2012 17:03

Router#config2.Router(config)#hostnameN115-7206

3.

N115-7206(config)#interfaceserial1/1

4.

N115-7206(config-if)ipaddress192.168.155.2255.255.255.0

5.

N115-7206(config-if)ipv6addressfe80::230:1bff:fe80:b8ea/64

6.

N115-7206(config-if)ipv6enable

7.

N115-7206(config-if)noshutdown

8.

N115-7206(config-if)ctrl-z

9.

N115-7206#showinterfaceserial1/1

10.

N115-7206#config11.N115-7206(config)#interfaceethernet2/3

12.

N115-7206(config-if)#ipaddress192.168.150.90255.255.255.0

13.

N115-7206(config-if)#noshutdown

14.

N115-7206(config-if)#ctrl-z

15.

N115-7206#showinterfaceethernet2/3

16.

N115-7206#config17.N115-7206(config)#ipname-server172.16.0.10

18.

N115-7206(config)#ctrl-z19.N115-7206#pingarchie.au

20.

N115-7206#config21.N115-7206(config)#enablesecretpassword

22.

N115-7206(config)#ctrl-z23.N115-7206#copyrunning-config

24.

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

47 of 60 10-12-2012 17:03

startup-configN115-7206#exit25.

4.TroubleshootingyourCiscorouter

Inevitably,therewillbeproblems.Usually,itwillcomeintheformofausernotifyingyouthattheycannotreachacertaindestination,oranydestinattionatall.Youwillneedtobeabletocheckhowtherouterisattemptingtoroute

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

48 of 60 10-12-2012 17:03

traffic,andyoumustbeabletotrackdownthepointoffailure.

Youarealreadyfamiliarwiththeshow

commands,bothspecificcommandsandhowtolearnwhatothershow

commandsareavailable.Someofthemostbasic,mostusefulcommandsyouwillusefortroubleshootingare:

Router#showinterfacesRouter#showipprotocolsRouter#showipv6protocolsRouter#show

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

49 of 60 10-12-2012 17:03

iprouteRouter#showipv6routeRouter#showiparpRouter#showipv6neighbors

4.1Testingconnectivity

Itisverypossiblethatthepointoffailureisnotinyourrouterconfiguration,oratyourrouteratall.Ifyouexamineyourrouter'sconfigurationandoperationandeverythinglooksgood,theproblemmightbebefartheruptheline.Infact,

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

50 of 60 10-12-2012 17:03

itmaybethelineitself,oritcouldbeanotherrouter,whichmayormaynotbeunderyouradministration.

Oneextremelyusefulandsimplediagnostictoolistheping

command.PingisanimplementationoftheIPMessageControlProtocol(ICMP).PingsendsanICMPechorequesttoadestinationIPaddress.Ifthedestination

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

51 of 60 10-12-2012 17:03

machinereceivestherequest,itrespondswithanICMPechoresponse.Thisisaverysimpleexchangethatconsistsof:

Hello,areyoualive?

Yes,Iam.

ExampleName#pingxx.xx.xx.xx

Ifthepingtestissuccessful,youknowthatthedestinationyouarehavingdifficultyreachingisaliveandphysicallyreachable.

Iftherearerouters

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

52 of 60 10-12-2012 17:03

betweenyourrouterandthedestinationyouarehavingdifficultyreaching,theproblemmightbeatoneoftheotherrouters.Evenifyouping

arouteranditresponds,itmighthaveotherinterfacesthataredown,itsroutingtablemaybecorrupted,oranynumberofotherproblemsmayexist.

Toseewherepacketsthat

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

53 of 60 10-12-2012 17:03

leaveyourrouterforaparticulardestinationgo,andhowfar,usethetrace

command.

ExampleName#tracexx.xx.xx.xx

Itmaytakeafewminutesforthisutilitytofinish,sogiveitsometime.Itwilldisplayalistofallthehopsitmakesonthewaytothedestination.

4.2debug

commands

There

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

54 of 60 10-12-2012 17:03

areseveraldebug

commandsprovidedbytheIOS.Thesecommandsarenotcoveredhere.RefertotheCiscowebsiteformoreinformation.

4.3Hardwareandphysicalconnections

Donotoverlookthepossibilitythatthepointoffailureisahardwareorphysicalconnectionfailure.Anynumberofthingscangowrong,fromboardfailuresto

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

55 of 60 10-12-2012 17:03

cutcablestopowerfailures.Thisdocumentwillnotdescribewtroubleshootingtheseproblems,exceptforthesesimplethings.

Checktoseethattherouteristurnedon.Alsomakesurethatnocablesarelooseordamaged.Finally,makesurecablesarepluggedintothecorrectports.Beyondthissimpleadviceyouwillneedtocheckother

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

56 of 60 10-12-2012 17:03

sources.

4.4Outofyourcontrol

Ifthepointoffailureisfartheruptheline,theprolemmightliewithequipmentnotunderyouradministration.Youronlyoptionmightbetocontacttheequipment'sadministrator,notifythemofyourproblem,andaskthemforhelp.Itisinyourinteresttobecourtiousand

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

57 of 60 10-12-2012 17:03

respectful.Theotheradministratorhastheirownproblems,theirownworkloadandtheirownpriorities.Theiragendamightevendirectlyconflictwithyours,suchastheirintentiontochangedynamicroutingprotocols,etc.Youmustworkwiththem,evenifthesituationisfrustrating.Alienatingsomeonewiththepowertoblockimportantroutestoyournetworkisnot

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

58 of 60 10-12-2012 17:03

agoodidea.

5.References

Leinwand,PinskyandCulpepperCiscoRouterConfiguration.Indianapolis,Indiana:CiscoPress,1998.CiscoSystems,Inc.,http://www.cisco.com

6.Moreinformation

CiscoQuickTips

MytutorialonIPsubnetcalculations

CiscoT1LoadBalancing

PDFversionsofthisandotherdocumentsbyJoshGentry

Ads by Google Cisco Router Cisco Server Cisco About Cisco Connect

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

59 of 60 10-12-2012 17:03

Web joshgentry.com

Authored by Josh Gentry

Top

Cisco Router Configuration Tutorial http://pages.swcp.com/~jgentry/topo/cisco.htm

60 of 60 10-12-2012 17:03