TCP/IP Protocol Suite
INTERNET PROTOCOL (IPV4)
Position of IP in TCP/IP Protocol Suite
The TCP/IP protocol suite consists of several layers, each serving a specific function:
Application Layer
- SMTP (Simple Mail Transfer Protocol)
- FTP (File Transfer Protocol)
- TFTP (Trivial File Transfer Protocol)
- DNS (Domain Name System)
- SNMP (Simple Network Management Protocol)
- DHCP (Dynamic Host Configuration Protocol)
Transport Layer
- SCTP (Stream Control Transmission Protocol)
- TCP (Transmission Control Protocol)
- UDP (User Datagram Protocol)
- IGMP (Internet Group Management Protocol)
- ICMP (Internet Control Message Protocol)
Network Layer
- IP (Internet Protocol)
- ARP (Address Resolution Protocol)
Data Link Layer
Physical Layer
- Underlying LAN or WAN technology.
IP Protocol – Needed Functions
The necessary functions of the IP protocol include:
- Logical addressing
- Packet format and the processes of fragmentation and reassembly
- Routing
- Forwarding
- Error reporting
The Internet Protocol (IP)
The Internet Protocol serves multiple critical purposes:
- It provides a packet delivery service from source to destination, characterized by the following features:
- Unreliable: It does not guarantee delivery.
- Best-effort: It attempts delivery but does not ensure success.
- Connectionless: Each packet (datagram) is handled independently, not as part of a continuous connection.
- The IP defines the basic unit of data transfer, which is referred to as a datagram.
- It performs the essential routing function.
- The protocol includes a set of rules that support the concept of unreliable packet delivery in packet-switched networks.
- It supports three types of data delivery mechanisms: unicast (one-to-one), broadcast (one-to-all), and multicast (one-to-many).
- The protocol does not implement congestion control.
- There are two versions of the Internet Protocol: IPv4 (Internet Protocol version 4) and IPv6 (Internet Protocol version 6).
IP Protocol
The Internet Protocol (IP) is defined as a host-to-host network-layer delivery protocol for the Internet, possessing the following properties:
- Connectionless Service: Each packet is transmitted independently, possibly taking different paths through the network.
- Best-effort Delivery Service:
- Attempts to deliver packets to their destination with no guarantees.
- Limited error control: only performs error detection—corrupted packets are discarded.
- Lacks flow control.
- It must be utilized in conjunction with a reliable transport or application layer protocol (such as TCP) to ensure data reliability during transmission.
IP Protocol Versions
- IPv4: The version currently in widespread use, established in 1981.
- IPv6: A newer version created in 1996 to address significant IPv4 limitations, such as address space exhaustion.
- Mobile IP: An enhanced version of IPv4 developed in 1996 to support mobile environments.
Goal of Internet Protocol
The fundamental goal of the Internet Protocol is to interconnect heterogeneous networks, facilitating connectivity between different types of networks, which include:
- LAN (Local Area Network) x to LAN y
- WAN (Wide Area Network) a to WAN b
- LAN p to WAN q
Sample Network
Routers connect a variety of network types:
- Example devices and addresses commonly referenced include:
- Partner Server: IP address 172.16.0.2
- Internet: IP range 203.0.113.0/28
- Partner Host: IP address 209.165.1.6
Other mentioned networking technologies include:
- HDL (High-Level Data Link Control)
- HDLC (High-Level Data Link Control)
- PPP (Point-to-Point Protocol)
- CHAP (Challenge Handshake Authentication Protocol)
DATAGRAMS
Packets in the network layer are referred to as datagrams. A datagram is characterized as a variable-length packet consisting of two main components:
- Header: Length ranges from 20 to 60 bytes, containing essential information for routing and delivery.
- Data: The section whose length is determined by the Maximum Transfer Unit (MTU) of the link layer protocol. It is customary in TCP/IP to represent the header in 4-byte sections.
Problem Faced
Different physical layer technologies can lead to inconsistencies such as:
- Variation in frame formats
- Discrepancies in the maximum data capacity that link-layer frames can carry
- If the size of the MTU exceeds router capacity, this can necessitate re-transmission, resulting in delays.
Maximum Transfer Unit (MTU)
Each physical networking technology establishes limitations on the amount of data that can fit into a frame, with notable examples being:
- Ethernet: 1500 octets
- FDDI (Fiber Distributed Data Interface): 4470 octets
- PPP: 296 bytes
- WiFi: 7981 bytes
The MTU of a network impacts the efficiency of datagram transmission:
- Limiting datagram size to the smallest possible MTU can hinder performance across networks with larger MTUs.
- Conversely, allowing datagrams larger than a network's MTU can lead to fragmentation issues where datagrams do not conform to the frame size requirements.
IP Datagram Structure
The IP datagram header ranges from 20 to 60 bytes in length and contains the following fields:
- Version Number (VER): 4 bits indicating the IP protocol version (IPv4 or IPv6).
- Header Length (HLEN): 4 bits defining total header length in 4-byte words; standard length is 20 when no options are present (HLEN = 5).
- Service Type: 8 bits used to differentiate datagram types based on quality of service (QoS), influencing priority during congestion.
- Identification: 16 bits providing a unique identifier for datagrams to ensure correct reassembly.
- Time to Live (TTL): 8 bits limiting the maximum number of hops (routers visited); decremented by each router processed.
- Total Length: 16 bits indicating the entire datagram size (header + data) with a maximum of 65,535 bytes.
- Fragmentation Offset: 13 bits showing the position of the fragment within the original datagram.
- Flags: 3 bits indicating fragmentation status (including "do not fragment").
- Protocol: 8 bits specifying the transport-layer protocol to which data should be passed (e.g., TCP, UDP, ICMP).
- Header Checksum: A 16-bit field for error detection in the header.
- Source IP Address: 32-bit field for the originating address.
- Destination IP Address: 32-bit field for the receiving address.
- Options Field: Variable-length field (optional) used for specific purposes or routing extensions.
Fragmentation Process
Fragmentation occurs when a datagram is divided into smaller units to meet MTU constraints. Important details include:
- Identification Field: 16-bit unique identifier assigned to each datagram by the source to aid reassembly.
- Flags: Three-bit field indicating fragmentation directives:
- 1st bit reserved.
- 2nd bit indicates "do not fragment."
- 3rd bit designates if more fragments follow.
- Fragmentation Offset: Indicates the relative position of the fragmentation's data with respect to the entire original datagram.
- When splitting occurs, the datagram is divided into pieces under the following conditions:
- Case 1: Datagrams smaller than or equal to MTU are sent without fragmentation.
- Case 2: Datagrams larger than MTU with the DF bit set to 1 are discarded.
- Case 3: For datagrams larger than the MTU where DF bit is 0, the datagram is divided into fragments that comply with MTU standards, each with an individually reassigned header.
Datagram Reassembly
The reassembly of fragmented datagrams occurs only at the destination host. Here are key considerations:
- Individual fragments may arrive out-of-order due to route variations.
- The first fragment contains an identification field that aids in grouping fragments together.
- The fragment offset field signals where in the datagram each fragment's data belongs.
- Because fragments may travel independently, reassembly must be carried out at the end host, not intermediate routers, to maintain the stateless nature of IP.
Consequences of Fragment Loss
- If any fragment of a datagram is lost, the entire datagram is lost as well, requiring the sender to retransmit it without any acknowledgment of which parts were missing.
- Intermediate routers cannot buffer fragments for extended durations, leading to a need for a reassembly timer. If all fragments are not received before the timer expires, those fragments are discarded, requiring complete retransmission.
Example Calculations and Insights
- Processing IP Packets: Upon arrival, packets are processed, checking for AT LEAST:
- Destination matches host IP.
- TTL is decremented at router nodes.
- The fields within each packet frame are critical for transport layer interfacing and overall ensuring efficient data routing.
Practical Examples: Tracing and Testing
- Tracing Route Utility: The
traceroutecommand can determine the path taken by packets to their destination, useful for diagnosing network issues. - Ping Utility: Using the ping utility with specific options can help track routes and measure latency.
Fragmentation Examples
- Illustrations of how a singular large datagram can be split into smaller units when traveling through segments of varying MTU sizes, highlighting the challenges and protocols involved (e.g., Ethernet with MTU of 1500 bytes).
These notes provide a comprehensive overview of TCP/IP networking protocols, specifically focusing on Internet Protocol (IPv4), addressing its functionalities, limitations, structure, fragmentation processes, and practical implementations.