The Internet Protocol (IP) is the fundamental communication standard that makes the internet work. Every device connected to the internet — every smartphone, laptop, server, IoT sensor, and router — communicates using Internet Protocol. IP defines how data is addressed, packaged into packets, transmitted across networks, and reassembled at the destination. Without IP, there is no internet. Understanding how IP works, what IP addresses are, and the critical differences between IPv4 and IPv6 is essential knowledge for anyone working in networking, server administration, or modern software development.
This complete guide covers everything: what the Internet Protocol is, how it routes data across global networks, how IP addresses work, the TCP/IP model, the difference between IPv4 and IPv6, NAT, subnetting, IP security considerations, and how to view and configure IP addresses on Linux servers.
What Is the Internet Protocol?
The Internet Protocol is a network layer communication protocol defined in RFC 791 (IPv4, 1981) and RFC 8200 (IPv6, 2017). It is the principal protocol of the Internet Protocol suite (commonly called TCP/IP) — the foundational set of rules that govern how data is transmitted across interconnected networks that collectively form the internet.
IP has two core responsibilities:
- Addressing: Assigning a unique numerical address (an IP address) to every device on the network so that data can be directed to the correct destination.
- Routing: Defining how data packets move from the source device through intermediate networks and routers to the destination device — even when that journey spans thousands of miles and dozens of intermediate network hops.
Critically, IP is a connectionless, best-effort protocol. This means it does not establish a dedicated connection before sending data, does not guarantee that packets will arrive, does not guarantee they will arrive in order, and does not guarantee they will arrive without duplication. Reliability, ordering, and error correction are handled by higher-level protocols — principally TCP (Transmission Control Protocol) in the transport layer, which sits above IP in the protocol stack.
How IP Works: Packets, Addressing, and Routing
Data Packets
IP does not transmit data as a single continuous stream — it breaks data into discrete units called packets (sometimes called datagrams). Each packet contains two sections: the IP header and the payload.
The IP header contains the metadata IP needs to deliver the packet: the source IP address, the destination IP address, the protocol version (IPv4 or IPv6), the packet length, a Time to Live (TTL) counter that prevents packets from circulating indefinitely, and other routing and fragmentation fields. The payload is the actual data being transmitted — typically a TCP or UDP segment containing application data.
Breaking data into packets provides significant advantages over circuit-based transmission: different packets from the same data stream can take different paths through the network (choosing whichever route is available and efficient at the time), network resources are shared across many simultaneous connections rather than dedicated to a single one, and a failure on one network path does not necessarily break the entire connection.
IP Addresses
Every device that sends or receives data on an IP network requires a unique IP address — a numerical label that identifies both the device itself and the network it belongs to. An IP address serves two purposes simultaneously: it identifies the specific device (the host) and the network segment it is connected to. This hierarchical structure is what makes routing possible: routers use the network portion of an IP address to direct packets toward the correct destination network, and then the host portion identifies the specific device within that network.
How IP Routing Works
When a device sends a packet, the packet travels through a series of routers — specialised network devices whose job is to forward packets toward their destination. Each router makes an independent forwarding decision by consulting its routing table: a database of known network prefixes and the next-hop router or interface to use for each. This hop-by-hop forwarding continues until the packet reaches the destination network, where it is delivered to the target device.
Routing tables are built and maintained through routing protocols. BGP (Border Gateway Protocol) is the routing protocol that manages routing between autonomous systems (large, independently managed networks like ISPs, cloud providers, and large enterprises) — making it the protocol that effectively stitches the global internet together. Within individual networks, interior routing protocols like OSPF, EIGRP, and RIP manage routing between internal routers.
The TCP/IP Model: Where Internet Protocol Fits
IP sits within the Internet layer of the TCP/IP model — a four-layer conceptual framework that organises network communication protocols by function:
- Link Layer (Layer 1): Handles physical transmission of data over a single network segment — Ethernet, Wi-Fi, fibre optic. Responsible for framing, hardware addressing (MAC addresses), and physical error detection. Protocols: Ethernet, 802.11 (Wi-Fi), ARP.
- Internet Layer (Layer 2): Handles logical addressing and routing across multiple networks. This is where IP operates. Responsible for assigning IP addresses, determining routing paths, and encapsulating data into IP packets. Protocols: IP (IPv4/IPv6), ICMP, IPSec.
- Transport Layer (Layer 3): Handles end-to-end communication between applications on different hosts. TCP provides reliable, ordered delivery with error correction. UDP provides faster, connectionless delivery without reliability guarantees. Protocols: TCP, UDP, QUIC.
- Application Layer (Layer 4): The protocols used by applications to communicate. Built on top of the transport layer. Protocols: HTTP/HTTPS, DNS, SMTP, SSH, FTP, DHCP.
When you load a webpage, for example: your browser (application layer) sends an HTTP request; TCP (transport layer) breaks it into segments and handles reliable delivery; IP (internet layer) addresses each segment and routes it across networks; and the link layer handles the physical transmission on each individual network hop.
What Is an IP Address? Public, Private, Static, and Dynamic
Public vs Private IP Addresses
Not all IP addresses are directly reachable from the public internet. The IANA (Internet Assigned Numbers Authority) has designated specific IP address ranges as private — for use within private networks (homes, offices, data centres) only. These ranges are:
10.0.0.0to10.255.255.255(10.0.0.0/8) — Class A private range172.16.0.0to172.31.255.255(172.16.0.0/12) — Class B private range192.168.0.0to192.168.255.255(192.168.0.0/16) — Class C private range, most commonly seen in home networks
All other IP addresses are public — globally unique and routable across the internet. Your home router has one public IP address (assigned by your ISP) and assigns private addresses (like 192.168.1.x) to all your local devices. Network Address Translation (NAT) on the router translates between private addresses and the single public address for outbound traffic.
Static vs Dynamic IP Addresses
A static IP address is permanently assigned to a device — it does not change between reboots or sessions. Static IPs are used for servers, network infrastructure devices, printers, and any device that needs to be reliably reachable at a known address. A dynamic IP address is automatically assigned by a DHCP (Dynamic Host Configuration Protocol) server each time a device connects to the network and may change over time. Dynamic IPs are used for most end-user devices — laptops, smartphones — where a stable, fixed address is not required.
Subnets and CIDR Notation
A subnet is a logical subdivision of a larger IP network. Subnetting divides an IP address space into smaller, more manageable groups, improving routing efficiency and network security (by limiting broadcast domains and enabling firewall rules between subnets). Subnets are expressed using CIDR (Classless Inter-Domain Routing) notation: an IP address followed by a slash and the number of bits in the network prefix. For example, 192.168.1.0/24 means the first 24 bits identify the network (192.168.1) and the remaining 8 bits identify hosts — supporting up to 254 usable host addresses (192.168.1.1 through 192.168.1.254).
IPv4: The Original Internet Protocol
Internet Protocol version 4 (IPv4) was defined in RFC 791 in 1981 and remains the most widely deployed IP version today, though it is being actively supplemented by IPv6. IPv4 uses 32-bit addresses, written as four decimal octets separated by dots — for example, 203.0.113.45. Each octet can range from 0 to 255, giving IPv4 a total address space of 2³² = approximately 4.29 billion unique addresses.
When IPv4 was designed, 4.29 billion addresses seemed more than sufficient. However, the explosive growth of the internet — particularly the proliferation of smartphones, IoT devices, cloud services, and always-connected appliances — exhausted the global pool of available IPv4 addresses. IANA assigned the last IPv4 address blocks to regional registries in February 2011. Regional registries subsequently exhausted their allocations over the following years.
NAT: The IPv4 Address Exhaustion Workaround
Network Address Translation (NAT) is the primary technique that has allowed IPv4 to remain functional despite address exhaustion. NAT allows an entire private network (with many devices using private IP addresses) to share a single public IP address. When a device on a private network initiates an outbound connection, the router translates the private source address to the single public address and tracks the translation in a NAT table so that responses can be directed back to the correct private device. NAT has been enormously successful at extending the life of IPv4 but introduces complexity, breaks true end-to-end connectivity, creates problems for peer-to-peer applications and some VPN configurations, and adds latency and processing overhead.
IPv6: The Next-Generation Internet Protocol
Internet Protocol version 6 (IPv6) was developed by the IETF specifically to address IPv4 address exhaustion. Defined in RFC 2460 (1998) and updated in RFC 8200 (2017), IPv6 uses 128-bit addresses — providing an address space of 2¹²⁸, which is approximately 340 undecillion unique addresses (340,282,366,920,938,463,463,374,607,431,768,211,456). This is sufficient to assign a unique IP address to every atom on the surface of the Earth, many times over.
IPv6 addresses are written as eight groups of four hexadecimal digits separated by colons — for example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334. Consecutive groups of all zeros can be compressed using double colons (::), so the above can be written as 2001:db8:85a3::8a2e:370:7334.
Key Improvements IPv6 Brings Beyond Address Space
- Eliminates NAT: Every device gets a globally unique, routable address, restoring true end-to-end connectivity without translation layers. This simplifies network architecture and benefits peer-to-peer applications, VoIP, gaming, and IoT.
- Stateless Address Autoconfiguration (SLAAC): Devices can automatically generate their own IPv6 addresses based on the network prefix advertised by the local router — without needing a DHCP server for basic address assignment.
- Simplified, more efficient packet headers: IPv6 fixed headers are simpler and more efficiently parsable by routers than IPv4 headers, despite carrying more address information. Optional extension headers are used for features like fragmentation and security rather than burdening every packet with overhead for rarely-used features.
- IPSec built-in: IPv6 was designed with IPSec (IP Security) as an integral component — providing authentication and encryption capabilities natively, though deployment of IPSec remains optional in practice.
- Better multicast and no broadcast: IPv6 replaces IPv4's broadcast mechanism with more efficient multicast and anycast addressing, reducing unnecessary network traffic.
- Improved routing efficiency: IPv6's larger address space and hierarchical allocation design allow for more efficient route aggregation, reducing the size of global routing tables compared to fragmented IPv4 address allocations.
IPv4 vs IPv6: Direct Comparison
| Feature | IPv4 | IPv6 |
|---|---|---|
| Address length | 32 bits | 128 bits |
| Address count | ~4.29 billion | ~340 undecillion |
| Address format | Dotted decimal (e.g. 192.168.1.1) | Hexadecimal with colons (e.g. 2001:db8::1) |
| Address exhaustion | Exhausted — IANA pool depleted 2011 | Virtually unlimited for foreseeable future |
| NAT required | Yes — widely used to extend address space | No — every device gets unique global address |
| Address configuration | Manual or DHCP | Manual, DHCPv6, or SLAAC (autoconfiguration) |
| Security (IPSec) | Optional add-on | Integral to protocol design |
| Header complexity | Variable-length with many fields | Fixed 40-byte header, extension headers for options |
| Broadcast | Supported | Replaced by multicast and anycast |
| Global deployment (2026) | Still dominant but declining | ~45%+ of global internet traffic and growing |
Internet Protocol Security Considerations
IP itself was not designed with security as a primary goal — RFC 791 was written in a different era when the internet was a small, trusted academic network. Several IP-level security concerns are relevant for network and server administrators:
- IP spoofing: Attackers can craft packets with a forged source IP address to misrepresent their identity, bypass IP-based access controls, or amplify DDoS attacks. BCP 38 (network ingress filtering) recommends that ISPs and network operators drop packets whose source addresses do not match the expected origin range — but adoption is incomplete globally.
- DDoS amplification attacks: Protocols like DNS, NTP, and memcached can be used with spoofed source IPs to amplify attack traffic — a small query with a forged source address causes a large response to be sent to the forged victim address. Proper network ingress filtering and rate-limiting these UDP services reduces amplification risk.
- Routing hijacking (BGP hijacking): BGP, the protocol that routes traffic between large networks, can be exploited by announcing IP prefixes that do not belong to the announcing network — redirecting traffic through attacker-controlled infrastructure. BGP security extensions (RPKI) provide cryptographic verification of route announcements and are being progressively deployed.
- ICMP-based reconnaissance: ICMP (Internet Control Message Protocol) — which runs alongside IP and is used for ping, traceroute, and network diagnostic messaging — can be used by attackers for network reconnaissance. Selectively filtering ICMP at firewalls while allowing necessary ICMP types (particularly for IPv6, where ICMPv6 is more critical to protocol function) is standard practice.
- IPv6-specific considerations: Networks that have not yet fully deployed IPv6 but have IPv6 enabled on their devices (which is common — most modern operating systems enable IPv6 by default) can have unmonitored IPv6 traffic bypassing IPv4-focused security controls. Ensuring your firewalls and monitoring tools handle IPv6 as rigorously as IPv4 is important in dual-stack environments.
💡 None of these worked? Skip the guesswork.
Get Expert Help →How to View and Configure IP Addresses on Linux
For system administrators managing Linux servers, the following commands cover the essential IP address viewing and configuration tasks:
The ip command (part of the iproute2 package) is the modern tool for IP address management on Linux. The older ifconfig command is deprecated on most distributions but may still be present.
# Show all network interfaces and their IP addresses
ip addr show
# Show routing table
ip route show
# Show a specific interface (e.g., eth0)
ip addr show eth0
# Ping a host to test connectivity (IPv4)
ping -4 8.8.8.8
# Ping a host to test IPv6 connectivity
ping -6 2001:4860:4860::8888
Use this to assign an IP address temporarily (does not survive a reboot). Replace eth0 with your interface name and adjust the address and prefix as needed.
# Add a static IP address temporarily
sudo ip addr add 192.168.1.100/24 dev eth0
# Set the default gateway
sudo ip route add default via 192.168.1.1
# Remove an IP address
sudo ip addr del 192.168.1.100/24 dev eth0
On Ubuntu 18.04+ and Debian systems using Netplan, static IP configuration is done in YAML files under /etc/netplan/.
# Edit the netplan configuration (filename may vary)
sudo nano /etc/netplan/00-installer-config.yaml
# Example static IPv4 and IPv6 configuration:
network:
version: 2
ethernets:
eth0:
addresses:
- 192.168.1.100/24
- 2001:db8::100/64
routes:
- to: default
via: 192.168.1.1
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
# Apply the configuration
sudo netplan apply
# Edit the network interface config file
sudo nano /etc/sysconfig/network-scripts/ifcfg-eth0
# Set these values:
BOOTPROTO=static
IPADDR=192.168.1.100
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=8.8.8.8
ONBOOT=yes
# Restart networking
sudo systemctl restart NetworkManager
# Check your public-facing IP address from the command line
curl -4 ifconfig.me # Public IPv4 address
curl -6 ifconfig.me # Public IPv6 address
Professional Server Management and IP Configuration
For businesses running Linux servers in production — whether on-premises or in the cloud — correct IP address configuration, routing, and network security settings are foundational to reliable server operation. Incorrect IP configuration can cause connectivity loss, routing failures, or security gaps that expose servers to unnecessary risk. CloudHouse Technologies provides professional server management services that cover IP addressing, network configuration, firewall rules, and ongoing infrastructure monitoring — ensuring your servers are correctly configured and reliably reachable at all times.
Conclusion
The Internet Protocol is the foundational communication standard that makes the modern internet possible — defining how data is addressed, packaged, routed, and delivered across the world's interconnected networks. IPv4, despite its address exhaustion challenges addressed through NAT and careful allocation, continues to carry the majority of internet traffic in 2026. IPv6 is actively growing, now carrying over 45% of global internet traffic, and will increasingly become the dominant protocol as IPv4 addresses become scarcer and dual-stack deployments mature. For anyone building or managing network infrastructure, understanding how IP works, how IP addresses are structured, and how to configure them correctly on Linux servers is essential foundational knowledge that underpins every other aspect of networking and server administration.
