Wake on LAN with a alteration

(imported topic written by SystemAdmin)

Hello everyone,

Our issue involves the Wake on LAN feature in the “Power Management” module. We are attempting to set up our implementation of WoL by using certain systems as WoL packet forwarders. These devices have been given special authority by the network devices to communicate protocols across the network which are normally blocked. Our hope is that these devices will also be able to forward the “magic packet” to their final broadcast destination. We have been unable to test this as the fixlet checks that the system being awakened is on the same subnet. See action script below:

#############################################################

Download http://support.bigfix.com/download/bes/util/bes-wol.exe

appendfile {(if (exists subnet address whose (it as string = “XX.XX.XX.XX”) of adapters of network) then (concatenation " " of (substrings separated by ", " of (“XX.XX.XX.XX, AA-AA-AA-AA-AA-AA”))) else “”)}

wait “{pathname of client folder of site “BESSupport” & “\RunQuiet.exe”}” “__Download\bes-wol.exe” 10 @__appendfile

We’ve tried different variations of this action script for example taking out the part that checks for the correct subnet so it looks something like this:

Download http://support.bigfix.com/download/bes/util/bes-wol.exe

appendfile (concatenation " " of (substrings separated by ", " of (“XX.XX.XX.XX, AA-AA-AA-AA-AA-AA”)))

wait “{pathname of client folder of site “BESSupport” & “\RunQuiet.exe”}” “__Download\bes-wol.exe” 10 @__appendfile

Which completes but does not actually wake up the intended target even if it is actually on the same subnet. So my question is what would the correct relevance be that does not check for the systems being located on the same subnet and just broadcasts the “magic packet”?

Just as a note WoL actually works in our environment as BigFix has designed it, it works just as the documentation describes. It’s just that most if not all our system are shutdown at night and even if we have designated certain systems as “last man standing” there is no guarantee the user of that system would not shut it down as we have no dedicated systems for “last man standing”, we have so many subnets, some only having a handful of systems on them.

If anyone has any experience with using WoL in this manner or a similar manner you input would be appreciated.

Thanks

JJ

(imported comment written by BenKus)

Hey JJ,

So quick recap of WoL abilities in BigFix:

  1. “On-Demand wake-on-lan” (triggered from right-click menu in BigFix 7.1 and above) – This method will use the BigFix infrastructure to properly route the wake-on-lan packet to a computer on the same subnet to wake a system up. Shouldn’t require any network changes.

  2. “Scheduled wake-on-lan” (triggered through a wizard and a BigFix action) – This method sends a BigFix action to the agents to tell them to wake-up computers in your subnet (this is what you reference above). Shouldn’t require any network changes.

  3. Direct wake-on-lan packets – If you would like, you can use the simple wake-on-lan tool we offer to send the wake-on-lan packets directly to computers. In our very first implementation of wake-on-lan, we used to do this through the right-click extension menu – more info at http://support.bigfix.com/bes/misc/bes-wol.html – (which is different from #1 above because it doesn’t route through the BigFix infrastrucure). In most networks, this method would require network changes because the console computers wouldn’t be allowed to send a directed broadcast packet.

So having said all that, if you want to skip the BigFix wake-on-lan features built into the infrastructure and just send the WoL packets directly after changing the network, you can use method #3 above… OR you can use the bes-wol.exe tool yourself to send out the WoL packets outside of BigFix… OR you can use the method #2 above with the action you posted, but change the relevance of the action to TRUE to make it run on any computer (ignoring our relevance to run only on computers in a specific subnet).

If you want to do some more advanced things with Wake-on-LAN customized to your environment, you might consider speaking with our professional services organization, which has done some interesting projects for customers in this area.

Ben

(imported comment written by cstoneba)

Ben, these changes to WOL (#1) that occured in 7.2, will that fix the issue that I stated here: http://forum.bigfix.com/viewtopic.php?pid=12542#p12542 ?

(imported comment written by BenKus)

Hey cstoneba,

Oops… I meant to say the changes were in 7.1 and not 7.2 (I adjusted the description above to correct this)… I also updated the other thread and we can continue the discussion there if we need to…

Ben

(imported comment written by SystemAdmin)

Ben,

I like your suggestion in option 2 which is what I tried along with changing the relevance to true and I belive this will work. Only there is another subnet check in the action statement which I’ve included below.

Download http://support.bigfix.com/download/bes/util/bes-wol.exe

appendfile {(if (exists subnet address whose (it as string = “XX.XX.XX.XX”) of adapters of network) then (concatenation " " of (substrings separated by ", " of (“XX.XX.XX.XX, AA-AA-AA-AA-AA-AA”))) else “”)}

wait “{pathname of client folder of site “BESSupport” & “\RunQuiet.exe”}” “__Download\bes-wol.exe” 10 @__appendfile

There is an if statement that refers to subnet 146.138.194.0 which is failing if it’s not on that subnet. The rest of the action statement looks like it should be fine but my question is what should that “appendfile” line look. I’ve tried eliminating parts of the line so looks like this:

appendfile (concatenation " " of (substrings separated by ", " of (“XX.XX.XX.XX, AA-AA-AA-AA-AA-AA”)))

which does not work. Your thoughts?

Thanks

JJ

(imported comment written by BenKus)

Hmm… on the surface that looks good to me… What happens if you run that?

Ben

(imported comment written by SystemAdmin)

Ben,

Well it actually completes however it does not actaully wake up the target sytem. The original would fail on that line if the target system was not on the same subnet of course. Is there something else I’m missing or need to add?

Thanks,

JJ

(imported comment written by sthull)

Hi JJ,

You are missing the curly brackets, so it is appending the actual relevance statement instead of the results of evaluating the relevance statement. Try this:

appendfile {(concatenation " " of (substrings separated by ", " of (“XX.XX.XX.XX, AA-AA-AA-AA-AA-AA”)))}

Regards,

Steve

(imported comment written by SystemAdmin)

Thanks Steve and Ben,

Yes that was it, the action completed and woke the target system. Now to persue further testing with dedicated WoL packet forwarders as mentioned in the original post. I’ll update with results if anyone is interested.

Thanks again,

JJ