The TCP/IP Stack



The TCP/IP header structure is shown to the right and repeatedly below for reference. This is a visual aid to show how information can be creatively and functionally organized to make a network function so that the the packets are routed to the correct destination, most of the time

  • the first 4 bits make up the version field which indicates the format of the Internet header.

  • Internet header length is the length of the Internet header in 32-bit words. Points to the beginning of the data. The minimum value for a correct header is 5.

  • Type of Service: Indicates the quality of service desired. Networks may offer service precedence, meaning that they accept traffic only above a certain precedence at times of high load. There is a three-way trade-off between low delay, high reliability and high throughput.

  • Total length: Length of the datagram measured in bytes, including the Internet header and data. This field allows the length of a datagram to be up to 65,535 bytes, although such long datagrams are impractical for most hosts and networks. The current standard, however, is to have lengths of no more than 576 bytes.

  • Identification: Identifying value assigned by the sender to aid in assembling the fragments of a datagram.

  • Flags: A technical thing related to bit fragmentation. Who the hell really cares.

  • Fragment Offset: Again, who cares.

  • Time to live: encoded in seconds. Designed so that undelivered packets die a relatively rapid death instead of floating around the network not going anywhere. This one is quite important and relatively ingenious to think of from day one

  • Protocol: Indicates the next level protocol used in the data portion of the Internet datagram.

  • Header checksum: A checksum on the header only. Since some header fields change, e.g., Time To Live, this is recomputed and verified at each point that the Internet header is processed. This is one of the tests used to identify packet loss and trigger re-transmittal.

  • Source address / destination address: 32 bits each. A distinction is made between names, addresses and routes.

    • A name indicates an object to be sought.
    • An address indicates the location of the object.
    • A route indicates how to arrive at the object.

    The Internet protocol (IP) deals primarily with addresses. It is the task of higher level protocols (such as host-to-host or application) to make the mapping from names to addresses. The Internet module maps Internet addresses to local net addresses. It is the task of lower level procedures (such as local net or gateways) to make the mapping from local net addresses to routes.



This basic TCP/IP stack has been in use for the last 25 years. As networking becomes more complex, a new standard is being developed. This is called IPv6 which is shown above to the right to compare to the IPV4 stack.

In comparison to IPv4 there are basically three new fields that have been added or substituted to help more efficient packet flow.

These are:

  • Priority: Enables a source to identify the desired delivery priority of the packets. Priority values are divided into ranges: traffic where the source provides congestion control and non-congestion control traffic.

  • Flow label: Used by a source to label those products for which it requests special handling by the IPv6 router. This is the essence of QOS (Quality of Service) in IPv6.

  • Hop limit: 8-bit integer that is decremented by one by each node that forwards the packet. The packet is discarded if the Hop Limit is decremented to zero.



Read this Primer on the Various Protocols Most all of them remain in place.