RFC 791 - INTERNET PROTOCOL
DARPA INTERNET PROGRAM
Protocol Specification
Date: September 1981
Status: Internet Standard (STD 5)
Author: Jon Postel (Information Sciences Institute, USC)
Organization: DARPA Internet Program
Status of this Memo
This RFC specifies a standard for the DARPA Internet community. Hosts and gateways that implement this standard must adopt and implement this specification.
Abstract
The Internet Protocol (IP) is designed for use in interconnected systems of packet-switched computer communication networks. Such a system has been called a "catenet". The Internet Protocol provides for transmitting blocks of data called datagrams from sources to destinations, where sources and destinations are hosts identified by fixed length addresses. The Internet Protocol also provides for fragmentation and reassembly of long datagrams, if necessary, for transmission through "small packet" networks.
Table of Contents
Preface
- About this document
1. Introduction
- 1. Introduction
- 1.1 Motivation
- 1.2 Scope
- 1.3 Interfaces
- 1.4 Operation
2. Overview
- 2. Overview
- 2.1 Relation to Other Protocols
- 2.2 Model of Operation
- 2.3 Function Description
- 2.4 Gateways
3. Specification
- 3. Specification
- 3.1 Internet Header Format
- 3.2 Discussion
- 3.3 Interfaces
Appendices
Quick Reference: Core Concepts
IP Datagram Format
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Version| IHL |Type of Service| Total Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Identification |Flags| Fragment Offset |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Time to Live | Protocol | Header Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Destination Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Options | Padding |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Key Fields Description
| Field | Size | Description |
|---|---|---|
| Version | 4 bits | IP version number (4) |
| IHL | 4 bits | Internet Header Length (5-15) |
| Type of Service | 8 bits | Service type |
| Total Length | 16 bits | Total length in bytes |
| Identification | 16 bits | Identifier for reassembly |
| Flags | 3 bits | DF, MF flags |
| Fragment Offset | 13 bits | Fragment offset |
| Time to Live | 8 bits | TTL |
| Protocol | 8 bits | Upper layer protocol (TCP=6, UDP=17) |
| Header Checksum | 16 bits | Header checksum |
| Source Address | 32 bits | Source IP address |
| Destination Address | 32 bits | Destination IP address |
Address Classes
Class A: 0.0.0.0 - 127.255.255.255
Format: 0NNNNNNN.HHHHHHHH.HHHHHHHH.HHHHHHHH
Networks: 7 bits (128 networks)
Hosts: 24 bits (16,777,216 hosts)
Class B: 128.0.0.0 - 191.255.255.255
Format: 10NNNNNN.NNNNNNNN.HHHHHHHH.HHHHHHHH
Networks: 14 bits (16,384 networks)
Hosts: 16 bits (65,536 hosts)
Class C: 192.0.0.0 - 223.255.255.255
Format: 110NNNNN.NNNNNNNN.NNNNNNNN.HHHHHHHH
Networks: 21 bits (2,097,152 networks)
Hosts: 8 bits (256 hosts)
Class D: 224.0.0.0 - 239.255.255.255 (Multicast)
Class E: 240.0.0.0 - 255.255.255.255 (Reserved)
Related Resources
- Official Text: RFC 791 (TXT)
- Official Page: RFC 791 DataTracker
- Standard: STD 5
- Related Protocols:
- RFC 793 (TCP)
- RFC 768 (UDP)
- RFC 792 (ICMP)
- RFC 2460 (IPv6)
Important Note: RFC 791 defines the IPv4 protocol, which is the foundation of the modern Internet. Although IPv6 is gradually being deployed, IPv4 remains the most widely used protocol on the Internet today.