Welcome back!
In our last lesson, we took a deep dive into the journey of a single web request. We captured traffic with tcpdump and used Wireshark to see the distinct roles of DNS, TCP, IP, and Ethernet. You saw how IP addresses act as the global postal service of the internet, directing packets to their final destination.
Today, we shift our perspective from an observer to an architect. Instead of just seeing how IP addresses are used, you will learn how to design an IP addressing scheme for a small network using a given CIDR block and assign valid addresses to hosts. This is a fundamental skill for any data center or network role, as it's the first step in building a new, organized, and secure network.
1. Understanding the Building Blocks: CIDR and Address Ranges
Before we design a network, let's refresh some core concepts. Your ECE background gives you a head start here, but a quick review is essential.
An IP address, like 192.168.1.100, is always paired with a subnet mask, like 255.255.255.0. The subnet mask's job is to tell the computer which part of the address is the network portion (the street name) and which is the host portion (the house number).
A more modern and efficient way to write this is using Classless Inter-Domain Routing (CIDR) notation.
192.168.1.100 with 255.255.255.0 becomes 192.168.1.100/24.
The /24 means that the first 24 bits of the 32-bit address are the network portion. This leaves the remaining 8 bits (32 - 24) for host addresses.
Special Addresses You Can't Use
Within any given IP block or subnet, two addresses are always reserved and cannot be assigned to a device:
- Network ID: The very first address, where all host bits are
0. It identifies the network itself (e.g.,192.168.1.0/24). - Broadcast Address: The very last address, where all host bits are
1. It's used to send a message to all devices on the network simultaneously (e.g.,192.168.1.255/24).
This means the usable host addresses are everything in between. For a /24 block, this would be .1 to .254.
The video below gives a great overview of these fundamental concepts, including the private IP address ranges you'll most commonly use for internal network design.
How-to Design and Configure a Home or Small Office Network
The video "How-to Design and Configure a Home or Small Office Network" by PE4Doers with David Rivera provides a clear, practical explanation of these initial concepts.
Please watch these two segments: Private Address Ranges (03:30 - 06:03): This explains the common private IP ranges (10.x.x.x, 172.16.x.x, 192.168.x.x) and the basics of IP address structure (octets). Subnet Masks and Address Ranges (06:03 - 08:55): This is a critical section. Pay close attention to how the /24 subnet mask (255.255.255.0) defines the network and host portions and determines the network ID, broadcast address, and usable range.
2. A Practical Scenario: Designing a Small Office Network
Let's put this into practice. As you know, theory is best understood through application.
Your task: You are a network administrator for a new small office. You have been assigned the private IP block 172.20.10.0/24. You need to create an IP addressing plan for the following devices:
- 1 main router (the gateway to the internet)
- 2 servers (a file server and a web server)
- 1 network printer
- 30 employee workstations
Step 1: Static vs. DHCP
First, we need to decide which devices get a permanent, unchanging (static) IP and which can get one automatically from a pool (DHCP).
- Static: Routers, servers, and printers need static IPs. You need them to be at a predictable address. Imagine if your printer's address changed every day!
- DHCP: Employee workstations are perfect for DHCP. They come and go, and it's much easier to manage a pool of addresses than to configure each machine by hand.
Step 2: Planning the Address Allocation
Let's carve up our 172.20.10.0/24 block, which gives us usable addresses from 172.20.10.1 to 172.20.10.254.
A logical plan would be:
- Router:
172.20.10.1(It's a common convention to assign the first usable IP to the gateway). - Static IPs for Servers/Printers: Let's reserve a block for them, keeping them separate from the dynamic clients.
- Servers:
172.20.10.10and172.20.10.11 - Printer:
172.20.10.20
- Servers:
- DHCP Pool for Workstations: Let's assign a large range for the 30 workstations, leaving room for growth.
- DHCP Range:
172.20.10.100to172.20.10.200(This gives us 101 available addresses).
- DHCP Range:
This is a good, organized plan. The video below demonstrates this exact process of reserving static ranges and defining a DHCP pool within a router's configuration.
How-to Design and Configure a Home or Small Office Network
Let's revisit the PE4Doers video to see how our planning translates into a real configuration.
Watch the section on reserving address groups (11:25 - 14:33). The presenter creates a plan on paper very similar to ours, setting aside ranges for switches, servers, and printers, and then defining the DHCP range to exclude those static IPs. This is the core of network IP design.
3. Taking it a Step Further with Subnetting
Our plan is good, but what if the office wants to add a guest Wi-Fi network for visitors? Putting guests on the same network as your company's file server is a major security risk.
The solution is subnetting. We can take our single /24 block and split it into multiple smaller, isolated networks (subnets). This is a crucial skill you'll be expected to understand in interviews and on the job.
The core idea is to "borrow" bits from the host portion of the address to create more network bits.
- More networks: Good for security and organization.
- Fewer hosts per network: The trade-off.
Let's see how this works.
let’s subnet your home network // You SUCK at subnetting // EP 6
The video "let’s subnet your home network" from NetworkChuck has an energetic, practice-focused style that makes this concept click. He explains subnetting as "hacking" host bits to create new networks.
Watch these key segments to understand the mechanics of subnetting: Hacking Host Bits (02:34 - 04:27): This explains the central concept: to get more networks, you must steal bits from the host portion. Creating the New Mask (04:27 - 05:19): See how borrowing bits changes the subnet mask and the CIDR notation. Finding the Increment (05:19 - 06:57): Learn how to use the new subnet mask to calculate the address ranges of your new subnets.
Our Scenario Revisited with Subnetting
We have the 172.20.10.0/24 block and need two separate networks: one for employees (~35 devices) and one for guests (~20 devices).
- How many bits to borrow? We need 2 networks. The formula is , where is the number of bits to borrow. , so we need to borrow 1 bit.
- What's the new subnet mask?
- Our original
/24mask in binary is:11111111.11111111.11111111.00000000 - We borrow the first host bit:
11111111.11111111.11111111.10000000 - The new mask is
255.255.255.128, which is a/25.
- Our original
- What are our new subnets? A
/25gives us 128 total addresses per subnet.- Subnet 1 (Employees):
172.20.10.0/25- Range:
172.20.10.0-172.20.10.127 - Usable IPs:
172.20.10.1-172.20.10.126(126 hosts - plenty for our needs)
- Range:
- Subnet 2 (Guests):
172.20.10.128/25- Range:
172.20.10.128-172.20.10.255 - Usable IPs:
172.20.10.129-172.20.10.254(126 hosts - also plenty)
- Range:
- Subnet 1 (Employees):
Now you can create two completely separate DHCP pools and firewall rules for each subnet, dramatically improving security and organization.
4. Practice Makes Perfect
Subnetting is a skill that requires practice to master. Calculating network IDs, broadcast addresses, and usable ranges needs to become second nature. Here are two excellent resources for you to use.
First, an interactive practice tool. This is great for quick drills.
The website "Practice and Learn Subnetting" is a fantastic interactive tool to hone your skills. It generates random problems and checks your work instantly.
Spend about 15 minutes on this site. Use the "Next Problem" button to generate different IP/CIDR combinations. For each one, calculate the Network ID, Broadcast IP, First Host IP, and Last Host IP. This is exactly what you need to do when designing a network.
Next, for more structured practice, this workbook provides excellent, real-world scenarios.
Ip Addressing and Subnetting Workbook
The "Ip Addressing and Subnetting Workbook" is a comprehensive PDF with dozens of practice problems. We'll focus on a few that directly match today's lesson.
Please complete the following problems from the workbook: Go to page 15 ("Custom Subnet Masks Problem 4"). Solve for the custom subnet mask and other details based on the requirements. Go to page 16 ("Custom Subnet Masks Problem 5"). Solve this problem as well. Go to page 28 ("Subnetting Problem 1"). This problem asks you to not only determine the subnetting scheme but also to identify specific subnet ranges and addresses, which is the next logical step in applying your design. Don't worry about getting them all right immediately. The goal is to work through the process of borrowing bits and calculating the new ranges.
Conclusion
Today you've made the leap from analyzing network traffic to designing the very structure of a network. This is a critical skill that underpins all network and server administration. By planning your address space, you create networks that are more secure, efficient, and easier to manage.
Key Takeaways:
- CIDR notation (
/xx) is the standard for defining the size of an IP address block. - Every network plan must account for static assignments (for servers, routers) and DHCP pools (for clients).
- Subnetting is the process of dividing a large IP block into smaller, isolated networks. This is achieved by borrowing bits from the host portion to create more network bits.
- For any subnet, you must be able to calculate the Network ID, Broadcast Address, and the range of Usable Host IPs.
In our next lesson, we will put this knowledge into immediate practice. We'll start a new module on Virtualization and Linux Installation, where you will install a Linux server distribution on a virtual machine. As part of that installation, you'll configure its network interface with a static IP address based on a design just like the ones we've created today.