Protocol Data Units

Start Omhoog

As application data is passed down the protocol stack on its way to be transmitted across the network media, various protocols add information to it at each level. This is commonly known as the encapsulation process.

The form that a piece of data takes at any layer is called a protocol data unit (PDU). During encapsulation, each succeeding layer encapsulates the PDU that it receives from the layer above in accordance with the protocol being used. At each stage of the process, a PDU has a different name to reflect its new functions. Although there is no universal naming convention for PDUs, in this course, the PDUs are named according to the protocols of the TCP/IP suite, as shown in the figure:

Application Layer

Data - The general term for the PDU used at the application layer

Transport Layer

Segment - Transport layer PDU

TCP Segment:

Source Port Destination Port Sequence Number Acknowledgement Number Header Length Reserved Control Bits Window Size Checksum Urgent Options Application Layer Data
2 bytes 2 bytes 32 bits 32 bits 4 bits 6 bits 6 bits 2 bytes 2 bytes 2 bytes Size Varies Size Varies
  • Source Port:
    The source port number is randomly generated by the sending device to identify a conversation between two devices.
  • Destination Port:
     
  • Sequence Number:
    Used for data reassembly purposes.
  • Acknowledgement Number:
    Indicates that the data that has been received.
  • Header Length:
    Known as 'Data Offset'. Indicates the length of the TCP segment header.
  • Reserved:
    This field is reserved for the future.
  • Control Bits:
    Includes bit codes, or flags, that indicate the purpose and function of the TCP segment.
  • Window Size:
    Indicates the number of segments that can be accepted at one time.
  • Checksum:
    Used for error checking of the segment header and data.
  • Urgent:
    Indicates whether data is urgent.
  • UDP Datagram:

    Source Port Destination Port Length Checksum Application Layer Data
    2 bytes 2 bytes 2 bytes 2 bytes Size Varies
  • Source Port:
     
  • Destination Port:
     
  • Length:
     
  • Checksum:
     
  • Network Layer

    Packet - Network layer PDU

    IPv4 Packet Fields:

    Version Internet Header Length Differentiated Services (DS) Total Length Identification Flags Fragment Offset Time-to-Live Protocol Header Checksum Source IP Address Destination IP Address Options Padding
    4 bits 4 bits DSCP ECN 2 bytes 2 bytes 3 bits 13 bits 1 byte 1 byte 2 bytes 32 bits 32 bits Variable maximum
    40 bytes padded with 0's
    6 bits 2 bits
  • Version
    The first header in an IP packet is the four bit version field. For IPv4, this has a value of 4.
  • Internet Header Length (IHL)
    Contains a 4-bit binary value indentifying the number of 32-bit words in the header. The IHL value varies because of the Options and Padding fields. The minimum value for this field is 5 (that is, 532 = 160 bits = 20 bytes) and the maximum value is 15 (that is, 1532 = 480 bits = 60 bytes)
  • Differentiated Services Code Point (DSCP)
    Originally defined as the Type of service (ToS) field. This field is now defined by RFC 2474 for Differentiated services (DiffServ). New technologies are emerging that require real-time data streaming and therefore make use of the DSCP field. An example is Voice over IP (VoIP), which is used for interactive data voice exchange.
  • Explicit Congestion Notification
    This field is defined in RFC 3168 and allows end-to-end notification of network congestion without dropping packets. ECN is an optional feature that is only used when both endpoints support it and are willing to use it. It is only effective when supported by the underlying network.
  • Total Length
    Sometimmes referred to as Packet Length, this 16 bit field defines the entire packet (fragment) size, including header and data, in bytes. The minimum-length packet is 20 bytes (20 bytes header + 0 bytes data), and the maximum is 65535 bytes.
  •         A Router might have to fragment a packet when forwarding it from one medium to another medium that has a smaller MTU. When this happens, fragmentation occurs and the IPv4 packet uses the following fields to keep track of the fragments

  • Identification
    This 16-bit field uniquely identifies the fragment of an original IP packet.
  • Flags
    This 3-bit field identifies how the packet is fragmented. It is used with the Fragment Offset and Identification fields to help reconstruct the fragment into the original packet.
  • Fragment Offset
    This 13-bit field identifies the order in which to place the packet fragment in the reconstruction of the original packet.
  • Time-to-Live
    An eight-bit time to live field helps prevent datagrams from persisting (e.g. going in circles) on an internet. This field limits a datagram's lifetime. It is specified in seconds, but time intervals less than 1 second are rounded up to 1. In practice, the field has become a hop count—when the datagram arrives at a router, the router decrements the TTL field by one. When the TTL field hits zero, the router discards the packet and typically sends an ICMP Time Exceeded message to the sender.
  • Protocol
    This field defines the protocol used in the data portion of the IP datagram. The Internet Assigned Numbers Authority maintains a list of IP protocol numbers which was originally defined in RFC 790.
  • Header Checksum
    The 16-bit checksum field is used for error-checking of the header. When a packet arrives at a router, the router calculates the checksum of the header and compares it to the checksum field. If the values do not match, the router discards the packet. Errors in the data field must be handled by the encapsulated protocol. Both UDP and TCP have checksum fields. When a packet arrives at a router, the router decreases the TTL field. Consequently, the router must calculate a new checksum. RFC 1071 defines the checksum calculation.
  • Source IP Address
    This field is the IPv4 address of the sender of the packet. Note that this address may be changed in transit by a network address translation device.
  • Destination IP Address
    This field is the IPv4 address of the receiver of the packet. As with the source address, this may be changed in transit by a network address translation device.
  • Options
    The options field is not often used. Note that the value in the IHL field must include enough extra 32-bit words to hold all the options (plus any padding needed to ensure that the header contains an integer number of 32-bit words). The list of options may be terminated with an EOL (End of Options List, 0x00) option; this is only necessary if the end of the options would not otherwise coincide with the end of the header.
  • IPv6 Packet Fields:

    Version Traffic Class Flow Label Payload Length Next Header Hop Limit Source Address Destination Address
    4 bits 1 byte 2 bytes 2 bytes 1 byte 1 byte 128 bits 128 bits
  • Version
    The first header in an IP packet is the four bit version field. For IPv6, this has a value of 6.
  • Traffic Class
    The bits of this field hold two values. The 6 most-significant bits are used for differentiated services, which is used to classify packets. The remaining two bits are used for ECN; priority values subdivide into ranges: traffic where the source provides congestion control and non-congestion control traffic.
  • Flow Label
    Originally created for giving real-time applications special service.[1] The flow label when set to a non-zero value now serves as a hint to routers and switches with multiple outbound paths that these packets should stay on the same path so that they will not be reordered.[5][6] It has further been suggested that the flow label be used to help detect spoofed packets.
  • Payload Length
    The size of the payload in octets, including any extension headers. The length is set to zero when a Hop-by-Hop extension header carries a Jumbo Payload option.
  • Next Header
    Specifies the type of the next header. This field usually specifies the transport layer protocol used by a packet's payload. When extension headers are present in the packet this field indicates which extension header follows. The values are shared with those used for the IPv4 protocol field, as both fields have the same function (see List of IP protocol numbers).
  • Hop Limit
    Replaces the time to live field of IPv4. This value is decremented by one at each intermediate node visited by the packet. When the counter reaches 0 the packet is discarded.
  • Source Address
    Contains the IPv6 address of the packet sender. This can be any unicast IPv6 address (link local, global or ULA). It cannot be a multicast address. In some cases (if the node does not yet have any unicast address), the unspecified address (::) may be used.
  • Destination Address
    Contains the IPv6 address of the packet recipient. This can be a unicast IPv6 address (link local, global or ULA). It can also be a multicast IPv6 address of any scope. It cannot be the unspecified address (::).
  • Data Link Layer

    Frame – Data Link layer PDU

    Both Ethernet II and IEEE 80.3 standards define minimum frame size as 64 bytes and the maximum as 1518 bytes. This includes all bytes from the destination MAC Address through the FCS field.

    Any frame less than 64 bytes in length is considered a 'collision fragment' or 'runt frame' and is automatically discarded.

    The IEEE 80.2ac standard, released in 1998, extended the maximum allowable frame size to 1522 bytes. The frame size was increased to accommodate virtual local-area network's (VLAN's).

    Generic Frame Fields:

    Header Packet Trailer
    Frame Start Addressing Type Control Data Error Detection Frame Stop
  • Frame start and stop indicator flags
    Used by the MAC sublayer to identify the beginning and end limits of the frame
  • Addressing
    Used by the MAC sublayer to identify the source and destination nodes.
  • Type
    Used by the LLC to identify the Layer 3 protocol.
  • Control
    Identifies special flow control services.
  • Data
    Contains the frame payload (i.e., packet header, segment header, and the data.
  • Error Detection
    Included after the data to form the trailer, these frame fields are used for error detection.
  • Ethernet II Frame Fields:

    Preamble Destination Address Source Address Protocol Type Data Frame Check Sequence
    8 bytes 6 bytes 6 bytes 2 bytes 46 - 1500 bytes 4 bytes
  • Preamble
    Used for synchronization; also contains a delimiter to mark the mark the end of the timing information.
  • Destination Address
    48-bit MAC address for the destination node.
  • Source Address
    48-bit MAC address for the source node.
  • Protocol Type
    Value to indicate which upper-layer protocol will receive the data after the Ethernet process is complete.
  • Data
    This is the PDU, typically an Ipv4 packet, that is to be transmitted over the media.
  • Frame Check Sequence
    A CRC value used to check for damaged frames.
  • IEEE 802.3 Frame Fields:

    Preamble Destination Address Source Address Length 802.2 Header and Data Frame Check Sequence
    8 bytes 6 bytes 6 bytes 2 bytes 46 - 1500 bytes 4 bytes
  • Preamble
    Used for synchronization; also contains a delimiter to mark the mark the end of the timing information.
  • Destination Address
    48-bit MAC address for the destination node.
  • Source Address
    48-bit MAC address for the source node.
  • Protocol Type
    Value to indicate which upper-layer protocol will receive the data after the Ethernet process is complete.
  • Data
    This is the PDU, typically an Ipv4 packet, that is to be transmitted over the media.
  • Frame Check Sequence
    A CRC value used to check for damaged frames.
  • IEEE 802.3ac Frame Fields:

    Preamble Destination Address Source Address 802.1Q VLAN Tag 802.2 Header and Data Frame Check Sequence
    8 bytes 6 bytes 6 bytes 2 bytes 46 - 1500 bytes 4 bytes
    802.1Q VLAN Tag
    Tag Protocol ID 0x8100 User Priority Canonical Format Indicator VLAN ID
    2 bytes 3 bits 1 bit 12 bits
  • Preamble
    Used for synchronization; also contains a delimiter to mark the mark the end of the timing information.
  • Destination Address
    48-bit MAC address for the destination node.
  • Source Address
    48-bit MAC address for the source node.
  • Protocol Type
    Value to indicate which upper-layer protocol will receive the data after the Ethernet process is complete.
  • Data
    This is the PDU, typically an Ipv4 packet, that is to be transmitted over the media.
  • Frame Check Sequence
    A CRC value used to check for damaged frames.
  • PPP Frame Fields:

    Flag Address Control Protocol Data Frame Check Sequence
    1 byte 1 byte 1 byte 2 bytes variable 2 or 4 bytes
  • Flag
    Indicates the beginning or end of a frame. The flag field consists of the binary sequence 01111110.
  • Address
    A single byte that contains the standard PPP broadcast address. PPP does not assign individual station addresses.
  • Control
    A single byte that contains the binary sequence 00000011, which calls for transmission of user data in an un-sequenced frame.
  • Protocol
    Two bytes that identify the protocol encapsulated in the data field of the frame. The most up-to-date values of the protocol field are specified in the most recent Assigned Numbers RFC.
  • Data
    Zero or more bytes that contains the datagram for the protocol specified in the protocol field.
  • Frame Check Sequence
    Normally 16 bits (2 bytes). By prior agreement, consenting PPP implementations can use a 32-bit (4-byte) FCS for improved error detection.
  • Wireless Frame Fields:

    Frame Control Duration/ID Destination Address Source Address Receiver Address Sequence Control Transmitter Address Frame Body Frame Check Sequence
    Fragment Number Sequence Number
    2 bytes 2 bytes 6 bytes 6 bytes 6 bytes 4 bits 12 bits 6 bytes 0-2312 bytes 4 bytes
    Frame Control
    Protocol Version Type Subtype To DS From DS More Fragments Retry Power Management More Data WEP Order
    2 bits 2 bits 4 bits 1 bit 1 bit 1 bit 1 bit 1 bit 1 bit 1 bit 1 bit
  • Frame Control
  • Protocol Version
    Version of 802.11 frame in use
  • Type and Subtype
    Identity one of three functions and subfunctions of the frame: control, data and management
  • To DS
    Set to 1 in data frames destined for the distribution system (devices in the wireless structure)
  • From DS
    Set to 1 in data frames exiting the distribution system
  • More Fragments
    Set to 1 for frames that have another fragment
  • More Data
    Set to 1 to indicate that a node will be in power-save mode
  • Wired Equivalent Privacy (WEP)
    Set to 1 if the frame contains WEL-encrypted information for security
  • Order
    Set to 1 in a data type frame that uses Strictly Ordered service class (does not need reordering)
  • Duration/ID
    Depending on the type of frame, represents either the time, in microseconds, required to transmit the frame or an association identity (AID) for the station that transmitted the frame.
  • Destination Address
    MAC Address of the final destination node in the network.
  • Source Address
    MAC Address of the node that initiated the frame.
  • Receiver Address
    MAC address that identifies the wireless device that is the immediate recipient of the frame.
  • Sequence Control
  • Fragment Number
    Indicates the number for each fragment of the frame.
  • Sequence Number
    Indicates the sequence number assigned to the frame; retransmitted frames are identified by duplicate sequence numbers.
  • Transmitter Address
    MAC Address that identifies the wireless device that transmitted the frame.
  • Frame Body
    Contains the information being transported; for data frames typically an IP packet.
  • Frame Check Sequence
    Contains a 32-bit cyclic redundancy check (CRC) of the frame.
  • Physical Layer

    Bits - A Physical layer PDU used when physically transmitting data over the medium