A router may be a network device that connects different pc networks by routing packets from one network to the opposite. This device is typically connected to 2 or a lot of different networks. once a data packet comes to a router port, the router reads the address info in the packet to determine out that port the packet are sent. as an example, a router provides you with the net access by connecting your computer network with the net.
A router is considered a Layer three device of the OSI model as a result of its primary forwarding decision is based on the data of the OSI Layer three (the destination ip address). If 2 hosts from completely different networks need to speak with one another, they’ll would like a router between them. consider the following example:
We have a network of 3 computers. Note that every pc is on a different network. Host A desires to communicate with Host B and sends a packet with Host B’s ip address (10.0.0.20) to the default gateway (the router). The router receives the packet, compares the packet’s destination ip address to the entries in its routing table and finds a match. It then sends the packet out the interface related to that network. only Host B can receive the packet. In fact, Host C won’t even remember that the communication took place.