cisco router ios commands

14
8/12/2019 Cisco Router Ios Commands http://slidepdf.com/reader/full/cisco-router-ios-commands 1/14

Upload: ganesh-dahiwal

Post on 03-Jun-2018

243 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Cisco Router Ios Commands

8/12/2019 Cisco Router Ios Commands

http://slidepdf.com/reader/full/cisco-router-ios-commands 1/14

Page 2: Cisco Router Ios Commands

8/12/2019 Cisco Router Ios Commands

http://slidepdf.com/reader/full/cisco-router-ios-commands 2/14

$outer(config-if) +

To exit to 2lobal configuration mode use the exit  command.

$outer(config-if) + exit

$outer(config) +

'" Su%-Interface Configuration mode

'ub-interfaces allow you to create virtual interfaces within the router. The !rom!tthen changes to $outer(config-subif)+.

$outer(config) + interface astetnernet /0/.1$outer(config-subif)+

(" Line Configuration mode

Line commands are used to configure user mode !asswords

$outer(config) + line console /$outer(config-line) +

Line console 0 changes the context to console configuration mode.

)" Routing *rotoco$ Configuration mode

To configure routing !rotocols li%e $I3 and I2$3 use the !rom!t (config-router)+

$outer(config) + router ri!$outer(config-router) +

See+ing Conte,t Sensitive e$

!" To vie. IOS commands suorted on a articu$ar CLI romt"

3ress 4uestion mar% (5). It dis!lays list of all IO' commands su!!orted on theCLI !rom!t in 4uestion along with brief descri!tion about each command.

www.softech!une.com   Page 2 of 14

Page 3: Cisco Router Ios Commands

8/12/2019 Cisco Router Ios Commands

http://slidepdf.com/reader/full/cisco-router-ios-commands 3/14

&" To vie. commands that start .ith a articu$ar $etter or set of $etters"To view commands starting with letter 6C7 !ress 6C57 with no s!ace betweenthem.

'" To vie. ne,t command arameter in a command s/nta,Insert a s!ace and then !ress 4uestion mar% (5).

www.softech!une.com   Page 3 of 14

Page 4: Cisco Router Ios Commands

8/12/2019 Cisco Router Ios Commands

http://slidepdf.com/reader/full/cisco-router-ios-commands 4/14

Page 5: Cisco Router Ios Commands

8/12/2019 Cisco Router Ios Commands

http://slidepdf.com/reader/full/cisco-router-ios-commands 5/14

Page 6: Cisco Router Ios Commands

8/12/2019 Cisco Router Ios Commands

http://slidepdf.com/reader/full/cisco-router-ios-commands 6/14

Other Conso$e *ort Commands

The exec-timeout / / command sets the timeout for the console ""C sessionto *ero or to never time out.

Logging synchronous sto!s console messages from !o!!ing u! and disru!tingin!ut you are trying to ty!e.

Auxiliary Password

 =uxiliary !assword is set on =uxiliary !ort and is !rom!ted while accessing therouter through =uxiliary !ort. <ou have to be in 2lobal Configuration ,ode.

Te$net *ass.ord

Telnet !asswords are set on >T< !orts and are !rom!ted while ma%ing telnetaccess to router through >T< !orts. #umber of >T< !orts de!ends on version ofIO'.

www.softech!une.com   Page 6 of 14

Page 7: Cisco Router Ios Commands

8/12/2019 Cisco Router Ios Commands

http://slidepdf.com/reader/full/cisco-router-ios-commands 7/14

Encr/ting *ass.ords

Only the enable secret !assword is encry!ted by default. To manually encry!tother !asswords use the service !assword-encry!tion command

$outer(config)+service !assword-encry!tion

4anner MOTD Command

?anner is a message configured by the administrator to add a security notice tousers who logins into the router. It is dis!layed before user mode.The ?anner ,OT (,essage of the ay) is the most used and gives a messageto every !erson dialing in or connecting to the router via Telnet auxiliary !ort orconsole !ort.

Logout of CLI !rom!t and login again. ?anner is dis!layed before &'"$ ,O".

Interface-Configuration Mode Commands

'ome of the configurations used to configure an interface are #etwor% layeraddresses media-ty!e bandwidth and other administrator commands.

 =ssigning I3 =$"'' to an interface @ Choose the interface on which i!address is to be assigned.

www.softech!une.com   Page 7 of 14

Page 8: Cisco Router Ios Commands

8/12/2019 Cisco Router Ios Commands

http://slidepdf.com/reader/full/cisco-router-ios-commands 8/14

?y default all !orts of the router are 6'hutdown7. i.e. !orts are disabled. They willnot communicate unless 6enabled.7 or that use the command 6no shutdown7.

Seria$ Interface-Configuration Mode Commands

C$oc+ rate command !rovides cloc%ing on the lin%. It is su!!orted on C"interfaces. The unit is bits !er second.

?andwidth of a serial lin% is used by routing !rotocols such as I2$3 "I2$3 andO'3 to calculate the best cost to a destination networ%. The unit su!!orted isAilobits.

ostnamesIt changes the dis!lay of the CLI !rom!t. This is only locally significant whichmeans it has no bearing on how the router !erforms name loo%u!s on theinternetwor%.

Descritions

'etting descri!tions on an interface is hel!ful to the administrator and li%ethe hostname only locally significant.

>erify using 6show run7 command.

www.softech!une.com   Page 8 of 14

Page 9: Cisco Router Ios Commands

8/12/2019 Cisco Router Ios Commands

http://slidepdf.com/reader/full/cisco-router-ios-commands 9/14

Saving Configurations

<ou can manually save the file from $=, to #>$=, by using the copyrunning-config startup-config command. <ou can use the shortcut copy run start  also.

To view the saved file in #>$=, (i.e. startu!-config file)

<ou can delete the startu!-config file by using the command erasestartu!-config.

Sho. Interface Command

www.softech!une.com   Page 9 of 14

Page 10: Cisco Router Ios Commands

8/12/2019 Cisco Router Ios Commands

http://slidepdf.com/reader/full/cisco-router-ios-commands 10/14

It dis!lays the hardware address logical address and enca!sulation method aswell as statistics on collisions. The most im!ortant status of the show interface command is the out!ut of the line and data-lin% !rotocol status.

The first !arameter refers to the 3hysical layer and is u! when it receives carrier detect. The second !arameter refers to the ata Lin% layer and loo%s for %ee!alives from the connecting end.

Chec% the %ee!alives on both ends to ma%esure they matchB the cloc% rate is set if neededB and the enca!sulation ty!eis the same on both ends.

it is a cable or interface !roblem

Interface is shutdown. Issue command 6no shut7 to enable the interface.

4ac+ing U 8our Router IOS

www.softech!une.com   Page 10 of 14

Page 11: Cisco Router Ios Commands

8/12/2019 Cisco Router Ios Commands

http://slidepdf.com/reader/full/cisco-router-ios-commands 11/14

Page 12: Cisco Router Ios Commands

8/12/2019 Cisco Router Ios Commands

http://slidepdf.com/reader/full/cisco-router-ios-commands 12/14

9. ,a%e sure you can connect to the TT3 host by !inging the I3 address of thehost from the router console.

. Once you %now you have good "thernet connectivity to the TT3 host issuethe co!y tft! flash command.

D. Confirm that the router is not functioning during the restore or u!grade byfollowing the !rom!ts !rovided on the router console.

:. "nter the I3 address of the TT3 host.

;. "nter the IO' filename you want to restore or u!grade.

E. Confirm that you understand that the contents of flash memory will be erased.

F. Gatch in ama*ement as your IO' is deleted out of flash memory and your

new IO' is co!ied to flash memory.

4ac+ing U the Router Configuration

1. Log in to your router and go into !rivileged mode by ty!ing en or enable.

9. 3ing the TT3 host to ma%e sure you have I3 connectivity.

. On $outer ty!e co!y run tft!.

D. Ty!e the I3 address of the TT3 host and !ress "nter.

:. The router will !rom!t you for a filename. The hostname of the router isfollowed by the !refix Hconfg

The are &3 ac%nowledgments that the file was transferred successfully.

Using the Cisco Discover/ *rotoco$ 9CD*:

1. Log in to your router and go into !rivileged mode by ty!ing en or enable.

www.softech!une.com   Page 12 of 14

Page 13: Cisco Router Ios Commands

8/12/2019 Cisco Router Ios Commands

http://slidepdf.com/reader/full/cisco-router-ios-commands 13/14

9. rom the router ty!e sh cp and !ress "nter. <ou should see that C3!ac%ets are being sent out to all active interfaces every ;/ seconds and theholdtime is 1F/ seconds (these are the defaults).

. To change the C3 u!date fre4uency to J/ seconds ty!e cp ti!er 90  in

global configuration mode

D. >erify your C3 timer fre4uency has changed by using the command showcp in !rivileged mode.

:. #ow use C3 to gather information about neighbor routers. <ou can get thelist of available commands by ty!ing sh cd! 5.

;. Ty!e sh cp int  to see the interface information !lus the default enca!sulationused by the interface. It also shows the C3 timer information.

E. Ty!e sh cp entry "  to see the C3 information received from all routers.

F. Ty!e show cp neighbor  to gather information about all connected neighbors.

J. Ty!e show cp neighbor  detail. #otice that it !roduces the same out!ut asshow cd! entry K.

Using Te$net

1. Log in to your router and go into !rivileged mode by ty!ing en or enable.

9. rom $outer = telnet into your remote router by ty!ing telnet i!address fromthe command !rom!t.

. Ty!e in $outer ?7s I3 address from $outer =7s command !rom!t. #otice thatthe router automatically tries to telnet to the I3 address you s!ecified. <ou canuse the telnet command or Must ty!e in the I3 address.

D. rom $outer ? !ress CtrlN'hiftN; then to return to $outer =7s command!rom!t. #ow telnet into your third router $outer C. 3ress CtrlN'hiftN; then toreturn to $outer =.

:. rom $outer = ty!e show sessions. #otice your two sessions. <ou can !ressthe number dis!layed to the left of the session and !ress "nter twice to return tothat session. The asteris% shows this default session. <ou can !ress "nter twiceto return to that session.

;. 2o to the session for your $outer ?. Ty!e show user. This shows the consoleconnection and the remote connection. <ou can use the disconnect command to

www.softech!une.com   Page 13 of 14

Page 14: Cisco Router Ios Commands

8/12/2019 Cisco Router Ios Commands

http://slidepdf.com/reader/full/cisco-router-ios-commands 14/14

clear the session or Must ty!e exit from the !rom!t to close your session with$outer ?.

E. 2o to the $outer C7s console !ort by ty!ing show sessions on the first routerand using the connection number to return to $outer C. Ty!e show user and

notice the connection to your first router $outer =.

F. Ty!e clear line to disconnect the Telnet session.

Reso$ving ostnames

1. Log in to your router and go into !rivileged mode by ty!ing en or enable.

9. rom $outer = ty!e 62mail7 and !ress "nter at the command !rom!t. #oticethe error you receive and the delay. The router is trying to resolve the hostnameto an I3 address by loo%ing for a #' server.

<ou can turn this feature off by using the no ip o!ain-loo#up command fromglobal configuration mode.

. To build a host table you use the i! host command. rom $outer = add a hosttable entry for $outer ? and $outer C by entering the following commands@

D. Test your host table by ty!ing !ing routerb from the command !rom!t (not theconfig !rom!t).

Test your host table by ty!ing !ing routerc.

:. Aee! your session to $outer ? o!en and then return to $outer = by !ressingCtrlN'hiftN; then .

E. Telnet to $outer C by ty!ing routerc at the command !rom!t.

F. $eturn to $outer = and %ee! the session to $outer C o!en by !ressingCtrlN'hiftN; then .

J. >iew the host table by ty!ing show hosts and !ressing "nter.

www.softech!une.com   Page 14 of 14