Does it matter what UDP port a WOL signal is sent to?

72,648

Solution 1

@Spiff is correct that it doesn't matter as far as the Wake-on-LAN functionality of the intended recipient goes. However, UDP is recommended because it can be generated without raw sockets which come with security restrictions, and port 9 is recommended because it maps to the old well-known discard protocol whereas port 7 maps to the echo protocol.

This means that if there are hosts on your network that support these old simple standard services you will get unnecessary backscatter traffic when using port 7 but none when using port 9. And since Wake-on-LAN is normally broadcasted, you could get backscatter from many hosts.

Further, if you are troubleshooting WoL with a network sniffer such as Wireshark, it will decode WoL packets properly only if they are UDP packets on port 9.

Solution 2

Nope, it doesn't matter. It doesn't even have to be a UDP or an IP packet at all. The NIC is just looking for the magic pattern (six bytes of 0xff, then its own MAC address 16 times) in all the frames it sees.

Solution 3

When I woke my computer using port 9 it would restart instead of coming out of sleep. For the life of me I couldn't figure out what I did wrong. I tried using port 7 and instead of restarting it woke up normally. It doesn't seem to matter most of the time which you use, but for my hardware I need to use port 7.

Share:
72,648

Related videos on Youtube

rjt
Author by

rjt

Updated on September 18, 2022

Comments

  • rjt
    rjt over 1 year

    i have seen many WOL instances use port 7 and many use port 9, does it matter? Isn't it just looking for a WOL packet at layer 2 or ethernet?

  • rjt
    rjt almost 13 years
    "in all the frames it sees" --- so the 6x0xff + 16xMAC can be in a single frame?
  • Spiff
    Spiff almost 13 years
    @rjt Yes, the magic pattern can be in a single frame. In fact, it probably has to be. I doubt it would work if it was split between frames.
  • rjt
    rjt over 8 years
    Thanks, that was informative! Turned out Intel vPro nics discard and ignore WOL packets completely and of course turns out these were vPro machines I was trying to wake.
  • Shaun Wilson
    Shaun Wilson over 7 years
    for the sake of knowing, what hardware was it that behaved this way? sounds like port 9 was being used as a sort of ILO instead of WOL.
  • Marki
    Marki about 7 years
    So this will even work if you egress the WoL-VLAN tagged toward the end user (if not otherwise possible)?