Step 1: Understanding the Question:
The question asks to identify the network device responsible for filtering all incoming packets from external networks before they are permitted to enter the local network.
Step 2: Analyzing Network Border Security:
- Local networks require boundary protection systems to screen untrusted traffic arriving from the Internet.
- Packet filtering can occur at multiple nodes, but the ultimate security, translation, and access control boundary point is typically situated at the network entry node.
Step 3: Detailed Explanation of Devices:
- Hub (C): Operates purely at the Physical Layer (Layer 1) and broadcasts all data indiscriminately. It cannot read packet contents or filter traffic.
- Switch (A): Operates at the Data Link Layer (Layer 2) to route internal traffic based on MAC addresses. It is an internal LAN device and does not filter incoming external WAN traffic.
- Router (D): Routes traffic between different networks based on IP addresses. While routers can perform basic packet filtering, they are primarily path-selection devices.
- Gateway (B): Serves as the key entry and exit node (protocol converter and traffic gatekeeper) connecting a local network to an external, untrusted network. Because it acts as an entry/exit portal, all external packets must pass through it, where they are actively filtered, translated, and checked by firewall rules.
Step 4: Final Answer:
All packets originating from outside the network are filtered at the Gateway, which acts as the security border of the network.
Hence, option (B) is the correct choice.