Reputation: 65
What does the ethernet header look like?
Is it:
1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|
..................................destination mac..................................
...................................|...................source mac..................
...................................................................................|
...............type................|
Or:
1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|
..................................destination mac..................................
...................................|...................source mac..................
...................................................................................|
...............type................|.......................data....................
......................................up to 1500...................................|
crc/fcs|
Or is it:
1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|
...Preamble..|................................destination mac......................
...........................................................|source mac.............
...................................................................................
.............|.type........................................|data....................
......................................up to 1500...................................|
crc/fcs|
I found many different opinions on this in the web.
Upvotes: 4
Views: 12591
Reputation: 2692
Neither of them. Following the specs the frame looks like:
The specs are here: http://standards.ieee.org/about/get/802/802.3.html
A more useful and easily accessible explanation is here: http://wiki.wireshark.org/Ethernet
The header is the frame before the data. The MAC header is point 2-4 (14 bytes). The MAC trailer is 4 bytes (last point). The ethernet frame thus consists of the preamble (8 bytes), the MAC header (14 bytes), data and the trailer (4 bytes).
Upvotes: 5