Buffl

Network Basics

CF
by Carmen F.

IPv4 Packet Aufbau


Version: immer 4 bzw 100

IHL: Internet Header Length, gibt in Vielfachen von 32 Bit wie lange der Header ist

Type of Service (ToS): 0-5 DSCP (Differentiated Services Code Point) 6-7 ECN (Explicit Congestion Notification)

Total Length: Größe des Gesamten Pakets mit Header

Fragment Identification: Steuert Zusammensetzung nach Fragmentierung, mit Source Address, Fragment Offest und Flags kann Empfänger diese wieder zusammenbauen

Flags: 0 immer 0, 1: Do Not Fragment (DF), 2: More Fragment (MF)

Fragment Offset: bei fragmentierten Paketen, ab welcher Position innerhalb des Paketes das Fragment anfängt, bezieht sich auf Daten-Blöcke von 64 Bit bzw. 8 Byte Größe

TTL: Hat dieses Feld den Wert null, so wird das Paket verworfen, mit jedem Hop (Router) wird diese verringert um Loops zu erkennen

Protocol: bezeichnet das Folgeprotokoll, IP-Paket zum Beispiel ein TCP-Paket, steht hier der Wert 6, für ein UDP-Paket 17, werden von IANA vergeben

Header Checksum: Dieser Wert wird bei jeder Station neu verifiziert und – weil sich die TTL pro Hop verändert – neu berechnet, alle 16-Bit-Halbwörter des Kopfdatenbereichs nach den Regeln des Einerkomplements addiert (Übertrag auf das LSB addieren) und von der Summe das Einerkomplement gebildet. Das Ergebnis sollte 1111 1111 1111 1111 (Hex: 0xFFFF) sein, denn sonst ist ein Fehler im Header.

IP Options: maximale Anzahl der mit Optionen belegbaren Byte im konkreten Paket ergibt sich aus (IHL*4)-20

Padding: Da die Gesamtlänge des IP-Headers durch das Feld IHL nur in Vielfachen von 4 Byte festgelegt wird, werden unbenutzte Byte mit Nullen aufgefüllt

TCP

Transmission Control Protocol

Sequence number: How many bits where already transmissoned in this stream

Acknowledgment number: How many bits where already received in this stream

Data offset: size of the TCP header in 32-bit words. The minimum size header is 5 words and the maximum is 15 words

Reserved: size of the TCP header in 32-bit words. The minimum size header is 5 words and the maximum is 15 words

CWR: Congestion window reduced (CWR) flag is set by the sending host to indicate that it received a TCP segment with the ECE flag set and had responded in congestion control mechanism.

ECE: If the SYN flag is set (1), the TCP peer is ECN capable. If the SYN flag is unset (0), a packet with the Congestion Experienced flag set (ECN=11) in its IP header was received during normal transmission. This serves as an indication of network congestion (or impending congestion) to the TCP sender.

URG: Indicates that the Urgent pointer field is significant

ACK: Indicates that the Acknowledgment field is significant. All packets after the initial SYN packet sent by the client should have this flag set.

PSH: Push function. Asks to push the buffered data to the receiving application.

RST: Reset the connection

SYN: Synchronize sequence numbers. Only the first packet sent from each end should have this flag set. Some other flags and fields change meaning based on this flag, and some are only valid when it is set, and others when it is clear.

FIN: Last packet from sender

Window: The size of the receive window, which specifies the number of window size units[b] that the sender of this segment is currently willing to receive

Checksum: The 16-bit checksum field is used for error-checking of the TCP header, the payload and an IP pseudo-header. The pseudo-header consists of the source IP address, the destination IP address, the protocol number for the TCP protocol (6) and the length of the TCP headers and payload (in bytes).

Urgent Pointer: If the URG flag is set, then this 16-bit field is an offset from the sequence number indicating the last urgent data byte.

Options: The length of this field is determined by the Data Offset field. The TCP header padding is used to ensure that the TCP header ends, and data begins, on a 32-bit boundary. The padding is composed of zeros.



Author

Carmen F.

Information

Last changed