1

I'm attempting to build a system to Auto-WOL devices when plugged into HP ProCurve switches (2510G and 2530G models). This is on a completely flat network, no VLANs or subnet routing.

If you'd like to know my reason why, we have thousands of devices coming in to be network imaged in our facility. Each device by default has WOL-to-PXE on, and an automated WOL system can save minutes of time per machine (which adds up to quite a lot if we could optimize the process).

At the moment, I can successfully scrape the MAC Address list of the switch and send WOL packets to the addresses (this is in a Windows environment, by the way).

Where I'm currently stuck is that the HP ProCurve switch does not learn the MAC Address upon a device (with power, but off) plugged in. This breaks my flow, and I believe some vendors do learn the MAC of an offline device plugged in (I can't confirm this- HP shop here).

Now on a test device, I can send a directed WOL and it wakes up, switch learns the MAC Address, all is well. I believe this involves an ARP request.

Am I understanding the technology correctly, that what I'm looking to do is send a Gratuitous ARP (via say a Cygwin port of ARPing) to the broadcast address FFFFFF-FFFFFF? I read some data here - http://wiki.wireshark.org/Gratuitous_ARP - but I get the impression that this is the wrong solution (pushing the MAC of the machine out to all others versus causing the others to report back). I've tried to do a ping against the IP Broadcast address as well to no avail.

I guess what I'm asking for is, does a solution exist where a single host can cause an unknown NIC MAC Address to respond so as to populate the switch MAC Table? Or another solution that could get this data?

EDIT: I've setup a CentOS box to run arp-scan but it didn't trigger anything (http://linux.die.net/man/1/arp-scan) and neither did arping. Brute forcing the OUI would be 16 million per OUI (if we locked it down to just HP, for example, they have multiple entries). I bring it up as a note in case a Linux box would be needed, I have one available.

2 Answers 2

2

I guess what I'm asking for is, does a solution exist where a single host can cause an unknown NIC MAC Address to respond so as to populate the switch MAC Table? Or another solution that could get this data?

Let's step back for a moment and think about how switches work.

If a switch doesn't know the destination mac-address in a frame, the switch floods the frame with the unknown destination mac out all ports in that vlan; thus you do not need the switch to know the mac-address of the hosts while the host is powered down.

However, you do need to know the mac-address of all PCs in question; that mac-address is embedded in the WOL frame. Quite honestly, knowing the list of macs is pretty simple... just poll your edge router for arp entries for the Vlan(s) in question every five minutes, and store the results somewhere.

Now when you're ready to wake computers up, build a unique list of macs from your archived ARP tables and send a WOL frame to each unique mac; and if you send a WOL frame to a printer that's already up, who cares?

FYI, I built a python WOL packet crafter if it's at all helpful... you'll need linux or another *nix to use it though. Run in cygwin or a VM if you like...

If you really hate the idea of scraping and archiving your ARP table, another option is HP Port-Security with Static mac-learning... that makes the switch remember the mac it learned on a port and then it saves the mac in the running / startup configurations.

HP Port-security Static

1
  • Your insight is appreciated. I like your packet crafter as well. For this use case, the machines will never have ever been powered on, so there's no ability to catch the MAC ahead of time and archive it or save it. But a script built around forcing a gamut of MACs could work in theory. Thanks for your time! Mar 11, 2015 at 19:55
3

an automated WOL system can save minutes of time per machine

I don't see how. Let's suppose a person carries the machine in, sets on desk, plugs in power, plugs in network. After all that, how hard is it to push the power button?

Where I'm currently stuck is that the HP ProCurve switch does not learn the MAC Address upon a device (with power, but off) plugged in

As expected. Until the system sends a frame, the switch will not know what's attached to it, and you won't know the MAC to wake it up. So we're back to the minion who plugged in the cables turning it on. (or keying in a MAC and hoping they never get it wrong.)

does a solution exist where a single host can cause an unknown NIC MAC Address to respond so as to populate the switch MAC Table

As there is no OS running, NO. WOL, at the most basic, is the NIC firmware waiting for a specific bit pattern. There's otherwise nothing to talk to. If the system ("server") has a management engine, then maybe, as that would be an embedded OS with network support (ping, telnet, ssh, ipmi, web, ...)

1
  • You'd be surprised at the logic in the madness- we're talking assembly lines here. It appears the NICs do as you say, wait silently until they see the WOL bitpattern. We had over 12,000 that had the first 7 characters of the MAC address be the same (with the eighth having only 2 variations) before randomizing. It may appear a WOL Bruteforcer may be the only option, which isn't pretty. But they do exist (code.google.com/p/wol-e). I think it'd be easier to build a robot to toggle power/PXE boot...! I also have a few other vendor switches to confirm if all other devices operate the same. Mar 9, 2015 at 21:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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