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
220.127.116.11.in-addr.arpa domain name pointer dragonfly.
$ host 192.168.0.1
18.104.22.168.in-addr.arpa domain name pointer router.
To do the reverse, you can use commands like these:
Source:: Network World – Data Center