Ethernet Protocol Data Units (Packets)
Ethernet Protocol Data Units (Packets)
Introduction
User data payloads sent using Ethernet are encapsulated in an Ethernet Protocol Data Unit
(PDU). This document explains the structure of the Ethernet Protocol Data Unit so that you
can write your own software for sending payloads of user data over the Ethernet logical
topology. At the end of the document we will examine an Ethernet PDU that can be used to
wake up a machine on a LAN accoding to the Wake On Lan standard. The Ethernet Protocol
Data Unit is also known as an Ethernet Packet or Ethernet Data Unit. For the remainder of
this document we will use the term Ethernet Packet.
Ethernet packets are transmitted as a bit-serial sequence of fields in order from left to right.
Each field consists of one or more octets (bytes). Each octet received is processed starting
from its least significant bit. In other words, the Ethernet packet is transmitted in a bit-serial
fashion from its most to least significant octet and that each octet is processed by the receiver
starting with the least significant bit. The simplest way to restate this is that an Ethernet
packet is sent from left to right and processed byte by byte from right to left by the receiver.
An Ethernet packet has three main fields:
Header Frame Footer
Magic Packets
In October 1996, Intel and IBM formed the Advanced Manageability Alliance (AMA). In April
1997, this alliance introduced the Wake-on-LAN technology. Wake-on-LAN ("WOL") is
implemented using a specially designed frame called a magic packet, which is sent to all
computers in a network, among them the computer to be awakened. The magic packet
contains the MAC address of the destination computer, an identifying number built into each
network interface card ("NIC") or other ethernet device in a computer, that enables it to be
uniquely recognized and addressed on a network. Powered-down or turned off computers
capable of Wake-on-LAN will contain network devices able to "listen" to incoming packets in
low-power mode while the system is powered down. If a magic packet is received that is
directed to the device's MAC address, the NIC signals the computer's power supply or
motherboard to initiate system wake-up, in the same way that pressing the power button
would do. The magic packet is a frame that is most often sent as a broadcast and that
contains anywhere within its payload 6 bytes of all 255 (FF FF FF FF FF FF in hexadecimal),
followed by sixteen repetitions of the target computer's 48-bit MAC address, for a total of 102
bytes. Since the magic packet is only scanned for the string above, and not actually parsed
by a full protocol stack, it could be sent as payload of any network- and transport-layer
protocol, although it is typically sent as a UDP datagram to port 0 (reserved port number), 7
(Echo Protocol) or 9 (Discard Protocol),[7] or directly over Ethernet as EtherType 0x0842. A
connection-oriented transport-layer protocol like TCP is less suited for this task as it requires
establishing an active connection before sending user data.
FF FF FF FF FF FF A8 61 0A AE 67 32 08 42 FF FF FF FF FF FF 00 30 48 97 D3 FE 00 30
48 97 D3 FE 00 30 48 97 D3 FE 00 30 48 97 D3 FE 00 30 48 97 D3 FE 00 30 48 97 D3 FE
00 30 48 97 D3 FE 00 30 48 97 D3 FE 00 30 48 97 D3 FE 00 30 48 97 D3 FE 00 30 48 97 D3
FE 00 30 48 97 D3 FE 00 30 48 97 D3 FE 00 30 48 97 D3 FE 00 30 48 97 D3 FE 00 30 48 97
D3 FE 69 4A 00 E5
Layer 1, the physical layer takes care of the preamble the start frame delimiter (Ethernet PDU
header) and the inter packet gap (Ethernet PDU footer).