How a Router Works

Harsh Gupta - Tech Writer
A router is a device that accepts the incoming packet and uses the router table to find the output port, and sends the packet from that output port. Here, router is represented like a black box; not referring to the internal view of router but only an overview of router. I am not referring to the circuitry of internal port/output port/routing processor etc.

A router mainly has four components:

· Input port

· Output port

· Routing processor

· Switching fabric

Input ports:

The signals are received at this port. It acts as physical and data link function for router. Firstly, the received signals are transformed to bits. Actually, the received packet is divided from the frames. All the errors are detected and corrected. Now, the packet is ready to be delivered. The input port has buffers to hold the packet before being directed to switching fabric.

Output ports:

It works exactly opposite to the input port. All the outgoing packets are queued into a single frame, and then these frames are transformed to signals by physical layer function, to send these signals on the line.

Routing processor:

It performs the functions of network layer. The destination address is used to find the address of the next hop and the output port is numbered from which the data is to be sent. This activity is referred to as "table lookup". The routing processor has to look up the routing table. But to expedite this process the routing processor is now combined into input port in the newer routers.

Switching fabrics:

To move a packet from the input queue to output queue is the most difficult task. The speed with which this transfer is done affects the size of delay in delivery and the size of input/output queue. Initially, when router was actually a dedicated computer, a bus or computer's memory was used as switching fabric. The input port stores the packet into computer's memory; and the output port gets the packet from the memory. But now router uses a variety of switching fabrics e.g.

· Crossbar switch

A crossbar switch is a device that connects n inputs to m outputs using the technique of electronic micro switches at each cross point to reduce the noise level in transmission e.g. for 1000 inputs to 1000 outputs requires a crossbar with 1,000,000 cross points. But, a cross bar with 1,000,000 cross point is not possible. And if it is possible than by the statistics approximately 25% of them are in use, rest are idle.

· Banyan switch

In this type of switches for n inputs, there are n outputs, and we have log2 (n) stages and n/2 micro switches that route the cells to the output port as a binary string. The limitation in banyan switch is "internal collision". This can be solved by sorting the arriving cells based on their destination part.

· Batcher-Banyan switch

"K. E. Batcher" designed a switch before banyan that sort the cells based on their final destination. The combination of Banyan and Batcher switch is known as "Batcher-Banyan" switch. Another hardware module called trap is added between batcher and banyan switch. Only one cell for each destination is allowed, if more than one, they wait for the next tick.

Published by Harsh Gupta - Tech Writer

I am a part time freelancer and writing is my hobby Some of my websites: http://www.GenericArticles.com http://www.JailBreakingiPhone.com  View profile

To comment, please sign in to your Yahoo! account, or sign up for a new account.