Routers and Routing Basics CCNA 2 - PowerPoint PPT Presentation

1 / 80
About This Presentation
Title:

Routers and Routing Basics CCNA 2

Description:

Routers and Routing Basics CCNA 2 Chapter 5 Introduction The first half of this chapter reviews the boot process The second half examines several topics relating to ... – PowerPoint PPT presentation

Number of Views:658
Avg rating:3.0/5.0
Slides: 81
Provided by: infosysRi
Category:
Tags: ccna | basics | routers | routing

less

Transcript and Presenter's Notes

Title: Routers and Routing Basics CCNA 2


1
Routers and Routing Basics CCNA 2
Chapter 5
2
Introduction
  • The first half of this chapter reviews the boot
    process
  • The second half examines several topics relating
    to how to copy files to and from the router

3
Managing Cisco IOS Software
  • Router Boot Sequence and Loading Cisco IOS Images
  • Choosing the Cisco IOS Image During the Router
    Boot Sequence
  • Troubleshooting and Verifying the Choice of
    Cisco IOS
  • Managing Cisco Router IOS and Configuration Files
  • Cisco IOS File System
  • Cisco IOS Filenames
  • Copying and Managing Cisco IOS Images
  • Copying and Managing Cisco IOS Configuration
    Files
  • Recovering from Lost Passwords
  • Summary

4
Introduction
  • Routers perform several functions at
    initialization, including picking which Cisco IOS
    image to load into RAM and use.
  • The final initialization step relates to how the
    router finds and picks a configuration file to
    use, typically the startup-configuration is file
    stored in NVRAM.
  • To do both steps, the router must find, copy,
    move, and manipulate files that hold IOS images
    and files that contain configuration
  • commands.
  • This chapter closely examines the options and
    processes that routers use to manage these types
    of files.

5
Router Boot Sequence and Loading Cisco IOS Images
  • When an engineer first powers on or reboots a
    router, the router goes through
  • a four-step process
  • 1. Perform a power-on self test (POST).
  • - The POST process happens automatically,
    performing basic hardware tests.
  • 2. Load a bootstrap program.
  • - The bootstrap program completes the hardware
    testing and initializes software in the router.
  • 3. Load an IOS.
  • - The router loads an IOS image, enabling the
    router to route IP packets.
  • 4. Load a startup configuration file.
  • - The router loads an initial configuration
    file, which tells IOS the parameters it needs to
    know things like IP addresses and routing
    protocols to use so that the router can
    successfully route packets.
  • - The last three steps require the router to
    copy the files into RAM,

6
Moving the Bootstrap, IOS, and Configuration
Files into RAM
  • In most networks
  • all the routers simply load the startup-config
    file in NVRAM into RAM as the Running-config file
    during the initialization process.
  • in other networks, each router may have
    different settings that affect how each router
    picks which IOS file to load.

7
Configuration Register
  • The configuration register is a 16-bit register
    that Cisco
  • routers store in a hidden area of NVRAM that is
    not part of the startup-config file.
  • The configuration registers value tells the
    router facts about several operating parameters
    including
  • Which IOS to load the full image, ROMMON or
    RXBoot.
  • The speed of the router console port.
  • Whether or not to use the configuration file

8
Changing and Viewing the Configuration Registers
Value
  • The configuration register can be viewed using
    the show version command.
  • The configuration register can be set in two of
    ways,
  • The most commonly used way to set its value is to
    use the config-register global configuration
    command.
  • It can also be set from Rommon Mode
  • When you set the configuration registers value,
    the value is used only after the router is
    reloaded.

9
Changing and Viewing the Configuration Registers
Value (Continued)
  • Example shows the (default) value of the
    configuration register, the user changing the
    value, and the show
  • version command stating that the new value will
    not be
  • used until the next reload.

10
Changing and Viewing the Configuration Registers
Value (Continued)
  • The current value at the end of the example shows
    the
  • Current setting (hex 2102) and the setting that
    will be used
  • at the next reload of the router (hex 2101).

11
How Routers Use the Boot Field to Choose an IOS
(Continued)
12
Choosing the Cisco IOS Image During the Router
Boot Sequence
  • Routers use the following logic to attempt to
    load an IOS
  • 1. Load a limited-function IOS based on whether
    the configuration registers last hex digit is
    set to 0 or 1.
  • - Engineers can use Step 1 when performing
    certain maintenance the OSs loaded at this step
    cannot route packets, but they can be used for
    some useful functions, such as password recovery.
  • 2. Load an IOS based on the configuration of boot
    system commands in the startup-config file.

13
Choosing the Cisco IOS Image During the Router
Boot Sequence (Continued)
  • 3. Load the first file in flash memory as the
    IOS.
  • - Routers almost always pick their IOS based on
    either Step 2 or Step 3.
  • Step 2 and 3 give engineers plenty of choices of
    how they can make the router load the correct IOS
    for normal operation of the router
  • 4. Use TFTP broadcasts to find a TFTP server, and
    download an IOS from that server.
  • 5. Load a limited-function IOS from ROM.
  • - Steps 4 and 5 exist mainly as fail-safe
    mechanisms when the first three steps do not work.

14
The Boot Field
  • Routers use the 4 low-order bits of the
    configuration register as the boot field.
  • The boot field tells the router what to do in its
    first of the five decision steps (Slides 11, 12).
  • Depending on the value of the boot field and the
    model of the router, a router can choose to load
    ROMMON, load RXBoot, or move on to a later step
    in the five-step list for choosing an IOS to load.

15
Comparing ROMMON and RXBoot OSs
  • Only older routers, such as the Cisco 1600 and
    2500 series routers, have an RXBoot IOS in ROM.
    Later, Cisco added all the features of the RXBoot
    IOS to ROMMON, so newer routers do not need (and
    do not have) an RXBoot IOS.

16
How Routers Use the Boot Field to Choose an IOS
  • If the router loads either ROMMON or RXBoot
    software, the process is complete, waiting for
    the network engineer to do whatever low-level
    maintenance function needs to be done.
  • However, depending on the configuration register
    settings, the router may simply move on to Step 2
    or even Step 3 of the process of finding an IOS
    to load.
  • The most production routers default to use a boot
    field of 2, because the configuration register
    defaults to 0x2102, which tells the router to
    load the IOS

17
How Routers Use the Boot Field to Choose an IOS
(Continued)
  • Software Configuration Bit Meanings
  • Bit No. Hex Meaning
  • 00-03 0x0000-0x000F Boot Field (see Table B-2)
  • 06 0x0040 Ignore NVM contents
  • 07 0x0080 OEM bit enabled
  • 08 0x0100 Break disabled
  • 10 0x0400 IP broadcast with all zeros
  • 11-12 0x0800-0x1000 Console line speed
  • 13 0x2000 Boot default ROM software if
    network boot fails
  • 0x4000 IP broadcasts do not have net
    numbers
  • 0x8000 Enable diagnostic messages and
    ignore NVRAM
  • contents

18
How Routers Use the Boot Field to Choose an IOS
(Continued)
  • Explanation of Boot Field (Configuration Register
    Bits 00-03)
  • Boot Field Meaning
  • 00 Stays at the system bootstrap prompt
  • 01 Boots system image on EPROM
  • 02-F Specifies a default netboot filename
  • Enables boot system commands that override
    default
  • netboot filename1

19
Choosing the Cisco IOS Based on boot system
Commands
  • The router looks in the startup-config file for
    any boot system commands and loads the IOS file
    listed in the commands.
  • The boot system command may fail for one of
    several reasons
  • - mistype of a long filename
  • - IOS file erased from flash memory by mistake
  • - the file may be corrupted
  • - hardware error trying to access flash memory.

20
Choosing the Cisco IOS Based on boot system
Commands (Continued)
  • Cisco routers provide a couple of ways to prepare
    for cases
  • in which the router fails when trying to load the
    IOS listed in
  • a boot system command
  • 1. Configure multiple boot system commands, and
    the router will try each of them sequentially
    until one of them
  • works.
  • 2. After the router has tried all the boot system
    commands, it moves on to Step 3, in which the
    router attempts to load the first file it finds
    in flash memory, no matter what its name is.

21
Configuring Multiple boot system Commands
Example 5-2 shows a typical case of how to use
multiple boot system commands in a single
configuration.
  • The configuration shows the following four boot
    system commands, with the three extra commands
    giving the engineer extra protection against
    potential problems.

22
Configuring Multiple boot system Commands
(Continued)
  • 1. The first boot system command simply
    references the specific IOS image in flash
    memory.
  • 2. To be ready for the possibility that the file
    may be accidentally erased, the boot system tftp
    command points to a TFTP server at IP address
    10.1.1.1, but with the same filename. In that
    case, the router attempts to contact the listed
    TFTP server, transfer a copy of the same IOS
    file, and load that into RAM.
  • 3. The boot system flash command next tells the
    router to look in flash memory, find the first
    file in flash (more on what first file means in
    the next section), and load that file as the IOS.
  • 4. If all these commands fail, the router
    attempts to use the last boot system command,
    boot system rom, which tells the router to load
    ROMMON. This last step would then allow to begin
    the process of recovering and copying the erased
    IOS file back into flash.

23
Configuring Multiple boot system Commands
(Continued)
  • If you add or change boot system commands the
    copy running-config startup-config command in the
    example is needed so that the boot system
    commands will not be lost when the router is
    rebooted.
  • If the router loads the IOS from the TFTP server
    based on the second boot system tftp command, the
    IOS is copied from the server, into RAM, and
    used the file is not stored in flash.
  • If you later add another boot system command, it
    is added to the end of the list of boot system
    commands. If you want to add a new command to the
    middle of the list instead of the end of the
    list, you must delete some of the commands by
    using the no boot system
  • command, add the new boot system command, and
    then add the previously deleted commands back
    into the configuration.

24
Loading the First File in Flash Memory
  • When a router fails to find and successfully load
    an IOS at Step 1 or 2,
  • it then tries one last time to find an IOS in
    flash memory.
  • The router looks in flash, finds the first file
    in flash, and attempts to use that file as the
    IOS.
  • Example shows the output of a show flash command
    on router R1 with the first file in flash (number
    1 on the left).

25
Broadcasting to Find a Cisco IOS on a TFTP Server
  • Most routers have been configured so that they
    choose their IOS images at Step 2 or Step 3.
  • Step 4 provides the router with one final effort
    to find and load an IOS.
  • At this step, the router broadcasts on all
    interfaces to which a cable has been attached,
    looking for a TFTP server.
  • If found, the router asks the TFTP server to send
    the router a specific
  • file, with the file using a standard name based
    in part on the routers
  • hostname, and in part on the configuration
    register value.

26
Broadcasting to Find a Cisco IOS on a TFTP Server
  • Step 4 (TFTP) provides the router with one final
    effort to find and load an IOS.
  • At this step, the router broadcasts on all
    interfaces to which a cable has been attached,
    looking for a TFTP server.
  • If found, the router asks the TFTP server to send
    the router a specific
  • file, with the file using a standard name based
    in part on the routers
  • hostname, and in part on the configuration
    register value.

27
Loading a Limited-Function OS from ROM
  • If the router has given up trying to load a fully
    functional
  • IOS, it goes ahead and loads one of the
    limited-function
  • OSs, as follows
  • If the router has an RXBoot OS (only on older
    routers), the router loads the RXBoot image.
  • If the router does not have an RXBoot OS, the
    router loads ROMMON.
  • In both cases, the OS loaded by the router can
    copy an IOS from a
  • TFTP server or copy an IOS image from a PC
    attached to the console.

28
Troubleshooting and Verifying the Choice of
Cisco IOS
  • Routers fail to load an IOS, or load the wrong
    IOS, for a variety of reasons
  • - the configregister and boot system commands
    may have been configured to incorrect values
  • - if the boot system commands are configured
    correctly, the files may simply be missing from
    flash memory, or the file may not be on the TFTP
    server.
  • When referencing a TFTP server, other problems
    could occur
  • - the router may not have a working IP route to
    reach the TFTP server
  • - the TFTP server software may not be running at
    the time
  • - the router has hardware problems that prevent
    flash memory from
  • working.

29
Determining Wrong IOS
  • When the router has a possibly wrong IOS loaded,
    first look at the two
  • configurable items that impact the five-step IOS
    decision process the
  • configuration register and the boot system
    commands.
  • See the configuration register only by looking at
    the output of the show
  • version command the show running-config and show
    startup-config
  • commands do not list the value of the
    configuration register.
  • After examining the configuration register,
    examine the boot system
  • commands in the startup-config file by using the
    show startup-config
  • command.
  • It is important to look at the startup-config
    file, because the boot system
  • commands will not be used until the router
    reboots, and the running-config
  • file will be lost when the router reboots.

30
Determining Which Steps Failed
  • After you determine which specific IOS images the
    router
  • will attempt to load, verify that the files are
    there and
  • accessible.
  • Consider the following examples
  • For any boot system flashfilename commands, you
    should verify that the file with that name is in
    flash, with the same spelling and capitalization.
    The names are case-sensitive.
  • For boot system tftp filename ip-address
    commands, you should verify that the correctly
    spelled filename is on the TFTP server, that TFTP
    server software is installed and running on that
    computer, and that the router can ping the
    servers IP address.

31
Determining Which Steps Failed(Continued)
  • For a boot system flash command, with no filename
    listed, make sure the lowest numbered file in
    flash is the IOS file that you want to load.
  • In some rare cases, the router hardware may have
    a problem and be
  • unable to read the contents of flash memory. In
    these cases, it may be
  • best to simply call the Cisco Technical
    Assistance Center (TAC) and
  • get advice on how to attack the problem.

32
Cisco IOS File System
  • IOS has a file system, named the Cisco IOS File
    System (IFS).
  • Three general types of files defined and stored
    by IOS using the IFS

33
Variations of Configuration Commands Styles
  • The file system created by Cisco IOS has gone
    through three major
  • design steps over the years.
  • As a result, todays most current IOS releases
    support three variations
  • of commands that reference the configuration
    files
  • The pre-Version-10.3 style
  • The new style as of Version 10.3 (which is the
    most commonly used style)
  • The style of commands that use the full IFS names
    for the
  • configuration files.

34
Recently Added Stylesof Configuration File
Commands
  • The last column of Table lists prefixes added to
    IOS as part of the IFS.
  • These prefixes have
  • the same sort of meaning as a drive letter with a
    PCs OS. For example, a PCs hard disk drive may
    be drive letter C.
  • With IFS, nvram of course refers to NVRAM, and
    system refers to system files held in RAM,
    including the running-config file.

35
Cisco IFS File System Prefixes
  • Table lists the prefixes defined by IFS, along
    with
  • a brief description.

36
Cisco IOS Filenames
  • Cisco supports a very large set of customer
    requirements. As a result,
  • Cisco offers a large number of different IOS
    files to its customers.
  • IOS files differs from each other with the four
    main points
  • 1. The differences in Cisco IOS versions and
    releases.
  • To support the various versions and releases,
    Cisco must create different files for each IOS
    version number and, inside that version, for each
    maintenance release.
  • 2. The differences between router model
    series/Cisco IOS platforms.
  • 3. The differences in Cisco IOS feature sets.
  • 4. Other minor differences, including whether the
    IOS is compressed or relocatable.

37
Common IOS Feature Sets
  • IP BaseProvides basic IP routing functions,
    including all the features covered in this book.
  • IP VoiceSupports the same features as IP Base,
    plus support for voice sent inside IP packets
    (voice over IP, or VoIP).
  • IP/FW 3DESIncludes the features of IP Base, plus
    a firewall feature and Triple Digital Encryption
    Standard (3DES) encryption. This feature set
    provides many security features.
  • IP/ADSL/IPX/AT/IBM PlusIncludes IP, IPX, and
    AppleTalk (AT) routing, support for many
    proprietary protocols from IBM, and support for
    asymmetric DSL (ADSL), which is the type of DSL
    most typically found installed in the United
    States today.
  • Enterprise ServicesIncludes most every feature
    used in the largest enterprises.

38
Multiple File Formats of IOS Files
  • The file format differs mainly on two features
  • - Whether the file is compressed
  • Compressed IOS files require less space in
    flash memory, but they require more time when
    the router reboots, because the router has to
    uncompress the file before loading it.
  • - Whether the file is relocatable
  • With a relocatable IOS file, the router does
    not have to copy the whole IOS into RAM, instead
    leaving most of it in flash memory, which saves
    some space in RAM. IOS files that cannot be
    relocated must be fully copied into RAM when the
    IOS is loaded.

39
Cisco IOS Filenames(Continued)
  • Cisco names the IOS files so that all four
    different items
  • are implied by the name.

40
Copying IOS Files Using copy Command
  • The IOS copy command provides a way to copy files
    to
  • and from flash memory in the router and a server
    in the
  • network. It supports three main protocols
  • 1. Trivial File Transfer Protocol (TFTP)
  • 2. Remote Copy (RCP)
  • 3. File Transfer Protocol (FTP)
  • TFTP tends to be the most commonly used option,
    and it
  • has been supported in IOS longer than RCP and FTP.

41
Copying from TFTP Server into Flash Memory
  • 1. The user enters the copy tftp flash command.
  • 2. The router asks for the hostname or IP address
    of the TFTP server and waits for a response.
  • 3. The user enters 192.168.119.20 and presses
    Enter.
  • 4. The router asks for the name of the source
    file to be taken from the TFTP server and waits
    for a response.
  • 5. The user enters C2600-js-l_121-3.bin, presses
    Enter.
  • 6. The router asks for the name it should use
    when storing the file in flash memory, which
    defaults to the same name as the source file, as
    shown in brackets. The router then waits for a
    response.

42
Copying from TFTP Server into Flash Memory
(Continued)
  • 9. The user presses Enter, taking the default
    action of erasing all the flash files.
  • 10. The router asks if the user is sure about
    erasing flash memory, again asking the user to
    confirm.
  • 11. The user presses Enter, taking the default
    action of erasing flash memory.
  • 12. The router erases flash memory and then
    copies the file. Progress on the erasure of flash
    memory is shown by the routers displaying
    another e every few seconds, and progress on the
    copy is shown by displaying another ! every few
    seconds.

7. The user presses Enter to accept the default
of using the same filename. 8. The router
displays several lines and then asks if the user
wants to erase flash memory before copying the
file. The router then waits for a response.
43
Copying Using the ROMMON tftpdnld Command
  • The ROMMON tftpdnld command can work only if the
    following conditions are met
  • The IP network is working well enough that the
    broken router can send IP packets to and from a
    TFTP server.
  • The TFTP server has the appropriate IOS file
    available for download.

44
Copying Using the ROMMON tftpdnld Command
(Example)
(continued)
45
Environment Variables Needed for the tftpdnld
Command
46
Copying Using ROMMON and Xmodem
  • The Xmodem protocol defines a method to transfer
    files over an asynchronous serial line.
  • Xmodem was first created to support transferring
    files over dialed links that used modems.
  • Because the word transfer was frequently
    abbreviated as xfer, Xmodem seemed like a good
    short name for a protocol for transferring files
    using modems and dialed serial links.

47
Copying Using ROMMON and Xmodem (Continued)
  • To transfer an IOS file into a router using the
    Xmodem
  • protocol, you need three basic components
  • 1. A router running ROMMON software so that the
    ROMMON xmodem command can be used.
  • 2. A PC with the IOS file and a terminal emulator
    that supports Xmodemfor example, HyperTerminal.
  • 3. A connection between a PC and the router that
    connects to the routers console or the aux ports.

48
Copying Using ROMMON and Xmodem (Continued)
  • Using Xmodem to copy a new IOS into a routers
    flash memory should be your last resort when
    trying to get an IOS to load into a Cisco router.
  • The first option is to use the IOS copy command
    to copy the correct IOS into flash, assuming you
    can get some copy of IOS up and working.
  • If the router cannot load an IOS directly, using
    ROMMON and the tftpdnld command is the next best
    option, but this option requires a working IP
    network and working TFTP server.
  • The Xmodem option works when no IOS will load in
    the router and when there is no IP connectivity
    between the router and a TFTP server.

49
Components Required for Xmodem Transfer over the
Console
  • Transferring an IOS using Xmodem, with the
    default console speed,
  • Is a very slow process.
  • To speed up the process, you can change the
    speed of the console port up to its maximum speed
    of 115.2 kbps.

50
Setting the Configuration Register from ROMMON
  • To change the speed, you must change the value
    of the configuration register to change the
    register from ROMMON, you need to use the ROMMON
    confreg command.
  • The confreg command prompts the user with a
    series of questions.
  • The answers to the questions tell ROMMON to what
    value the confi-guration register should be
    changed.
  • As it turns out, the console speed can be
    changed by changing some of the bits in the
    configuration register.

51
Setting the Configuration Register from ROMMON
(Continued)
  • Example above focuses on how to set the console
    bit rate to a different value, but the command
    allows the user to change any
  • of the bits in the configuration register.
  • Note that the configuration register does not
    immediately change. It
  • requires a reset or power off/on to take effect,
    just like when setting the configuration register
    using the IOS config-register command.
  • When you do reload the router, the console bit
    rate changes, so the
  • Terminal emulator settings also need to be
    changed to match the same speed in this case,
    115.2 kbps.

52
Steps Used by the xmodem Command
A Router Preparing to Receive a File Using
ROMMONs xmodem Command
  • Regardless of the console speed, the transfer of
    the IOS file from the PC to the routers flash
    memory requires two basic steps
  • Step 1 The engineer issues the ROMMON xmodem
    command to prepare the router to receive the
    file.
  • Step 2 The engineer tells the terminal emulator
    to send the file using Xmodem.

53
Starting an Xmodem File Transfer Using a Terminal
Emulator
54
After Transfer is Done
  • To get the router working again, you need to
    follow these steps
  • Step 1 Use the confreg command to reset the
    configuration
  • register to its original setting.
  • Step 2 Use the reset command to reload the
    router (or turn it off and then on).
  • Step 3 Change back the terminal-emulator
    configuration to
  • use a speed of 9600 bps.

55
Verifying Cisco IOS Images
  • The two main types of information about IOS
    images
  • include the following
  • 1. Information about the IOS that the router is
    currently using.
  • 2. Information that determines what IOS images
    the router will attempt to load the next time it
    reboots.

56
Important show Commands When Working with IOS
Files
57
Key Items in the Output of the show version
Command
  • The show version command lists most of the
    information relevant to examining IOS files.

58
Copying and Managing Cisco IOS Configuration
Files
  • IOS includes two main configuration files
  • 1. startup-configStored in NVRAM and holds the
    configuration that will be used the next time
    the router reloaded.
  • 2. running-configSits in RAM and holds the
    configuration commands currently being used in
    the router.
  • Copying the configuration to a computer allows
    the engineer to keep backup copies of the
    configuration.
  • Copying the configuration into the running-config
    file may give the engineer a more convenient
    method for typing and adding configuration
    commands to routers.

59
Copying Configuration Files Using the IOS copy
Command
  • The process of copying configuration files
    between a router
  • and a TFTP server requires that you use
  • - the copy tftp running-config command to the
    file from the server into the running-config file
  • - the copy running-config tftp command to the
    file from the routers running-config file to the
    TFTP server.

60
Copying Configuration Files Using the IOS copy
Command (Continued)
Copying to and from a TFTP Server
  • Step 1 Enter either the copy tftp running-config
    or copy running-config tftp command, and press
    Enter.
  • Step 2 Respond to the prompt with the IP address
    or hostname of the TFTP server, and press Enter.
  • Step 3 Respond to the next prompt with the
    filename to be used on the
  • TFTP server, and press Enter.
  • Step 4 Respond to the third prompt by simply
    pressing Enter to confirm that you want to
    transfer the file.

61
Copying Configuration Files Using Copy and Paste
  • Most Windows-based applications have a
    copy-and-paste feature that makes it easy to
    duplicate text between applications. Because
  • configuration files are all text-based, they can
    be copied and pasted as well.
  • There are two variations on how to use the
    copy-and-paste feature of a PC to copy
    configuration commands to and from the
    running-config file in a router
  • - use a text-editor window and a
    terminal-emulator window, copying the text
    between the two
  • - use some text-capture and text-sending
    features typically included in most terminal
    emulators.

62
Copy and Paste Between the Emulator and a Text
Editor
  • Every PC OS supports a variety of applications
    called text editors. All of these applications
    allow the user to enter text into the editor,
    change the text, and save the file as text file.
  • For example, Notepad on Microsoft OSs is
    relatively simple, while Microsoft Word is quite
    sophisticated.
  • For the purpose of copying the configuration to
    and from a router, a simple text editor such as
    Notepad will work just fine.

63
Entering Commands into a Text Editor and Copying
the Command Text
  • Use Notepad (or any other editor) to enter
    configuration commands
  • select and copy the text. After that the PC is
    ready to paste the text into another window.
  • The picture shows a window from a PC, with the
    Notepad editor.
  • The user has entered four configuration commands,
    selected the text, and is ready to select the
    Copy
  • function on the Edit menu.

64
Pasting Text into a Terminal-Emulator Window
  • When the PC has a copy of the text that was shown
    in the text-editor screen, the user can paste the
    text into another window.
  • To add the configuration commands
  • to a routers configuration
  • - log in to the router using a terminal emulator,
    from that same PC, and get into configuration
    mode.
  • - in configuration mode use the Paste feature of
    the OS, which sends the text to the chosen
    windowin this case, the terminal emulator.
  • Pasting the text into the window works just like
    someone typing the exact same text into the
    window.

65
Using copy-and-paste
  • When configuring the same commands on many
    routers, you can enter the commands into an
    editor on the PC and then copy and paste the
    commands into several routers configurations,
  • saving time and effort.
  • You can also copy from the terminal-emulator
    window and paste the text into the text editor to
    make backup copies of the configuration.
  • While performing labs during the class, you can
    easily copy and paste from the terminal emulator
    into an editor such as Notepad and then save the
    file on your PC for later reference.

66
Using a Terminal Emulators Text Capture Feature
  • Most terminal emulators have a feature (that is
    the a variation of the copy-and-paste process) by
    which you can tell the emulator to capture all
    text displayed by the emulator and then put the
    text into a text file.
  • Emulators also typically have a feature by which
    you can tell the emulator to take the content of
    a text file and send it into the window as if you
    had entered all the text in the file into that
    window.

67
Using a Terminal Emulators Text Capture Feature
(Continued)
  • These two features together allow network
    engineers to use a simple
  • three-step process to back up the configurations
    of routers
  • Step 1 Use the emulators text-capture feature to
    capture the output of
  • a show running-config or show startup-config
    command.
  • Step 2 Because the capture process may capture
    extraneous characters or other unneeded text,
    edit the file to prepare it to be used as a
    backup configuration file.
  • Step 3 Should the router ever lose its
    configuration, use the emulators
  • send text file feature to send the contents of
    the backup configuration file back to the router
    and into configuration mode.

68
Using a Terminal Emulators Text Capture Feature
(Continued)
  • For Step 1, you need to use the emulators
    text-capture feature to capture the
  • output of a show running-config command.
  • The following list describes how to use the
    text-capture feature of
  • the HyperTerminal emulator to make a backup copy
    of the running-config file
  • Step 1 In the HyperTerminal window, choose
    Transfer gt Capture Text.
  • Step 2 Specify the name for the text file to the
    capture configuration.
  • Step 3 Click the Start button to start capturing
    text.
  • Step 4 Display the configuration to the screen by
    entering show runningconfig.
  • Step 5 Press the Spacebar when each --More--
    prompt appears, which
  • continues with the configuration until the end is
    reached.
  • Step 6 When the complete configuration has been
    displayed, stop the capture
  • by choosing Transfer gt Capture Text gt Stop, as
    shown in Figure 5-7.

69
Stopping the HyperTerminal Text-Capture Feature
  • If the user has already started the text capture,
    so the menu shows only an option to stop the
    current capture.
  • If no text capture were currently in progress,
    the menu would list a Start option instead.

70
Editing File From Notepad
  • To edit the file from Notepad, complete the
    following steps
  • Step 1 Open the Notepad application. (On
    Microsoft OSs, go to Start gt
  • Run, enter notepad, and click OK).
  • Step 2 Select File gt Open.
  • Step 3 Find the captured file and select it.
  • Step 4 Click Open.
  • The following types of lines typically need to be
    deleted to be ready to paste the
  • configuration back into the router
  • show running-config
  • Building configuration...
  • Current configuration
  • - More -
  • Any lines that appear after the word End

71
Additional Features
  • You can also add comment lines to document the
    configuration. When you are pasted back into the
    router, the router ignores and discards the
    comment lines, but they are useful when reviewing
    the file on your PC.
  • To add a comment line, simply add a new line to
    the file, with the first character being an
    exclamation mark (!).
  • Additionally, you may also want to add the no
    shutdown command
  • under each interface so that when the
    configuration is pasted back into the router, the
    router attempts to bring up each interface.
  • Finally, dont forget to save the file. With
    Notepad, choose
  • File gt Save.

72
Restoring Backup Configuration
  • That last step occurs when you want to add the
    configuration back into
  • the router. You can then restore the backup
    configuration from a
  • HyperTerminal session by using the text-transfer
    feature
  • Step 1 Log in to the router using HyperTerminal.
  • Step 2 Go into router global configuration mode.
  • Step 3 From the HyperTerminal window, choose
  • Transfer gt Send Text File.
  • Step 4 Select the name of the file for the saved
    backup configuration.

73
Restoring Backup Configuration(Continued)
  • Step 5 The lines of the file are entered into the
    router as if they are being typed. Look for any
    errors.
  • Step 6 After the configuration is entered, press
    Ctrl-Z to exit global
  • configuration mode.
  • Step 7 Restore the startup configuration with
  • copy running-config startup-config.

74
Recovering from Lost Passwords
  • If you forget the console, telnet, and enable
    passwords on a router,
  • you need to find a way to get back into the
    router and reset or recover the passwords.
  • The password recovery process requires reboot the
    router and tell it to ignore the configuration in
    NVRAM. If the router manages to boot without
    using the configuration in NVRAM, the router will
    not have any passwords configured it will have
    nothing configured.
  • From that point, the engineer can log in from the
    console and get into enable mode, and the router
    will not request a password.
  • Then the engineer can reconfigure new passwords
    or display any unencrypted passwords using the
    show startup-config command.

75
Password Recovery Process
  • The overall password recovery process runs like
    this
  • Step 1 Connect to the console of the router.
  • Step 2 Reload the router (or turn it off and back
    on).
  • Step 3 Press the Break key on the keyboard in the
    first 30 seconds of the reload.
  • Step 4 When the router responds by entering
    ROMMON mode, change the configuration register
    (with the confreg ROMMON command) to tell the
    router to ignore the startup-config file.
    (Typically, that means setting the configuration
    registers third octet to 4for example, 0x2142.)

76
Password Recovery Process(Continued)
  • Step 5 Reload the router (typically using the
    reset ROMMON command).
  • Step 6 When the router has completed booting, log
    in to the router from
  • the console, and enter enable mode.
  • Step 7 Use the copy startup-config running-config
    command to load the configuration into the
    router.
  • Step 8 Enter configuration mode, and reconfigure
    new passwords.
  • This list does not include every detail, but it
    does give the overall flow of the process used on
    most every model of Cisco router.
  • Go to Cisco.com and use the search tool to search
    for password
  • for detailed password recovery procedures.

77
Summary
  • A Cisco router chooses the location from which it
    should load a
  • stored copy of an IOS image based on several
    rules
  • - first, router attempt to load an IOS from
    flash memory
  • - if that fails, the router attempts to load an
    IOS from a TFTP server
  • - and if that fails, the router may have to load
    a limited-function OS
  • such as ROMMON or RXBoot.
  • You can control this process by changing the boot
    field of the configuration register (the last 4
    bits, or last hex digit) using the
    config-register command, and by configuring boot
    system commands.

78
Summary (Continued)
  • Under normal conditions, a router first looks for
    boot system commands in the startup-config file
  • - if multiple boot system commands exist, the
    router attempts each command, in order, until it
    manages to successfully load an IOS
  • - if all the boot system commands fail, the
    router then attempts to load the first file found
    in flash memory.
  • To troubleshoot the boot process, look at the
    boot system commands in the startup-config file
    by using the show startup-config command.
  • Additionally, look at the configuration
    registers value as listed at the end of the show
    version command output.
  • Note that the configuration register value
    changes only when the router is reloaded.

79
Summary (Continued)
  • Cisco creates the filenames of IOS files with
    four parts
  • 1. The hardware platform
  • 2. A code that represents the feature set
  • 3. A code that represents the file format
  • 4. The version and release number
  • Cisco routers use two internal configuration
    files the startup-config file and the
    running-config file. The startup-config file is
    stored in NVRAM and is copied into RAM to be used
    as the running-config file when the router is
    reloaded.
  • While configuring a router, periodically save
    the running-config file using the copy
    running-config startup-config command, so the
    files end up being identical.

80
Summary (Continued)
  • It is useful and important to keep a backup copy
    of the configuration files on an external device.
    The copy running-config tftp command can be used
    to copy the configuration to an external
  • TFTP server.
  • Use a text editors simple copy-and-paste
    mechanisms when logged in to a router to copy the
    output of a show running-config command into a
    file.
  • Most terminal emulators support the ability to
    perform a text-capture function, which causes the
    emulator to copy everything sent to the screen
    into a text file.
Write a Comment
User Comments (0)
About PowerShow.com