mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Linux (https://www.mersenneforum.org/forumdisplay.php?f=39)
-   -   WakeOnLan (There must be someone who knows the answer to this.) (https://www.mersenneforum.org/showthread.php?t=21342)

wildrabbitt 2016-05-28 14:10

WakeOnLan (There must be someone who knows the answer to this.)
 
Hi,

I've used this page : [URL]https://help.ubuntu.com/community/WakeOnLan[/URL]

and I've got as far as the part where I'm told to edit the interfaces file

[QUOTE]
shahar@shahar-backup:~$ cat /etc/network/interfaces # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 10.0.0.1 netmask 255.255.255.0 gateway 10.0.0.138 up ethtool -s eth0 wol g

[/QUOTE]


What I need to know is whether or not I'm meant to enter the numbers written in for address, netmask and gateway as they are above or use ones specific to my computer.

Please help.

Mark Rose 2016-05-28 16:02

They will be specific to your network. If you type in this command we can help you create the entry in /etc/network/interfaces:

ip route show
ip address show

xilman 2016-05-28 16:35

have
have you
have you heard
have you heard the
have you heard the one
have you heard the one about
have you heard the one about traceroute

wildrabbitt 2016-05-28 18:46

done it
 
illiam@william-desktop:~$ ip route show
william@william-desktop:~$ ip address show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 00:e0:4c:e9:96:a7 brd ff:ff:ff:ff:ff:ff
william@william-desktop:~$ ^C
william@william-desktop:~$ ^C
william@william-desktop:~$




When I booted up this time, the ubuntu screen said

"Booting without full network configuration."

Not sure what the consequences of that are in terms of how far I'm going to get with using wakeonlan.

Mark Rose 2016-05-28 19:30

[QUOTE=xilman;435016]have
have you
have you heard
have you heard the
have you heard the one
have you heard the one about
have you heard the one about traceroute[/QUOTE]

That won't show the netmask.

Mark Rose 2016-05-28 19:31

[QUOTE=wildrabbitt;435025]illiam@william-desktop:~$ ip route show
william@william-desktop:~$ ip address show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 00:e0:4c:e9:96:a7 brd ff:ff:ff:ff:ff:ff
william@william-desktop:~$ ^C
william@william-desktop:~$ ^C
william@william-desktop:~$




When I booted up this time, the ubuntu screen said

"Booting without full network configuration."

Not sure what the consequences of that are in terms of how far I'm going to get with using wakeonlan.[/QUOTE]

You need to get networking working first.

wildrabbitt 2016-05-28 19:51

Thanks.

Might it not be working because I DID add that snippet to the interfaces file?

chalsall 2016-05-28 20:02

[QUOTE=wildrabbitt;435028]Might it not be working because I DID add that snippet to the interfaces file?[/QUOTE]

Possibly. Try removing the created interfaces file, and reboot. Do you have network connectivity? Then run "ethtool eth0 | grep Wake" as root. If you see something like:[code] Supports Wake-on: g
Wake-on: g[/code]
...then you shouldn't need the interfaces file.

I use WoL all the time, but under CentOS. Works great!

Edit: From the machine you are trying to wake up the remote machine from, you can issue the "arp -n" command (root or unprivileged) to get the MAC address of the remote machine. If you don't see it, ping it and the run the arp command again. Note, of course, that both machines must be on the same LAN (or, at least, can communicate via ICMP).

wildrabbitt 2016-05-28 22:19

Okay. I took those lines out of interfaces and rebooted and there were no messages about network configuration issues.

I reran those commands and got this :




illiam@william-desktop:~$
william@william-desktop:~$ ip route show
default via 192.168.1.254 dev eth0 proto static
169.254.0.0/16 dev eth0 scope link metric 1000
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.70 metric 1
william@william-desktop:~$ ip address show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
link/ether 00:e0:4c:e9:96:a7 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.70/24 brd 192.168.1.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::2e0:4cff:fee9:96a7/64 scope link
valid_lft forever preferred_lft forever
william@william-desktop:~$


So can you help me create the entry now?

chalsall 2016-05-28 22:34

[QUOTE=wildrabbitt;435031]So can you help me create the entry now?[/QUOTE]

What does "ethtool eth0 | grep Wake" as root say?

There's a good chance you don't need to create an interfaces file. The above will tell you this.

Separately, from the machine you wish to wake up this machine, do you see this remote machine's MAC?

wildrabbitt 2016-05-29 06:09

This is what I get when I run arp -n :


william@william-GA-78LMT-USB3:~$ arp -n
Address HWtype HWaddress Flags Mask Iface
192.168.1.254 ether c4:ea:1d:b0:a9:58 C enp3s0
192.168.1.67 ether 74:d4:35:5e:a6:18 C enp3s0
william@william-GA-78LMT-USB3:~$

chalsall 2016-05-29 13:35

[QUOTE=wildrabbitt;435049]This is what I get when I run arp -n :[/QUOTE]

What does "ethtool eth0 | grep Wake" as root say on the box you want to remotely wake up?

wildrabbitt 2016-05-29 13:58

Supports Wake-on: pumbg

Wake-on: g

chalsall 2016-05-29 14:21

[QUOTE=wildrabbitt;435064]Supports Wake-on: pumbg
Wake-on: g[/QUOTE]

OK, then you should be good to go. Just to be clear, I'm assuming you wish to wake up william-desktop (IP: 192.168.1.70; MAC:00:e0:4c:e9:96:a7) from william-GA-78LMT-USB3?

Your "arp -n" from the latter didn't show william-desktop. Are you sure they are on the same LAN? If you "ping -c 1 192.168.1.70" and then "arp -n" does it show up?

If so, try powering down william-desktop, and then run "ether-wake 00:e0:4c:e9:96:a7" as root from william-GA-78LMT-USB3. If everything's good, william-desktop should power up.

wildrabbitt 2016-05-29 15:52

good news
 
It wasn't on the same LAN but is now. Great news :


william@william-GA-78LMT-USB3:~$ ping -c 1 192.168.1.70
PING 192.168.1.70 (192.168.1.70) 56(84) bytes of data.
64 bytes from 192.168.1.70: icmp_seq=1 ttl=64 time=0.337 ms

--- 192.168.1.70 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.337/0.337/0.337/0.000 ms
william@william-GA-78LMT-USB3:~$ arp -n
Address HWtype HWaddress Flags Mask Iface
192.168.1.254 ether c4:ea:1d:b0:a9:58 C enp3s0
192.168.1.70 ether 00:e0:4c:e9:96:a7 C enp3s0
william@william-GA-78LMT-USB3:~$


So what next?

chalsall 2016-05-29 16:10

Already given.

[QUOTE=chalsall;435067]If so, try powering down william-desktop, and then run "ether-wake 00:e0:4c:e9:96:a7" as root from william-GA-78LMT-USB3. If everything's good, william-desktop should power up.[/QUOTE]

Note that this is based on CentOS / RedHat / Fedora. The command "ether-wake" may be different under Ubuntu.

wildrabbitt 2016-05-30 06:08

william@william-GA-78LMT-USB3:~$ sudo etherwake 00:e0:4c:e9:96:a7
SIOCGIFHWADDR on eth0 failed: No such device


I ran sudo poweroff on the machine I wanted to wake.

Is Wakeonlan intended to switch PC's on from a position like that?

chalsall 2016-05-30 16:02

[QUOTE=wildrabbitt;435121]william@william-GA-78LMT-USB3:~$ sudo etherwake 00:e0:4c:e9:96:a7
SIOCGIFHWADDR on eth0 failed: No such device[/QUOTE]

Hmmm... Weird.

When I ran the command from one of my CentOS boxens I got this:[CODE][root@samba2 ~]# ether-wake -v -D 00:e0:4c:e9:96:a7
ether-wake.c: v1.09 11/12/2003 Donald Becker, http://www.scyld.com/
The target station address is 0:e0:4c:e9:96:a7.
Packet is 00 e0 4c e9 96 a7 00 e0 4c e9 96 a7 08 42 ff ff ff ff ff ff 00 e0 4c e9 96 a7 00 e0 4c e9 96 a7 00 e0 4c e9 96 a7 00 e0 4c e9 96 a7 00 e0 4c e9 96 a7 00 e0 4c e9 96 a7 00 e0 4c e9 96 a7 00 e0 4c e9 96 a7 00 e0 4c e9 96 a7 00 e0 4c e9 96 a7 00 e0 4c e9 96 a7 00 e0 4c e9 96 a7 00 e0 4c e9 96 a7 00 e0 4c e9 96 a7 00 e0 4c e9 96 a7 00 e0 4c e9 96 a7.
The hardware address (SIOCGIFHWADDR) of enp11s0 is type 1 00:1a:ffffffa0:ffffffb0:ffffffda:29.
Sendto worked ! 116.
The hardware address (SIOCGIFHWADDR) of lo is type 772 00:00:00:00:00:00.
Sendto worked ! 116.[/CODE]

Perhaps try increasing the debugging / verbosity for the command, and report the results. Note that you are running a different derivative of Linux, so your etherwake may be completely different software than my ether-wake.

Having done a bit of Googling, is seems like Ubuntu also has a "powerwake" command. You might want to try installing and running that.

[QUOTE=wildrabbitt;435121]I ran sudo poweroff on the machine I wanted to wake. Is Wakeonlan intended to switch PC's on from a position like that?[/QUOTE]

Yes. I often use this to bring machines back online after power failures and/or user shutdowns.

wildrabbitt 2016-05-30 20:01

Can you tell me what this means ? :


<code>
william@william-GA-78LMT-USB3:~$ sudo etherwake 00:e0:4c:e9:96:a7
SIOCGIFHWADDR on eth0 failed: No such device
</code>

This was ran from the waker while it the only machine plugged into the modem.

I'm asking because I'm wondering if we identified correctly the machine to wake.

chalsall 2016-05-30 20:20

[QUOTE=wildrabbitt;435162]I'm asking because I'm wondering if we identified correctly the machine to wake.[/QUOTE]

Please take this as supportive... You seem to go out of your way to not follow suggestions. To be spoon-fed what to do next.

What happens when you run etherwake with deeper verbosity and/or debugging?

Have you tried using alternative programs from the waking machine? Have you tried thinking for yourself?

I try to be tolerant, but this is getting a bit ridiculous.

chalsall 2016-05-30 21:23

[QUOTE=wildrabbitt;435162]This was ran from the waker while it the only machine plugged into the modem.[/QUOTE]

Why on gods green earth would you think this would work?

How is william-desktop supposed to receive the broadcast message if it isn't plugged into the switch (on the modem)? Magic???

wildrabbitt 2016-05-30 21:37

[QUOTE]
Why on gods green earth would you think this would work?
[/QUOTE]

I know this wouldn't work with regards to switching on the machine we were

trying to wake.

I was trying to understand what arp -n

actually does and I wanted to try it (on the waker) with no other machines except the waker plugged in to the modem.

chalsall 2016-05-30 21:47

[QUOTE=wildrabbitt;435168]...actually does and I wanted to try it (on the waker) with no other machines except the waker plugged in to the modem.[/QUOTE]

OK. I'm done. Best of luck.

wildrabbitt 2016-05-30 21:48

Sorry, I only read your last post when I replied.





After i said this :

[QUOTE]william@william-GA-78LMT-USB3:~$ sudo etherwake 00:e0:4c:e9:96:a7
SIOCGIFHWADDR on eth0 failed: No such device


I ran sudo poweroff on the machine I wanted to wake.

Is Wakeonlan intended to switch PC's on from a position like that? [/QUOTE]


there was a 10hr gap until your next post.

I've tried to get Wakeonlan to work numerous times, failed and when I ask for help on mersenneforums, everyone gives up on me.

By the time i read your reply, the router the machine to wake was plugged into was in my kitchen half-stuck with drying glue to a piece of perspex which I intend to drill holes in so I can screw to my desk (in an attempt to be organised).

Consequently the situation had changed.

[QUOTE]Please take this as supportive... You seem to go out of your way to not follow suggestions. To be spoon-fed what to do next.[/QUOTE]

I got to figure out why I do that.

wildrabbitt 2016-05-30 21:53

Sorry I'm mad.

Thanks for trying.

chalsall 2016-05-30 22:10

[QUOTE=wildrabbitt;435173]Sorry I'm mad.

Thanks for trying.[/QUOTE]

No problem. I should learn not to take people's questions seriously. Most are simply trolling....

pooterGuy 2020-05-09 19:09

Ethernet interface name?
 
Sorry if I'm raising a dead thread here, but this was one of the first results to come up for me when googling this same issue. I made an account to offer what worked for me in case someone out there had the same issue:

My ethernet interface on my source device that was serving up the WOL packet was not named "eth0"; [U]this is the default interface name that etherwake uses however[/U]. Using ifconfig to get my ethernet interface's correct name, and looking at switches for etherwake on it's man page, my command to wake my device ended up looking like this:

etherwake -i [correct interface name] -D [destination mac address]

Hope that helps someone out there. Sorry if I broke any rules I'm new here.


All times are UTC. The time now is 08:20.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.