Você está na página 1de 44

Router IOS

The purpose of Cisco IOS Software

As with a computer, a router or switch cannot function without an operating system. Cisco calls its operating system the Cisco Internetwork Operating System or Cisco IOS. Without an operating system, the hardware does not have any capabilities.
2

The purpose of Cisco IOS Software (1)

The Cisco IOS provides the following network services:


Routing and switching functions Reliable and secure access to networked resources Network scalability
3

Router user interface

The Cisco IOS software uses a command-line interface (CLI) as the traditional console environment. The IOS is a core technology that extends across most of the Cisco product line. Its operation details may vary on different internetworking devices.

Router user interface (1)

This environment is accessible through several methods. One way to access the CLI is through a console session. Another way to access a CLI session is by use of a dialup connection using a modem or null modem connected to a router AUX port. Neither of these methods require that the router have any network services configured
Console Port Auxillary Port

Connection established without any configuration


5

Router user interface (2)


The next method of accessing a CLI session is to Telnet to the router. To establish a Telnet session to the router, at least one interface must be configured with an IP address. And virtual terminal sessions must be configured for login and passwords.

Telnet 192.168.1.2

E0: 192.168.1.1

line vty 0 4 password cisco login

Connection established requires configuration


6

Router user interface (3)


Another method of accessing a CLI session is using web browser. To establish a HTTP session to the router, at least one interface must be configured with an IP address. Router must be configured to act as a Web Server.

HTTP 192.168.1.2 ip http server

E0: 192.168.1.1

Connection established requires configuration


7

Router user interface Mode


User Mode Interface config

Privileged Mode

Line config

Config Mode

Router config

The Cisco command-line interface (CLI) uses a hierarchical structure. This structure requires entry into different modes to accomplish particular tasks.

Router user interface Mode (1)


User Mode Interface config

Privileged Mode

Line config

Config Mode

Router config

For example, to configure a router interface, the user must enter interface configuration mode. From interface configuration mode, all configurations entered apply only to that particular interface. Each configuration mode is indicated with a distinctive prompt and allows only commands that are appropriate for that mode.

Router user interface Mode (2)


The IOS provides a command interpreter (Trnh phin dch) service known as the command executive (EXEC). After each command is entered, the EXEC validates and executes the command. (EXEC xc nhn tnh hp l thc thi lnh) As a security feature, the Cisco IOS software separates the EXEC sessions into two access levels. User EXEC mode (User Mode) Privileged EXEC mode (Enable Mode)

10

User Mode

The user EXEC mode allows only a limited number of basic monitoring commands. This is often referred to as a view only mode. The user EXEC level does not allow any commands that might change the configuration of the router. The user EXEC mode can be identified by the >" prompt.
11

Privilege Mode

The privileged EXEC mode accesses all router commands. This mode can be configured to require a password from the user before accessing it. For added protection, it can also be configured to require a user ID. This allows only authorized users to access the router. Configuration and management commands require that the network administrator be at the privileged EXEC level. Global configuration mode and all other more specific configuration modes can only be reached from the privileged EXEC mode. 12 The privileged EXEC mode can be identified by the "#" prompt.

Router user interface Mode (3)

To access the privileged EXEC level from the user EXEC level, enter the enable command at the > prompt. If a password is configured, the router will then ask for that password. For security reasons, a Cisco network device will not show the password that is entered. When the correct password is entered, the router prompt changes to #, indicating that the user is now at the privileged EXEC level.

13

Cisco IOS naming convention

The naming convention for the different Cisco IOS releases contains three parts: xxxx-yyyy-ww xxxx: The platform on which the image runs yyyy: The special features supported in the image ww: Where the image runs and whether it has been zipped or compressed For example: c2600-ds-mz.120-5.T1.bin

Platform c2600: Cisco 2600 Features ds: SNMP, IP, Bridging, WAN, Remote note, Terminal services, IPX Format mz: RAM, zip compressed Version 120-5.T1: Released number
15

Feature definition.

i: IP subset N: IPX J: Enterprise subset P: Service provider subset S: NAT, VPN.. 56i: Plus IPSEC more

16

Cisco IOS naming convention


c2600-ix-mz.122-1.bin c2600-js-mz.121-5.XM.bin c2600-jsx-mz.121-5.XM.bin c2500-ix-l.121-5.T9.bin c1700-y-mz.121-8a.bin c1700-osv3y-mz.120-5.XQ1.bin c805-nsy6-mw.120-7.T.bin c800-g3n-mw.120-1.XB1.bin

17

Operation of Cisco IOS Software

The Cisco IOS devices have three distinct operating environments or modes:

ROM monitor Boot ROM Cisco IOS

19

Operation of Cisco IOS Software (1)

The startup process of the router normally loads into RAM and executes one of these operating environments. The configuration register setting can be used by the system administrator to control the default start up mode for the router.

20

ROM monitor

The ROM monitor performs the bootstrap process and provides low-level functionality and diagnostics. It is used to recover from system failures and to recover a lost password. The ROM monitor cannot be accessed through any of the network interfaces. It can only be accessed by way of a direct, physical connection through the console port.
21

Boot ROM

When the router is running in boot ROM mode, only a limited subset of the Cisco IOS feature set is available. Boot ROM allows write operations to flash memory and is used primarily to replace the Cisco IOS image that is stored in flash. The Cisco IOS image can be modified in boot ROM by using the copy tftp flash command, which copies an IOS image stored on a TFTP (Trivial File Transfer Protocol, UDP , port 69) server into the flash memory of the router.
22

Cisco IOS

The normal operation of a router requires use of the full Cisco IOS image as stored in flash. In some devices, the IOS is executed directly from flash. However, most Cisco routers require a copy of the IOS to be loaded into RAM and also executed from RAM. Some IOS images are stored in flash in a compressed format and have to be expanded when copied to RAM.
23

Config-Register

All Cisco routers have a 16-bit software register thats written in to NVRAM. The 16 bits of the configuration register are read from 15 to 0, from left to right. The default configuration setting on Cisco routers is 0x2102. This means that bit 13, 8 and 1are on. Remember to add prefix 0x to the configuration register address.24 The 0x means that the digits that follow are in hexadecimal.

Config-register (1)
0x2100 : System bootstrap prompt (> or rommon>) 0x 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0

0x2101 : Boot system from ROM (Router(boot)) 0x 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1

0x2102 : Boot system from flash (Router>) 0x 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0

0x2142 : Ignore start-up configuration 0x 0 0 1 0 0 0 0 1 0 1 0 0 0 0 1 0


25

Config-register (2)

You can see the current value of the configuration register by using the show version command.

26

Config-register (3)

You can change the configuration register value to modify how the router boots and runs. Heres an example: The following commands tell the router to boot a small IOS from boot ROM mode and then show the current configuration register value.

Router(config)#config-register 0x2101 Router(config)#^Z Router#show version

[output cut}
Configuration register is 0x2102 (will be 0x2101 at netxt reload)

27

Config-register command

0x
Bit:

0 0 1 0 12

0 0 0 1 8

0 0 0 0 4

0 0 1 0 0

Router(config)# config-register 0x2102 Router(config)# exit Router#show version

28

Configuration register values


0 3: 6: 8: 11-12: 13: 15:

Boot field Ignore NVRAM contents Break disabled Console line speed Boot ROM if network boot fails Diagnostic and ignore NVRAM

29

Reasons to modify Configuration Register


Recovering a lost password Changing the console baud rate Enabling or disabling Break Forcing the router to boot automatically from the system bootstrap software or from its system image in Flash memory, and read any boot system commands that are stored in the configuration file in NVRAM.

30

show version
Cisco Internetwork Operating System Software IOS (tm) 2500 Software (C2500-D-L), Version 12.0(10), RELEASE SOFTWARE (fc1) Copyright (c) 1986-2000 by cisco Systems, Inc. Compiled Mon 20-Mar-00 22:33 by phanguye Image text-base: 0x0303882C, data-base: 0x00001000 ROM: System Bootstrap, Version 11.0(10c), SOFTWARE BOOTFLASH: 3000 Bootstrap Software (IGS-BOOT-R), Version 11.0(10c), RELEASE SOFTWARE (fc1) SGCTT-HCM uptime is 1 week, 1 day, 1 hour, 9 minutes System restarted by power-on System image file is "flash:c2500-d-l.120-10" cisco 2500 (68030) processor (revision N) with 2048K/2048K bytes of memory. Processor board ID 23101339, with hardware revision 00000000 Bridging software. X.25 software, Version 3.0.0. 1 Ethernet/IEEE 802.3 interface(s) 2 Serial network interface(s) 32K bytes of non-volatile configuration memory. 8192K bytes of processor board System flash (Read ONLY) Configuration register is 0x2102
31

Initial startup of Cisco routers

A router initializes by loading the bootstrap, the operating system, and a configuration file. If the router cannot find a configuration file, it enters setup mode.32

Initial startup of Cisco routers


The goal of the startup routines for Cisco IOS software is to start the router operations. To do this, the startup routines must accomplish the following:

Make sure that the router hardware is tested and functional. Find and load the Cisco IOS software. Find and apply the startup configuration file or enter the setup mode.

33

Power On Self Test (POST)


When a Cisco router powers up, it performs a power-on self test (POST). During this self test, the router executes diagnostics from ROM on all hardware modules. These diagnostics verify the basic operation of the CPU, memory, and network interface ports. After verifying the hardware functions, the router proceeds with software initialization.(Sau khi kim tra HW, Router tip tc khi to Software) After the POST, the following events occur as the router initializes:

34

Bootstrap

The bootstrap loader in ROM executes. A bootstrap is a simple set of instructions that tests hardware and 35 initializes the IOS for operation.

Cisco Internetwork Operating System

The IOS can be found in several places. The boot field of the configuration register determines the location to be used in loading the IOS. If the boot field indicates a flash or network load, boot system commands in the configuration file indicate the exact name and 36 location of the image.

Cisco Internetwork Operating System


Router#config terminal Router(config)#boot system flash c2600-js-mz.12.1T.bin Router(config)#boot system tftp c2600-js-mz.12.1T.bin 192.168.1.1 Router(config)#boot system ROM [Ctrl+Z) Router#copy running-config startup-config

In the figure above, the router will: Boot using IOS image in flash memory first, If flash is empty, boot using IOS image on TFTP server, If no TFTP server available, boot using IOS image in ROM.

37

Cisco Internetwork Operating System

The operating system image is loaded. When the IOS is loaded and operational, a listing of the available hardware and software components is output to the console terminal screen.
38

Configuration File

The configuration file saved in NVRAM is loaded into main memory and executed one line at a time. The configuration commands start routing processes, supply addresses for interfaces, and define other operating characteristics 39 of the router.

Configuration File

If no valid configuration file exists in NVRAM, the operating system searches for an available TFTP server. If no TFTP server is found, the setup dialog is initiated.
40

Configuration File (Setup mode)

The purpose of the setup mode is to permit the administrator to install a minimal configuration for a router.
41

Configuration File (Setup mode)

In the setup mode, default answers appear in square brackets [ ] following the question. Press the Enter key to use these defaults. During the setup process, Ctrl-C can be pressed at any time to terminate the process. When setup is terminated by using Ctrl-C, all 42 interfaces will be administratively shutdown.

Configuration File (Setup mode)

When the configuration process is completed in setup mode, the following options will be displayed: [0] Go to the IOS command prompt without saving this config. [1] Return back to the setup without saving this config. [2] Save this configuration to nvram and exit. Enter your selection [2]:

43

Router LED Indicators

Cisco routers use LED indicators to provide status information. Depending upon the Cisco router model, the LED indicators will vary. An interface LED indicates the activity of the corresponding interface.

44

Examining the initial router bootup

46

Q&A

47

Você também pode gostar