Wake on lan

I can currently use EMCO wol free software to turn computers on across my network.  EMCO works great even  across subnets.  I would like to be able to use dos to shut the computers off.   I can turn off a computer on another subnet if I specify the mac address and the IP address.  I need to be able to turn it on with just the mac address.  I can do this on the local subnet but not across the network to other subnets.  I can use either of these programs to turn on computers on the local subnet without ip address or or another subnet, using the ip address.  

Can anyone tell me how I can use  dos wol computers without using the ip address.  I dont want to use the ipaddress because they are dynamic.  
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

As I read http://www.gammadyne.com/cmdline.htm#wol\
In Example:
wol 5c9d32b5f287
the ip is not DHCP-IP of PC but IP of the router on network with PC.
And I guess that is static.
I have not tried the program yet.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It looks more like a bootp option then a DHCP option which makes sense.  Remember IP is layer 3, so it looks like it's taking the MAC and assigning it that IP Address of course it has to be an address that is available on the network.  Now as far as WOL without using an IP Address you have no way of routing the WOL Packet to the correct device.  

The key statement is:

Packets cannot be broadcast across the Internet.  That's why they call it Wake On Lan, not Wake On Internet.

Your LAN is defined by your subnet or your broadcast domain.  So going from network to network might be tricky.  I imagine you may be able to add an accesslist, but that is still IP.  Routers tend to drop broadcast packets to keep the over head down you wouldn't want every packet sent out to have to hit your router.

 But this might help:  http://forums.techguy.org/networking/563696-wol-over-wan.html

On router at your remote location:

Verify access-list 40 doesn't exist: (sh ip access-list)

enter config mode: (conf t)

access-list 10 permit xxx.xxx.xxx.xxx [where xxx is the IP sending the wake-on-lan broadcast]
interface x/y [where x/y is the interface of the LAN]
ip directed-broadcast 40
wr mem

This will create an access-list (40) that only allows the host you specify to send directed broadcast to the LAN in question. You have to do this on each and every LAN interface serviced by a router/switch in your WAN.
In reaction to my fellow experts. Usually, we use the terms "different subnet" when they are located in different sites, location, building, city...). Is this what you mean, or you just have different subnets in your LAN? Please confirm your topology.

You say:  I dont want to use the ipaddress because they are dynamic.
-What IP is dynamic? Your WAN (Internet) IP address or the ones of your PCs?
-What kind of DHCP you have?
-If it's a Windows DHCP, You could have a batch file reading the infos found in the DHCP server, associate the IP with a specific MAC address then do your WOL stuffs.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

ForLoop5Author Commented:
@jburgaard I will try that.  

@erobby I am able to wake computers on the same subnet as my computer without an ip.  I suppose this is because it broadcasts on the local subnet.  But your saying that I would need to create access control lists to be able to broadcast the wol packet on subnets other than my own?  

The subnets are sections of the campus.  Separated by floors and buildings.  All part of our Lan.  
The computers have dynamic ip address.
We do use windows DHCP.
I have thought about trying to put together a script to accomplish associating the ip with the mac address and then taking that and sending a wol packet to each of the computers.

Yes remember switches are layer 2 devices unless you have a layer 3 switch.  And they work by building a mac list...which is what you are trying to route to specific ports.  So the device sending the WOL packet would need to pass the router.  Since routers are layer 3 you would need to add the sending device to the receiving router's accesslist so once the packet is on the intended network and it the WOL packet can then be broadcast.  It's encapsulating the WOL packet in a IP header to route it from your network to the target network.

@erobby: Way da go!! Your comments are reminding me far away knowledge back in my MCSE NT4. I did not need to apply a lot of it so I'm kind of rusted here. My contribution will be more in my troubleshooting skills and divergent thinking style. Cheers to you!!

@ForLoop5: (Q=Quote R=Response)
Q:The subnets are sections of the campus.  Separated by floors and buildings.  All part of our Lan.  
R: Routing between your subnets can be done in a differant ways. Are they all in differant VLANs? All in the same LAN with just a different logic subnet?  If you don,t know, thy this. If you don't know how to add a "route", add an ip address in your IP4 NIC Advanced properties another LAN in the campus, that you know does not exist. This will create the required route. Then, ping an accessible IP address in that subnet. Does it work? If yes, your subnets are defined as logical, not as VLans or physical.

Q:The computers have dynamic ip address. We do use windows DHCP.
R:As I right to assume that your Windows DHCP server provides the IP address for all of your subnets?  (either broacasting between subnets possible or BooyP relay is setup).

Q:I have thought about trying to put together a script to accomplish associating the ip with the mac address and then taking that and sending a wol packet to each of the computers.
R:Great, but maybe not required. Before, lets make more efforts in defining your topology.

Should I have asked other questions that you think you should answer so we can more understand how you are setup?


Well you have to remember that it's not doing DHCP at that moment.  DHCP first packet is a broadcast packet.  And the DHCP Broadcast Packet is either FF:FF:FF:FF:FF:FF or 00:00:00:00:00:00.

Also remember that you need a helper statement  on your router or DHCP Relay agents setup on the other networks to route DHCP Packets otherwise nothing outside the broadcast domain.  We are working with WOL so it MAC dependent.  

To address the issue you need to send a packet to a device that doesn't have an IP Address.  In order to get a DHCP Address it has to be running because DHCP is initiated by the Client.  So once again we are looking at Bootp and you need to encapsulate the packet in an IP header to get it across a router.
Q:"it's not doing DHCP at that moment."
R:It is clear you know your stuff. Please forgive my "memory challenged mind". Would you mind sharing with me how you figured it?

Q:...DHCP Relay agents...
R:I'm still challanged to understand their topology. For example, are all the subnets in the same physical LAN and same VLAN?, etc... Maybe broadcasting is possible in all subnets

Q:you need to send a packet to a device that doesn't have an IP Address.
R:If the DHCP server can broadcast to all subnets (maybe not from DHCP relays, who knows), therefore, it could be that... (you know...)... the IP infos, can be retrieved from the DHCP server and therefore, can be matched to the MAC address.

Q:encapsulate the packet in an IP header to get it across a router.
R:a router was not mentionned by ForLoop5

Thanks for challanging me. Let's see what ForLoop5 has to say about how they are setup.

@ForLoop5: Do you get all of this? What is pending that needs answors?


Please read  http://en.wikipedia.org/wiki/Wake-on-LAN

Since you apparently are having a problem understanding DHCP and Routing
Ok then. I never tried this scenario, but believe it would work.
Immagine you have two PCs, connected to a simple switch, and in a same VLAN.
-PC1 is in the subnet
-PC2 is in the subnet
-All are properly set so WOL works
-Both PCs have the other subnet properly added to their respective routing table.
-Both PCs can ping the other PC.
-You shutdown PC1
-With PC2, you send your WOL magic packets to PC1
-Will it most likely fire up?

Thanks for the link. It was fun to read. Actually ForLoop5should read it as well. Let now see how ForLoop5 is setup.


First you can't have them connect to the same VLAN those are to separate networks.  You are looking at VLANs the wrong way.  VLAN's are a logical division of networks on a switch used to separate network.  In order to get them to talk you need to enable trunking which is a connection between the two LANs

This may help:  http://en.wikipedia.org/wiki/Virtual_LAN
Good, so it seems that you have it all figured out.

So I guess my help will not be required here.

ForLoop5Author Commented:
ReneGe your help is appreciated!   I am trying to get a new computer lab imaged and set up today,  I dont have a minute at the moment to get more details.  I will get back asap!
Glad I could help and thanks for the points.
Would you mind sharing with us how you resolved it?

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.