<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://cpudev.org/w/index.php?action=history&amp;feed=atom&amp;title=Ethernet</id>
	<title>Ethernet - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://cpudev.org/w/index.php?action=history&amp;feed=atom&amp;title=Ethernet"/>
	<link rel="alternate" type="text/html" href="https://cpudev.org/w/index.php?title=Ethernet&amp;action=history"/>
	<updated>2026-04-25T16:41:37Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.36.1</generator>
	<entry>
		<id>https://cpudev.org/w/index.php?title=Ethernet&amp;diff=27&amp;oldid=prev</id>
		<title>Immibis: /* Ethernet packet */</title>
		<link rel="alternate" type="text/html" href="https://cpudev.org/w/index.php?title=Ethernet&amp;diff=27&amp;oldid=prev"/>
		<updated>2025-03-21T19:15:05Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Ethernet packet&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:15, 21 March 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l19&quot;&gt;Line 19:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 19:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Immediately followed after the preamble is the SFD (Start Frame Delimiter).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Immediately followed after the preamble is the SFD (Start Frame Delimiter).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This byte has the value &amp;lt;code&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;01110101&lt;/del&gt;&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;0xd5&amp;lt;/code&amp;gt;) and indicates the start of the Ethernet Frame.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This byte has the value &amp;lt;code&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;11010101&lt;/ins&gt;&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;0xd5&amp;lt;/code&amp;gt;) and indicates the start of the Ethernet Frame.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;After the Ethernet Frame there is an IPG (InterPacket Gap) of 12 bytes during which no data is sent whatsoever.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;After the Ethernet Frame there is an IPG (InterPacket Gap) of 12 bytes during which no data is sent whatsoever.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Immibis</name></author>
	</entry>
	<entry>
		<id>https://cpudev.org/w/index.php?title=Ethernet&amp;diff=15&amp;oldid=prev</id>
		<title>Demindiro: Quick draft of Ethernet page</title>
		<link rel="alternate" type="text/html" href="https://cpudev.org/w/index.php?title=Ethernet&amp;diff=15&amp;oldid=prev"/>
		<updated>2023-02-17T20:39:26Z</updated>

		<summary type="html">&lt;p&gt;Quick draft of Ethernet page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Ethernet is a &amp;#039;&amp;#039;wired&amp;#039;&amp;#039; protocol for connecting many devices in a network such that they can transfer data between each other.&lt;br /&gt;
It defines both the physical layers (10BASE-T, 100BASE-TX ...) as well the data format of an Ethernet packet &amp;amp; frame.&lt;br /&gt;
&lt;br /&gt;
= Ethernet packet &amp;amp; frame =&lt;br /&gt;
&lt;br /&gt;
There are two major formats of ethernet &amp;#039;&amp;#039;packets&amp;#039;&amp;#039;:&lt;br /&gt;
the regular variant which supports MTUs (Maximum Transmission Unit) of up to 1500 bytes&lt;br /&gt;
and &amp;quot;jumbo frames&amp;quot;, which support MTUs of up to 9000 bytes.&lt;br /&gt;
The latter are only supported for gigabit links and higher.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note:&amp;#039;&amp;#039;&amp;#039; each byte is transmitted starting from its LSb to its MSb.&lt;br /&gt;
&lt;br /&gt;
== Ethernet packet ==&lt;br /&gt;
&lt;br /&gt;
Every Ethernet packet starts with a preamble.&lt;br /&gt;
This preamble is a repeated pattern of &amp;lt;code&amp;gt;01010101&amp;lt;/code&amp;gt; bits (hex: &amp;lt;code&amp;gt;0x55&amp;lt;/code&amp;gt;).&lt;br /&gt;
This pattern is used to synchronize the clock as well as signal to the receiver a frame is about to be transmitted.&lt;br /&gt;
The preamble consists of 7 bytes.&lt;br /&gt;
&lt;br /&gt;
Immediately followed after the preamble is the SFD (Start Frame Delimiter).&lt;br /&gt;
This byte has the value &amp;lt;code&amp;gt;01110101&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;0xd5&amp;lt;/code&amp;gt;) and indicates the start of the Ethernet Frame.&lt;br /&gt;
&lt;br /&gt;
After the Ethernet Frame there is an IPG (InterPacket Gap) of 12 bytes during which no data is sent whatsoever.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Ethernet packet&lt;br /&gt;
|-&lt;br /&gt;
! Preamble !! SFD !! Ethernet frame !! IPG&lt;br /&gt;
|-&lt;br /&gt;
| 0x55, 7 times || 0xd5 || ... || 12 bytes of nothing&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Ethernet frame ==&lt;br /&gt;
&lt;br /&gt;
An Ethernet frame is at least 64 bytes long.&lt;br /&gt;
&lt;br /&gt;
Each frame ends with a FCS (Frame Check Sequence) which is a CRC32 of all preceding frame data.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Ethernet frame&lt;br /&gt;
|-&lt;br /&gt;
! Destination MAC address !! Source MAC address !! EtherType !! Payload !! FCS&lt;br /&gt;
|-&lt;br /&gt;
| 6 bytes || 6 bytes || 2 bytes || At least 46 bytes || 4 bytes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;EtherType&amp;quot; &amp;lt;code&amp;gt;0x8100&amp;lt;/code&amp;gt; indicate a 802.1Q tag is present, in which case the format is as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Ethernet frame with 802.1Q tag&lt;br /&gt;
|-&lt;br /&gt;
! Destination MAC address !! Source MAC address !! 802.1Q tag !! EtherType !! Payload !! FCS&lt;br /&gt;
|-&lt;br /&gt;
| 6 bytes || 6 bytes || 4 bytes || 2 bytes || At least 42 bytes || 4 bytes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;real&amp;quot; EtherType is located right after the tag.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ 802.1Q tag&lt;br /&gt;
|-&lt;br /&gt;
! TPID !! TCI&lt;br /&gt;
|-&lt;br /&gt;
| 0x8100 || ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Interfaces =&lt;br /&gt;
&lt;br /&gt;
There are various types of interfaces to interact with Ethernet controllers.&lt;br /&gt;
&lt;br /&gt;
== Media Independent Interface (MII) ==&lt;br /&gt;
&lt;br /&gt;
The MII is the most common type of interface. Several variants exists for higher speeds or lower pin count.&lt;br /&gt;
&lt;br /&gt;
=== Standard ===&lt;br /&gt;
&lt;br /&gt;
The standard MII interfaces supports 10BASE-T and 100BASE-TX.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ MII pins&lt;br /&gt;
|-&lt;br /&gt;
! Pin(s) !! Description&lt;br /&gt;
|-&lt;br /&gt;
| TX_CLK || Transmission clock. Must be used when sending data.&lt;br /&gt;
|-&lt;br /&gt;
| TXD[0:3] || 4 bits of data to transmit if TX_EN is high.&lt;br /&gt;
|-&lt;br /&gt;
| TX_EN || When high, transmit data.&lt;br /&gt;
|-&lt;br /&gt;
| TX_ER || When high, force a transmission error.&lt;br /&gt;
|-&lt;br /&gt;
| RX_CLK || Receive clock. Must be used when receiving data.&lt;br /&gt;
|-&lt;br /&gt;
| RXD[0:3] || 4 bits of received data when RX_DV is high.&lt;br /&gt;
|-&lt;br /&gt;
| RX_DV || Whether data is currently being received.&lt;br /&gt;
|-&lt;br /&gt;
| RX_ER || Whether an error occured during reception.&lt;br /&gt;
|-&lt;br /&gt;
| CRS || Carrier sense. TODO&lt;br /&gt;
|-&lt;br /&gt;
| COL || Collision detect. TODO&lt;br /&gt;
|-&lt;br /&gt;
| MDIO&lt;br /&gt;
|-&lt;br /&gt;
| MDC&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
When receiving or sending data, the &amp;#039;&amp;#039;&amp;#039;high&amp;#039;&amp;#039;&amp;#039; nibble (4 bits) is sent first, then the low nibble.&lt;br /&gt;
&lt;br /&gt;
It is possible some bytes of the preamble may be missing on reception. This may happen if the controller detects the signal late.&lt;/div&gt;</summary>
		<author><name>Demindiro</name></author>
	</entry>
</feed>