In the following articles I will focus more on describing the well known routing protocols used today in networking. Routing is the process of selecting paths in a network along which to send network traffic (Wikipedia). In this article I will talk about devices that are used to forward traffic in a network, the routers. A router is a physical network device used to make decisions on how packets are sent across a network, based on the Internet Protocol. Routers are in the core of the Internet, they are the main elements that interconnect networks and because of them packets are sent successfully from one device to another. Routers usually have multiple interfaces that interconnect separate networks, that’s why a router can connect two LANs, a LAN to a WAN or two WANs. Imagine how a home router connects the Local Area Network to the Internet Service Provider (ISP) WAN. Through the ISP’s network a home user gets Internet access. A usual home network would look something like this:
A router separates the private network from the Internet. From it’s routing table, a router can make decisions based on the destination IP address. Routing information can be stored either by using static entries or dynamic protocols. Imagine you want to send a message to a remote device. Packets arrive at the router, they are decapsulated, the destination IP address is checked with the routing table, the exit interface is chosen, the packet is encapsulated into the appropriate data link frame and forwarded through the exit interface. Multiple routers can exist from one end to another and each device have to process packets independently.
Routers have some main hardware components that we need to point out:
CPU – the main processing unit used to execute instructions
ROM – read only memory, used to store permanently the bootstrap and other read only information.
RAM – random access memory, used to store information needed by the CPU.
Flash – the location of Cisco IOS.
Interfaces – can be either Ethernet or Serial, these ports are used to interconnect networks.
Console port – used to establish a physical connection with the router.
Aux port – used to connect an external modem.
Upon start-up, a router does the following:
– It performs the POST or power on self test – a mechanism in which router’s components are checked for faults
– The bootstrap is copied from ROM to RAM. Bootstrap is used to identify the routers operating system.
– The IOS is loaded from the Flash memory or a TFTP server.
– The start-up configuration file is loaded and executed. The start-up config file is usually stored in the NVRAM or a TFTP server. When the start-up file is located, it is loaded into RAM as the running configuration file. If the start-up config is not located, the user is prompted to make the initial router configuration.
To see information about the hardware components and more, type in the show version command:
From this output you can determine the IOS version, the system image file name, CPU attributes, Flash and NVRAM size, etc.
As you already know, routers can have both Serial and Ethernet interfaces. You can see the router interfaces by typing show ip interfaces brief in the cli:
Routing tables are used to store information about the available network paths. You can see the routing information by typing show ip route:
After the router has determined the exit interface using the path determination function, the router needs to encapsulate the packet into the data link frame of the outgoing interface.
The switching function is the process used by a router to accept a packet on one interface and forward it out another interface. A key responsibility of the switching function is to encapsulate packets in the appropriate data link frame type for the outgoing data link.
What does a router do with a packet received from one network and destined for another network? The router performs the following three major steps:
1. Decapsulates the Layer 3 packet by removing the Layer 2 frame header and trailer.
2. Examines the destination IP address of the IP packet to find the best path in the routing table.
3. Encapsulates Layer 3 packet into a new Layer 2 frame and forwards the frame out the exit interface.
That’s it for this post, I hope you’ll enjoy it.