Construct and send magic packet to take advantage of the Wake-on-LAN.

Preliminary notes

Inspect ethtool details.

$ apt info ethtool
Package: ethtool
Version: 1:5.16-1
Priority: optional
Section: utils
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian Kernel Team <debian-kernel@lists.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 645 kB
Depends: libc6 (>= 2.34), libmnl0 (>= 1.0.3-4~)
Homepage: https://www.kernel.org/pub/software/network/ethtool/
Task: cloud-image, server, ubuntu-server-raspi, ubuntukylin-desktop, ubuntu-mate-core, ubuntu-mate-desktop
Download-Size: 208 kB
APT-Sources: http://pl.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
Description: display or change Ethernet device settings
 ethtool can be used to query and change settings such as speed, auto-
 negotiation and checksum offload on many network devices, especially
 Ethernet devices.

Install ethtool to inspect Ethernet device settings.

$ sudo apt install ethtool
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  ethtool
0 upgraded, 1 newly installed, 0 to remove and 31 not upgraded.
Need to get 208 kB of archives.
After this operation, 645 kB of additional disk space will be used.
Get:1 http://pl.archive.ubuntu.com/ubuntu jammy/main amd64 ethtool amd64 1:5.16-1 [208 kB]
Fetched 208 kB in 0s (477 kB/s) 
Selecting previously unselected package ethtool.
(Reading database ... 264173 files and directories currently installed.)
Preparing to unpack .../ethtool_1%3a5.16-1_amd64.deb ...
Unpacking ethtool (1:5.16-1) ...
Setting up ethtool (1:5.16-1) ...
Processing triggers for man-db (2.10.2-1) ...

Inspect Ethernet device settings (Wake-on-LAN disabled).

$ sudo ethtool enp2s0
Settings for enp2s0:
	Supported ports: [ TP	 MII ]
	Supported link modes:   10baseT/Half 10baseT/Full
	                        100baseT/Half 100baseT/Full
	                        1000baseT/Full
	Supported pause frame use: Symmetric Receive-only
	Supports auto-negotiation: Yes
	Supported FEC modes: Not reported
	Advertised link modes:  10baseT/Half 10baseT/Full
	                        100baseT/Half 100baseT/Full
	                        1000baseT/Full
	Advertised pause frame use: Symmetric Receive-only
	Advertised auto-negotiation: Yes
	Advertised FEC modes: Not reported
	Link partner advertised link modes:  10baseT/Half 10baseT/Full
	                                     100baseT/Half 100baseT/Full
	                                     1000baseT/Full
	Link partner advertised pause frame use: Symmetric
	Link partner advertised auto-negotiation: Yes
	Link partner advertised FEC modes: Not reported
	Speed: 1000Mb/s
	Duplex: Full
	Auto-negotiation: on
	master-slave cfg: preferred slave
	master-slave status: slave
	Port: Twisted Pair
	PHYAD: 0
	Transceiver: external
	MDI-X: Unknown
	Supports Wake-on: pumbg
	Wake-on: d
	Link detected: yes

Inspect Ethernet device settings (Wake-on-LAN enabled, using magic packet as a trigger).

$ sudo ethtool enp2s0
Settings for enp2s0:
	Supported ports: [ TP	 MII ]
	Supported link modes:   10baseT/Half 10baseT/Full
	                        100baseT/Half 100baseT/Full
	                        1000baseT/Full
	Supported pause frame use: Symmetric Receive-only
	Supports auto-negotiation: Yes
	Supported FEC modes: Not reported
	Advertised link modes:  10baseT/Half 10baseT/Full
	                        100baseT/Half 100baseT/Full
	                        1000baseT/Full
	Advertised pause frame use: Symmetric Receive-only
	Advertised auto-negotiation: Yes
	Advertised FEC modes: Not reported
	Link partner advertised link modes:  10baseT/Half 10baseT/Full
	                                     100baseT/Half 100baseT/Full
	                                     1000baseT/Full
	Link partner advertised pause frame use: Symmetric
	Link partner advertised auto-negotiation: Yes
	Link partner advertised FEC modes: Not reported
	Speed: 1000Mb/s
	Duplex: Full
	Auto-negotiation: on
	master-slave cfg: preferred slave
	master-slave status: slave
	Port: Twisted Pair
	PHYAD: 0
	Transceiver: external
	MDI-X: Unknown
	Supports Wake-on: pumbg
	Wake-on: g
	Link detected: yes

Determine MAC address on an a target device.

$ ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    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: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether f8:b1:56:b2:fc:71 brd ff:ff:ff:ff:ff:ff
    altname enp0s25
    inet 172.16.150.201/21 metric 100 brd 172.16.151.255 scope global dynamic eno1
       valid_lft 85272sec preferred_lft 85272sec
    inet6 fe80::fab1:56ff:feb2:fc71/64 scope link 
       valid_lft forever preferred_lft forever

etherwake

Inspect package details.

$ apt info etherwake
Package: etherwake
Version: 1.09-4build1
Priority: optional
Section: universe/net
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Pierre Blanc <pierreblanc75@gmail.com>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 26.6 kB
Depends: libc6 (>= 2.14)
Recommends: wakeonlan
Download-Size: 8900 B
APT-Sources: http://pl.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
Description: tool to send magic Wake-on-LAN packets
 WOL (Wake-on-LAN) is a standard that allows you to turn on a computer
 over an Ethernet connection. Computers with WOL-enabled network
 interface cards can be woken from sleep mode, or powered up from
 standby via a BIOS feature.
 .
 One feature that separates etherwake from other implementations is that
 it also supports WOL passwords.

Install etherwake package.

$ sudo apt install etherwake
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  etherwake
0 upgraded, 1 newly installed, 0 to remove and 31 not upgraded.
Need to get 8900 B of archives.
After this operation, 26.6 kB of additional disk space will be used.
Get:1 http://pl.archive.ubuntu.com/ubuntu jammy/universe amd64 etherwake amd64 1.09-4build1 [8900 B]
Fetched 8900 B in 0s (21.4 kB/s)    
Selecting previously unselected package etherwake.
(Reading database ... 264166 files and directories currently installed.)
Preparing to unpack .../etherwake_1.09-4build1_amd64.deb ...
Unpacking etherwake (1.09-4build1) ...
Setting up etherwake (1.09-4build1) ...
Processing triggers for man-db (2.10.2-1) ...

Display help information.

$ sudo etherwake -u
usage: etherwake [-i <ifname>] [-p aa:bb:cc:dd[:ee:ff]] 00:11:22:33:44:55

	This program generates and transmits a Wake-On-LAN (WOL)
	"Magic Packet", used for restarting machines that have been
	soft-powered-down (ACPI D3-warm state).
	It currently generates the standard AMD Magic Packet format, with
	an optional password appended.

	The single required parameter is the Ethernet MAC (station) address
	of the machine to wake or a host ID with known NSS 'ethers' entry.
	The MAC address may be found with the 'arp' program while the target
	machine is awake.

	Options:
		-b	Send wake-up packet to the broadcast address.
		-D	Increase the debug level.
		-i ifname	Use interface IFNAME instead of the default 'eth0'.
		-p <pw>		Append the four or six byte password PW to the packet.
					A password is only required for a few adapter types.
					The password may be specified in ethernet hex format
					or dotted decimal (Internet address)
		-p 00:22:44:66:88:aa
		-p 192.168.1.1

Construct and send magic packet with f8:b1:56:b2:fc:71 MAC address using enp3s0 interface.

$ sudo etherwake -i enp3s0 f8:b1:56:b2:fc:71

wakeonlan

Inspect package details.

$ apt info wakeonlan
Package: wakeonlan
Version: 0.41-12.1
Priority: optional
Section: net
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Thijs Kinkhorst <thijs@debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 29.7 kB
Depends: perl
Homepage: https://github.com/jpoliv/wakeonlan
Download-Size: 9292 B
APT-Sources: http://pl.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
Description: Sends 'magic packets' to wake-on-LAN enabled ethernet adapters
 With this package you can remotely wake up and power on machines which have
 motherboards or network cards that support 'Wake-on-Lan' packets.
 .
 The tool allows you to wake up a single machine, or a group of machines.
 .
 You need the MAC addresses of machines to construct the WOL packets, but,
 in contrast to 'etherwake', you do not need root privileges to use the
 program itself as UDP packets are used.

Install wakeonlan utility.

$ sudo apt install wakeonlan
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  wakeonlan
0 upgraded, 1 newly installed, 0 to remove and 31 not upgraded.
Need to get 9292 B of archives.
After this operation, 29.7 kB of additional disk space will be used.
Get:1 http://pl.archive.ubuntu.com/ubuntu jammy/main amd64 wakeonlan all 0.41-12.1 [9292 B]
Fetched 9292 B in 0s (23.5 kB/s)    
Selecting previously unselected package wakeonlan.
(Reading database ... 264175 files and directories currently installed.)
Preparing to unpack .../wakeonlan_0.41-12.1_all.deb ...
Unpacking wakeonlan (0.41-12.1) ...
Setting up wakeonlan (0.41-12.1) ...
Processing triggers for man-db (2.10.2-1) ...

Display help information.

$ wakeonlan -h
Usage
    wakeonlan [-h] [-v] [-i IP_address] [-p port] [-f file] [[hardware_address] ...]

Options
    -h
        this information
    -v
        displays the script version
    -i ip_address
        set the destination IP address
        default: 255.255.255.255 (the limited broadcast address)
    -p port
        set the destination port
        default: 9 (the discard port)
    -f file 
        uses file as a source of hardware addresses

See also
    wakeonlan(1)    

Construct and send magic packet with f8:b1:56:b2:fc:71 MAC address.

$ wakeonlan f8:b1:56:b2:fc:71
Sending magic packet to 255.255.255.255:9 with f8:b1:56:b2:fc:71

Additional notes

Enable Wake-on-LAN and disable deep sleep inside BIOS on a Small Form Factor Dell machines to make it work. Although, sometimes it can be broken beyond imagination.