The trouble with "ping" is that it's not strictly a name server lookup tool (like nslookup) - for instance if you ping a hostname, it can be resolved to an IP address by a number of methods: DNS lookup, host file lookup, WINS (god forbid) or NetBIOS broadcast. It can also return a potentially out-dated cached result.
The order in which the methods are tried, depends on the clients' TCP/IP configuration and node type flag:
- B-node (1): Broadcast
- P-node (2): Peer (WINS only)
- M-node (4): Mixed (broadcast, then WINS)
- H-node (8): Hybrid (WINS, then broadcast)
To see the node type of the current computer:
C:\>ipconfig /all | find "Node Type"
Node Type . . . . . . . . . . . . : Hybrid
If the resolution method is of no concern, use
ping -a w.x.y.z
as you please. If you need to be sure you're querying your DNS server for the correct name, use nslookup.