What is Router?
A router is a device that is commonly used in computer networks to connect different networks that are dissimilar and works on different protocols. If you find a router that is connecting to a LAN and a WAN, for your private local area network to the Internet. So, you can often get routers from Internet service providers(ISP), since these allow you to connect your computer or home network to the telephone line.
A router has a very important role in the mechanism of the Internet and in IP networks. It is based on its current understanding of the state of the network it is connected to, a router performs like a dispatcher as it decides the way to send each information packet. A router is located at any gateway in the network including each point-of-presence on the internet. A router is often included as part of a network switch. Each router on a network that can forward the data packets traveling on that network towards their destinations, based on their IP address. A router is different from a switch. The latter is simply a device to connect machines to form a LAN.
How Router Works?
When data packets are transmitted over a network. They can move through many routers in their journey from the source machine to the destination machine. Routers work with IP packets, means that it works at the level of the IP protocol. Each router sends its information to its neighbors. This information includes the IP address and the cost of the routers, which in terms of time, to delay the other network considerations. This information is kept in a routing table, that can found in all routers. When a data packet arrives in a router, its header information is analyzed by the router. That can be based on the destination and source IP addresses of the packet, the router decides which neighbor it will forward to it. It will choose the route with the least cost and forwards the packet to the first router on that route. This can happen at each router until the data packet reaches its destination.
A wireless router is one which can connect to the devices’ wireless. Most of the routers act as the hub, in the sense, they connect devices to a LAN. Wireless routers have a Wi-Fi module and have a small antenna allowing them to connect to devices.