Network Byte Order – Explanation and Importance

ethernetipv4

According to big endian byte ordering or network byte order the bits are transmitted in this order: bits 0-7 first, then bits 8-15, then 16-23 and bits 24-31 last.
Does this means that bits from version, identification, TTL etc go first and then bits from next fields?

enter image description here

Best Answer

There is a confusion here. The network byte order does not specify how bits are transmitted over the network. It specifies how values are stored in multi byte fields.

Example:

The Total Length field is composed of two bytes. It specifies in bytes the size of the packet.

Lets say we have the value 500 for that field. Using the Network Byte Order it will be seen over the wire like this, being transmitted transmission from left to right:

00000001 11110100

If we would use the little endian format then it would have been seen over the wire like this:

11110100 00000001

After the whole packet is constructed the bits will be sent starting with the lowest addressed bit of the header (bit 0), so the transmission will start with the Version field.

A final point to make here is that the Network byte order is, as you mentioned, the Big Endian Order. This was chosen arbitrarily to have a common format for all network protocols and implementations.

Related Topic