If you are in a VLAN environment where you have HP ProCurve switches and want to Wake-On-LAN or WOL packets to be forwarded to different VLANs
On the switch that is doing your routing, in my case, a ProCurve 5300 series switch, I typed the commands below.
ip address 10.0.2.2 255.255.255.0
ip forward-protocol udp 10.0.5.255 9
ip address 10.0.5.2 255.255.255.0
VLAN 2 is where my FOG server sits and the WOL packets it sends out are forwarded to VLAN 5.
I was recently asked to give a little more detail on this post. (I also found a typo I made and fixed it too. I changed 10.0.16.255 to 10.0.5.255)
This post assumes that you are using virtual LANs or VLANs. If you are not using VLANs, you don't have to do this.
Here is the quick and dirty of VLANs.
- VLANs take your one physical network and breaks it up into multiple logical networks. The closest example I can give is a hard drive. You can have one physical hard drive but multiple partitions.
Please keep in mind that this is an over simplification VLANs and what they can do.
On to the questions.
To expand on this example
- Lets say that the IP address of my FOG server is 10.0.2.50 and with a subnet mask of 255.255.255.0.
- The server is sits in VLAN 2.
- VLAN 2 gateway address is 10.0.2.2
- VLAN 5 gateway address is 10.0.5.2
- The desktop computer that I want to image using FOG is in VLAN 5 and is setup to get an IP address from the DHCP server.
- The desktop computer is set up to boot from the network (PXE) first and has Wake-On-LAN (WOL) enabled
Wake-On-LAN (WOL) or "magic" packets send out a broadcast to wake up a computer. By design, VLANs keep any kind of broadcasts within it's own VLAN. (Back to the hard drive example, you can't save a 500mb file across two partitions of flash drives.) This prevents a user or someone else from taking down your entire network when they plug both ends of a network cable into the wall or switch, it will only take down that VLAN.
On HP switches (and I assume other manufactures as well), you can allow broadcasts to be passed on from one VLAN to another based on IP address and port number. This is where the command "ip forward-protocol udp 10.0.5.255 9" comes into play.
The WOL packet uses UDP port 9. The 10.0.5.255 is the broadcast address for VLAN 5.
When my FOG server sends out a wake up broadcast (packet) using UDP port 9 in VLAN 2, my HP switch will forward that wake up broadcast (packet) on to VLAN 5.
I hope this clears up any confusion that you may have.
--Updated 3/18/13 9:20am