The host command on Linux systems can look up a variety of information available through the Domain Name System (DNS). It can find a host name if given an IP address or an IP address if given a host name plus a lot of other interesting details on systems and internet domains.
The first query below tells us that the system associated with the address 192.168.0.18 is named “dragonfly”. The second tells us that 192.168.0.1 is the default router.
$ host 192.168.0.18
18.0.168.192.in-addr.arpa domain name pointer dragonfly.
$ host 192.168.0.1
1.0.168.192.in-addr.arpa domain name pointer router.
To do the reverse, you can use commands like these:
To read this article in full, please click here
Source:: Network World – Data Center