1D0-510 · Question #68
Which TCP/IP configuration determines whether a destination address is local or remote?
The correct answer is C. Subnet mask. See the full explanation below for the reasoning.
Question
Options
- ADNS
- BIP address
- CSubnet mask
- DDefault gateway
How the community answered
(26 responses)- A4% (1)
- B4% (1)
- C77% (20)
- D15% (4)
Community Discussion
4The correct answer is C, the subnet mask. When your machine has a packet to send, it does a bitwise AND between the destination IP and the subnet mask, then compares that result to the result of doing the same operation on its own IP address. If the two results match, the destination is on the same local network and the packet goes out directly. If they do not match, the machine knows the destination is remote and hands the packet off to the default gateway instead. DNS just resolves names to IPs, the IP address itself does not tell you anything about locality, and the default gateway is what you use after the subnet mask has already told you the destination is remote.
Yusuf nailed it, and worth adding that this AND comparison happens in the IP stack before any ARP lookup, so the subnet mask is doing its job even before the machine knows the MAC address it needs to actually deliver the frame.
Subnet mask is right. It's what your host ANDs with the destination IP to compare against its own network address, if they match it's local traffic, if not it forwards to the default gateway.
Yep, C is right, the subnet mask is what tells your machine whether the destination IP is on the same network or needs to go to the default gateway. It does this by ANDing the subnet mask against both the source and destination IP addresses and comparing the results.