My network includes machines running Linux and others running Windows. And my machine is running Linux.
7 Answers
Type in terminal.
sudo nmap -sn <Your LAN Subnet>
For Example:
sudo nmap -sn 192.168.1.*
You can find your LAN subnet using ip addr command.
It will show all host name in LAN whether it is Linux or Windows. You also able to see mobile devices, if any present on LAN network. Here you need to make sure that you run command with sudo or root.
- 19,753
Type in terminal
sudo aptitude install nmap
nmap -sP xxx.xxx.xxx.xxx
This will give you:
Starting Nmap 5.21 ( http://nmap.org ) at 2012-11-03 19:08 CET
Nmap scan report for HOST.DOMAIN (xxx.xxx.xxx.xxx)
Host is up (0.00052s latency).
MAC Address: YY:YY:YY:YY:YY:YY (Manufactor)
Nmap done: 1 IP address (1 host up) scanned in 0.11 seconds
Where HOST.DOMAIN is the DNS-name of the machine.
- 6,537
A Netbios name reverse lookup might accomplish what you want more than than "hostname" which is a function of DNS and tcp/ip. nmblookup with the -A parameter returns device names as well as mac address. Try something like this:
nmblookup -A 192.168.1.2
- 188
What if you try this:
You can run it in windows
nbtstat -A xxx.xxx.xxx.xxx (where x is the ip address)
on ubuntu you can install nbtscan. You can find more information here : http://www.unixwiz.net/tools/nbtscan.html
Hope it helps
If your network is running a DHCP server, usually on the modem/router, chances are it will have a way for you to see the DHCP assigned addresses - often by a web page, and that often lists the computer names beside the allocated ip addresses.
- 2,755
To the best of my knowledge, there is no utility available to resolve an IP address into a NetBIOS name. I'd imagine that some sort of a network scoping program or a penetration testing program might be able to give you that sore of information though. However, all of the computers would have to be on the same domain and subnet.
- 219