Real-Life Hardware: Cisco
Introduction to Cisco IOS
What is IOS?
Internetwork Operating System A derivative of BSD UNIX
Custom built by Cisco for each platform Pre-packaged and static. Features available in different revisions (for
a price!) GUI’s available, but 90%+ of users still
prefer command-line configuration.
IOS and Hardware IOS is designed to be hardware independent.
A high end router may use ASIC’s
A smaller access router may use the central processor.
Configuration and monitoring commands should be almost identical!
Router Components RAMRAM• Stores configuration files• Contents lost on power-off• Large enough to hold large
routing tables
Stores• Routing tables (remember: usually built dynamically)• ARP cache (again, built dynamically and ephemeral)• Fast-switching cache• Packet buffers• Packet hold queues
Router Components NVRAMNVRAM• Non-volatile RAM• Slow• Content is NOT LOST on power
off.• Usually less than 100 Kbytes
Stores• Exclusively used to store configuration scripts that are parsed
on power-up.
Router Components FLASHFLASH• EEPROM (Electronically Erasable
Programmable Read-Only Memory)
• Retained on power-down.
• May be off-board in the form of flashcards.
Stores• IOS versions. Allows for upgrading Operating System
without replacing chip. • Multiple versions of IOS may be stored at once (GREAT for
testing of a new version!)• Off-board configuration allows you to “put OS in your pocket”.
Router Components ROMROM• Read-Only Memory. • Generally installed in factory
and never touched again!
Stores• POST (power-on self test)• Bootstrap program that calls IOS.• Bare-bones version of an IOS. If IOS load routine fails, it
defaults back to this version, giving limited functionality.
ROM init CONFIG SCRIPT NVRAM
FLASH RAM
Contains location of IOS, could be FLASH, TFTP, etc.
TFTP?
IOS VersionConfig Params from script..
Loaded IOS..
Route tables..
ARP..
Built during runtime
IOS Interface IOS commands are very “assembly-like”.
They are extremely granular, and often counter-intuitive.
This is somewhat alleviated with inline help. The “?” character will become your best friend.
Since these configurations are stored as text scripts, you can look up lots of examples on Cisco’s website.
In-line Help Typing the “?” character either after a
command or at some point during a word brings up configuration parameters:
For instance, typing:
“ac?” <RETURN>
Will ask the IOS what commands begin with “ac”, it will respond with:
“access-enable access-template”
This also works to find command modifiers or subsets:
“show ip ?”
Asks the IOS what is available for the “show ip” command:
“interface route …”
Shortcuts Just like most *NIX’s, IOS has a wide array
of shortcut keys to expedite configuration.
Command Issued At Effect Delete Anywhere Removes one char to the right of cursor
Backspace Anywhere Removes one char to the left of cursor TAB Anywhere Finishes a partial command.
Ctrl-A Anywhere Moves the cursor to beginning of current line. Ctrl-E Anywhere Moves cursor to end of current line. Ctrl-R Anywhere Redisplays a line. Ctrl-U Anywhere Erases a line. Ctrl-W Anywhere Erases previous word. Ctrl-Z Configuration Mode Ends configuration mode and returns to EXEC
Up Arrow Anywhere Scroll forward through former commands. Down Arrow Anywhere Scroll backward through former commands.
The most useful is the TAB key, which as you may know, completes a word.
Why connect to a router•Until routers are configured they generally have no connection to any medium.
•By default most interfaces are turned off.
•To perform the initial install, a serial connection is set up to the console port.
Lab Goals What will we learn in this lab?
A brief overview of the Cisco design philosophy. How one can access a Cisco router. The Cisco security model. Command line usage and hints. How to build a configuration script and store it in
NVRAM. What the CLI looks like and how it interacts. What it feels like to get your hands on some real
hardware!
Chapter 4 Objectives
• The Cisco router IOS• Enhanced editing• Administrative functions
– Hostnames– Banners– Passwords– Interface descriptions
• Verifying your configuration14
Cisco Router IOS
• Carries network protocols and functions• Connects high-speed traffic between devices• Adds security to control access• Provides scalability for growth• Supplies reliability
Router Access
• Console port (console)– Rollover cable, RJ-45 to DB-9, RJ-45 to DB-25
• Auxiliary port (AUX)
• Virtual terminal (VTY)
Connecting To A Cisco Router
Cisco 2811
Cisco 1841
Connecting To A Cisco Router
Connecting Via Terminal Programs
• Establish a connection– Physical connection through console
• 9600 bits per second, data bits 8, stop bits 1, parity “none”, flow control “none”
– Logical connection through VTY
• Terminal programs
• HyperTerminal, Microphone Pro, ProComm Plus, Telix, Tera Term
Bringing up a Router
• Boot-up process:1: POST
2: Looks for the Cisco IOS from Flash memory
3: IOS loads & looks for a valid configuration;• startup-configurationstartup-configuration• stored in nonvolatile RAM (NVRAM)
4: If a valid configuration is not found in NVRAM:• setup modesetup mode
Bringing up a Router
• Boot-up process:
Setup Mode
• Basic Management Setup
• Extended Setup
• Command-Line Interface
Command-Line Interface (CLI)
• More flexible than setup mode.
• To use the CLI, just say No to entering the initial configuration dialog.
• Initial prompt consists of two parts– Hostname– Greater than symbol (>)
Logging into the Router
• User mode: – Router>– Used mostly to view statistics
• Privileged mode:– Router#– Used to view & change router configuration
Overview of Router Modes
• Global changes:– config terminal or config t
– Changes made to running-config running-config (DRAM)
– To change the startup-configstartup-config (NVRAM)• config memory or config mem
Note: Any configuration changes need to be placed into RAM. Typing config mem or config net (from a TFTP host) will append the current running-configrunning-config
Configuration Modes
• Global configuration mode– Router(config)
• Interface mode– Router(config–if)#
• Line configuration mode– Router(config-line)#
• Router configuration mode– Router(config-router)#
Configuration Modes
Configuration
• CLI Prompts
• Interfaces
• Sub-interfaces
• Line Commands
• Routing Protocol Configurations
Editing & Help Features
Editing & Help Features
• Commands starting with a certain letterRouter#c?clear clock configure connect copy
• Enhanced Editing Commands
• Router-Command History
• Gathering Basic Routing Information– show versionshow version
Enhanced Editing Commands
Enhanced Editing Commands (cont.)
Router Command History
Gathering Basic Routing Information
Administrative Functions
The administrative functions that you can configure on a router and switch are
• Hostnames
• Banners
• Password
• Interface descriptions
Hostnames & Descriptions
• HostnamesRouter(config)#hostname SUSTSUST(config)#
• DescriptionsCSIT(config)#int e0CSIT(config-if)#description CS LAN
Banners
• Purpose: welcome message
• Types– exec: set EXEC process creation banner– incoming: set incoming terminal line banner– login: login banner– motd: set message of the Day banner
• Delimiting character
Banners
Setting the Passwords
• 5 passwords:– 1st two used to set your enable password
• Used to secure privileged mode; Router>enable
– Other three are used to configure a password in useruser mode via:• console port• auxiliary port• Telnet
Passwords
• Enable passwordsRouter(config)#enable password ciscoRouter(config)#enable secret cisco
• Auxiliary Password• Console Password• Telnet Password• Encrypting Your Password
Router(config)#service password-encryption
Passwords
Passwords
Passwords
Passwords
Passwords
Interface DescriptionsSetting descriptions on an interface is helpful to the administrator and, like the hostname, only locally significant. The description command is a helpful one because you can, for instance, use it to keep track of circuit numbers.
Here’s an example:Khartoum(config)#int e0Khartoum(config-if)#description CSIT LANKhartoum(config-if)#int s0Khartoum(config-if)#desc WAN to Dongola circuit:6fdda4321
You can view the description of an interface either with the show running-config command or the show interface command.
Router Interfaces
• Bringing up an Interfaceno shutdownshutdownshow interface
• Configuring an IP Address on an InterfaceRouter(config)#int e0Router(config-if)#ip address 172.16.10.2 255.255.255.0Router(config-if)#no shut
• Serial Interface Commandsclock rate & bandwidth (entered in kilobits)
Configuring The Time And Date
Viewing, & Saving Configurations
• Viewing & Saving Configurations– running-configrunning-config saved in DRAM– startup-configstartup-config saved in NVRAM
copy run startsh runsh starterase startup-config
Verifying Your Configuration
Tools:– show running-config– show startup-config– ping– show cdp nei detail– trace– telnet
Other Verification Methods
• Verifying with the show interface command– Router#show interface ?
• Verifying with the show ip interface command (layer 3 info)– Router#show ip interface– Router#show ip interface brief– Router#show controllers
Router Components
• ROM
• Flash memory
• NVRAM
• RAM/DRAM
Router Components
• ROM– Read-only memory (ROM)
– Bootstrap program
– ROM monitor firmware
– ROM monitor mode• (>) or (rommon 1>)
Router Components• Flash memory
– Erasable, programmable, read-only memory (EPROM)
– Contains the Cisco IOS
– Can store multiple IOS
– “show version” command
– “show flash” command
Router Components
• NVRAM– Nonvolatile random access memory (NVRAM)
– Special type of RAM
– Not cleared when router is rebooted
– Startup configuration file
– “show start” command
Router Components
• Random access memory (RAM)– Volatile
– Information is not retain during router reboot
– Running configuration
– “show running-config” command
– “show memory” command
– “show buffers” command
Summary
• Go through all the written labs and review questions• Review answers in class
Lab References Useful References:
http://www.cisco.com/ http://www.cisco.com/en/US/products/sw/iosswrel/
ps1824/products_command_references_books_list.html
http://www.cisco.com/en/US/products/sw/iosswrel/ps1824/products_configuration_guides_books_list.html