sarav
sarav

Reputation: 111

How to discover the MAC address of machines in and over a network?

How do I discover the MAC address of machines in a network?

I need to discover the machines that are available just with only BIOS installed (no operating system present). And I need to find the MAC address of machines that are up.

I won't have physical access to the machines. This is for baremetal discovery!

Upvotes: 2

Views: 18989

Answers (4)

Stephane Paquet
Stephane Paquet

Reputation: 2344

Try the arp command. I am not sure it will be really helpful for you as it might only work for PC with an IP address (and likely to have an OS).

If your computers are connected to a switch I guess you can have this information from it. Many "modern" switches are able to provide you with that information, should you know which PC is connected to which port on the switch.

Upvotes: 0

schmijos
schmijos

Reputation: 8735

A just-not-as-"nice" solution as the ones suggested above (working over a network is just comfortable):

If you have physical access to the machines: Plug in a monitor and look the MAC address up in the BIOS. If for some reason the MAC address isn't listed in the BIOS, you could enable PXE. After reboot, when PXE is initializing, you're going to see the MAC address.

Upvotes: 0

atamanroman
atamanroman

Reputation: 11818

You can use WinPcap to monitor the Ethernet traffic on your network in the same collision domain. So you could learn all the MAC addresses just as a switch does. You could also fake some DHCP messages in order to create some traffic. But this only works with PXE (which is actually made for this scenario) and in your own collision domain.

Upvotes: 2

al.
al.

Reputation: 717

Since the machines probably don't have IP addresses, I don't think you have a chance to actively query them. They would need to answer packets sent to the broadcast MAC and for e.g. ICMP echo requests, they'd need to send packets with something like 0.0.0.0 as a source IP. This is common and allowed for BOOTP/DHCP, but I haven't seen anything like this implemented by BIOSes yet.

Maybe just logging all MACs that go over the wire with a tool like arpwatch would help? If the machines have PXE booting enabled, you should at least see some DHCP DISCOVERs, before they leave into eternal silence.

Upvotes: 1

Related Questions