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