Re: Translate MAC address to IP address

From: Nick Barnes (Nick.Barnes_at_pobox.com)
Date: 08/13/03

  • Next message: Lars Eggert: "Re: Translate MAC address to IP address"
    To: Robert Watson <rwatson@freebsd.org>
    Date: Wed, 13 Aug 2003 15:28:05 +0100
    
    

    At 2003-08-13 13:58:51+0000, Robert Watson writes:
    >
    > On Wed, 13 Aug 2003, Nick Barnes wrote:
    >
    > > I have written a small utility for traffic volume monitoring on an
    > > Ethernet segment. It uses libpcap to capture the ethernet header of
    > > every packet and counts traffic volume by source and destination MAC. A
    > > bit like a lobotomized tcpdump (and indeed that is what I started with).
    >
    > The easiest way would actually be to expand your tool to also look at the
    > IP header and track usage at the IP level in the first place.

    But the IP addresses in the packets are not interesting to me. I want
    to track usage according to router on the local subnet, not according
    to IP address of the ultimate (possibly distant) sources and
    destinations. That's why I'm looking at the MAC addresses in the
    first place.

    I have a routing subnet, with a bunch of gateway machines on it. For
    the purposes of this application, I neither know nor care about the IP
    addresses of the machines behind those gateways. Packets coming
    through will have IP addresses of those distant machines but the MAC
    addresses of the gateways themselves. Other than that, the
    application is broadly similar to your bpfmon. Thanks for those
    sources.

    I'm leaning towards a routine which will send a simple packet (maybe a
    ping) to all IP addresses on the local subnet, then waits for a short
    while (long enough for all the ARP exchanges), and then harvest the
    results from the local ARP table. This seems easy enough to create
    (given the sources to ping and arp, of course). It won't work for
    machines which are off the network when I trigger the ARP; I guess I
    could do it at the beginning and then do it again if I see a MAC
    address which I didn't harvest.

    Nick B
    _______________________________________________
    freebsd-net@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-net
    To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"


  • Next message: Lars Eggert: "Re: Translate MAC address to IP address"

    Relevant Pages

    • RE: mac to ip address tools
      ... Say host A on your net is trying to communicate with host B. Host A ... needs to know the MAC address for host B (or the MAC address for the ... ARP replies are no good for you - those are ... About 100 machines using the same MAC address: ...
      (Pen-Test)
    • RE: Running Ethernet without ARP
      ... This is the overly-short version of how things like the arp ... Again you could use the IP broadcast address and ... and without hand-coded MAC address limiting peer tables, ... receiver endpoint/processor on the public machine, wrap the *entire* packet into ...
      (Linux-Kernel)
    • Re: Pure IP & ARP broadcasts
      ... It actually communicates via the MAC address of the Nics (aka Layer2 ... what the ARP request does. ... A host has a packet to send, it has the IP# and nothing else. ... But if the owner of the IP# is not on that segment then the Router replies ...
      (microsoft.public.windows.server.networking)
    • Re: What is ARP
      ... >>> I should have put the subject to What is ARP doing, ... >> send an IP packet to another it must first determine the MAC address of ... >> To determine the MAC address, a broadcast ARP packet is sent (since at ... > addressing them to the MAC addy of the remote host, you send them to the IP ...
      (alt.computer.security)
    • Re: What is ARP
      ... >> I should have put the subject to What is ARP doing, ... > send an IP packet to another it must first determine the MAC address of ... > To determine the MAC address, a broadcast ARP packet is sent (since at ... addressing them to the MAC addy of the remote host, you send them to the IP ...
      (alt.computer.security)