IP has the task of deliveringpackets from the sourcehost to the destination host solely based on theIP addresses in the packetheaders. For this purpose, IP defines packet structures thatencapsulate the data to be delivered. It also defines addressing methods that are used to label the datagram with source and destination information.IP was theconnectionless datagram service in the originalTransmission Control Program introduced byVint Cerf andBob Kahn in 1974, which was complemented by aconnection-oriented service that became the basis for theTransmission Control Protocol (TCP). The Internet protocol suite is therefore often referred to asTCP/IP.
Encapsulation of application data carried byUDP to a link protocol frame
The Internet Protocol is responsible for addressinghost interfaces, encapsulating data into datagrams (includingfragmentation and reassembly) and routing datagrams from a source host interface to a destination host interface across one or more IP networks.[2] For these purposes, the Internet Protocol defines the format of packets and provides an addressing system.
Each datagram has two components: aheader and apayload. TheIP header includes a source IP address, a destination IP address, and other metadata needed to route and deliver the datagram. The payload is the data that is transported. This method of nesting the data payload in a packet with a header is called encapsulation.
IP addressing entails the assignment of IP addresses and associated parameters to host interfaces. The address space is divided intosubnets, involving the designation of network prefixes. IP routing is performed by all hosts, as well asrouters, whose main function is to transport packets across network boundaries. Routers communicate with one another via specially designedrouting protocols, eitherinterior gateway protocols orexterior gateway protocols, as needed for the topology of the network.[3]
There are four principal addressing methods in the Internet Protocol:
Unicast delivers a message to a single specific node using aone-to-one association between a sender and destination: each destination address uniquely identifies a single receiver endpoint.
Broadcast delivers a message to all nodes in the network using aone-to-all association; a singledatagram (orpacket) from one sender is routed to all of the possibly multiple endpoints associated with thebroadcast address. The network automatically replicates datagrams as needed to reach all the recipients within the scope of the broadcast, which is generally an entire networksubnet.
Multicast delivers a message to a group of nodes that have expressed interest in receiving the message using aone-to-many-of-many ormany-to-many-of-many association; datagrams are routed simultaneously in a single transmission to many recipients. Multicast differs from broadcast in that the destination address designates a subset, not necessarily all, of the accessible nodes.
Anycast delivers a message to any one out of a group of nodes, typically the one nearest to the source using aone-to-one-of-many[4] association where datagrams are routed to any single member of a group of potential receivers that are all identified by the same destination address. The routing algorithm selects the single receiver from the group based on which is the nearest according to some distance or cost measure.
A timeline for the development of the transmission control Protocol TCP and Internet Protocol IPFirst Internet demonstration, linking theARPANET,PRNET, andSATNET on November 22, 1977
The followingInternet Experiment Note (IEN) documents describe the evolution of the Internet Protocol into the modern version of IPv4:[6]
IEN 2Comments on Internet Protocol and TCP (August 1977) describes the need to separate the TCP and Internet Protocol functionalities (which were previously combined). It proposes the first version of the IP header, using 0 for the version field.
IEN 26A Proposed New Internet Header Format (February 1978) describes a version of the IP header that uses a 1-bit version field.
IEN 28Draft Internetwork Protocol Description Version 2 (February 1978) describes IPv2.
IEN 41Internetwork Protocol Specification Version 4 (June 1978) describes the first protocol to be called IPv4. The IP header is different from the modern IPv4 header.
IEN 44Latest Header Formats (June 1978) describes another version of IPv4, also with a header different from the modern IPv4 header.
IEN 54Internetwork Protocol Specification Version 4 (September 1978) is the first description of IPv4 using the header that would become standardized in 1980 asRFC760.
IEN 80
IEN 111
IEN 123
IEN 128/RFC 760 (1980)
IP versions 1 to 3 were experimental versions, designed between 1973 and 1978.[7] Versions 2 and 3 supported variable-length addresses ranging between 1 and 16 octets (between 8 and 128 bits).[8] An early draft of version 4 supported variable-length addresses of up to 256 octets (up to 2048 bits)[9] but this was later abandoned in favor of a fixed-size 32-bit address in the final version ofIPv4. This remains the dominant internetworking protocol in use in theInternet Layer; the number 4 identifies the protocol version, carried in every IP datagram. IPv4 is defined inRFC791 (1981).
Version number 5 was used by theInternet Stream Protocol, an experimental streaming protocol that was not adopted.[7]
The successor to IPv4 isIPv6. IPv6 was a result of several years of experimentation and dialog during which various protocol models were proposed, such as TP/IX (RFC1475), PIP (RFC1621) and TUBA (TCP and UDP with Bigger Addresses,RFC1347). Its most prominent difference from version 4 is the size of the addresses. While IPv4 uses32 bits for addressing, yielding c. 4.3billion (4.3×109) addresses, IPv6 uses128-bit addresses providing c.3.4×1038 addresses. Although adoption of IPv6 has been slow, as of January 2023[update], most countries in the world show significant adoption of IPv6,[10] with over 41% of Google's traffic being carried over IPv6 connections.[11]
The assignment of the new protocol as IPv6 was uncertain until due diligence assured that IPv6 had not been used previously.[12] Other Internet Layer protocols have been assigned version numbers,[13] such as 7 (IP/TX), 8 and 9 (historic). Notably, on April 1, 1994, theIETF published anApril Fools' Day RfC about IPv9.[14] IPv9 was also used in an alternate proposed address space expansion called TUBA.[15] A 2004 Chinese proposal foran IPv9 protocol appears to be unrelated to all of these, and is not endorsed by the IETF.
The design of the Internet protocol suite adheres to theend-to-end principle, a concept adapted from theCYCLADES project. Under the end-to-end principle, the network infrastructure is considered inherently unreliable at any single network element or transmission medium and is dynamic in terms of the availability of links and nodes. No central monitoring or performance measurement facility exists that tracks or maintains the state of the network. For the benefit of reducingnetwork complexity, the intelligence in the network is located in theend nodes.
As a consequence of this design, the Internet Protocol only providesbest-effort delivery and its service is characterized asunreliable. In network architectural parlance, it is aconnectionless protocol, in contrast toconnection-oriented communication. Various fault conditions may occur, such asdata corruption,packet loss and duplication. Because routing is dynamic, meaning every packet is treated independently, and because the network maintains no state based on the path of prior packets, different packets may be routed to the same destination via different paths, resulting inout-of-order delivery to the receiver.
All fault conditions in the network must be detected and compensated for by the participating end nodes. Theupper layer protocols of the Internet protocol suite are responsible for resolving reliability issues. For example, a host maybuffer network data to ensure correct ordering before the data is delivered to an application.
IPv4 provides safeguards to ensure that the header of an IP packet is error-free. A routing node discards packets that fail a headerchecksum test. Although theInternet Control Message Protocol (ICMP) provides notification of errors, a routing node is not required to notify either end node of errors. IPv6, by contrast, operates without header checksums, since currentlink layer technology is assumed to provide sufficient error detection.[25][26]
The dynamic nature of the Internet and the diversity of its components provide no guarantee that any particular path is actually capable of, or suitable for, performing the data transmission requested. One of the technical constraints is the size of data packets possible on a given link. Facilities exist to examine themaximum transmission unit (MTU) size of the local link andPath MTU Discovery can be used for the entire intended path to the destination.[27]
The IPv4 internetworking layer automaticallyfragments a datagram into smaller units for transmission when the link MTU is exceeded. IP provides re-ordering of fragments received out of order.[28] An IPv6 network does not perform fragmentation in network elements, but requires end hosts and higher-layer protocols to avoid exceeding the path MTU.[29]
TheTransmission Control Protocol (TCP) is an example of a protocol that adjusts its segment size to be smaller than the MTU. TheUser Datagram Protocol (UDP) and ICMP disregard MTU size, thereby forcing IP to fragment oversized datagrams.[30]
During the design phase of theARPANET and the early Internet, the security aspects and needs of a public, international network were not adequately anticipated. Consequently, many Internet protocols exhibited vulnerabilities highlighted by network attacks and later security assessments. In 2008, a thorough security assessment and proposed mitigation of problems was published.[31] The IETF has been pursuing further studies.[32]
^Cerf, V.; Kahn, R. (1974)."A Protocol for Packet Network Intercommunication"(PDF).IEEE Transactions on Communications.22 (5):637–648.doi:10.1109/TCOM.1974.1092259.ISSN1558-0857.Archived(PDF) from the original on 2017-01-06. Retrieved2020-04-06.The authors wish to thank a number of colleagues for helpful comments during early discussions of international network protocols, especially R. Metcalfe, R. Scantlebury, D. Walden, and H. Zimmerman; D. Davies and L. Pouzin who constructively commented on the fragmentation and accounting issues; and S. Crocker who commented on the creation and destruction of associations.