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).




Router Components and their Functions

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



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.

RAM is volatile memory and loses its content when the router is powered down or restarted. However, the router also contains permanent storage areas, such as ROM, flash and NVRAM.

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

ROM uses firmware, which is software that is embedded inside the integrated circuit. Firmware includes the software that does not normally need to be modified or upgraded, such as the bootup instructions. Many of these features, including ROM monitor software, will be discussed in a later course. ROM does not lose its contents when the router loses power or is restarted.

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.

Flash memory does not lose its contents when the router loses power or is restarted.

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.

ROM, RAM, NVRAM, and flash are discussed in the following section which introduces the IOS and the bootup process. They are also discussed in more detail in a later course relative to managing the IOS.

It is more important for a networking professional to understand the function of the main internal components of a router than the exact location of those components inside a specific router. The internal physical architecture will differ from model to model.



Router Interfaces

Management Ports

Routers have physical connectors that are used to manage the router. These connectors are known as management ports. Unlike Ethernet and serial interfaces, management ports are not used for packet forwarding. The most common management port is the console port. The console port is used to connect a terminal, or most often a PC running terminal emulator software, to configure the router without the need for network access to that router. The console port must be used during initial configuration of the router.



Router Interfaces

The term interface on Cisco routers refers to a physical connector on the router whose main purpose is to receive and forward packets. Routers have multiple interfaces that are used to connect to multiple networks. Typically, the interfaces connect to various types of networks, which means that different types of media and connectors are required. Often a router will need to have different types of interfaces. For example, a router usually has FastEthernet interfaces for connections to different LANs and various types of WAN interfaces to connect a variety of serial links including T1, DSL and ISDN.



Router interfaces can be divided into two major groups:
- LAN interfaces - such as Ethernet and FastEthernet
- WAN interfaces - such as serial, ISDN, and Frame Relay

LAN Interfaces

As the name indicates, LAN interfaces are used to connect the router to the LAN, similar to how a PC Ethernet NIC is used to connect the PC to the Ethernet LAN. Like a PC Ethernet NIC, a router Ethernet interface also has a Layer 2 MAC address and participates in the Ethernet LAN in the same way as any other hosts on that LAN. For example, a router Ethernet interface participates in the ARP process for that LAN. The router maintains an ARP cache for that interface, sends ARP requests when needed, and responds with ARP replies when required.

A router Ethernet interface usually uses an RJ-45 jack that supports unshielded twisted-pair (UTP) cabling. When a router is connected to a switch, a straight-through cable is used. When two routers are connected directly through the Ethernet interfaces, or when a PC NIC is connected directly to a router Ethernet interface, a crossover cable is used.


WAN Interfaces

WAN interfaces are used to connect routers to external networks, usually over a larger geographical distance. The Layer 2 encapsulation can be of different types, such as PPP, Frame Relay, and HDLC (High-Level Data Link Control). Similar to LAN interfaces, each WAN interface has its own IP address and subnet mask, which identifies it as a member of a specific network.

Note: MAC addresses are used on LAN interfaces, such as Ethernet, and are not used on WAN interfaces. However, WAN interfaces use their own Layer 2 addresses depending on the technology. Layer 2 WAN encapsulation types and addresses are covered in a later course.







Post a Comment

0 Comments