I'm using Nmap version 7.12 to discover the live hosts in my subnet. When I type the following command:

nmap -sn xxx.xxx.x.*

It lists the live hosts alright, but the report only shows the IP address of the hosts. I'd like to see the hostname and the ip address of the live hosts in the subnet. How can I achieve this? Thanks.

1 Answer 1


You are using -sn which means No-port scan and it doesn't have any direct relation with hostname part of output. Nmap's both DNS resolver and reverse resolver will work in such cases but sometimes DNS server don't simply show up to the reverse DNS request and in those cases only IP address is shown.

If you are using a different DNS server(which can reply for reverse DNS request) in your subnet then consider using nmap --dns-servers <IP of your DNS server1>,[IP of your DNS server2] -sn xxx.xxx.x.*

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .