Terwijl toepassingsgegevens door de protocolstapel worden doorgegeven om via de netwerkmedia te worden verzonden, voegen verschillende protocollen er op elk niveau informatie aan toe. Dit staat algemeen bekend als het inkapselingsproces.

De vorm die een gegevensstuk op een willekeurige laag aanneemt, wordt een protocolgegevenseenheid (PDU) genoemd. Tijdens het inkapselen kapselt elke volgende laag de PDU in die deze ontvangt van de laag erboven in overeenstemming met het protocol dat wordt gebruikt. In elke fase van het proces heeft een PDU een andere naam om de nieuwe functies weer te geven. Hoewel er geen universele naamgevingsconventie voor PDU’s is, worden de PDU’s in deze cursus benoemd volgens de protocollen van de TCP / IP-suite, zoals weergegeven in de afbeelding:

Applicatielaag

Data – De algemene term voor de PDU die wordt gebruikt op de applicatielaag

Transportlaag

Segment – Transportlaag PDU

TCP Segment:

Source PortDestination PortSequence NumberAcknowledgement NumberHeader LengthReservedControl BitsWindow SizeChecksumUrgentOptionsApplication Layer Data
2 bytes2 bytes32 bits32 bits4 bits6 bits6 bits2 bytes2 bytes2 bytesSize VariesSize Varies
TCP Segment
  • Source Port:
    Het bronpoortnummer wordt willekeurig gegenereerd door het verzendende apparaat om een gesprek tussen twee apparaten te identificeren.
  • Destination Port:
  • Sequence Number:
    Wordt gebruikt voor het opnieuw samenstellen van gegevens.
  • Acknowledgement Number:
    Geeft aan dat de data is ontvangen.
  • Header Length:
    Bekend als ‘Data Offset’. Geeft de lengte van de TCP-segmentkop aan.
  • Reserved:
    Dit veld is gereserveerd voor de toekomstig gebruik.
  • Control Bits:
    Bevat bitcodes, of vlaggen, die het doel en de functie van het TCP-segment aangeven.
  • Window Size:
    Geeft het aantal segmenten aan dat tegelijkertijd kan worden geaccepteerd.
  • Checksum:
    Wordt gebruikt voor foutcontrole van de segmentkop en gegevens.
  • Urgent:
    Geeft aan of gegevens urgent zijn.

UDP Datagram:

Source PortDestination PortLengthChecksumApplication Layer Data
2 bytes2 bytes2 bytes2 bytesSize Varies
UDP Datagram
  • Source Port:
  • Destination Port:
  • Length:
  • Checksum:

Netwerklaag

Packet – Netwerklaag PDU

IPv4 Packet Fields:

VersionInternet Header LengthDifferentiated Services (DS)Total LengthIdentificationFlagsFragment OffsetTime-to-LiveProtocolHeader ChecksumSource IP AddressDestination IP AddressOptions/Padding
4 bits4 bits8 bits2 bytes2 bytes3 bits13 bits1 byte1 byte2 bytes32 bits32 bitsVariable maximum
40 bytes padded with 0’s
IPv4 Packet fields
Differentiated Services (DS)
DSCPECN
6 bits2 bits
IPv4 Packet fields: DS field
  • 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:

VersionTraffic ClassFlow LabelPayload LengthNext HeaderHop LimitSource AddressDestination Address
4 bits1 byte2 bytes2 bytes1 byte1 byte128 bits128 bits
IPv6 Packet fields
  • 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 (::).

Datalinklaag

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:

HeaderPacketTrailer
Frame StartAddressingTypeControlDataError DetectionFrame Stop
Generic Frame Fields
  • 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:

PreambleDestination AddressSource AddressProtocol TypeDataFrame Check Sequence
8 bytes6 bytes6 bytes2 bytes46 – 1500 bytes4 bytes
Ethernet II Frame fields
  • 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:

PreambleDestination AddressSource AddressLength802.2 Header and DataFrame Check Sequence
8 bytes6 bytes6 bytes2 bytes46 – 1500 bytes4 bytes
IEEE 802.3 Frame fields
  • 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:

PreambleDestination AddressSource Address802.1Q VLAN Tag802.2 Header and DataFrame Check Sequence
8 bytes6 bytes6 bytes2 bytes46 – 1500 bytes4 bytes
IEEE 8023ac Frame fields
802.1Q VLAN Tag
Tag Protocol ID 0x8100User PriorityCanonical Format IndicatorVLAN ID
2 bytes3 bits1 bit12 bits
IEEE 802.3ac Frame fields: 8021Q VLAN Tag field
  • 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:

FlagAddressControlProtocolDataFrame Check Sequence
1 byte1 byte1 byte2 bytesvariable2 or 4 bytes
PPP Frame fields
  • 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 ControlDuration/IDDestination AddressSource AddressReceiver AddressSequence ControlTransmitter AddressFrame BodyFrame Check Sequence
2 bytes2 bytes6 bytes6 bytes6 bytes16 bits6 bytes0-2312 bytes4 bytes
Wireless frame fields
Frame Control
Protocol VersionTypeSubtypeTo DSFrom DSMore FragmentsRetryPower ManagementMore DataWEPOrder
2 bits2 bits4 bits1 bit1 bit1 bit1 bit1 bit1 bit1 bit1 bit
Wireless frame fields: frame control field
Sequence Control
Fragment numberSequence number
4 bits12 bits
Wireless frame fields: sequence control field
  • 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.

Fysieke laag

Bits – Een fysieke laag-PDU die wordt gebruikt bij het fysiek verzenden van gegevens via het medium