Standards/Ethernet
(Created page with "{{TOC right}} Ethernet is standardized as IEEE 802.3. It is used for connecting computers to each other via the Web, and it gets more and more used for connecting embedded sy...") |
(→Frame structure) |
||
Line 24: | Line 24: | ||
Frames are separated by an ''interframe gap'' of 12 bytes. | Frames are separated by an ''interframe gap'' of 12 bytes. | ||
− | The maximal frame length, from the MAC addresses to the FCS is of 1518 bytes. | + | The maximal frame length, from the [[Standards/Ethernet/MAC addresses|MAC addresses]] to the FCS is of 1518 bytes. |
== Example: ping request == | == Example: ping request == |
Revision as of 11:53, 5 June 2012
|
Ethernet is standardized as IEEE 802.3. It is used for connecting computers to each other via the Web, and it gets more and more used for connecting embedded systems to the Web.
The most known is Internet Protocol version 4 (IPv4), the fourth revision in the development of the Internet Protocol (IP). Internet Protocol Version 6 (IPv6) is designed to succeed Internet Protocol version 4 (IPv4). IPv6 uses a 128-bit address, whereas IPv4 only uses 32 bits.
Frame structure
An Ethernet frame structure is shown next:
Preamble | Start of frame delimiter | MAC destination | MAC source | Ethertype or length | Payload | Frame Check Sequence (FCS) |
---|---|---|---|---|---|---|
7 bytes of 1010 1010 | 1 byte of 1010 1011 | 6 bytes | 6 bytes | 2 bytes | 46–1500 bytes | 4 bytes |
The FCS is a 32 bit CRC.
Frames are separated by an interframe gap of 12 bytes.
The maximal frame length, from the MAC addresses to the FCS is of 1518 bytes.
Example: ping request
Frame data
The following data shows the Wireshark display of a ping request frame:
F0 4D A2 33 B7 EF 00 25 64 C2 6F 6A 08 00 45 00 00 3C 31 98 00 00 80 01 CA DA 99 6D 05 E0 99 6D 05 94 08 00 D5 5B 04 00 74 00 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 61 62 63 64 65 66 67 68 69
Wireshark does not display the preamble and the FCS. From the frame we read:
- the destination MAC address
F0 4D A2 33 B7 EF
- the source MAC address
00 25 64 C2 6F 6A
- the Ethertype (IP)
08 00
- the payload
45 00 00 3C 31 98 00 00 80 01 CA DA 99 6D 05 E0 99 6D 05 94 08 00 D5 5B 04 00 74 00 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 61 62 63 64 65 66 67 68 69
MII data sequence
A 100BaseT MII has a 4 bit data interface. The bytes are transferred in a sequence of 2 nibbles, with the least significant nibble first.
The MII data sequence for the preceeding ping request will start with the preamble:
55 55 55 55 55 55 55 5D
followed by the MAC addresses:
0F D4 2A 33 7B FE 00 52 46 2C F6 A6 ...
and so on for the rest of the frame which ends with the last data nibbles:
... 86 96
and finish with the FCS:
36 7A AE 28