What does the ethernet header look like?
What does the ethernet header look like?
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 that:
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 on the internet.
+3
source to share
1 answer
None of them. Following the specs, the frame looks like this:
- Preamble: 8 bytes
- Mac destination: 6 bytes
- Mac source: 6 bytes
- Type / length: 2 bytes
- Data: 46-1500 bytes.
- Frame check: 4 bytes
The specifications are here: http://standards.ieee.org/about/get/802/802.3.html
More helpful and readily available explanation 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 is thus composed of a preamble (8 bytes), a MAC header (14 bytes), data, and a trailer (4 bytes).
+4
source to share