A library router chooses a next hop between two subnets by comparing the destination IP address with its routing table. Which layer makes that forwarding decision?
Select an answer to reveal the explanation.
Short Explanation
Picking the next town is a roadmap decision, and the roadmap is the IP address. Your library router compares the destination IP address with the routing table and chooses a next hop between two subnets, which is the network layer. A MAC table, a cable, or a port number does not make that choice.
Full Explanation
The network layer decides the next hop by matching the destination IP address against a routing table. The library router is doing that as it forwards between two subnets. The data-link layer delivers frames on one link using MAC addresses. A switch picks a port from a MAC table. That is forwarding, and it is not how a router selects a next hop by IP. The physical layer puts bits on a medium. It does not read an IP address. The transport layer multiplexes conversations with port numbers. A port can choose which application gets a segment, and it is not how a router picks the next subnet. Exam caveat: a layer-3 switch can forward by MAC inside a VLAN and route by IP between VLANs. The job in the stem, next hop by destination IP, is the network-layer function. Operational check: look up the destination in the routing table, confirm the chosen next hop, and only then expect the outgoing frame to use that next hop's MAC address. The MAC is how the frame crosses the link after the IP choice is made.