Download - Chabot College

Transcript
Page 1: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Chabot CollegeChabot College

ELEC 99.08ELEC 99.08Router Command Line Interface

Page 2: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

InterfaceInterface

• A system for communicating instructions to / from the computer

• Older systems: "character mode" or "command line" interface

• Today most systems use a "graphical user interface" (GUI).

Page 3: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Cisco Router InterfacesCisco Router Interfaces

• CiscoWorks– Special and expensive program to manage

Cisco switches and routers– Used relatively little

Page 4: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Cisco Router InterfacesCisco Router Interfaces

• Web Interface– Web server and interface commands built in

to Cisco IOS– Very limited capabilities– Used relatively little

Page 5: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Cisco Router InterfacesCisco Router Interfaces

• Command Line Interface (CLI)– The primary means of interaction with Cisco

routers (and most unix servers too)

– Used extensively.

Page 6: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

CLI FeaturesCLI Features

• The "executive"

• Modes of operation

• Help command

• Abbreviation

• Auto-complete

• Command history (up arrow)

Page 7: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

The Executive (EXEC)The Executive (EXEC)

• Interprets and executes typed commands

• Provides error messages.

• Part of the Cisco IOS

Page 8: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Modes of OperationModes of Operation

• User Exec Mode

• Privileged Exec Mode

• Global Configuration Mode

• Interface Configuration Mode

• Router Configuration Mode

Page 9: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

User Exec ModeUser Exec Mode

• Prompt:router>

• Used for:– Limited examination of router– Remote access

Page 10: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Privileged Exec ModePrivileged Exec Mode

• Promptrouter#

• Used for:– Detailed examination of router, debugging

and testing– Entering the privileged configuration

modes– Remote access.

Page 11: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Global Configuration ModeGlobal Configuration Mode

• Prompt:router(config) #

• Used for:– General configuration commands– Static routes

Page 12: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Interface Configuration Interface Configuration ModeMode• Prompt:

router(config-if) #• Used for:

– Setting of IP addresses and subnet masks

– Setting other interface characteristics

Page 13: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Router Configuration ModeRouter Configuration Mode

• Prompt:router(config-router) #

• Used for:– Setting routing protocols

Page 14: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Quiz: Which mode is this?Quiz: Which mode is this?

• router>• user Exec mode

(user mode)

Page 15: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Quiz: Which mode is this?Quiz: Which mode is this?

• router#• privileged Exec mode

(privileged mode)

Page 16: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Quiz: Which mode is this?Quiz: Which mode is this?

• router(config)#• Global configuration mode

Page 17: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Quiz: Which mode is this?Quiz: Which mode is this?

• router(config-if)#• Interface configuration mode

Page 18: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Quiz: Which mode is this?Quiz: Which mode is this?

• router(config-router)#• Router configuration mode

Page 19: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Quiz:Quiz:

• Which mode must I be in toset the IP address for the ethernet 0 interface?

• Interface configuration mode:router(config-if) #

Page 20: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Quiz:Quiz:

• Which mode must I be in toconfigure the routing protocols?

• Router configuration mode:router(config-router) #

Page 21: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Quiz:Quiz:

• Which mode must I be in toset the router name?

• Global configuration mode:router(config) #

Page 22: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Quiz:Quiz:

• Which mode must I be in toview the running-configuration file?

• Privileged Exec mode:router#

Page 23: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Changing Modes - PracticeChanging Modes - Practice• Try it now:

• Start the Router e-Sim program. You'll find it in the Cisco Programs list on your curriculum PC.

• Say "I Accept" to the use agreement.

• You will see the router's console display:Press return to get started.

• You are in "user mode" & you will see the user exec prompt:router>

• Follow the directions on the next slide to practice changing modes.

Page 24: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Changing Modes - Practice:Changing Modes - Practice:Current Prompt Desired Mode Command/Abbrev

router> Privileged enable en

router# User disable disa

router# Global config configure terminal conf t

router(config)# Privileged exit ex

router(config)# Interface Config interface Ethernet 0 int e0

router(config-if)# Global Config exit ex

Page 25: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Help CommandHelp Command

?• Can be used three ways:

– On a line by itself– Following the first few letters of a word– After the first word of a multiple-word

command

Page 26: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Help CommandHelp Command

• On a line by itself.

• The router then lists the available commands.

• Try it now using Router e-Sim. Type a ? at the router> prompt as shown below:

router> ?

access profile clear

Page 27: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Help CommandHelp Command

• Following the first few letters of a word

• The router then shows the possible ways to complete the command.

• Try it now using Router e-Sim as shown below:

router>s?

set show slip systat

Page 28: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Help CommandHelp Command

• After the first word of a multiple-word command. (use a space before the ?)

• The router then shows the possible second words for the command.

• Try it now using Router e-Sim:router>show ?

alps Alps information arp Arp Table backup Backup status ...

Page 29: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Command AbbreviationCommand Abbreviation

• Commands may be abbreviated.

• Type enough of the word to be unambiguous.

• Learn to use abbreviations - they are helpful time-savers!

Page 30: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Command AbbreviationCommand Abbreviation

• Example: In user mode, two commands start with e:

router>e?enable exit

• What would be the shortest abbreviation for the enable command?

router>en

Page 31: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Abbreviation - Practice:Abbreviation - Practice:

• Try it now: Let’s experiment with abbreviations.

• Start Router - eSim.

• Change to privileged exec mode:

router>en• The prompt changes to:

router#

Page 32: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Abbreviation - Practice:Abbreviation - Practice:

• Use Router - eSim to find the shortest abbreviation for the this command:

router# show running-config

router# sh ru

Page 33: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Abbreviation - Practice:Abbreviation - Practice:

• Use Router - eSim to find the shortest abbreviation for the this command:

router# configure termial

router# conf t

Page 34: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Abbreviation - Practice:Abbreviation - Practice:

• Use Router - eSim to find the shortest abbreviation for the this command:(change to the correct mode!)

router(config)# interface ethernet 0

router (config)# int e0

Page 35: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Abbreviation - Practice:Abbreviation - Practice:

• Use Router - eSim to find the shortest abbreviation for the this command:(change to the correct mode!)

router# show interface

router# sh in

Page 36: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Abbreviation - Practice:Abbreviation - Practice:

• Use Router - eSim to find the shortest abbreviation for the this command:router# copy running-config startup-config

router# cop ru st

• But the shortest abbreviation may not be easiest to remember.

• Better:

router# copy run start

Page 37: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Auto-completeAuto-complete

• Press TAB to complete an abbreviation or partial word in a command.

• Type enough of the word to be “unambiguous”, or nothing will happen when you press TAB.

• Use Router - eSim to try it now.

Page 38: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Command HistoryCommand History

• The IOS keeps track of the last few commands you typed. (10 by default)

• Use the up and down arrow keys to scroll through previous commands.

• Press ENTER or RETURN to execute the displayed command.

• Use Router - eSim to try it now.

Page 39: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Command HistoryCommand History

• Remember to use the arrow keys!

• To view all the commands in the history buffer, type:show history

• Use Router - eSim to try it now.

Page 40: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Router e-Sim PracticeRouter e-Sim Practice

• Spend a few minutes in free practice of these CLI features:– Modes and mode changes– Help command (?)– Abbreviations– Command History (up/down arrow)