cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
wgknowles
Engaged Sweeper II
[4.0 Update - follow the instruction posted by john_e_wagner below]

In Lansweeper 3.5.2 the link for Network Wake on Lan will only wake up computers in the same subnet. The way to Wake up computers in different subnets is via "Directed Broadcast" Unfortunately the utility included in 3.5.2 (WOL.exe) does not generate directed broadcast packets.

Lansweeper support says in the next version you can specify a custom action for WOL
default : wol.exe {mac}


But for now, here's a simple way to get WOL to work across subnets in 3.5.2:

1)Download poweroff: http://users.telenet.be/jbosman/applications.html
2)Place poweroff.exe into the folder with the rest of the tools you use for custom actions
3)Backup & then modify your it-compdetail.aspx file as follows
Replace:

<td class="lijntje"><a href="javascript:runApp('wol.exe <%=replace(myrow("macaddress"),":","")%>','true');"><%=myrow("description")%></a>&nbsp;</td>

With: (Fix the Path to poweroff.exe to match your environment)

<td class="lijntje"><a href="javascript:runApp('cmd.exe /K \\\\SERVERNAME\\lstools\\poweroff.exe wol -ip <%=dscomputers.FieldValue("ip address", nothing)%> -subnet 255.255.255.0 -mac <%=replace(myrow("macaddress"),":","")%>','true');"><%=myrow("description")%></a>&nbsp;</td>

VOILA!
Enjoy waking up all those sleepy computers!


Here's a very in-depth technical background of WOL (for those who care):

WOL is primarily a Layer 2 function in that it is solely dependent on the MAC address.
The target NIC card doesn't care what protocol or port it is using. It is not actually parsed by a full protocol stack, all the target NIC card looks for is the unique WOL payload for that MAC Address. So if you can deliver this packet to the target NIC you are in business.

Because the PC is asleep, it will not have an IP address and will not respond to Address Resolution Protocols (ARPs) from the router. Therefore, only a local subnet IP broadcast packet will be transmitted on the broadcast segment.

If there is a Layer 2 switch between the router and the PC, which is true for most networks today, the switch does not know to which port the PC is physically connected. Only a Layer 2 broadcast or an unknown unicast frame is sent out to all switch ports. All IP broadcast packets are addressed to the broadcast MAC address.

That being said, WOL uses Directed Broadcast for delivery across subnets. The broadcast is typically sent as a UDP datagram to port 0, 7 or 9, or, in former times, as an IPX packet. The broadcast IP Address depends on your subnet configuration, but is typically x.x.x.255 The port and protocol are only relevant if you have firewalls in place that might block this traffic, or if you are attempting to set up port forwarding from the internet (NOT ADVISED).

An IP directed broadcast is a datagram which is sent to the broadcast address of a subnet to which the sending machine is not directly attached. The directed broadcast is routed through the network as a unicast packet until it arrives at the target subnet, where it is converted into a link-layer broadcast. Because of the nature of the IP addressing architecture, only the last router in the chain, the one that is connected directly to the target subnet, can conclusively identify a directed broadcast

If a Cisco interface is configured with the no ip directed-broadcast command, directed broadcasts that are otherwise exploded into link-layer broadcasts at that interface are dropped instead. The no ip directed-broadcast command is the default in Cisco IOS Software Release 12.0 and later.

IP directed broadcasts are used in the popular smurf denial of service attack. In a smurf attack, the attacker sends ICMP echo requests from a falsified source address to a directed broadcast address. This causes all the hosts on the target subnet to send replies to the falsified source. By sending a continuous stream of such requests, the attacker can create a much larger stream of replies. This can completely inundate the host, whose address is falsified.

If routers are configured to allow subnet-directed broadcasts, the additional configuration can mitigate security concerns.
Routers can be configured to allow only IP-directed broadcasts from specific servers, using a specified (preferrably non standard) UDP port number.


References:
http://www.cisco.com/en/US/products/hw/switches/ps5023/products_configuration_example09186a008084b55c.shtml#directed

http://en.wikipedia.org/wiki/Wake-on-LAN#See_also

http://blogs.technet.com/smsandmom/archive/2008/03/04/configmgr-2007-implementing-wake-on-lan-wol.aspx
11 REPLIES 11
john_e_wagner wrote:
Instructions for 4.0.

(Easy Way.)

go to http://users.telenet.be/jbosman/applications.html.
Download poweroff.exe.
Copy poweroff.exe to actions folder.
Start webSweeper configuration utility, configuration, custom actions, computer actions.
Change Wake On Lan to: (Right below action path)
"
{actionpath}poweroff.exe wol -mac {mac} -ip {ipaddress} -subnet 255.255.255.0 -immediate
"
Save Options.
Done.

JW





Thank you for instructions. I have created custom action, but {mac} parameter does not return mac address. I tried with {macaddress} but it's not working.
Does anybody know which is the correct parameter for returning mac address?
Thanks.
wgknowles
Engaged Sweeper II
A more sophisticated method is described in another post that allows for wol over the internet and across firewalls:
http://www.lansweeper.com/forum/yaf_postst1374_Wake-On-Lan-with-poweroffexe.aspx