real-life hardware: cisco q introduction to cisco ios

58
Real-Life Hardware: Cisco Introduction to Cisco IOS

Upload: helen-ashlynn-gregory

Post on 26-Dec-2015

232 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Real-Life Hardware: Cisco

Introduction to Cisco IOS

Page 2: Real-Life Hardware: Cisco q 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.

Page 3: Real-Life Hardware: Cisco q Introduction to Cisco IOS

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!

Page 4: Real-Life Hardware: Cisco q Introduction to Cisco IOS

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

Page 5: Real-Life Hardware: Cisco q Introduction to Cisco IOS

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.

Page 6: Real-Life Hardware: Cisco q Introduction to Cisco IOS

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”.

Page 7: Real-Life Hardware: Cisco q Introduction to Cisco IOS

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.

Page 8: Real-Life Hardware: Cisco q Introduction to Cisco IOS

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

Page 9: Real-Life Hardware: Cisco q Introduction to Cisco IOS

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.

Page 10: Real-Life Hardware: Cisco q Introduction to Cisco IOS

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 …”

Page 11: Real-Life Hardware: Cisco q Introduction to Cisco IOS

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.

Page 12: Real-Life Hardware: Cisco q Introduction to Cisco IOS

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.

Page 13: Real-Life Hardware: Cisco q Introduction to Cisco IOS

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!

Page 14: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Chapter 4 Objectives

• The Cisco router IOS• Enhanced editing• Administrative functions

– Hostnames– Banners– Passwords– Interface descriptions

• Verifying your configuration14

Page 15: Real-Life Hardware: Cisco q Introduction to Cisco IOS

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

Page 16: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Router Access

• Console port (console)– Rollover cable, RJ-45 to DB-9, RJ-45 to DB-25

• Auxiliary port (AUX)

• Virtual terminal (VTY)

Page 17: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Connecting To A Cisco Router

Cisco 2811

Cisco 1841

Page 18: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Connecting To A Cisco Router

Page 19: Real-Life Hardware: Cisco q Introduction to Cisco IOS

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

Page 20: Real-Life Hardware: Cisco q Introduction to Cisco IOS

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

Page 21: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Bringing up a Router

• Boot-up process:

Page 22: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Setup Mode

• Basic Management Setup

• Extended Setup

• Command-Line Interface

Page 23: Real-Life Hardware: Cisco q Introduction to Cisco IOS

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 (>)

Page 24: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Logging into the Router

• User mode: – Router>– Used mostly to view statistics

• Privileged mode:– Router#– Used to view & change router configuration

Page 25: Real-Life Hardware: Cisco q Introduction to Cisco IOS

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

Page 26: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Configuration Modes

• Global configuration mode– Router(config)

• Interface mode– Router(config–if)#

• Line configuration mode– Router(config-line)#

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

Page 27: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Configuration Modes

Page 28: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Configuration

• CLI Prompts

• Interfaces

• Sub-interfaces

• Line Commands

• Routing Protocol Configurations

Page 29: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Editing & Help Features

Page 30: Real-Life Hardware: Cisco q Introduction to Cisco IOS

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

Page 31: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Enhanced Editing Commands

Page 32: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Enhanced Editing Commands (cont.)

Page 33: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Router Command History

Page 34: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Gathering Basic Routing Information

Page 35: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Administrative Functions

The administrative functions that you can configure on a router and switch are

• Hostnames

• Banners

• Password

• Interface descriptions

Page 36: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Hostnames & Descriptions

• HostnamesRouter(config)#hostname SUSTSUST(config)#

• DescriptionsCSIT(config)#int e0CSIT(config-if)#description CS LAN

Page 37: Real-Life Hardware: Cisco q Introduction to Cisco IOS

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

Page 38: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Banners

Page 39: Real-Life Hardware: Cisco q Introduction to Cisco IOS

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

Page 40: Real-Life Hardware: Cisco q Introduction to Cisco IOS

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

Page 41: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Passwords

Page 42: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Passwords

Page 43: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Passwords

Page 44: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Passwords

Page 45: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Passwords

Page 46: Real-Life Hardware: Cisco q Introduction to Cisco IOS

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.

Page 47: Real-Life Hardware: Cisco q Introduction to Cisco IOS

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)

Page 48: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Configuring The Time And Date

Page 49: Real-Life Hardware: Cisco q Introduction to Cisco IOS

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

Page 50: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Verifying Your Configuration

Tools:– show running-config– show startup-config– ping– show cdp nei detail– trace– telnet

Page 51: Real-Life Hardware: Cisco q Introduction to Cisco IOS

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

Page 52: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Router Components

• ROM

• Flash memory

• NVRAM

• RAM/DRAM

Page 53: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Router Components

• ROM– Read-only memory (ROM)

– Bootstrap program

– ROM monitor firmware

– ROM monitor mode• (>) or (rommon 1>)

Page 54: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Router Components• Flash memory

– Erasable, programmable, read-only memory (EPROM)

– Contains the Cisco IOS

– Can store multiple IOS

– “show version” command

– “show flash” command

Page 55: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Router Components

• NVRAM– Nonvolatile random access memory (NVRAM)

– Special type of RAM

– Not cleared when router is rebooted

– Startup configuration file

– “show start” command

Page 56: Real-Life Hardware: Cisco q Introduction to Cisco IOS

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

Page 57: Real-Life Hardware: Cisco q Introduction to Cisco IOS

Summary

• Go through all the written labs and review questions• Review answers in class