A trainee is learning the OSI reference model and asks which layer is responsible for logical addressing and for selecting a path between networks so that a packet can reach a host on a different subnet. Which layer performs this function?
- AThe data link layer (Layer 2), which frames bits and uses MAC addresses to move data between devices on the same physical segment.
- BThe network layer (Layer 3), which uses logical IP addresses and routing decisions to forward packets between separate networks. Correct
- CThe transport layer (Layer 4), which segments data and provides reliable end-to-end delivery using port numbers to identify applications.
- DThe session layer (Layer 5), which establishes, manages and tears down dialogues between two communicating applications.
Why A is wrong: This is tempting because Layer 2 also does addressing, but it uses hardware MAC addresses and only moves frames within a single local segment, not between separate networks.
Why B is correct: Correct: Layer 3 handles logical addressing with IP and makes routing decisions, allowing a packet to travel from one subnet to another.
Why C is wrong: This is tempting because Layer 4 does end-to-end delivery, but it identifies applications with ports and does not perform logical network addressing or path selection.
Why D is wrong: This is tempting as it sits near the middle of the stack, but Layer 5 manages conversations between applications and plays no role in addressing or routing.