powerwake is attempting to wake up an incorrect MAC addres

Adrian Torrie

When attempting to wake a remote machine (ubuntu server) from my laptop using powerwake host01.cluster I get a message back saying:

INFO: Trying to wake host: [host01.cluster]
INFO: Sending magic packet to: [xxxxxxxxxxxx]

Unfortunately, xxxxxxxxxxxx is an incorrect MAC address, and hence no remote waking up of the remote machine occurs.

When I try using the IP address (powerwake 192.168.1.101) it also sends the magic packet to the wrong MAC address.

I have the following line in /etc/hosts/

192.168.1.101   host01.cluster  host01

However, I can ssh into the machine using both ssh host01, and ssh host01.cluster. I'm assuming /etc/hosts, which I have set up for static addresses (on my laptop) is being used here for resolution.

When reading through man powerwake it provides a hierarchy of which caches it searches to resolve names:

  1. /var/cache/powerwake/ethers
  2. /etc/ethers
  3. or the arp table (arp -n)

On my laptop (uname -r -> 4.2.0-35-generic), bullet list item 1 is empty, 2 doesn't exist, and the incorrect MAC address doesn't even exist in the arp -n table either.

If I run sudo arp-scan -l on my laptop the incorrect MAC address doesn't show up there either.

Running sudo find /var/cache/ -type f -exec grep -il "host01" {} \; turns up no results either.

Where else could a MAC address be cached buy ubuntu/powerwake?

I would like to be able to purge the incorrect MAC address so that I can use powerwake to wake up this particular machine remotely.

sudo ethtool eth0 run on the remote shows that WOL is enabled.

Settings for eth0:
    Supported ports: [ TP ]
    Supported link modes:   10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
                            1000baseT/Full 
    Supported pause frame use: No
    Supports auto-negotiation: Yes
    Advertised link modes:  10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
                            1000baseT/Full 
    Advertised pause frame use: No
    Advertised auto-negotiation: Yes
    Speed: 1000Mb/s
    Duplex: Full
    Port: Twisted Pair
    PHYAD: 1
    Transceiver: internal
    Auto-negotiation: on
    MDI-X: off (auto)
    Supports Wake-on: pumbg
    Wake-on: g
    Current message level: 0x00000007 (7)
                   drv probe link
    Link detected: yes
Adrian Torrie

I went digging through /usr/bin/powerwake (just a python script) and I found a reference to "%s/.cache/ethers", so I looked in my home directory ,and sure enough, this file was present (cat ~/.cache/ethers) that wasn't part of man powerwake.

This file held the incorrect reference for the IP address -> MAC address mapping that was causing the issue.

Solution

Anyway, I deleted the file ~/.cache/ethers, then "warmed" this cache file again.

Warm the powerwake cache

First I checked my arp table, as I had since cleared it, to see what was in there. None of the remotes I wanted to contact were listed, so I performed a simple ping -c 2 192.168.1.XXX on each machine I wished to wake (the remote machines need to be on and able to be pinged). This loaded them into the arp table (confirmed by arp -n).

I then ran:

  • powerwake 192.168.1.XXX for each machine
  • powerwake hostXX for each machine again
  • This allowed the ~/.cache/ethers file to be loaded with each entry that matches my /etc/hosts file on my laptop
  • Run cat ~/.cache/ethers to confirm the file exists and has been populated with the correct IP Addr -> MAC mapping

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Wake up device programmatically

分類Dev

Location detection wake up application

分類Dev

iOS wake up/interrupt the device with Swift

分類Dev

powerwakeが誤ったMACアドレスをウェイクアップしようとしています

分類Dev

Programs minimized for long time takes long time to "wake up"

分類Dev

Wait_event_interruptibleとwake_up_interruptible

分類Dev

GeForce GTX 980 Ti reverts to single monitor on wake up

分類Dev

My Windows 10 Computer Seems to Wake up And Run Slower

分類Dev

Keyboard and Mouse not working after wake up; independent of OS

分類Dev

Attempting to use OOP Inner Objects, comming up with really werid error

分類Dev

Attempting headless boot - GRUB keeps coming up and preventing startup

分類Dev

Does a spurious wake up unblock all waiting threads, even the unrelated ones?

分類Dev

Wake up from suspend using wireless USB keyboard or mouse (for any Linux Distro)

分類Dev

Using Google Drive API Libraries and Play with Java freezes/locks up application when attempting to save credentials

分類Dev

Why does custom cursor image show up incorrect?

分類Dev

jQuery UI Drag and Drop: Target picks up incorrect droppable area

分類Dev

Android PATH set up in the Mac OS

分類Dev

Wake on LANAlternatives

分類Dev

try_to_wake_up() はどこでタスクを CPU 実行キューに追加しますか?

分類Dev

How to Speed Up Metal Code for iOS/Mac OS

分類Dev

Possible to designate which Mac / iDevice pops up PIN for software updates

分類Dev

Wake on Lan configure port

分類Dev

Wake On Lan not working

分類Dev

bad usage on attempting to mount

分類Dev

How to tell what wake source is when Wake Source: Unknown

分類Dev

BusyBoxでWake-on-LAN?

分類Dev

Wake on LAN Port Forwarding not Working

分類Dev

How do I set up a MAC to use Selenium with Watir Webdriver and Ruby

分類Dev

Automatically Launch safari with a certain url the first time the mac wakes/boots up in a day?

Related 関連記事

  1. 1

    Wake up device programmatically

  2. 2

    Location detection wake up application

  3. 3

    iOS wake up/interrupt the device with Swift

  4. 4

    powerwakeが誤ったMACアドレスをウェイクアップしようとしています

  5. 5

    Programs minimized for long time takes long time to "wake up"

  6. 6

    Wait_event_interruptibleとwake_up_interruptible

  7. 7

    GeForce GTX 980 Ti reverts to single monitor on wake up

  8. 8

    My Windows 10 Computer Seems to Wake up And Run Slower

  9. 9

    Keyboard and Mouse not working after wake up; independent of OS

  10. 10

    Attempting to use OOP Inner Objects, comming up with really werid error

  11. 11

    Attempting headless boot - GRUB keeps coming up and preventing startup

  12. 12

    Does a spurious wake up unblock all waiting threads, even the unrelated ones?

  13. 13

    Wake up from suspend using wireless USB keyboard or mouse (for any Linux Distro)

  14. 14

    Using Google Drive API Libraries and Play with Java freezes/locks up application when attempting to save credentials

  15. 15

    Why does custom cursor image show up incorrect?

  16. 16

    jQuery UI Drag and Drop: Target picks up incorrect droppable area

  17. 17

    Android PATH set up in the Mac OS

  18. 18

    Wake on LANAlternatives

  19. 19

    try_to_wake_up() はどこでタスクを CPU 実行キューに追加しますか?

  20. 20

    How to Speed Up Metal Code for iOS/Mac OS

  21. 21

    Possible to designate which Mac / iDevice pops up PIN for software updates

  22. 22

    Wake on Lan configure port

  23. 23

    Wake On Lan not working

  24. 24

    bad usage on attempting to mount

  25. 25

    How to tell what wake source is when Wake Source: Unknown

  26. 26

    BusyBoxでWake-on-LAN?

  27. 27

    Wake on LAN Port Forwarding not Working

  28. 28

    How do I set up a MAC to use Selenium with Watir Webdriver and Ruby

  29. 29

    Automatically Launch safari with a certain url the first time the mac wakes/boots up in a day?

ホットタグ

アーカイブ