1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Bonjour Sleep Proxy Service / Wake on Demand

Discussion in 'Tomato Firmware' started by occamsrazor, Dec 2, 2009.

  1. occamsrazor

    occamsrazor Network Guru Member

    Apple has a feature on their Airport routers called "Wake on Demand". Basically your computer running various bonjour services (filesharing, iTunes, printer, etc) can be set to sleep. When another machine tries to access the service on the sleeping machine, the router acting as a sort of proxy picks up the request, and fires off a Wake-on-LAN packet to the computer, waking it up.

    There's a decent description of how it works in the last message by mfripp on this forum thread

    Apparently the feature uses "Sleep Proxy Service" which is an open source component of zero configuration networking. There are some links at the bottom of that Wikipedia article.

    Wondering if this could be run on the Tomato router? Would be a cool way to have a home server running but asleep and wakeable remotely (e.g. if you use the OpenVPN mods) without having to manually fire off WOL packets.
  2. Azuse

    Azuse Addicted to LI Member

    What's wrong with wol?
  3. occamsrazor

    occamsrazor Network Guru Member

    This uses WOL. You could still use WOL manually if you want. But rather than either:

    1. Manually loading up a WOL app and firing off a WOL packet to a specified IP/MAC address.
    2. Accessing the Tomato web interface and selecting which machine then waking it.

    You could have it all happen automagically.

    In addition, and this is substantially different from simple WOL, the router continues to advertise/broadcast the Bonjour services of the sleeping computer. So under a normal situation if Computer A is sleeping and Computer B looks for Bonjour services (file-sharing, iTunes server, etc) it won't find any.

    With the Bonjour Sleep Proxy, Computer B will still see the Bonjour services of Computer A even though it's asleep, and when it tries to use them the router will wake Computer A via WOL.

    Errr... at least that's how it appears to work from my reading. I don't have an Airport router to try it on....
  4. ewmailing

    ewmailing Networkin' Nut Member

    Yes, this is my interpretation of how it works too. I don't think you need an actual Airport to try it though. I think Apple has shipped Bonjour Sleep Proxy on their other devices because I've seen it work without an Airport on the network. (On a Leopard machine, I browsed for an ssh server on a sleeping Snow Leopard Mac and was able to find it. When I attempted to log in, it woke up automagically and I was able to connect. And I repeated the test from a machine running Debian Linux and Avahi, and it was also able to wake up and connect to the Snow Leopard Mac.)

    Something else was acting as the Sleep Proxy server. It was either (or some or all) a PowerPC Mac running Leopard (but I don't think Apple shipped Sleep Proxy for Leopard), a Windows machine running the latest Bonjour for Windows, an Apple TV, or an iPhone.

    However, all of these devices can wake/sleep/come/go (except for the Apple TV, but nobody has any of those :p). It makes much more sense for a low power, always on router to assume Sleep Proxy Server duties.
  5. ewmailing

    ewmailing Networkin' Nut Member

    Also check out:

    Got somebody to build Bonjour. I'm working on a quick code hack to enable Bonjour Sleep Proxy.

    FYI, Apple TV does indeed act as a Bonjour Sleep Proxy. Desktop and server Macs may also act as a proxy if they are set to never-sleep (according to the source code comments). However, I tried this on one of my Macs and it didn't seem to hold true.
  6. bripab007

    bripab007 Network Guru Member

    I came across this while searching for how to do a WOL over wi-fi for my Mac.

    I'm curious if any progress was made or where it stands now. Anyone have any ideas/anything to add to this discussion at the moment?

    I'm off to read this thread to see if I can catch up on what went on: http://www.linksysinfo.org/forums/showthread.php?t=64245&page=10
  7. Toastman

    Toastman Super Moderator Staff Member Member

    This just got me curious. If I try to access my daughter's disk drive when her machine is sleeping, it wakes up. That's a gigabyte motherboard. So why is it doing that? I am using Windows 7 and latest RT firmware... no Bonjour in sight.
  8. rhester72

    rhester72 Network Guru Member

    Looks like Windows 7 may indeed be sending a magic packet to the appropriate destination MAC when doing network sharing. I haven't yet confirmed with tcpdump, but the Power Management tab under Device Properties for the NIC suggests this is the case.

  9. bripab007

    bripab007 Network Guru Member

    Yeah, that must be the case. So Windows 7 has its own version of sleep proxy service, it would seem.
  10. Toastman

    Toastman Super Moderator Staff Member Member

    Yes indeed - wake on magic packet is enabled by default on both machines. But looking in all the help files and google I see nothing that says Windows 7 sends Magic Packets. There are utilities to do it, but I have not installed one, and it does wake up the other Win7 machine anyway. Likewise, her machine can wake mine up if I put it to sleep. Maybe it has been done as part of an online MS update?

    http://en.wikipedia.org/wiki/Wake-on-LAN WOL Description
    http://www.dd-wrt.com/wiki/index.php/WOL WOL info
    http://software.bootblock.co.uk/?id=wakeonlanex2 WOL client

Share This Page