The CCNA exam will test your ability to identify different types of network equipment. This tutorial focuses on routers.
A router is specialized computer connected to more than one network running software that allows the router to move data from one network to another. Routers operate at the network layer (OSI Model's layer 3). The primary function of a router is to connect networks together and keep certain kinds of broadcast traffic under control. There are several companies that make routers: Cisco Linksys, Juniper, Nortel (Bay Networks), Redback, Lucent, 3Com, and HP just to name a few.
Why do I need a Router?
Routers used in networks perform the following functions:
- Restrict broadcasts to the LAN
- Act as the default gateway.
- Move (route) data between networks
- Learn and advertise loop free paths
Networks (especially Ethernet networks) use broadcast communication at the physical, datalink and network layer. Network layer broadcasts are transmissions sent to all hosts using the network layer protocol (usually Internet Protocol [IP] or IPX). Network broadcast communication is used to communicate certain kinds of information that makes the network function (ARP, RARP, DHCP, IPX-SAP broadcasts etc.). Since several devices could attempt to transmit simultaneously and cause collisions, it is preferable to separate large sets of hosts into different broadcast domains using a switch, or router.
As the number of hosts on the network increases, the amount of broadcast traffic increases. If enough broadcast traffic is present on the network, then ordinary communication across the network becomes difficult.
To reduce broadcasts, a network administrator can break up a network with a large number of hosts into two smaller networks. Broadcasts are then restricted to each network, and the router performs as the 'default gateway' to reach the hosts on the other networks.
Especially in today's networks, people are connecting to the Internet. When your computer wants to talk to a computer on another network, it does so by sending your data to the default gateway (your local router). The router receives your data, looks for the remote address of that far-off computer makes a routing decision and forwards your data out a different interface that is closer to that remote computer. There could be several routers between you and the remote computer, so several routers will take part in handing off the packet, much like a fireman's bucket brigade.
Routers have the capability to move data from one network to another. This allows two networks managed by different organizations to exchange data. They create a network between them and exchange data between the routers on that network. Because a router can accept traffic from any kind of network it is attached to, and forward it to any other network, it can also allow networks that could not normally communicate with each other to exchange data. In technical terms, a token ring network and an ethernet network can communicate over a serial network. Routers make all this possible.
A router can take in an Ethernet frame, strip the ethernet data off, and then drop the IP data into a frame of another type such as SDH/SONET, PDH/T1, ATM, FDDI. In this way a router can also perform 'protocol conversion', provided it has the appropriate hardware and software to support such a function. The whole point, however, is to forward the data from the interface it receives data on, to another interface that retransmits the received data onto another interface serving another network.
Routing moves data on a hop-by-hop basis, what is often called 'hot potato' routing. If a set of routers ends up passing the data around in a circle, without reaching the destination, it's calleda a 'routing loop'. Packets get tossed around the loop until they die of old age: their 'Time To Live' counter in the IP datagram is decremented as it passes through each router and eventually it reaches zero and is discarded.