How to find MAC addresses on network?

Chris G cl at
Mon Jan 26 10:15:07 UTC 2009

On Mon, Jan 26, 2009 at 09:40:10AM +0100, Pierre Frenkiel wrote:
> On Fri, 23 Jan 2009, Alex Katebi wrote:
> > How about pinging your HP printer. Does it have an IP address? Then you can
> > do dcpdump on the echo reply and look at the mac address.
>    After responding to ping, it is in the arp cache. Then, arp
>    should give its MAC address, which is easier than looking at the tcpdump output.
Going back to the original issue I don't *know* the IP address of the
printer as it's been assigned using DHCP.  All I know is that it's one
of five or six possibles.

In reality what I have done is assign the printer a static IP because it
doesn't play nicely with DHCP anyway as it doesn't provide a name like
every other device and system.

As I'm using dnsmasq (I don't know what other DHCP servers do) the
names that systems provide when getting their IP address via DHCP are
stored in a file /var/lib/misc/dnsmasq.leases. Thus I can see what I
need there, e.g.:-

    1232968282 00:01:e3:9d:8b:b5 C475IP *
    1232967118 00:1f:e2:4e:8f:ca garage *

All ready made and just exactly what I needed.

Chris Green

More information about the ubuntu-users mailing list