CHAPTER 04
Intermediate
IP Addressing Fundamentals
Updated: May 16, 2026
20 min read
# CHAPTER 4
IP Addressing Fundamentals
1. Introduction
To mail a physical letter across the country, you must write a unique, globally recognized zip code on the envelope. In the digital world, to send a data packet across the internet, you must stamp it with a unique IP Address. Operating at Layer 3 (The Network Layer) of the OSI model, the Internet Protocol (IP) address is the foundational math that makes global routing possible. Without IP addresses, the internet collapses instantly. In this chapter, we will dissect the structure of IPv4, contrast it with the massive scale of IPv6, differentiate between Public and Private addresses, and introduce the concept of CIDR notation.2. Learning Objectives
By the end of this chapter, you will be able to:- Explain the 32-bit structure of an IPv4 address.
- Differentiate between IPv4 and IPv6.
- Identify the reserved ranges for Private IP Addresses (RFC 1918).
- Understand the difference between a Public, Routable IP and a Private IP.
- Compare Static IP assignment versus Dynamic (DHCP) assignment.
-
Read and interpret basic CIDR notation (e.g.,
/24).
3. The IPv4 Structure
An IPv4 Address is a 32-bit mathematical number. Because humans are terrible at reading 32 ones and zeros (e.g.,11000000.10101000.00000001.00001010), we use Dotted Decimal Notation.
We chop the 32 bits into four blocks of 8 bits (called Octets).
Example: 192.168.1.10.
Each octet can be a number between 0 and 255.
4. IPv4 vs IPv6
Because IPv4 only has 32 bits, it can only create about 4.3 billion unique addresses. In the 1990s, engineers realized we were going to run out of IPs. To fix this, they invented IPv6.-
IPv4: 32-bit address. (Example:
192.168.1.1) -> 4.3 Billion addresses.
-
IPv6: 128-bit address. (Example:
2001:0db8:85a3:0000:0000:8a2e:0370:7334) -> 340 Undecillion addresses (Enough to assign an IP to every atom on Earth).
5. Public vs. Private IP Addresses
To delay running out of IPv4 addresses, the internet authorities reserved specific blocks of IPs exclusively for Private use (RFC 1918). These IPs are legally banned from the public internet backbone. They can only be used *inside* a local network (LAN).- 10.x.x.x (Used by massive corporate enterprises)
- 172.16.x.x to 172.31.x.x (Used by medium networks)
- 192.168.x.x (Used almost exclusively by home Wi-Fi routers)
*How do you reach the internet with a Private IP?* Your home router uses Network Address Translation (NAT) to swap your private 192.168.1.10 for a single, paid Public IP before the packet goes out to the web.
6. Static vs. Dynamic IP Assignment
How does your laptop actually get an IP address?- Dynamic (DHCP): When you join a coffee shop Wi-Fi, your laptop shouts into the void. A DHCP Server replies, *"You can borrow IP 192.168.1.50 for the next 24 hours."* It is automatic and temporary.
- Static: Servers and Printers cannot have changing IP addresses, or people wouldn't be able to find them. A Network Engineer manually types the IP address permanently into the Server's configuration.
7. Introduction to CIDR Notation
When you see an IP address like192.168.1.10, the router needs to know how large the local neighborhood is. We use CIDR (Classless Inter-Domain Routing) Notation.
Example: 192.168.1.10 /24.
The /24 means the first 24 bits of the address (192.168.1) are the "Neighborhood Name" (Network ID). The remaining bits (.10) are the specific "House Number" (Host ID). We will dive deep into this math in the next chapter on Subnetting.
8. Command Examples
How to check your IP address:
bash
9. Best Practices
-
Never hardcode DHCP IPs: A junior admin sets up a new web application and configures it to point to the database at
10.0.1.55. However, the database is using DHCP. A week later, the database restarts, the DHCP server gives it a new IP of10.0.1.80, and the entire web application crashes. Servers must *always* use Static IP addresses.
10. Common Mistakes
-
Using Public IPs Internally: A beginner sets up a lab and arbitrarily assigns the IP
8.8.8.8to their internal printer.8.8.8.8is a Public IP owned by Google. When a computer on that network tries to reach Google, the router gets confused and sends the web traffic to the printer instead. Always stick to the reserved RFC 1918 Private IP ranges for your LANs.
11. Mini Project: Find Your Local Configuration
Let's find out what your home network is using.- 1. Open a terminal or command prompt.
-
2.
Run
ipconfig(Windows) orifconfig(Mac/Linux).
-
3.
Find your "IPv4 Address". It will likely start with
192.168.or10.. This proves you are behind a NAT router using a Private IP.
-
4.
Open a web browser and Google "What is my IP". Google will return a completely different number (e.g.,
72.14.20.5). This is your Public IP, provided by your ISP!
12. Practice Exercises
- 1. Explain the architectural necessity that led to the creation of IPv6.
- 2. What are the three blocks of IPv4 addresses designated strictly for Private (non-routable) network use?
13. MCQs with Answers
Question 1
Which of the following IPv4 addresses is legally permitted to route freely across the global public internet backbone?
Question 2
When assigning an IP address to a critical corporate database server to ensure it is always reachable at the same location, which assignment method should be used?
14. Interview Questions
-
Q: Explain the difference between a Public IP address and a Private IP address. Why is it impossible for two computers in different homes with the IP
192.168.1.5to conflict with each other over the internet?
-
Q: What is CIDR notation? Briefly explain what the
/24represents at the end of an IP address.
- Q: Contrast IPv4 and IPv6 in terms of bit length and available address space.
15. FAQs
Q: What is APIPA (169.254.x.x)? A: If your computer is set to DHCP, but the DHCP server is dead or unreachable, the Windows operating system will panic and automatically assign itself a random IP starting with169.254.x.x. If you see an IP address starting with 169, you instantly know your network connectivity is completely broken.