Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If you have those Windows machines in the same f16 machine subnet you may work with the MAC address which will stay the same (always) unless the nic card breaks and you have to replace it!

I am assuming your f16 host has an eth0 network card configured.

Run this command to get the subnet mask:

ifconfig eth0 | grep Mask
          inet addr:192.168.1.7  Bcast:192.168.1.255  Mask:255.255.255.0

Mask:255.255.255.0 was the info we were looking for.

Now you could ping (remember that ping scans are well done by specific tools like nmap or fping) each of the 255 IP address in your /24 (CIDR notation equivalent to 255.255.255.0) subnet and then run

arp -a

The previous command will return IP/MAC couples. You should annotate these results so the next time you do this procedure again if some windows machine has a different IP (DHCP assigned) you can still find the right one by browsing and comparing the MAC addresses lists.

arp is considered obslete and you should use ip neighbor instead.

Another (probably better) way to do so is to use nmap.

A simple OS scan as root in the same subnet will return the information you are looking for (MAC addresses and currently associated IP).

nmap -O 192.168.1.0/24 | egrep 'Nmap scan report|MAC Address'
Nmap scan report for 192.168.1.1         # <- my dhcp router
MAC Address: 00:14:7F:FF:FF:FF (Thomson Telecom Belgium)
Nmap scan report for 192.168.1.6         # <- another f16 in the same subnet
MAC Address: 00:16:6F:EE:EE:EE (Intel)
Nmap scan report for 192.168.1.7         # <- my f16 host

I intentionally obfuscated the last 3 bytes of my MACs