Monitor Magic packet(wake on lan packet )

  • Hi All,

    In my app,I want to monitor the magic packet .
    Where I will get more info about this. Could
    give some link for this?.I found a command tcpdump,
    Could I use this for wol packet monitoring?.

    Thanks In Advance,
    Sheen
  • On 08 Dec 08, at 02:55, sheen mac wrote:
    > In my app,I want to monitor the magic packet .
    > Where I will get more info about this. Could
    > give some link for this?.

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

    > I found a command tcpdump,
    > Could I use this for wol packet monitoring?

    Not very well... the machine is necessarily asleep or turned off when
    it receives the packet, so tcpdump isn't running. Wake-on-LAN is
    implemented in hardware, and can be enabled in OS X from the Energy
    Saver prefpane, under the Options tab ("Wake for Ethernet network
    administrator access").
  • sheen mac wrote:
    > In my app,I want to monitor the magic packet .
    > Where I will get more info about this. Could
    > give some link for this?.I found a command tcpdump,
    > Could I use this for wol packet monitoring?.

    As Andrew Farmer pointed out, you don't typically monitor for the magic
    packet, since it is used to wake your computer from sleep or to turn it
    on remotely.

    The packet is sent as an UDP broadcast on the LAN and can be sent to any
    port, though port 9 seems to be commonly used among the sample WOL
    broadcaster apps available on the 'Net.

    If you wanted to monitor for WOL broadcasts on your LAN, then you might
    want to monitor port 9 for incoming UDP connections and log anything
    that arrives. I'm pretty sure that tcpdump can do that, though I've
    never used it. If you're trying to debug an existing WOL application,
    then you'll want to listen on whatever port it sends to.

    A WOL monitor would make for a decent first server exercise for a class
    in network programming. Bonus points to the student who can explain why
    WOL won't work over IPv6.

    Cheers,
    Jason