Key Concepts from Chapter 7: Internet Protocol Version 4 (IPv4)
Objectives of the Chapter
Explain the role of the IP protocol within the TCP/IP suite.
Understand the IPv4 datagram structure.
Discuss datagram fragmentation and reassembly.
Learn about options within an IPv4 datagram and their applications.
Calculate checksums for IPv4 datagram headers and their verification at the receiver.
Explore IP over ATM vs. IP over LANs/point-to-point WANs.
Understand a simplified IP package and the pseudocode for relevant modules.
Introduction to IP
The Internet Protocol (IP) operates at the network layer of the TCP/IP protocol suite, essential for routing and delivering packets across networks.
Format of an IPv4 Datagram
A datagram is a variable-length packet consisting of a header (20-60 bytes) and data (20-65,535 bytes).
Header Structure:
Version: 4 bits (indicating IPv4)
Header Length (HLEN): 4 bits
Total Length: 16 bits (header + data)
Identification: 16 bits
Flags: 3 bits (indicating fragmentation)
Time to Live (TTL): 8 bits
Protocol: 8 bits (denotes the transport layer protocol)
Source IP Address: 32 bits
Destination IP Address: 32 bits
Options: Up to 40 bytes, can include various control information.
Fragmentation of Datagrams
Fragmentation is necessary when datagrams exceed the Maximum Transfer Unit (MTU) of the network.
MTU and Fragmentation Fields:
Fragmentation only applies to data; the header remains intact.
Flags:
D (Do not fragment): blocks fragmentation.
M (More fragments): indicates if more fragments follow.
Upon fragmentation, each fragment contains a partial datagram plus necessary header info to ensure it can be reassembled correctly.
Options in IPv4 Datagram
Options are not mandatory but may include elements such as timestamp, record route, strict source route, and loose source route for testing/debugging purposes.
They can comprise a maximum of 40 bytes, divided into single-byte or multiple-byte formats.
Checksum Calculation
The checksum is used for error detection in the header of the IP datagram (not the data).
Checksum Calculation:
At sender: All fields are added in 16-bit segments, then complemented and inserted.
At receiver: The same calculation is performed, and if the result is all zeros, the packet is accepted.
IP Over ATM
Explains encapsulation in ATM networks where IP packets are converted into ATM cells.
Also introduces the ATMARP protocol for binding IP addresses to physical addresses in ATM networks.
Security Implications
Originally, IPv4 lacked security features; however, it is now crucial to consider security due to modern threats.
Discusses additional protocols like IPSec for providing security features.
IP Package Structure
Describes a simplified model of how an IP datagram is processed and the modules involved, such as:
Header-Adding Module: To encapsulate data and insert checksums.
Processing Module: To manage incoming datagrams (routing, fragmentation, etc.).
Reassembly Module: To reconstruct fragmented datagrams.