Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm new to network programming and I don't know if this is the right place where to ask.

I have a small router with a proprietary control panel (= no openwrt or similar). I'd like to know programmatically what are the MAC addresses connected to the router.

Is it possible?

share|improve this question
    
I remember some routers export this information via SNMP. –  grawity Jun 16 at 9:34
1  
Use nmap and scan your local subnet. Or maybe all private subnets. Since you don’t have to operate stealthily, a full-speed scan is possible. If you already have the IP addresses, just arp them. –  Daniel B Jun 16 at 9:40
1  
@DanielB ARP would do it but if arp doesn't have the IPs, then i'd be surprised if nmap can scan his local subnet. OTOH I suppose nmap could help trigger an ARP request. But in that case, pinging every ip on a subnet would also be effective at filling the arp table –  barlop Jun 16 at 10:39
    
nmap has built-in optimizations for host discovery, including so-called ARP Pinging (-RP). In this case, nmap itself generates ARP requests and collects responses. It’s much faster than letting the OS handle it. –  Daniel B Jun 16 at 11:56

1 Answer 1

As @grawity said check if in the config there is SNMP settings.

The other option would be to use something like http://casperjs.org/ to scrap the arp table it lists.

Or run a sniffer and watch for ARP requests with the IP of the router.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.