A router is one of the most import components of a computer network. Also, it can also be found in almost 8 out of 10 houses. As the name suggests, it is involved with the task of routing in a network. It primarily forwards the data packets between various computers in a network and also in between various networks. It is basically is connected to two or more data lines from different IP networks. Whenever a data packet comes in on one of the lines, the router reads the network address information contained in the packet header. From the network address information, it determines the ultimate destination. It then directs the packet to the next network using the information in its routing table or policy.
The most familiar type of router is the home or small office routers that simply forward the IP packets between the Internet and the home computers.