DNS Lab use of ping or nslookup


In DNS Lab

What is the IP address of the site www.facebook.com ? Use ping to test

Of course as question expects the answer is found out by using ping alone.


bob@caleston-lp10:~$ ping www.facebook.com
PING star-mini.c10r.facebook.com ( 56 data bytes
64 bytes from icmp_seq=0 ttl=55 time=5.161 ms64 bytes from icmp_seq=1 ttl=55 time=5.344 ms
64 bytes from icmp_seq=2 ttl=55 time=5.393 ms
64 bytes from icmp_seq=3 ttl=55 time=5.292 ms
64 bytes from icmp_seq=4 ttl=55 time=5.315 ms
^Cā€” star-mini.c10r.facebook.com ping statistics ā€”
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 5.161/5.301/5.393/0.078 ms
bob@caleston-lp10:~$ nslookup facebook.comServer:

Non-authoritative answer:
Name: facebook.com
Name: facebook.com
Address: 2a03:2880:f12d:83:face:b00c:0:25de

bob@caleston-lp10:~ bob@caleston-lp10:~

Hint : run: nslookup facebook.com

If questions ask to use ping and it gives same results as nslookup why do we need to mention hint for using nslookup and not ping www.facebook.com

Am I missing anything here in this question or rational of this question ?

You can use either for the first question. ping or nslookup, but there is a follow up question which you may have noticed that the IP changes because of the hosts file based dns resolution.
In this case you will have to use ping as nslookup or dig will still make use of the dns server.