What is Internet Protocol (IP)?
Internet Protocol (IP) is the method or protocol by which data is sent from one computer to another on the internet. Each computer -- known as a host -- on the internet has at least one IP address that uniquely identifies it from all other computers on the internet.
IP is the defining set of protocols that enable the modern internet. It was initially defined in May 1974 in a paper titled, "A Protocol for Packet Network Intercommunication," published by the Institute of Electrical and Electronics Engineers and authored by Vinton Cerf and Robert Kahn.
At the core of what is commonly referred to as IP are additional transport protocols that enable the actual communication between different hosts. One of the core protocols that runs on top of IP is the Transmission Control Protocol (TCP), which is often why IP is also referred to as TCP/IP. However, TCP isn't the only protocol that is part of IP.
How does IP routing work?
When data is received or sent -- such as an email or a webpage -- the message is divided into chunks called packets. Each packet contains both the sender's internet address and the receiver's address. Any packet is sent first to a gateway computer that understands a small part of the internet. The gateway computer reads the destination address and forwards the packet to an adjacent gateway that in turn reads the destination address and so forth until one gateway recognizes the packet as belonging to a computer within its immediate neighborhood -- or domain. That gateway then forwards the packet directly to the computer whose address is specified.
Because a message is divided into a number of packets, each packet can, if necessary, be sent by a different route across the internet. Packets can arrive in a different order than the order they were sent. The Internet Protocol just delivers them. It's up to another protocol -- the Transmission Control Protocol -- to put them back in the right order.
While IP defines the protocol by which data moves around the internet, the unit that does the actual moving is the IP packet.
An IP packet is like a physical parcel or a letter with an envelope indicating address information and the data contained within.
An IP packet's envelope is called the header. The packet header provides the information needed to route the packet to its destination. An IP packet header is up to 24 bytes long and includes the source IP address, the destination IP address and information about the size of the whole packet.
The other key part of an IP packet is the data component, which can vary in size. Data inside an IP packet is the content that is being transmitted.
What is an IP address?
IP provides mechanisms that enable different systems to connect to each other to transfer data. Identifying each machine in an IP network is enabled with an IP address.
Similar to the way a street address identifies the location of a home or business, an IP address provides an address that identifies a specific system so data can be sent to it or received from it.
An IP address is typically assigned via the DHCP (Dynamic Host Configuration Protocol). DHCP can be run at an internet service provider, which will assign a public IP address to a particular device. A public IP address is one that is accessible via the public internet.
A local IP address can be generated via DHCP running on a local network router, providing an address that can only be accessed by users on the same local area network.
Differences between IPv4 and IPv6
The most widely used version of IP for most of the internet's existence has been Internet Protocol Version 4 (IPv4).
IPv4 provides a 32-bit IP addressing system that has four sections. For example, a sample IPv4 address might look like 192.168.0.1, which coincidentally is also commonly the default IPv4 address for a consumer router. IPv4 supports a total of 4,294,967,296 addresses.
A key benefit of IPv4 is its ease of deployment and its ubiquity, so it is the default protocol. A drawback of IPv4 is the limited address space and a problem commonly referred to as IPv4 address exhaustion. There aren't enough IPv4 addresses available for all IP use cases. Since 2011, IANA (Internet Assigned Numbers Authority) hasn't had any new IPv4 address blocks to allocate. As such, Regional Internet Registries (RIRs) have had limited ability to provide new public IPv4 addresses.
In contrast, IPv6 defines a 128-bit address space, which provides substantially more space than IPv4, with 340 trillion IP addresses. An IPv6 address has eight sections. The text form of the IPv6 address is xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx, where each x is a hexadecimal digit, representing 4 bits.
The massive availability of address space is the primary benefit of IPv6 and its most obvious impact. The challenges of IPv6, however, are that it is complex due to its large address space and is often challenging for network administrators to monitor and manage.
IP network protocols
IP is a connectionless protocol, which means that there is no continuing connection between the end points that are communicating. Each packet that travels through the internet is treated as an independent unit of data without any relation to any other unit of data. The reason the packets are reassembled in the right order is because of TCP, the connection-oriented protocol that keeps track of the packet sequence in a message.
In the OSI model (Open Systems Interconnection), IP is in layer 3, the networking layer.
There are several commonly used network protocols that run on top of IP, including:
- TCP. Transmission Control Protocol enables the flow of data across IP address connections.
- UDP. User Datagram Protocol provides a way to transfer low-latency process communication that is widely used on the internet for DNS lookup and voice over Internet Protocol.
- FTP. File Transfer Protocol is a specification that is purpose-built for accessing, managing, loading, copying and deleting files across connected IP hosts.
- HTTP. Hypertext Transfer Protocol is the specification that enables the modern web. HTTP enables websites and web browsers to view content. It typically runs over port 80.
- HTTPS. Hypertext Transfer Protocol Secure is HTTP that runs with encryption via Secure Sockets Layer or Transport Layer Security. HTTPS typically is served over port 443.