A device in a subnet needs to send a packet to a device in a different subnet. To which device will it address the outgoing packet?
Answers
A router is a layer 3 device in the OSI network model. As the name implies, it routes packets logically from source to destination. An interface in a router represents a segment or a configured stand-alone network, with a specific subnet mask.
Routers have routing tables that learns a network route statically or dynamically with protocols. When a packet is to be sent to a device in another network, the router receives the packet and forwards the traffic to the destination (through another interface, if connected directly) or to the next hop router interface alone the path to the destination.
SUBNETTING:
A subnet is just a range of IP addresses. All the devices in the same subnet can communicate directly with one another without going through any routers.
EXPLANATION:
If the laptop is on a subnet that also contains a server, a printer, and a router. If we want to communicate with another device in the same subnet, we can send packets to it directly. If it’s not on the same subnet, we need to forward the packet to a router first so it will route it to the configured default gateway. It knows that another device is in the same subnet by looking at its own IP address and subnet mask.