Chabot College ELEC 99.08 Router Command Line Interface CISCO NETWORKING ACADEMY Interface • A system for communicating instructions to / from the computer • Older systems:

Download Report

Transcript Chabot College ELEC 99.08 Router Command Line Interface CISCO NETWORKING ACADEMY Interface • A system for communicating instructions to / from the computer • Older systems:

Chabot College
ELEC 99.08
Router Command Line Interface
CISCO NETWORKING ACADEMY
Interface
• 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).
CISCO NETWORKING ACADEMY
Cisco Router Interfaces
• CiscoWorks
– Special and expensive program to manage
Cisco switches and routers
– Used relatively little
CISCO NETWORKING ACADEMY
Cisco Router Interfaces
• Web Interface
– Web server and interface commands built in
to Cisco IOS
– Very limited capabilities
– Used relatively little
CISCO NETWORKING ACADEMY
Cisco Router Interfaces
• Command Line Interface (CLI)
– The primary means of interaction with Cisco
routers
(and most unix servers too)
– Used extensively.
CISCO NETWORKING ACADEMY
CLI Features
•
•
•
•
•
•
The "executive"
Modes of operation
Help command
Abbreviation
Auto-complete
Command history (up arrow)
CISCO NETWORKING ACADEMY
The Executive (EXEC)
• Interprets and executes typed
commands
• Provides error messages.
• Part of the Cisco IOS
CISCO NETWORKING ACADEMY
Modes of Operation
•
•
•
•
•
User Exec Mode
Privileged Exec Mode
Global Configuration Mode
Interface Configuration Mode
Router Configuration Mode
CISCO NETWORKING ACADEMY
User Exec Mode
• Prompt:
router>
• Used for:
– Limited examination of router
– Remote access
CISCO NETWORKING ACADEMY
Privileged Exec Mode
• Prompt
router#
• Used for:
– Detailed examination of router, debugging
and testing
– Entering the privileged configuration
modes
– Remote access.
CISCO NETWORKING ACADEMY
Global Configuration Mode
• Prompt:
router(config) #
• Used for:
– General configuration commands
– Static routes
CISCO NETWORKING ACADEMY
Interface Configuration
Mode
• Prompt:
router(config-if) #
• Used for:
– Setting of IP addresses and subnet
masks
– Setting other interface characteristics
CISCO NETWORKING ACADEMY
Router Configuration Mode
• Prompt:
router(config-router) #
• Used for:
– Setting routing protocols
CISCO NETWORKING ACADEMY
Quiz: Which mode is this?
• router>
• user Exec mode
(user mode)
CISCO NETWORKING ACADEMY
Quiz: Which mode is this?
• router#
• privileged Exec mode
(privileged mode)
CISCO NETWORKING ACADEMY
Quiz: Which mode is this?
• router(config)#
• Global configuration mode
CISCO NETWORKING ACADEMY
Quiz: Which mode is this?
• router(config-if)#
• Interface configuration mode
CISCO NETWORKING ACADEMY
Quiz: Which mode is this?
• router(config-router)#
• Router configuration mode
CISCO NETWORKING ACADEMY
Quiz:
• Which mode must I be in to
set the IP address for the ethernet 0
interface?
• Interface configuration mode:
router(config-if) #
CISCO NETWORKING ACADEMY
Quiz:
• Which mode must I be in to
configure the routing protocols?
• Router configuration mode:
router(config-router) #
CISCO NETWORKING ACADEMY
Quiz:
• Which mode must I be in to
set the router name?
• Global configuration mode:
router(config) #
CISCO NETWORKING ACADEMY
Quiz:
• Which mode must I be in to
view the running-configuration file?
• Privileged Exec mode:
router#
CISCO NETWORKING ACADEMY
Changing 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.
CISCO NETWORKING ACADEMY
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
CISCO NETWORKING ACADEMY
Help 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
CISCO NETWORKING ACADEMY
Help 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
CISCO NETWORKING ACADEMY
Help 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
CISCO NETWORKING ACADEMY
Help 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 ...
CISCO NETWORKING ACADEMY
Command Abbreviation
• Commands may be abbreviated.
• Type enough of the word to be
unambiguous.
• Learn to use abbreviations - they are
helpful time-savers!
CISCO NETWORKING ACADEMY
Command 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
CISCO NETWORKING ACADEMY
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#
CISCO NETWORKING ACADEMY
Abbreviation - Practice:
• Use Router - eSim to find the shortest
abbreviation for the this command:
router# show running-config
router# sh ru
CISCO NETWORKING ACADEMY
Abbreviation - Practice:
• Use Router - eSim to find the shortest
abbreviation for the this command:
router# configure termial
router# conf t
CISCO NETWORKING ACADEMY
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
CISCO NETWORKING ACADEMY
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
CISCO NETWORKING ACADEMY
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
CISCO NETWORKING ACADEMY
Auto-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.
CISCO NETWORKING ACADEMY
Command 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.
CISCO NETWORKING ACADEMY
Command 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.
CISCO NETWORKING ACADEMY
Router 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)
CISCO NETWORKING ACADEMY