#297557 - 24/04/2007 21:06
Wake on Lan - debian/ubuntu
|
addict
Registered: 02/04/2002
Posts: 691
|
Lately it seems like we've gotten alot of debian/ubuntu issues answered, so I figured I'd post mine I've got a ubuntu router (old ppc G4) which runs shorewall. My old router was a huge power sucking dell 2650. I've got svn and a few other bits of useful data on the PowerEdge. So, I figured why not use the WOL this server supports, and create scripts to turn it on in the middle of the night for the pcs in my house to run backups. However, after getting everything setup (I think?), it doesn't answer to any "magic packets" I've installed ethtools on the 2650, running "ethtool eth0" gives me... Code:
Supports Wake-on: g Wake-on: Link detected: yes
Followed with "ethtool -s eth0 wol g", which gives me... Code:
Supports Wake-on: g Wake-on: g Link detected: yes
After this, I'll shutdown the server with either shutdown -h now or halt. Then I'll send a magic packet from each program (etherwake, wakeonlan, a few windows command line apps), walk down 3 floors, and look at a powered down server. Hit the button, go back up stairs look at a bunch of files and try again. Oh yea, I found I needed to edit the "/etc/init.d/halt" script and enable the nic to remain active after shutdown, but it didn't change the symptoms.
_________________________
Oliver
mk1 30gb: 129 | mk2a 30gb: 040104126
|
Top
|
|
|
|
#297558 - 24/04/2007 21:13
Re: Wake on Lan - debian/ubuntu
[Re: oliver]
|
addict
Registered: 02/04/2002
Posts: 691
|
I've checked the bios and I can't find any settings for wake on lan unless I'm blind.
The server does have a dell remote management card, but I don't have any extra ports on my switch.
_________________________
Oliver
mk1 30gb: 129 | mk2a 30gb: 040104126
|
Top
|
|
|
|
#297559 - 25/04/2007 07:13
Re: Wake on Lan - debian/ubuntu
[Re: oliver]
|
addict
Registered: 11/01/2002
Posts: 612
Loc: Reading, UK
|
Works on my poweredges - it is in the power part of the BIOS settings on those.
Is this a plugin network card or onboard? (IIRC some cards have a WOL header that needs connecting to a WOL header on the motherboard...)
Another thing: IIRC, WOL packets are broadcast - can you start the server, run ethereal and send the WOL packet to make sure it actually gets there - I have seen switches that don't pass certain broadcast packets (well, these were DHCP) unless specifically configured.
Also, what user are you sending the packet as? Sometimes you need to be root. (Though I think wakeonlan is a perl script that does UDP and works as any user...)
_________________________
LittleBlueThing
Running twin 30's
|
Top
|
|
|
|
#297560 - 25/04/2007 14:30
Re: Wake on Lan - debian/ubuntu
[Re: LittleBlueThing]
|
addict
Registered: 02/04/2002
Posts: 691
|
Quote: Works on my poweredges - it is in the power part of the BIOS settings on those.
I'm pretty sure I don't have a power section in my bios, I looked through every option lastnight and I only found under integrated devices, settings for both nics, they were set to Without PXE so I figured I'd see what PXE was.
This enabled the intel pre executable environment, which gives me CTRL+S at bootup for more lan settings. In this menu their is a Enable WOL (was set to NO, changed to yes)
Quote: Is this a plugin network card or onboard? (IIRC some cards have a WOL header that needs connecting to a WOL header on the motherboard...)
They're Onboard. I searched the mainboard lastnight for any jumpers, or anything labeled WOL and couldn't find anything.
Quote: Another thing: IIRC, WOL packets are broadcast - can you start the server, run ethereal and send the WOL packet to make sure it actually gets there - I have seen switches that don't pass certain broadcast packets (well, these were DHCP) unless specifically configured.
I found I had the nosmurfs options set in shorewall on my intranet adapter, which I disabled. The 2 switches I have right now are a Linksys WRT54G v5 (with all services disabled, dhcp, router, nothing plugged into the WAN port), then for the upstairs I have a 8 port Netgear 10/100 FastEthernet switch. I'm guessing the crappy linksys is causing the problems, either that or dhcpd or shorewall.
Quote: Also, what user are you sending the packet as? Sometimes you need to be root. (Though I think wakeonlan is a perl script that does UDP and works as any user...)
I've tried every combination I can think of, regular user, sudo, sudo bash, su. While running each of the wol programs I have installed (etherwake, wakeonlan). I've tried port 7 instead of 9, I've tried setting up an /etc/ethers file with the ip>mac address.
On my Vista box, I haven't tried running it from an admin command prompt.
Still no wake on lan from either my router, or my workstation.
_________________________
Oliver
mk1 30gb: 129 | mk2a 30gb: 040104126
|
Top
|
|
|
|
#297561 - 25/04/2007 14:40
Re: Wake on Lan - debian/ubuntu
[Re: oliver]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14491
Loc: Canada
|
Quote:
Quote: Another thing: IIRC, WOL packets are broadcast - can you start the server, run ethereal and send the WOL packet to make sure it actually gets there - I have seen switches that don't pass certain broadcast packets (well, these were DHCP) unless specifically configured.
I found I had the nosmurfs options set in shorewall on my intranet adapter, which I disabled. The 2 switches I have right now are a Linksys WRT54G v5 (with all services disabled, dhcp, router, nothing plugged into the WAN port), then for the upstairs I have a 8 port Netgear 10/100 FastEthernet switch. I'm guessing the crappy linksys is causing the problems, either that or dhcpd or shorewall.
You still need to try the test suggested above -- run wireshark/ethereal on the server, and send it the WOL packets from elsewhere, and see if they actually arrive or not. With the server running. If *that* doesn't work, then yes, you have routing issues.
If the WOL packets *do* arrive (wireshark/ethereal), then there's a problem with the server. Most of the gear here has little status LEDs on the ethernet jacks, which remain lit even after the machine is shut down. Seeing those LEDs remaining lit is a very good indication that WOL is possible; seeing them turn off when the machine is off is an indication that WOL is not going to work with the current settings.
Cheers
Edited by mlord (25/04/2007 14:41)
|
Top
|
|
|
|
#297562 - 25/04/2007 21:12
Re: Wake on Lan - debian/ubuntu
[Re: mlord]
|
addict
Registered: 02/04/2002
Posts: 691
|
Quote: WOL packets are broadcast - can you start the server, run ethereal
Are there any good command line sniffers? Currently I'm using ettercap, not sure if that's the best one to be using.
Note: All my linux boxes are console only, no gui.
_________________________
Oliver
mk1 30gb: 129 | mk2a 30gb: 040104126
|
Top
|
|
|
|
#297563 - 25/04/2007 21:53
Re: Wake on Lan - debian/ubuntu
[Re: oliver]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14491
Loc: Canada
|
Quote:
Quote: WOL packets are broadcast - can you start the server, run ethereal
Are there any good command line sniffers? Currently I'm using ettercap, not sure if that's the best one to be using.
Plain old tcpdump may work -- I haven't tried it with WOL before.
|
Top
|
|
|
|
#297564 - 25/04/2007 23:57
Re: Wake on Lan - debian/ubuntu
[Re: mlord]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
Unfortunately, WOL packets can be contained in almost any transport layer, so you can't really narrow the capture down very well. Hmm, in fact, I wonder if the packet that you're computer is expecting is different than the one being sent. Another possibility is that your switch is being too smart and not delivering the packet properly to a shut-down port. Of course, it shouldn't be shut down.
_________________________
Bitt Faulk
|
Top
|
|
|
|
#297565 - 26/04/2007 01:48
Re: Wake on Lan - debian/ubuntu
[Re: oliver]
|
carpal tunnel
Registered: 17/12/2000
Posts: 2665
Loc: Manteca, California
|
What about eliminating as much of the intervening hardware as possible? Just to narrow the problem a bit.
_________________________
Glenn
|
Top
|
|
|
|
#297566 - 26/04/2007 05:19
Re: Wake on Lan - debian/ubuntu
[Re: wfaulk]
|
carpal tunnel
Registered: 18/01/2000
Posts: 5683
Loc: London, UK
|
Quote: Unfortunately, WOL packets can be contained in almost any transport layer, so you can't really narrow the capture down very well.
Can be, but they're usually just plain-old UDP packets, because that's the easiest way to put them together from userspace.
As for captures, I'm with Mark on this one: use tcpdump. You can then look at it in Ethereal, if you need a GUI (also available on Windows, if that's the only GUI you have available).
_________________________
-- roger
|
Top
|
|
|
|
#297567 - 26/04/2007 06:59
Re: Wake on Lan - debian/ubuntu
[Re: Roger]
|
addict
Registered: 11/01/2002
Posts: 612
Loc: Reading, UK
|
_________________________
LittleBlueThing
Running twin 30's
|
Top
|
|
|
|
#297568 - 26/04/2007 13:17
Re: Wake on Lan - debian/ubuntu
[Re: Roger]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
Quote: Can be, but they're usually just plain-old UDP packets
True, and those UDP packets are usually dst port 0, but not always, and, even so, is narrowing it down to only UDP really that useful? (Actually, thinking about it, it probably is. No one uses UDP any more.)
_________________________
Bitt Faulk
|
Top
|
|
|
|
#297569 - 28/04/2007 15:14
Re: Wake on Lan - debian/ubuntu
[Re: wfaulk]
|
addict
Registered: 02/04/2002
Posts: 691
|
I tried TCP dump, but I'm pretty sure the problem is in the server. The nic does not stay powered on after poweroff.
I've gone through every bios settings, and I can't find any other settings besides PXE. When I go into the PXE bios, there is a Wake on Lan setting which is disabled. Each time I enable it, and save changes, powerdown, and go back into the bios it's disabled again.
It's a 2650, if that helps. I haven't been able to find anything in the 500 or so google searches I've tried.
tcpdump recieves the packet when the server is running (i think?)
23:38:11.955265 IP 10.42.0.22.51184 > 255.255.255.255.65535: UDP, length 116 23:38:12.547487 IP 10.42.0.22.51185 > 255.255.255.255.65535: UDP, length 116 23:38:13.021956 IP 10.42.0.62.51186 > 255.255.255.255.65535: UDP, length 116
_________________________
Oliver
mk1 30gb: 129 | mk2a 30gb: 040104126
|
Top
|
|
|
|
#297570 - 28/04/2007 16:15
Re: Wake on Lan - debian/ubuntu
[Re: oliver]
|
addict
Registered: 11/01/2002
Posts: 612
Loc: Reading, UK
|
Quote: When I go into the PXE bios, there is a Wake on Lan setting which is disabled. Each time I enable it, and save changes, powerdown, and go back into the bios it's disabled again.
Go into the PXE BIOS, enable it, boot, run: ethtool -s eth0 wol g then poweroff and try it (and look for the link light).
I think the BIOS may 'allow' it rather than enable it. You may have to run the ethtool command every boot. I think I read something about that whilst googling my WOL setup. One of my diskless machines needs this in rc.local
David
_________________________
LittleBlueThing
Running twin 30's
|
Top
|
|
|
|
|
|