in reply to Mac Addresses

You appear to have a medium sized network - which would normally be divided into subnets and/or VLANs, most likely all connected to a core router.

The core router in this scenerio would be the only device that is aware of all other devices that are communicating on the network, and it needs to maintain an ARP cache.

You should be able to get the contents of the ARP cache, which contains MAC to IP address mappings, either via SNMP, or via telent.

if you /msg me, I could share a crude but functional perl script that I have that collects this information using Net::Telnet, from an Enterasys router.

     "For every complex problem, there is a simple answer ... and it is wrong." --H.L. Mencken

Replies are listed 'Best First'.
Re^2: Mac Addresses
by grep (Monsignor) on Oct 04, 2006 at 16:34 UTC
    That script may not be portable to other routers (or even work on some simple routers or that don't support SNMP). Nor would the router know about MAC's that haven't passed a packet through. But it gave me a good idea.

    Assuming this all on a local net and the subnets are not firewalled from each other (ie. no firewall between the local subnets - Firewalls between the local net and the internet would be fine). Just ping each ip in the net. If this is your local net you should have no problem getting the network info.

    Then all you have to do poll you local ARP table. Which far easier than wirting a custom router poller.



    grep
    One dead unjugged rabbit fish later
      Your first paragraph makes valid points, but your conclusion :
      -- all you have to do poll you local ARP table --
      will not work if you have multiple routed subnets, because of proxy ARP.

           "For every complex problem, there is a simple answer ... and it is wrong." --H.L. Mencken

        Good point - Though it should be easy to determine if the router is proxying arp requests (lot's of IP's with the same MAC).

        The only really reliable way of getting all MACs, I can think of would be polling SNMP enabled switches, assuming that each subnet is running switched traffic.



        grep
        One dead unjugged rabbit fish later