Skip to main content

RFC 791 - INTERNET PROTOCOL

  • Status: Internet Standard
  • Published: September 1981
  • Stream: Legacy
  • Obsoletes: RFC760
  • Errata: No Errata

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​

2. Overview​

  • 2. Overview
    • 2.1 Relation to Other Protocols
    • 2.2 Model of Operation
    • 2.3 Function Description
    • 2.4 Gateways

3. Specification​

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​

FieldSizeDescription
Version4 bitsIP version number (4)
IHL4 bitsInternet Header Length (5-15)
Type of Service8 bitsService type
Total Length16 bitsTotal length in bytes
Identification16 bitsIdentifier for reassembly
Flags3 bitsDF, MF flags
Fragment Offset13 bitsFragment offset
Time to Live8 bitsTTL
Protocol8 bitsUpper layer protocol (TCP=6, UDP=17)
Header Checksum16 bitsHeader checksum
Source Address32 bitsSource IP address
Destination Address32 bitsDestination 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)


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.