Jump to content
XPEnology Community

How to get Wake On LAN working?


Recommended Posts

First let me tell you I am already a PC hardware/software geek, but since I decided to move from my old Synology DS414 to a custom built NAS there's no way I can get the damned box to be put into sleep mode and therefore to get the whole WOL service working...

 

So far I tried four different motherboards (of course all of them were WOL compliant) and even three PCI-E Gigabit LAN cards.

 

However I have seen in this board that there are actually people that can get WOL working and that is what I want to preserve the hard disks life and save power when the NAS is not used at all without having to manually power on/off the box everytime...

 

Is there something I am missing here?? :?

Edited by Cr4z33
Link to comment
Share on other sites

Expecting, that required settings were done in DSM.

my settings
 

1.thumb.png.b9259843a2109bfafd4a0e47d73841b7.png2.thumb.png.bf706348ea585fd34ae18c559ad5642d.png

Hide  

 

The most easiest way - mac in the boot loader and real mac of NIC are same.

DS finder (mobile or PC ) WOL is not working if mac's are different. In this case, I can WOL NAS only via router web interface using real mac of NIC. 

  • Like 1
Link to comment
Share on other sites

1 hour ago, deloza said:

Expecting, that required settings were done in DSM.

my settings

1.thumb.png.b9259843a2109bfafd4a0e47d73841b7.png2.thumb.png.bf706348ea585fd34ae18c559ad5642d.png

Hide

 

The most easiest way - mac in the boot loader and real mac of NIC are same.

DS finder (mobile or PC ) WOL is not working if mac's are different. In this case, I can WOL NAS only via router web interface using real mac of NIC. 

Sorry forgot to say the yes I have enabled those options into DSM and the cfg is matching the real MAC address of the NIC.

Link to comment
Share on other sites

Edit root/etc/synoinfo.conf:

 

Search for eth0 or the lan connection required for WOL.

 

eth0_wol_options="d" change the "d" to "g" = eth0_wol_options="g" this will set a tick in the WOL for eth0 in the control panel power settings.

 

Make sure > wol_enabled_options="g" < is set to "g" not "d"

 

Make sure > support_wol="yes" <

 

Copy file or create a file called:

S99ZZZ_Shutdown.sh

 

to:


dsm5.x
root/usr/syno/etc/rc.d

dsm6.x
root/usr/local/etc/rc.d

 

Set execute permission.

 

Script command (file content):

#!/bin/sh

case $1 in
start)

 if [ -f /var/packages/shutdown_script/DSShutdown.sh ]; then
  /var/packages/shutdown_script/DSShutdown.sh &
 fi
    ;;
stop)

 if [ -f /var/tmp/shut.down ]; then
  rm /var/tmp/shut.down
 fi
 ifconfig eth0 down

    ;;
*)
    echo "Usage: $0 [start|stop]"
    ;;
esac

Now set the WOL option in the synology assistant and then shutdown the machine. Use the WOL option in synology assistant to test WOL is functional.
If you need WOL over a WAN connection your router will need to be able to pass the magic packet on to the LAN devices.

Edited by CtrlAltDel
Link to comment
Share on other sites

1 hour ago, CtrlAltDel said:

 

If you need WOL over a WAN connection your router will need to be able to pass the magic packet on to the LAN devices.

I did already everything but this part. :2_grimacing:

 

What NAT port should I map?

The same one I use for a SSH connection to the NAS?

 

Thanks

Edited by Cr4z33
Link to comment
Share on other sites

UDP 7 and 9 iirc not all routers will pass/broadcast the magic packet correctly so this may or may not work for you?

 

If you use a router with Tomato installed there is a WOL utility under tools which is handy if you have VPN access to your router. Obviously you need access to the routers control panel so only people with admin rights could use that method. Other flavours of router firmware offer similar tools in some cases. Stock consumer routers firmware tend not to support WOL via WAN very well in my experience. 

 

If you can join your network using a VPN you should be able to use WOL to start machines that are accessible on the same network using a WOL script/utility. Obviously that's not much help if the machine in question is the VPN server and it's down.

 

This maybe useful? https://www.depicus.com/wake-on-lan/woli

Link to comment
Share on other sites

UDP 7 and 9 iirc not all routers will pass/broadcast the magic packet correctly so this may or may not work for you?
 
If you use a router with Tomato installed there is a WOL utility under tools which is handy if you have VPN access to your router. Obviously you need access to the routers control panel so only people with admin rights could use that method. Other flavours of router firmware offer similar tools in some cases. Stock consumer routers firmware tend not to support WOL via WAN very well in my experience. 
 
If you can join your network using a VPN you should be able to use WOL to start machines that are accessible on the same network using a WOL script/utility. Obviously that's not much help if the machine in question is the VPN server and it's down.
 
This maybe useful? https://www.depicus.com/wake-on-lan/woli
Thanks I will read everything carefully later, but let me remind everybody that the NAS does not even go into sleep mode when using Synology DSM.

On the other hand if I run ie. an Ubuntu Live session then sleep mode works flawlessly. :/


Link to comment
Share on other sites

If your unit isn't going to sleep properly then WOL will never work!

 

Have you doubled checked your config and S99ZZZ_Shutdown.sh script including making sure the script has write access? You need that working to get your unit to sleep. I use that method with HP N40L and Gen8 devices without any issues. WOL works fine for me using LAN or VPN WAN.

 

P.S. I also have the power button fix applied to my HP servers, which I need if I power off using the power switch, rather than the DSM control panel shutdown. Maybe your hardware needs a similar fix? Try searching the forum for 'acpi power off' or 'acpi power switch' etc. there should be some scripts and instructions on here. There's also an alternative power button script called 'POWERBUTTON_6.1-0005.spk' - I'm not running 6.1 so I don't know if the old method works on 6.1, maybe try this newer script first?

Link to comment
Share on other sites



If your unit isn't going to sleep properly then WOL will never work!
 
Have you doubled checked your config and S99ZZZ_Shutdown.sh script including making sure the script has write access? You need that working to get your unit to sleep. I use that method with HP N40L and Gen8 devices without any issues. WOL works fine for me using LAN or VPN WAN.
 
P.S. I also have the power button fix applied to my HP servers, which I need if I power off using the power switch, rather than the DSM control panel shutdown. Maybe your hardware needs a similar fix? Try searching the forum for 'acpi power off' or 'acpi power switch' etc. there should be some scripts and instructions on here. There's also an alternative power button script called 'POWERBUTTON_6.1-0005.spk' - I'm not running 6.1 so I don't know if the old method works on 6.1, maybe try this newer script first?


I gave 755 to that script from root user so shouldn't it be already OK?

I too am already using the power button script, but unfortunately it only switches off the NAS and nothing else.
Link to comment
Share on other sites

  • Polanskiman changed the title to How to get Wake On LAN working?
  • 4 years later...

Hi, I know I'm late to this topic, but I haven't had any WOL problems with my N40L until recently.

 

I've been running DSM 5.2 for several years and have had no problems. Decided to upgrade to DSM 6.2 so I could take advantage of some of the new backup tools. But I cannot, for the life of me, get my production N40L to wake on lan.

 

I was careful - tried it in a VM, then installed 5.2 and upgraded to 6.2 on a (physical) test box. Everything was good so I decided to upgrade my production box. I have read several theads on this issue, have followed all the clues, and am still unable to wake up my production box. The difference, I think, is that I have a 2nd NIC in that box, and the bios has reordered the ports putting my embedded NIC on Lan2. And, of course, the GUI only gives you the option of setting WOL on Lan1. I have changed all the usual options in sysinfo.conf with no success.

 

Anyone encountered this problem before? My next option is to take the machine apart and remove the 2nd NIC. But before I do that, I'd like to know if there's a software solution available.

 

Thanks

Link to comment
Share on other sites

  • 1 month later...
On 12/1/2017 at 2:35 PM, CtrlAltDel said:

Edit root/etc/synoinfo.conf:

 

Search for eth0 or the lan connection required for WOL.

 

eth0_wol_options="d" change the "d" to "g" = eth0_wol_options="g" this will set a tick in the WOL for eth0 in the control panel power settings.

 

Make sure > wol_enabled_options="g" < is set to "g" not "d"

 

Make sure > support_wol="yes" <

 

Copy file or create a file called:

S99ZZZ_Shutdown.sh

 

to:


dsm5.x
root/usr/syno/etc/rc.d

dsm6.x
root/usr/local/etc/rc.d

 

Set execute permission.

 

Script command (file content):


#!/bin/sh

case $1 in
start)

 if [ -f /var/packages/shutdown_script/DSShutdown.sh ]; then
  /var/packages/shutdown_script/DSShutdown.sh &
 fi
    ;;
stop)

 if [ -f /var/tmp/shut.down ]; then
  rm /var/tmp/shut.down
 fi
 ifconfig eth0 down

    ;;
*)
    echo "Usage: $0 [start|stop]"
    ;;
esac

Now set the WOL option in the synology assistant and then shutdown the machine. Use the WOL option in synology assistant to test WOL is functional.
If you need WOL over a WAN connection your router will need to be able to pass the magic packet on to the LAN devices.

someone got it working under dsm 7.0?

Link to comment
Share on other sites

  • 4 months later...
Posted (edited)
On 1/12/2022 at 6:57 PM, morpheus said:

Hi, I know I'm late to this topic, but I haven't had any WOL problems with my N40L until recently.

 

I've been running DSM 5.2 for several years and have had no problems. Decided to upgrade to DSM 6.2 so I could take advantage of some of the new backup tools. But I cannot, for the life of me, get my production N40L to wake on lan.

 

I was careful - tried it in a VM, then installed 5.2 and upgraded to 6.2 on a (physical) test box. Everything was good so I decided to upgrade my production box. I have read several theads on this issue, have followed all the clues, and am still unable to wake up my production box. The difference, I think, is that I have a 2nd NIC in that box, and the bios has reordered the ports putting my embedded NIC on Lan2. And, of course, the GUI only gives you the option of setting WOL on Lan1. I have changed all the usual options in sysinfo.conf with no success.

 

Anyone encountered this problem before? My next option is to take the machine apart and remove the 2nd NIC. But before I do that, I'd like to know if there's a software solution available.

 

Thanks

I have the same problem.

Did it work with only one NIC?

Edited by FireMan
Link to comment
Share on other sites

On 6/19/2022 at 11:25 AM, FireMan said:

I have the same problem.

Did it work with only one NIC?

I resolved it by editing the shutdown script. By default, it specifically references Lan Port 0, the one I don't want to use. So I edited the script and had it reference Port 1 (my embedded NIC) and everything worked as it should.

 

Hope this helps.

 

  • Like 1
Link to comment
Share on other sites

  • 2 months later...
On 6/21/2022 at 3:07 PM, morpheus said:

I resolved it by editing the shutdown script. By default, it specifically references Lan Port 0, the one I don't want to use. So I edited the script and had it reference Port 1 (my embedded NIC) and everything worked as it should.

 

Hope this helps.

 

Could you please share the script that you used , iam new to this , please explain how did you do it

Thanks

Link to comment
Share on other sites

On 6/21/2022 at 8:07 AM, morpheus said:

I resolved it by editing the shutdown script. By default, it specifically references Lan Port 0, the one I don't want to use. So I edited the script and had it reference Port 1 (my embedded NIC) and everything worked as it should.

 

Hope this helps.

 

Sure.

 

The original script can be found on this forum (I don't really remember exactly where), but it's named "S99ZZZ_Shutdown.sh", and needs to be placed in the /usr/local/etc/rc.d/ folder. Here's is the text of the mod I made.

 

#!/bin/sh

case $1 in
start)

 if [ -f /var/packages/shutdown_script/DSShutdown.sh ]; then
  /var/packages/shutdown_script/DSShutdown.sh &
 fi
    ;;
stop)

 if [ -f /var/tmp/shut.down ]; then
  rm /var/tmp/shut.down
 fi
 ifconfig eth1 down

    ;;
*)
    echo "Usage: $0 [start|stop]"
    ;;
esac

 

I changed the line "ifconfig eth0 down" to "ifconfig eth1 down". I then rebooted my machine and everything worked as it should.

 

I hope this helps.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...