In this IP address tutorial, you will learn about all IP address concepts along with IPv4 and IPv6 protocols.
It is a fundamental concept every DevOps engineer or developer should know. When you work with cloud networking, Kubernetes, or any infrastructure tool for that matter, understanding IPV4 and IPV6 is a must.
What is an IP address?
An IP address is a unique address that identifies every device on a computer network. For example, it could be a 32-bit IPV4 address or a 128-bit IVP6 address.
The following image shows the IPV4 & IPV6 formats.
Let’s look at IPV4 and IPV6 addressing in detail.
Internet Protocol version 4 (IPV4 Addressing)
IPV4 addresses range from 0.0.0.0 to 255.255.255.255. It is a total of 4294967296 IP addresses (~4.3 billion). It is divided into five classes.
IP Address Classes
|A||0.0.0.0 – 127.255.255.255|
|B||126.96.36.199 – 188.8.131.52|
|C||192.0.0.0 – 184.108.40.206|
|D||220.127.116.11 – 18.104.22.168|
|E||240.0.0.0 – 255.255.255.255|
0.0.0.0 to 0.255.255.255, that is 0.0.0.0/8, was reserved for device auto-configuration, before DHCP. Currently, only 0.0.0.0 is used for configuration, and the rest is not used anywhere. Ideally, 0.0.0.0 address means “this host on this network.”
When the Internet Engineering Task Force (IETF) realized that 4.3 billion IPV4 addresses wouldn’t be enough to accommodate future internet-connected devices. So it reserved a few IP ranges for the private network (non-internet facing IP addresses). As a result, organizations can re-use to create their private network, and the private networks can connect to the internet via NAT-enabled devices. Check out the NAT tutorial to understand more.
Private IP Ranges
The Internet Engineering Task Force (IETF) and Internet Assigned Numbers Authority (IANA)’s decided on the following ranges as private IP addresses.
- Class A – 10.0.0.0 to 10.255.255.255
- Class B – 169.254.0.0 to 169.254.255.255 (For Automatic Private IP Addressing (APIPA))
- Class B – 172.16.0.0 to 172.31.255.255
- Class C – 192.168.0.0 to 192.168.255.255
Private addresses are extended to next generate IPV6 address space as well.
100.64.0.0/10 is the shared address used by ISPs that implement carrier-grade NAT. Meaning all ISPs can use this address space.
You can also use this address in your infrastructure. For example, in Kubernetes, you can use this range for Pod CIDR. It may cause routing issues if not properly configured. Additionally, it’s important to check with your cloud provider if they support using that IP range or if they have any specific requirements or restrictions.
127.0.0.1 to 127.255.255.255 are known as loopback addresses. It is commonly known as network testing addresses
Internet Protocol version 6 (IPV6 Addressing)
IPV6 is the latest Internet Protocol. An IPV6 address looks like
1050:0000:0000:0000:0005:0600:300c:326. It contains eight octets with sixteen bits each. The total number of IPV6 addresses is 340 trillion trillion trillion addresses.
fc00::/7 block is reserved for private networks. It is known as a Unique local address.
Why do we need IPV6 Addressing?
During the 1980s, the Internet Engineering Task Force (IETF) realized that 4.3 billion IPV4 addresses wouldn’t be enough due to the growing number of connected internet devices, as each device would need a unique IP address. So in 1998, IPV6 was created to accommodate 340 trillion trillion trillion IP addresses.
IPV6 Rollout Status
IPv6 officially started deployment on 6 June 2012. The following graph from google shows the IPV6 adoption statistics. At the time of writing this guide, global IPV6 adoption is at 37%.
IP Address FAQs
How to Purchase a Static Public IP Address?
You can purchase public IP ranges from RIR(regional Internet registry) and own them for a specific period. You can also buy it through your Internet Service provider.
Who owns the Public IP Addresses?
Public IP addresses are maintained by the Internet Assigned Numbers Authority (IANA) and regional Internet registry (RIR). There are five RIRs across the globe. RIRs are responsible for assigning IPs to local registries, ISPs, and users. Once you purchase the IP, you will be the owner of it. For example, Amazon owns millions of public IP addresses purchased from RIRs.
Do DevOps engineers need to Know IP-addressing Concepts?
Yes. DevOps engineers might have to deal with CIDR rages and public and private IP addresses when working with cloud environments. So a DevOps engineer needs to know IP address concepts.
In this tutorial, we learned all the essential concepts related to IP addresses. We also looked at two important protocols. IPV4 and IPV6.
Understanding IP addresses and how they work is essential for any DevOps engineer working in cloud networking. This guide provided an overview of IPV4 and IPV6 addresses, their differences, and how they are used in modern networks.