3

How headers are actually structured at the bit level let's take the TCP header as an example

|src port | dst port | Sequence Number

Then how are the three header fields actually structured at the bit level and if they are based on byte ordering

Is the structure will look like this

For big endian : |src port | dst port| Sequence Number

For little endian : |Sequence Number | dst port| src port |

1 Answer 1

3

The IETF settled on the network byte order to make sure that, regardless of the processor used in a host, the bytes on a network were consistently sent and received in the same order for use by the network protocols (layer-3 and above). Also:

3.2. Network Bit Order For certain low-level protocols or compression-oriented media types, bit-order may be an issue. When possible, big-endian is encouraged for consistancy with Network Byte Order.

Ethernet has always sent the low-order bits of the high-order bytes first. That is simply the way it was designed to place bits on the wire. Other physical protocols can do it differently, and it has no effect on the upper-layer protocols any more than something like the symbol encoding used on the wire.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.