in the first cisco learning we will learn about what is a router, and the components and their functions.

Define Router


A router is a computer, just like any other computer including a PC. The very first router, used for the Advanced Research Projects Agency Network (ARPANET), was the Interface Message Processor (IMP). The IMP was a Honeywell 316 minicomputer; this computer brought the ARPANET to life on August 30, 1969.

Note: The ARPANET was developed by Advanced Research Projects Agency (ARPA) of the United States Department of Defense. The ARPANET was the world's first operational packet switching network and the predecessor of today's Internet.

Routers have many of the same hardware and software components that are found in other computers including:
- CPU
- RAM
- ROM
- Operating System

Routers determine the best path
The primary responsibility of a router is to direct packets destined for local and remote networks by:
- Determining the best path to send packets
- Forwarding packets toward their destination

The router uses its routing table to determine the best path to forward the packet. When the router receives a packet, it examines its destination IP address and searches for the best match with a network address in the router's routing table. The routing table also includes the interface to be used to forward the packet. Once a match is found, the router encapsulates the IP packet into the data link frame of the outgoing or exit interface, and the packet is then forwarded toward its destination.

It is very likely that a router will receive a packet that is encapsulated in one type of data link frame, such as an Ethernet frame and when forwarding the packet, the router will encapsulate it in a different type of data link frame, such as Point-to-Point Protocol (PPP). The data link encapsulation depends on the type of interface on the router and the type of medium it connects to. The different data link technologies that a router connects to can include LAN technologies, such as Ethernet, and WAN serial connections, such as T1 connection using PPP, Frame Relay, and Asynchronous Transfer Mode (ATM).

Static routes and dynamic routing protocols are used by routers to learn about remote networks and build their routing tables. These routes and protocols are the primary focus of the course and will be discussed in detail in later chapters along with the process that routers use in searching their routing tables and forwarding the packets.

Router Components and their Functions
Like a PC, a router also includes:
- Central Processing Unit (CPU)
- Random-Access Memory (RAM)
- Read-Only Memory (ROM)

Roll over components in the figure to see a brief description of each.

CPU
The CPU executes operating system instructions, such as system initialization, routing functions, and switching functions.

RAM
RAM stores the instructions and data needed to be executed by the CPU. RAM is used to store these components:
Operating System: The Cisco IOS (Internetwork Operating System) is copied into RAM during bootup.

Running Configuration File: This is the configuration file that stores the configuration commands that the router IOS is currently using. With few exceptions, all commands configured on the router are stored in the running configuration file, known as running-config.
IP Routing Table: This file stores information about directly connected and remote networks. It is used to determine the best path to forward the packet.
ARP Cache: This cache contains the IPv4 address to MAC address mappings, similar to the ARP cache on a PC. The ARP cache is used on routers that have LAN interfaces such as Ethernet interfaces.

Packet Buffer: Packets are temporarily stored in a buffer when received on an interface or before they exit an interface.

ROM
ROM is a form of permanent storage. Cisco devices use ROM to store:
- The bootstrap instructions
- Basic diagnostic software
- Scaled-down version of IOS.

Flash Memory
Flash memory is nonvolatile computer memory that can be electrically stored and erased. Flash is used as permanent storage for the operating system, Cisco IOS. In most models of Cisco routers, the IOS is permanently stored in flash memory and copied into RAM during the bootup process, where it is then executed by the CPU. Some older models of Cisco routers run the IOS directly from flash. Flash consists of SIMMs or PCMCIA cards, which can be upgraded to increase the amount of flash memory.

NVRAM
NVRAM (Nonvolatile RAM) does not lose its information when power is turned off. This is in contrast to the most common forms of RAM, such as DRAM, that requires continual power to maintain its information. NVRAM is used by the Cisco IOS as permanent storage for the startup configuration file (startup-config). All configuration changes are stored in the running-config file in RAM, and with few exceptions, are implemented immediately by the IOS. To save those changes in case the router is restarted or loses power, the running-config must be copied to NVRAM, where it is stored as the startup-config file. NVRAM retains its contents even when the router reloads or is powered off.

Bootup Process
There are four major phases to the bootup process:
1. Performing the POST
The Power-On Self Test (POST) is a common process that occurs on almost every computer during bootup. The POST process is used to test the router hardware. When the router is powered on, software on the ROM chip conducts the POST. During this self-test, the router executes diagnostics from ROM on several hardware components including the CPU, RAM, and NVRAM. After the POST has been completed, the router executes the bootstrap program.
Loading the Bootstrap Program

2. After the POST, the bootstrap program is copied from ROM into RAM. Once in RAM, the CPU executes the instructions in the bootstrap program. The main task of the bootstrap program is to locate the Cisco IOS and load it into RAM.

3. Locating and Loading Cisco IOS
Locating the Cisco IOS software. The IOS is typically stored in flash memory, but can also be stored in other places such as a TFTP (Trivial File Transfer Protocol) server.
If a full IOS image can not be located, a scaled-down version of the IOS is copied from ROM into RAM. This version of IOS is used to help diagnose any problems and can be used to load a complete version of the IOS into RAM.

4. Locating and Loading the Configuration File
Locating the Startup Configuration File. After the IOS is loaded, the bootstrap program searches for the startup configuration file, known as startup-config, in NVRAM. This file has the previously saved configuration commands and parameters including:
- interface addresses
- routing information
- passwords
- any other configurations saved by the network administrator
If the startup configuration file, startup-config, is located in NVRAM, it is copied into RAM as the running configuration file, running-config.

Read More..