There are two main types of IP addresses: IPv4 and IPv6. Many of us are familiar with the first option. The first post in this series included an interactive section where you could test IP addresses. Stay tuned for IPv6. The numbers may seem random, but did you know your IP address matters? It matters for our privacy and could also matter to external actors if they can gain access to our systems. I, however, am talking about what it could reveal.
- Is your IP address private or public?
- How much does that affect the number of IP addresses that can be on a network?
- How are IP addresses organized into classes?
In this post, I'll focus on answering each of these questions.
Structure of an IPv4 Address
- Follows a dotted-decimal notation
- Has four octets
- Each octet has a value between 0 and 255, made up of 8 bits
- Has a total length of 32 bits in binary form

What are IP Classes?
Because IPv4 addresses have 32 bits, there are 232 possible combinations. That is over 4 billion possible IPv4 addresses. These IP addresses are split into 5 separate classes.
Class | IPv4 Address Range | Leading Bits |
---|---|---|
A | 0.0.0.0 - 127.255.255.255 | 0xxxxxxx |
B | 128.0.0.0 - 191.255.255.255 | 10xxxxxx |
C | 192.0.0.0 - 223.255.255.255 | 110xxxxx |
D | 224.0.0.0 - 239.255.255.255 | 1110xxxx |
E | 240.0.0.0 - 255.255.255.255 | 1111xxxx |
Within these ranges, there are both private and public IP addresses. Private IP address ranges are addressed in RFC1918.
What exactly are private and public IP addresses?
Going beyond which one is routable over the Internet, let's approach it from another view: What resource are we reaching for and how do we access it? RFC1918 highlights three categories to consider:
- Am I reaching for hosts within my network?
- Am I reaching hosts on another network without necessarily going across the Internet?
- Am I going out to the Internet?
If you answer yes to the first two questions, you need a private IP address. Using a private IP address offers:
- Security by isolation: Using private IP addresses is like having a private account on social media. Not everyone has access to your posts unless they follow. Similarly, your private network can only be accessed if connected to it, just as someone asking for your Wi-Fi password.
- Preserves precious IP space: On January 31, 2011, we ran out of IPv4 addresses. Using private IP addresses allowed for many devices to share one IP address to send and receive traffic (NAT). Think of a family within a home. Everyone can send and receive mail or some package, but it all goes to one address.
- Allows for IP address reuse: Private IP addresses can be reused. For example, you and your neighbor can share the same subnet of IP addresses: 192.168.1.0/24. How? Many addresses can share a house or building number of 123 but have different street names to identify the exact destination. Similarly, NAT abstracts the shared IP addresses and routes each household's traffic by a designated IP address to reach the Internet.
If you answer yes to the last question, you are using a public IP address. Using a public IP address offers:
- More uniqueness across the Internet: There are approximately 17.8 million private IP addresses, which seems a drop in the bucket with the remaining 4 billion possible public IP addresses.
- Easily accessed across the Internet: Whenever you access a website, you are accessing the web server, which uses a public IP address. You can find most websites' public IP addresses by doing a public lookup or using a terminal application command (i.e.
nslookup
ordig
) - Supports hosting and peer-to-peer connections: Public IP addresses are required when you want others to initiate connections to your device, such as running a web server, online game server, or even setting up remote access directly to your computer.
RFC1918 Private IP Address Ranges | ||
---|---|---|
Class | Range | Number of Possible Addresses |
A | 10.0.0.0 - 10.255.255.255 | 16.7 million (16,777,216) |
B | 172.16.0.0 - 172.31.255.255 | 1.04 million (1,048,576) |
C | 192.168.0.0 - 192.168.255.255 | 65,536 |
As you can see, the private IP ranges do not account for the over 4 billion IP addresses that IPv4 provides. Some are used by public-facing servers, while others have specific, reserved purposes such as experimentation and multicasting, particularly for classes D and E. This will be discussed in-depth in a later post.
What's Next?
We scratched the surface with the types of IPv4 addresses. The next part will include a deeper dive into public and private addresses, routing techniques, and a lab demo on Cisco Packet Tracer to see all IP in action.
Comments
Post a Comment