Results 1 to 5 of 5

Thread: can't get wake-on-lan to work with netplan config file

  1. #1
    Join Date
    Jun 2006
    Location
    Bellevue, WA, USA
    Beans
    20

    can't get wake-on-lan to work with netplan config file

    Hello,

    installed Ubuntu Server 18.04. Trying to set up my network card for WOL. I changed the 50-cloud-init.yaml file in /etc/netplan to include the wakeonlan: true line but after rebooting still not getting the "g" option in the Wake-on attribute when I do sudo ethtool on the adapter (the Supports Wake-on line indicated that "g" is supported).

    also tried sudo netplan apply after changing the file with no change

    I've had WOL working in an older release of Ubuntu Server when the method involved adding the up ethtool -s eth0 wol g command to /etc/network/interfaces

    stumped as what to try next.

    Any help gratefully accepted
    -Paul

  2. #2
    Join Date
    Jun 2006
    Location
    Bellevue, WA, USA
    Beans
    20

    Re: can't get wake-on-lan to work with netplan config file

    I tried creating a new config.yaml file in /etc/netplan with the following content, but still refuses to give the adapter the wol "g" attribute.

    Code:
    network:
        version 2:
        renderer: networkd
        ethernets:
           enp2s0:
              dhcp4: true
              wakeonlan: true
    Am hoping someone with expertise in netplan could update the wakeonlan help page to show how to do this under netplan instead of ifupdown.

    Thanks!

  3. #3
    Join Date
    Mar 2006
    Location
    Williams Lake
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: can't get wake-on-lan to work with netplan config file

    It looks like your spacing may be off. yaml files are space sensitive. Try:

    Code:
    network:
      version 2:
      renderer: networkd
      ethernets:
        enp2s0:
          dhcp4: true
          wakeonlan: true
    I use Sublime Text to edit .yaml files
    Last edited by cariboo; June 15th, 2018 at 09:40 PM.

  4. #4
    Join Date
    Jun 2006
    Location
    Bellevue, WA, USA
    Beans
    20

    Re: can't get wake-on-lan to work with netplan config file

    thanks for the suggestion. I deleted and recreated the config file as 01-netcfg.yaml and just using the up and down keys made sure that the file exactly matched your suggestion.

    Unfortunately still no luck in getting the WOL attribute set in the adapter. Not sure what to look at next. Is there a log that would show if netplan parsed the file correctly?

    Thanks!

  5. #5
    Join Date
    Jun 2006
    Location
    Bellevue, WA, USA
    Beans
    20

    Re: can't get wake-on-lan to work with netplan config file

    FYI, I got it working by adding the macaddress match lines, here is the full .yaml file:

    Code:
    network:
      version: 2
      renderer: networkd
      ethernets:
        enp2s0:
          match:
            macaddress: 50:e5:49:b3:fc:97
          dhcp4: true
          wakeonlan: true

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •