0% found this document useful (0 votes)
4 views

Ip Datagrams

IP datagrams are the basic units of information transmitted over IP networks, consisting of a header and payload. They are connectionless and unreliable, providing best-effort delivery without guarantees of order or delivery. The structure of IP datagrams varies between IPv4 and IPv6, with specific fields for routing, addressing, and control information.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Ip Datagrams

IP datagrams are the basic units of information transmitted over IP networks, consisting of a header and payload. They are connectionless and unreliable, providing best-effort delivery without guarantees of order or delivery. The structure of IP datagrams varies between IPv4 and IPv6, with specific fields for routing, addressing, and control information.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Ah, IP datagrams!

These are the fundamental building blocks of communication over the


Internet Protocol (IP). Think of them as the envelopes that carry your data across the internet.
Here's a breakdown of what IP datagrams are all about:
What is an IP Datagram?
An IP datagram is the basic unit of information transmitted over an IP network. It's a
self-contained, independent unit of data that carries both the header (control information) and
the payload (the actual data being transmitted).
Key Characteristics:
●​ Connectionless: IP is a connectionless protocol. This means that each datagram is
treated independently, and there's no pre-established connection between the sender and
receiver. Routers forward each datagram based on the destination IP address in its
header, without any prior negotiation or knowledge of previous datagrams in the same
"conversation."
●​ Unreliable: IP itself doesn't guarantee delivery, ordering, or error-free transmission.
Datagrams can be lost, duplicated, delayed, or arrive out of order. Higher-layer protocols
like TCP (Transmission Control Protocol) handle reliability if needed.
●​ Best-Effort Delivery: IP provides a "best-effort" delivery service, meaning it will try its
best to deliver the datagram, but there are no guarantees.
●​ Structure: An IP datagram consists of two main parts: the header and the data
(payload).
Structure of an IPv4 Datagram:
The IPv4 header has a variable length (typically 20 bytes, but can be up to 60 bytes with
options) and contains information crucial for routing and delivery. Here are some key fields:
●​ Version (4 bits): Indicates the IP version (4 for IPv4).
●​ Internet Header Length (IHL) (4 bits): Specifies the size of the header in 32-bit words.
●​ Differentiated Services Code Point (DSCP) (6 bits) and Explicit Congestion
Notification (ECN) (2 bits): Used for Quality of Service (QoS) and congestion
management.
●​ Total Length (16 bits): Specifies the total size of the datagram (header + data) in bytes.
●​ Identification (16 bits): A unique identifier for the datagram, used for fragmentation and
reassembly.
●​ Flags (3 bits): Control flags, including the "Don't Fragment" (DF) and "More Fragments"
(MF) flags.
●​ Fragment Offset (13 bits): Indicates the position of the fragment's data within the original
datagram (used for reassembly).
●​ Time to Live (TTL) (8 bits): Limits the lifespan of the datagram in the network to prevent
routing loops. Each router that forwards the datagram decrements the TTL. When it
reaches zero, the datagram is discarded.
●​ Protocol (8 bits): Indicates the next-level protocol carried in the data portion of the
datagram (e.g., TCP, UDP, ICMP).
●​ Header Checksum (16 bits): A checksum used to detect errors in the header.
●​ Source IP Address (32 bits): The IP address of the sender.
●​ Destination IP Address (32 bits): The IP address of the intended receiver.
●​ Options (variable length): Optional fields that can provide additional functionality (rarely
used in modern networks).
●​ Data (Payload): The actual data being transmitted, which could be a segment from a
higher-layer protocol like TCP or UDP, or ICMP messages, etc.
Structure of an IPv6 Datagram:
The IPv6 header has a fixed length of 40 bytes, which simplifies processing for routers. Optional
information is handled through extension headers. Key fields include:
●​ Version (4 bits): Indicates the IP version (6 for IPv6).
●​ Traffic Class (8 bits): Similar to DSCP in IPv4, used for QoS.
●​ Flow Label (20 bits): Used to identify packets belonging to the same flow for special
handling.
●​ Payload Length (16 bits): Specifies the length of the data portion of the datagram.
●​ Next Header (8 bits): Indicates the type of the next header (either a higher-layer protocol
or an IPv6 extension header).
●​ Hop Limit (8 bits): Similar to TTL in IPv4, limits the number of hops the datagram can
take.
●​ Source IP Address (128 bits): The IPv6 address of the sender.
●​ Destination IP Address (128 bits): The IPv6 address of the intended receiver.
●​ Extension Headers (optional, variable length): Provide additional functionality like
fragmentation, security (IPsec), and routing.
●​ Data (Payload): The actual data being transmitted.
In essence, IP datagrams are the workhorses of the internet. They encapsulate the data
that needs to travel across networks, along with the necessary addressing and control
information in their headers to guide them towards their destination. While IP itself
doesn't guarantee reliable delivery, it provides the fundamental framework upon which
more reliable protocols like TCP can build.

You might also like