What Is a Router and How Does It Work?
The router, at least the common home network device that is usually called a router, is the piece of network hardware that allows communication between your local home network—like your personal computers and other connected devices—and the internet.
The router used in home and small networks is more accurately called a residential gateway, but you'll never see these devices called that.
How does a router work?
Think of a router as an air traffic controller and data packets as aircraft headed to different airports (or networks). Just as each plane has a unique destination and follows a unique route, each packet needs to be guided to its destination as efficiently as possible. In the same way that an air traffic controller ensures that planes reach their destinations without getting lost or suffering a major disruption along the way, a router helps direct data packets to their destination IP address.
In order to direct packets effectively, a router uses an internal routing table — a list of paths to various network destinations. The router reads a packet's header to determine where it is going, then consults the routing table to figure out the most efficient path to that destination. It then forwards the packet to the next network in the path.
What are the different types of routers?
In order to connect a LAN to the Internet, a router first needs to communicate with a modem. There are two primary ways to do this:
1.wireless router:
A wireless router uses an Ethernet cable to connect to a modem. It distributes data by converting packets from binary code into radio signals, then wirelessly broadcasts them using antennae. Wireless routers do not establish LANs; instead, they create WLANs (wireless local area networks), which connect multiple devices using wireless communication.
2.Wired router:
Like a wireless router, a wired router also uses an Ethernet cable to connect to a modem. It then uses separate cables to connect to one or more devices within the network, create a LAN, and link the devices within that network to the Internet.
In addition to wireless and wired routers for small LANs, there are many specialized types of routers that serve specific functions:
3.Core router:
Unlike the routers used within a home or small business LAN, a core router is used by large corporations and businesses that transmit a high volume of data packets within their network. Core routers operate at the "core" of a network and do not communicate with external networks.
4.Edge router:
While a core router exclusively manages data traffic within a large-scale network, an edge router communicates with both core routers and external networks. Edge routers live at the "edge" of a network and use the BGP (Border Gateway Protocol) to send and receive data from other LANs and WANs.
5.Virtual router:
A virtual router is a software application that performs the same function as a standard hardware router. It may use the Virtual Router Redundancy Protocol (VRRP) to establish primary and backup virtual routers, should one fail.