A firewall administrator writes a rule that permits traffic destined for TCP port 443 and denies traffic destined for TCP port 80. The device reaches this decision by reading the port numbers in each segment header. At which OSI layer is this rule operating?
- ALayer 2, the data link layer
- BLayer 4, the transport layer Correct
- CLayer 3, the network layer
- DLayer 7, the application layer
Why A is wrong: Frames carry MAC addresses at the data link layer, but this rule reads TCP port numbers rather than hardware addresses, so Layer 2 is wrong.
Why B is correct: TCP port numbers are contained in the transport-layer segment header, so a rule matching port 443 or port 80 operates at Layer 4.
Why C is wrong: Firewalls can filter on destination IP at the network layer, which makes Layer 3 tempting, but ports 443 and 80 are transport-layer constructs, not network addresses.
Why D is wrong: Ports 443 and 80 carry HTTPS and HTTP, so the application layer looks plausible, but the rule inspects the port number in the segment header rather than the application data itself.