05-14-2020 08:53 AM
Hello,
I used to have a machine on a port with the "default settings" and also a work station, on a different (both 2960s) switch but also connected to a default port.
I was able to remotely wake up a computer (using RHEL/Centos ether-wake).
I assume that just works, because the machines are both on vlan 1, the native untagged default vlan.
I moved the client the machine I want to wake up, to vlan 2, it being a native vlan on that port:
interface GigabitEthernet1/0/2
switchport trunk native vlan 2
switchport trunk allowed vlan 2,4-7
switchport mode trunk
Another machine on a port with the same settings as above, should be able to wake the machine up, since it is in the same vlan(s) correct? (Of course it doesn't else I'd wouldn't be writing this ost).
So what else is needed to be able to send a a WOL packet to a machine where the sender and receiver of the WOL packet are on a port configure like above.
The next ste is that, of course, I would like to send a wake up packet from a different vlan to the same machine I want to wake up.
Are there some udp/broadcast settings that by default come with vlan1, but not necessarilly with other vlans?
thanks,
Ron
Solved! Go to Solution.
05-18-2020 12:25 PM
Ron
Thanks for the update. Glad to know that you got it sorted out and working. Raw ethertype was certainly a surprise. Glad there was an option to use udp.
05-18-2020 12:52 PM
Hello
excellent news -Udp forwarding did work then be it on the vlan2 broadcast address instead of the specific host address
Thanks for the update glad you to hear you got it to work!
05-14-2020 09:15 AM
Ron
you ask if there are default settings in vlan 1 that are not in other vlans. The answer is no there are not default vlan settings unique to vlan 1. All vlans have the same default settings.
Wake On Lan is easy when both machines are in the same vlan (and so in the same subnet). Broadcast frames are sent by the server and received by the client.
WOL is possible when the client is in one vlan and the server is in a different vlan but it takes some extra configuration. On the layer 3 interface doing forwarding for the vlan of the server you need to configure ip helper-address pointing to the subnet used by the client and you need to be sure that helper address is forwarding the UDP port number used by WOL.
05-14-2020 11:10 AM
Hello Richard,
yes I read that one can have an ip helper-address for the broadcast address in the subnet you need it for the interface on the router in my case.
One thing I ran into is that (I think) windows 10 turns of the nic for WOL, I don't have the issue with RHEL/Centos/Ubuntu
05-14-2020 12:00 PM
Hello Richard,
I have it working when I add vlan1 to the port where the client is connected (my server/workstation is in vlan1 (for now)).
Without vland1 added to the port, what I tried is adding to the router interface (gi/0/1.1 for my 192.168.1.0 network) is:
ip helper-address 192.168.2.255
ip directed-broadcast
The client I want to wake up is in 192.168.2.0 (but not in vlan1).
basically, that should be enough for sending a WOL packet from vlan1 to a machine on vlan2, right?
thanks,
Ron
05-14-2020 05:56 PM
Ron
assuming that 192.168.2.0 is the subnet for vlan 2 you are close in your configuration. Here are some comments:
- you should check what UDP port is used for WOL for your server. Helper-address has some ports it processes by default. If your server uses a port that is not in that list then you will need to configure ip forward-protocol for that port on the vlan 1 interface.
- you have ip directed-broadcast on the vlan 1 interface. You don't need it there. (Doesn't hurt to have it but not needed)
- on the L3 interface for vlan 2 you might (or might not- depending on platform and version of code) need ip directed-broadcast.
05-15-2020 09:26 AM
Hello Richard,
yes, 192.168.2.0 is the subnet for vlan2 (I am organizing stuff in separate subnets/vlans and associate 192.168.x.0 with vlan x, easier to keep track of that way.))
I alway thought that either 7 or 9 was used (I thought it was a broadcast though, so it wouldn't matter). From what I read some hardware uses 7/echo and some uses 9/discard? So shouldn't I use both, just in case?
ip directed-broadcast; I have 'ip directed-broadcast' on all interfaces that have hosts in the corresponding vlan that boot using dhcp (dhcp running on the 2900 router)
On the router, this is what the configuration for the interface with 192.168.2.0 looks like:
interface GigabitEthernet0/1.2
encapsulation dot1Q 2
ip address 192.168.2.1 255.255.255.0
ip helper-address 192.168.1.1
ip directed-broadcast
ip nat inside
ip virtual-reassembly in
on gi0/1.1, where the server/workstation is that sends the packet (ip addr 192.168.1.110) itended for waking up a machine with IP 192.168.2.117, the configuration is this:
interface GigabitEthernet0/1.1
encapsulation dot1Q 1 native
ip address 192.168.1.1 255.255.255.0
ip helper-address 192.168.1.1
ip helper-address 192.168.2.255
ip directed-broadcast
ip nat inside
ip virtual-reassembly in
So on the router, what I am missing, is either a (or both)
ip forward-protocol udp 7 or ip forward-protocol udp 9 ? (I tried 7, that didn't work.)
I have it working on the same vlan (vlan 2), across two switches btw (client on one switch, sever/workstation on the other)
thanks!
Ron
05-16-2020 03:47 AM - edited 05-16-2020 03:47 AM
Hello
@roncro wrote:
itended for waking up a machine with IP 192.168.2.117
Instead of directed broadcast to the whole subnet try forwarding it to that specific host with both udp 7-9 applied
interface GigabitEthernet0/1.1
no ip helper-address 192.168.1.1
no ip helper-address 192.168.2.255
no ip directed-broadcast
interface GigabitEthernet0/1.2
no ip helper-address 192.168.1.1
no ip directed-broadcast
ip helper address 192.168.2.117 <---specific destination host
ip forward protocol udp 7
ip forward protocol udp 9
05-17-2020 12:39 PM
hello Paul,
the ip helper address 192.168.1.1 I need for machines booting with dhcp in 192.168.1.0? (on gi0/1.1
I am a little confused about the "ip helper address 192.168.2.117" (I tried it though), because that machine is off and that address doesn't exist?
05-18-2020 06:28 AM - edited 05-18-2020 06:29 AM
Hello
I don’t want to get you distracted from the posts by Rick, However felt like i needed to state you have conflicting statemets(see below
Note:- The udp forwarding i suggested was based on your inital quote which would send specific UDP packets towards this host address for WOL services ONLY so this is separate from any dhcp relay addressing which by the way you would only require if your dhcp server didnt reside on the local network.
@roncro wrote:
itended for waking up a machine with IP 192.168.2.117
@roncro wrote:
the ip helper address 192.168.1.1 I need for machines booting with dhcp in 192.168.1.0? (on gi0/1.1
I am a little confused about the "ip helper address 192.168.2.117" (I tried it though), because that machine is off and that address doesn't exist?
05-18-2020 08:43 AM
Hi Paul,
thanks, I tried several things, but as I mentioned in my reply to Rick, it looks like the RHEL/Centos ether-wake tool doesn't use UDP, but raw ethertype packets (0x0842).
Since it doesn't use udp, none of the helper addresses etc will work I am afraid, unless raw ethertype 0x0842 can be forwarded or directed.
thanks,
Ron
05-16-2020 11:32 AM
Ron
I agree that organizing so that vlan x corresponds to subnet 192.168.x.0 is very helpful.
If the client and the server are in the same subnet you don't need to be concerned about the port number. But when they are in different subnets you do need to be concerned. There are many ports that can be used for WOL. 7 and 9 are common but others can be used. It depends on the server doing WOL. You need to find out what port your server uses. You will probably need to configure forward-protocol for that port on the device that does routing for the server.
ip directed-broadcast may be needed on interfaces where clients are connected. (On some platforms and some versions of code it is enabled by default but on many it is not, so it is safer to go ahead and configure it). It is not needed on the interface where the server is connected. And if would not be needed if you were forwarding to a remote host address rather than a remote subnet broadcast address.
You seem to associate directed-broadcast with DHCP. That is not the case. directed-broadcast is used when a packet addressed to the local broadcast address is received from a remote source. DHCP does use a local broadcast to find the server. But if the server is remote then communication to and from the server are unicast.
On gi0/1.1 you have a helper address pointing to the local IP. You don't need this one. Helper address is needed for remote addresses not for local addresses.
05-17-2020 01:03 PM
Hello Rick,
I have been trying to fingure that out, I am starting to get the impression that ether-wake, which comes with ethtool in Centos/Rhel just does a broadcast?
I am using ip directed-broadcast on interfaces that have clients that I want to send a WOL too.
ah.. I thought I needed the helper address on gi0/1.1 for dhcp.
I think I am still learning some of the not so obvious things about vlans.
For example I have a host connected to a switch like this:
interface GigabitEthernet1/0/1
switchport trunk native vlan 2
switchport trunk allowed vlan 2,4-7
switchport mode trunk
which I can get to from a workstation, on another switch from:
interface GigabitEthernet1/0/3
!
It surprises me that works (is that because of the native vlan2 and on the workstation vlan1 being untagged/native by default?)
thanks,
Ron
05-17-2020 02:49 PM
Ron
here is a quick review which I hope will help your understanding.
- by design in IP, broadcasts are local. So a router (or layer 3 switch) will not forward a broadcast to a remote subnet.
- some times we want an exception to that rule. This is what ip helper-address does. It takes a local broadcast and makes a copy which it sends to a remote subnet.
- helper address doesn't forward all broadcasts. There is a small number of ports for which it forwards by default (tftp and netBIOS being some of them). If you want to forward some other protocol (such as WOL) you need to use the forward protocol command to specify the protocol port whose broadcast will be forwarded.
- sometimes the helper address will specify a specific host address so the broadcast will be forwarded to that host (as in the suggestion from Paul). And sometimes the helper address will specify the broadcast address of the remote subnet (as in your post).
- if the helper address is using a remote broadcast address then the remote subnet interface probably should use the ip directed-broadcast command.
With that in mind we can see these points:
- for WOL where client and server are in the same subnet there is no need for helper address. The server sends the broadcast, the client receives it and no need for other configuration.
- for WOL where client is remote from the server the interface where server is will need helper address. And interface where client is may need directed broadcast.
- for DHCP where client is in subnet remote from the server the interface where the client is will need helper address pointing to the server. (No need for extra configuration on interface where the server is)
- for DHCP where client and server are in the same subnet there is no need for helper address.
05-18-2020 08:34 AM
Hello Rick,
I have been looking around to see what it is ether-wake does (and did some tcp dumps). It looks like it is not using UDP, or anything IP, but it is a "raw EtherType 0x0842" packet. I can see it with tcpdump;
$ sudo tcpdump -vv -i em1 ether proto 0x0842
tcpdump: listening on em1, link-type EN10MB (Ethernet), capture size 262144 bytes
09:26:37.092365 ec:f4:bb:39:yy:yy (oui Unknown) > bc:30:5b:b0:xx:xx (oui Unknown), ethertype Unknown (0x0842), length 116: *** magic packet ***
So since it is a raw ethernet packet, not using a port, I assume that can not be forwarded to a different vlan?
thanks,
Ron
05-18-2020 10:20 AM
Hello Rick, Paul,
apparently ether-wake is the 'culprit', it seems to only want to send raw ethertype packets, it used to do both but the application is split into ether-wake (raw only) and wol, udp only.
In the application wol (RHEL/Centos) one can use a port number as an option and then it "just" works.
What I ended up doing was:
conf t
ip forward-protocol udp 9/discard
and had to set up int gi0/1.1 with: "ip helper-address 192.168.2.255" (the sender of the magic packet is in vlan1, on this interface. wol sends a magic packet like so: 255.255.255.255:9 which does wake up the machine in vlan2.
was a hassle to get it going, but thanks for all the help!!
Ron
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide