19

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?

3 Answers 3

20

@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.

1
  • 3
    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.
    – rjt
    Jan 23, 2016 at 1:14
11

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.

3
  • "in all the frames it sees" --- so the 6x0xff + 16xMAC can be in a single frame?
    – rjt
    Jun 13, 2011 at 22:42
  • @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.
    – Spiff
    Jun 13, 2011 at 22:52
  • 1
    So this will even work if you egress the WoL-VLAN tagged toward the end user (if not otherwise possible)?
    – Marki
    Mar 10, 2017 at 9:24
6

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.

1
  • 5
    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.
    – wilson0x4d
    Dec 3, 2016 at 20:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .