Upload
vo-ngoc-hoang
View
222
Download
0
Embed Size (px)
Citation preview
7/27/2019 Router IOS 2
1/44
1
Router IOS
7/27/2019 Router IOS 2
2/44
2
The purpose of Cisco IOSSoftware
As with a computer, a router or switch cannot function without anoperating system.Cisco calls its operating system the Cisco Internetwork OperatingSystem or Cisco IOS.Without an operating system, the hardware does not have anycapabilities.
7/27/2019 Router IOS 2
3/44
3
The purpose of Cisco IOSSoftware (1)
The Cisco IOS provides the following network services:Routing and switching functions Reliable and secure access to networked resourcesNetwork scalability
7/27/2019 Router IOS 2
4/44
4
Router user interface
The Cisco IOS software uses a command-line interface (CLI) asthe traditional console environment.The IOS is a core technology that extends across most of theCisco product line.
Its operation details may vary on different internetworkingdevices.
7/27/2019 Router IOS 2
5/44
5
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 dialupconnection using a modem or null modem connected to a router
AUX port.Neither of these methods require that the router have anynetwork services configured
Console Port Auxillary Port
Connection established without any configuration
7/27/2019 Router IOS 2
6/44
6
Router user interface (2)The next method of accessing a CLI session is to Telnet to therouter.To establish a Telnet session to the router, at least one interfacemust be configured with an IP address.
And virtual terminal sessions must be configured for login andpasswords.
Telnet
Connection established requires configuration
192.168.1.2
E0: 192.168.1.1
line vty 0 4password ciscologin
7/27/2019 Router IOS 2
7/44
7
Router user interface (3) Another method of accessing a CLI session is using webbrowser .To establish a HTTP session to the router, at least one interfacemust be configured with an IP address.
Router must be configured to act as a Web Server.
HTTP
Connection established requires configuration
192.168.1.2
E0: 192.168.1.1
ip http server
7/27/2019 Router IOS 2
8/44
8
Router user interface Mode
The Cisco command-line interface (CLI) uses a hierarchicalstructure.
This structure requires entry into different modes to accomplishparticular tasks.
User Mode
Privileged Mode
Config Mode
Interface config
Line config
Router config
7/27/2019 Router IOS 2
9/44
7/27/2019 Router IOS 2
10/44
10
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 andexecutes the command. ( EXEC xc nhn tnh hp l thc thi lnh)
As a security feature, the Cisco IOS software separates theEXEC sessions into two access levels.User EXEC mode (User Mode)Privileged EXEC mode (Enable Mode)
7/27/2019 Router IOS 2
11/44
11
User Mode
The user EXEC mode allows only a limited number of basicmonitoring commands.
This is often referred to as a view onlymode.The user EXEC level does not allow any commands that mightchange the configuration of the router.The user EXEC mode can be identified by the >" prompt.
7/27/2019 Router IOS 2
12/44
12
Privilege Mode
The privileged EXEC mode accesses all router commands.This mode can be configured to require a password from theuser before accessing it. For added protection, it can also beconfigured to require a user ID. This allows only authorized usersto access the router.Configuration and management commands require that thenetwork administrator be at the privileged EXEC level.Global configuration mode and all other more specificconfiguration modes can only be reached from the privilegedEXEC mode .The privileged EXEC mode can be identified by the " #" prompt.
7/27/2019 Router IOS 2
13/44
13
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 thatpassword. For security reasons, a Cisco network device will notshow the password that is entered.When the correct password is entered, the router prompt
changes to #, indicating that the user is now at the privilegedEXEC level.
7/27/2019 Router IOS 2
14/44
15
Cisco IOS naming convention
The naming convention for the different Cisco IOS releasescontains three parts: xxxx-yyyy-ww
xxxx : The platform on which the image runsyyyy : The special features supported in the imageww : 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, Terminalservices, IPX Format mz : RAM, zip compressedVersion 120-5.T1 : Released number
7/27/2019 Router IOS 2
15/44
16
Feature definition.
i: IP subsetN: IPXJ: Enterprise subsetP: Service provider subsetS: NAT, VPN..56i: Plus IPSECmore
7/27/2019 Router IOS 2
16/44
17
Cisco IOS naming convention
c2600-ix-mz.122-1.binc2600-js-mz.121-5.XM.binc2600-jsx-mz.121-5.XM.bin
c2500-ix-l.121-5.T9.binc1700-y-mz.121-8a.binc1700-osv3y-mz.120-5.XQ1.binc805-nsy6-mw.120-7.T.bin
c800-g3n-mw.120-1.XB1.bin
7/27/2019 Router IOS 2
17/44
19
Operation of Cisco IOS SoftwareThe Cisco IOS devices have three distinct operatingenvironments or modes:
ROM monitor Boot ROM
Cisco IOS
7/27/2019 Router IOS 2
18/44
20
Operation of Cisco IOS Software(1)
The startup process of the router normally loads into RAM andexecutes one of these operating environments.
The configuration register setting can be used by the systemadministrator to control the default start up mode for the router.
7/27/2019 Router IOS 2
19/44
21
ROM monitor
The ROM monitor performs the bootstrap process and provideslow-level functionality and diagnostics.It is used to recover from system failures and to recover a lostpassword .The ROM monitor cannot be accessed through any of thenetwork interfaces.It can only be accessed by way of a direct, physical connectionthrough the console port.
7/27/2019 Router IOS 2
20/44
22
Boot ROM
When the router is running in boot ROM mode, only a limitedsubset of the Cisco IOS feature set is available.Boot ROM allows write operations to flash memory and is usedprimarily to replace the Cisco IOS image that is stored in flash.The Cisco IOS image can be modified in boot ROM by using thecopy tftp flash command, which copies an IOS image stored on aTFTP (Trivial File Transfer Protocol, UDP , port 69) server intothe flash memory of the router.
7/27/2019 Router IOS 2
21/44
23
Cisco IOS
The normal operation of a router requires use of the full CiscoIOS 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 beloaded into RAM and also executed from RAM.Some IOS images are stored in flash in a compressed formatand have to be expanded when copied to RAM.
7/27/2019 Router IOS 2
22/44
24
Config-Register
All Cisco routers have a 16- bit software register thats written into NVRAM.The 16 bits of the configuration register are read from 15 to 0,from left to right. The default configuration setting on Ciscorouters is 0x2102 .This means that bit 13, 8 and 1are on.Remember to add prefix 0x to the configuration register address.The 0x means that the digits that follow are in hexadecimal.
7/27/2019 Router IOS 2
23/44
25
Config-register (1)
0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 10x0x2101 : Boot system from ROM ( Router(boot ))
0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 00x
0x2102 : Boot system from flash (Router>)
0 0 1 0 0 0 0 1 0 1 0 0 0 0 1 00x
0x2142 : Ignore start-up configuration
0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 00x
0x2100 : System bootstrap prompt (> or rommon> )
7/27/2019 Router IOS 2
24/44
26
Config-register (2)
You can see the current value of the configuration register byusing the show version command.
7/27/2019 Router IOS 2
25/44
27
Config-register (3)You can change the configuration register value to modify howthe router boots and runs.Heres an example: The following commands tell the router toboot a small IOS from boot ROM mode and then show thecurrent configuration register value.
Router(config)#config-register 0x2101Router(config)#^ZRouter#show version
[output cut}
Configuration register is 0x2102 (will be 0x2101 at netxt reload)
7/27/2019 Router IOS 2
26/44
28
Config-register command
0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 00x
04812Bit:
Router(config)# config-register 0x2102
Router(config)# exit
Router#show version
7/27/2019 Router IOS 2
27/44
29
Configuration register values
0 3: Boot field6: Ignore NVRAM contents8: Break disabled
11-12: Console line speed13: Boot ROM if network boot fails15: Diagnostic and ignore NVRAM
7/27/2019 Router IOS 2
28/44
30
Reasons to modify ConfigurationRegister
Recovering a lost passwordChanging the console baud rateEnabling or disabling BreakForcing the router to boot automatically from the system bootstrapsoftware or from its system image in Flash memory, and read anyboot system commands that are stored in the configuration file inNVRAM.
7/27/2019 Router IOS 2
29/44
31
show versionCisco Internetwork Operating System SoftwareIOS (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 phanguyeImage text-base: 0x0303882C, data-base: 0x00001000
ROM: System Bootstrap, Version 11.0(10c), SOFTWAREBOOTFLASH: 3000 Bootstrap Software (IGS-BOOT-R), Version 11.0(10c), RELEASESOFTWARE (fc1)
SGCTT-HCM uptime is 1 week, 1 day, 1 hour, 9 minutesSystem restarted by power-onSystem 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 00000000Bridging 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
7/27/2019 Router IOS 2
30/44
32
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.
7/27/2019 Router IOS 2
31/44
33
Initial startup of Cisco routers
The goal of the startup routines for Cisco IOS software is to start therouter 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 setupmode.
7/27/2019 Router IOS 2
32/44
34
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 onall hardware modules.
These diagnostics verify the basic operation of the CPU, memory,and network interface ports.
After verifying the hardware functions, the router proceeds withsoftware initialization.( Sau khi kim tra HW, Router tip tc khi to Software)
After the POST, the following events occur as the router initializes:
7/27/2019 Router IOS 2
33/44
35
Bootstrap
The bootstrap loader in ROM executes. A bootstrap is a simple set of instructions that tests hardware and
initializes the IOS for operation.
7/27/2019 Router IOS 2
34/44
36
Cisco Internetwork OperatingSystem
The IOS can be found in several places.The boot field of the configuration register determines the location tobe 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 andlocation of the image.
7/27/2019 Router IOS 2
35/44
37
Cisco Internetwork OperatingSystem
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.
Router#config terminalRouter(config)#boot system flash c2600-js-mz.12.1T.binRouter(config)#boot system tftp c2600-js-mz.12.1T.bin 192.168.1.1Router(config)#boot system ROM[Ctrl+Z)Router#copy running-config startup-config
7/27/2019 Router IOS 2
36/44
7/27/2019 Router IOS 2
37/44
39
Configuration File
The configuration file saved in NVRAM is loaded into main memoryand executed one line at a time.The configuration commands start routing processes, supplyaddresses for interfaces, and define other operating characteristics
of the router.
7/27/2019 Router IOS 2
38/44
40
Configuration File
If no valid configuration file exists in NVRAM, the operating systemsearches for an available TFTP server.If no TFTP server is found, the setup dialog is initiated.
7/27/2019 Router IOS 2
39/44
41
Configuration File (Setup mode)
The purpose of the setup mode is to permit theadministrator to install a minimal configuration for a router.
7/27/2019 Router IOS 2
40/44
42
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 toterminate the process. When setup is terminated by using Ctrl-C, allinterfaces will be administratively shutdown.
7/27/2019 Router IOS 2
41/44
43
Configuration File (Setup mode)
When the configuration process is completed in setup mode, thefollowing 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]:
7/27/2019 Router IOS 2
42/44
44
Router LED Indicators
Cisco routers use LED indicators to provide status information.Depending upon the Cisco router model, the LED indicators willvary.
An interface LED indicates the activity of the corresponding
interface.
7/27/2019 Router IOS 2
43/44
46
Examining the initial router bootup
7/27/2019 Router IOS 2
44/44
47
Q&A