Router Components RAM: Boot Field Meaning
Router Components RAM: Boot Field Meaning
RAM
Random-Access Memory is similar in function to the RAM in PCs. This is where the IOS runs
its processes. It also contains the running configuration, routing and other tables as well as
packet buffers.
ROM
This Read-Only Memory stores a older 'lite' IOS used to boot the router for the very first time, or
when the Flash memory is erased or corrupted.
FLASH
This piece of 'flash-able' memory stores the IOS image, the operating system of the router.
NVRAM
In contradiction to normal RAM, Non-Volatile Random-Access Memory is a special type of
memory that doesn't lose its content when the router's power is turned off. It stores the startup
configuration and the configuration register.
CONFIGURATIONS
Config register
The NVRAM has a special location that contains the 16-bit configuration register. Every time
the router boots it reads this value. The config-register value is a hexadecimal value ranging from
0x0000 to 0xFFFF and can be set by using the config-register command. The most important
portion of the configuration register to understand for the exam is the boot field (bit 0 through 3,
hexadecimal range 0x0000-0x000F). The boot field value is used to specify from which location
the IOS image should be loaded or bypassed even during startup.
The remaining 12 bits of the configuration register are used for various functions such as
enabling/disabling the Break function, setting the Console line speed, bypassing
NVRAM, and controlling the broadcast address. To change the configuration register the
user has to enter be in global configuration mode. Use the command configure
terminal often abbreviated to conf t in privileged EXEC mode to enter global config
mode. Enter privileged EXEC mode using the enable command. When the correct
password entered, the prompt will change to Router# (where "Router" is the hostname of
the router).
Once in global config mode, the following command used to change configuration
register value:
Router(config)#config-register 0x2102
where 0x2102 is an example of a config-register value.
The current configuration setting can be viewed by using the Router# show
version command. The last line of the output will display the current value and if it is
different, the value after reboot:
Configuration register is 0x2142 (will be 0x2102 at next reload)
To copy the currently running active configuration to NVRAM, i.o.w. to save a changed
running configuration to the startup configuration so it will be used the next time you
reload the router, use the following command:
Router#copy running-config startup-config
The following command loads the startup configuration stored in NVRAM into RAM
and makes it the active running configuration.
Router#copy startup-config running-config
You can also copy the running configuration to a TFTP server using the following
command:
Router#copy running-config tftp 222.222.222.1
This can be done with the startup configuration as well:
Router#copy startup-config tftp 222.222.222.1
To load Cisco IOS software from Flash memory use the following command:
Router(Config)#boot system flash
Although this is default behavior, using this command can be useful especially when you
have multiple IOS images stored in FLASH. If you do not specify a filename, the first
located image will be loaded.
To load Cisco IOS software from a TFTP server use the following command:
Router(Config)#boot system tftp
To load Cisco IOS software from ROM use the following command:
Router(Config)#boot system rom
Note that this will load the limited IOS version and will likely prevent normal operation.
You can use a combination of these commands to provide some redundancy. You can
even specify multiple TFTP servers. Make sure you place them in the correct order, flash
first, tftp as backup, and rom as last resort. The configuration register's boot field must be
set to 0x2 through 0xF, in order for the router to check the configuration file in NVRAM
for boot system commands.
To back up the IOS stored in Flash to an TFTP server use the following command:
Router#copy flash tftp 222.222.222.1 c2600-js-l_121-5.bin
- Console port
Cisco routers are equipped with a Console port, which is an RJ-45 port on most routers
but on some high-end routers it's a DB-25 connector. You can connect a terminal (a
notebook or a PC for example) to the console port using a RJ-45 roll-over cable with RJ-
45, DB-9, or DB-25 connectors on the ends. A common example is a cable with a RJ-45
connector connecting to the router's console port and a DB-9 connector on the other end
connecting to the PC's COM port. When you connect a PC to the router's console port
you can use a terminal emulator to configure the router. When you start a session the
following should appear:
- Auxilary port
Many Cisco routers are also equipped with an Auxilary port, which can be used to
connect a modem and allow for remote administration of the router.
- Telnet
Once your router is configured with an IP address, a Telnet connection is the most
common way to connect to a router to manually configure and monitor it. Cisco IOS, the
router's operating system, has a built-in Telnet server and a Telnet client. This allows you
to connect to a router using a telnet client from a PC but from another Cisco router as
well. This type of connection using the same network the router operates in is also known
as in-band management. Telnet sends username and password credentials in clear text
and should be replaced with SSH connections if supported.
ROUTER MODES
User EXEC mode
This is the mode you enter once you are connected, and if required, logged on to the
router. In this mode you can perform non-disruptive troubleshooting, for example, view
the routing table and status of components. You can NOT view or modify the
configuration in User EXEC mode.
When you connect to the router and press the <Enter> key (Press RETURN to get
started) you'll be prompted for a password:
When you enter the correct console, telnet or AUX password (depending on how you
connect to the router) and press <Enter> the User EXEC mode command prompt will
appear.
Router>
"Router" is the default hostname for all Cisco routers. The > indicates you are in User
EXEC mode.
To exit User EXEC mode and quit the session with the command-line executive use one
of the following commands:
Router>logout
or
Router>exit
outer>enable <enter>
Password:
After submitting the correct enable password (or enable secret, which we'll discuss later
on) and pressing the <Enter> key the command prompt will change again:
Router#
To exit Privileged EXEC mode and return to User EXEC mode use the following
command:
Router#disable
To exit Privileged EXEC mode and quit the session with the router, use one of the
following commands:
Router#logout
or
Router#exit
As you can see the change immediately takes effect by looking at the prompt, which now
reflects the new name.
To exit global configuration mode and return to User EXEC mode use one of the
following commands:
Rnewyork1(config)#end
or
Rnewyork1(config)#exit
Or use the key combination CTRL-Z
You can use the following command to save the configuration to NVRAM so it will be
used next time the router starts:
Rnewyork1#copy running-config startup
You need to enter interface configuration mode when you want to configure settings
specific to an interface, such as assigning an IP address. To enter interface configuration
mode you must use the interface command and provide the name and number of an
existing interface. Following are some examples:
Router(config)#interface ethernet 0
Router(config-if)#
Router(config)#interface serial 2
Router(config-if)#
As you can see in the first example, the first possible interface is 0, the second Ethernet
interface on a router would be Ethernet 1, also noticable is the change in the prompt.
These commands are usually abbreviated, for example to int e1 or int s0
To exit interface configuration mode and return to global configuration mode, enter the
following command:
Router(config-if)#exit
To exit interface configuration mode and return to Privileged EXEC mode, use the key
combination CTRL-Z
or
Router(config-if)#end
Console password
Use the following commands to configure the console password. The first command is
used to enter Line configuration mode. The second configures the password "cisco123",
and the third command configures the console line to require a login.
Router(config)#line con 0
Router(config-line)#password cisco123
Router(config-line)#login
Telnet password
Use the following commands to configure a password for Telnet access:
Router(config)#line vty 0 4
Router(config-line)#password cisco123
Router(config-line)#login
Auxilary password
Use the following commands to configure the auxilary port password:
Router(config)#line aux 1
Router(config-line)#password cisco123
Router(config-line)#login
The enable secret password overrides the regular enable password, except when an old
IOS image is used that doesn't support the encrypted enable secret.
To configure an enable password, go to global config mode and issue the following
command:
Router(config)#enable password cisco123
where cisco123 is just an example for a password.
To configure an enable secret, go to global config mode and issue the following
command:
Router(config)#enable secret cisco456
where cisco456 is just an example for a password.
If you do not set an enable password or enable secret, you don't have to enter a password
when you type the enable command, but you will end up having problems connecting to
the router using telnet for example, you won't be able to enter Privileged EXEC mode.
By default all password except the enable secret are stored as clear-text in the
configuration file. When you have backups on TFTP servers or floppy disks even, this
might be an important issue. This can be solved using the following command to provide
some encryption the passwords:
Router(config)#service password-encryption
The irreversible MD5 encryption used to encrypt the enable secret is much stronger than
the rather simple encryption used by the service password-encryption, which can be
decrypted by publicly available tools.
Router#show ?
You don't need to press the <Enter> key after the ?, and when the end of the list is
reached the command will be after the prompt again without the ? so you can continue
typing the correct option. (When a list like this does not fit in the maximum allowed
lines, --More-- will be displayed on the last line, press the <Enter> key to scroll down per
line or the <Spacebar> to scroll down to the next screen.)
The arrow keys function only on ANSI-compatible terminals such as VT100s. You can
configure your terminal emulator to use VT100 emulation.
Another useful feature to assist with the command syntax is auto-complete. For example,
when you type a command partly but you don't know how to spell a particular option,
you can let IOS complete it by pressing the TAB key:
When you have finished all configurations, type end then <Enter> to exit the
configuration mode.