1. What is an IP Address?
2. Breakdown of 4 Octets:
Octet | Decimal Value | Binary Equivalent | Bits |
---|---|---|---|
1 | 192 | 11000000 | 8 |
2 | 168 | 10101000 | 8 |
3 | 1 | 00000001 | 8 |
4 | 10 | 00001010 | 8 |
Total = 8 + 8 + 8 + 8 = 32 bits
3. How to convert Decimal notation to Binary:
Bit Position | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
---|---|---|---|---|---|---|---|---|
Place Value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
Let's see how to convert Decimal 192 to Binary.
✅ Step-by-Step for 192:
Start with the highest place value (128) and work down:
-
192 ≥ 128 → ✅
→ Write 1, subtract 128 → 192 - 128 = 64 -
64 ≥ 64 → ✅
→ Write 1, subtract 64 → 64 - 64 = 0
Now all remaining place values are not needed, so write 0s.
Place Value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
---|---|---|---|---|---|---|---|---|
Fits in 192? | ✅ | ✅ | ✖ | ✖ | ✖ | ✖ | ✖ | ✖ |
Binary Digit | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
🔢 Final Answer: 192 = 11000000
4. Types of IP Addresses:
5. IP Address Classes:
This table offers a quick overview of the five IP address classes—A, B, C, D, and E—along with key details:
-
IP Range: The starting and ending IPs within each class.
-
Address Space: Total number of usable IP addresses in that class.
-
Subnet Mask: Defines which portion of the IP is the network vs. host.
-
CIDR Notation: A shorthand for representing subnet masks (e.g., /8, /16, /24).
6. Private IP Address Classes:
7. Loopback address:
- 127.0.0.1 is the most commonly used loopback address.
- The full range is from 127.0.0.0 to 127.255.255.255, but 127.0.0.1 is standard.
8. Understanding Subnet Mask:
-
A subnet mask defines which part of the IP address is the network and which is the host.
-
Example:
IP:192.168.1.10
Subnet Mask:255.255.255.0
⇒ Network:192.168.1
| Host:.10
9. CIDR:
9. 1 Full Form:
9. 2 What It Means:
9. 3 What is CIDR?
9. 4 CIDR Format:
192.168.1.0/24
-
192.168.1.0 → The network address
-
/24 → Tells us the first 24 bits are for the network
(which equals255.255.255.0
)
10. Subnetting:
2ⁿ - 2
CIDR |
Subnet
Mask |
Total
IPs |
Usable
IPs |
/20 |
255.255.240.0 |
4096 |
4094 |
/21 |
255.255.248.0 |
2048 |
2046 |
/22 |
255.255.252.0 |
1024 |
1022 |
/23 |
255.255.254.0 |
512 |
510 |
/24 |
255.255.255.0 |
256 |
254 |
/25 |
255.255.255.128 |
128 |
126 |
/26 |
255.255.255.192 |
64 |
62 |
/27 |
255.255.255.224 |
32 |
30 |
/28 |
255.255.255.240 |
16 |
14 |
/29 |
255.255.255.248 |
8 |
6 |
/30 |
255.255.255.252 |
4 |
2 |
10.1 Scenario 1:
Step 1: List Requirements:
Department |
Required
IPs |
Add
Buffer |
Closest
Power of 2 |
Usable
IPs |
Needed
CIDR |
IT |
50 |
+2 |
64 (2⁶) |
62 |
/26 |
HR |
30 |
+2 |
32 (2⁵) |
30 |
/27 |
Finance |
20 |
+2 |
32 (2⁵) |
30 |
/27 |
Step 2: Allocate Subnets:
Start from 192.168.1.0 and move up without overlaps.
🟦 Subnet 1: IT Department
-
Subnet:
192.168.1.0/26
-
Range:
-
Network:
192.168.1.0
-
Usable:
192.168.1.1 – 192.168.1.62
-
Broadcast:
192.168.1.63
-
🟨 Subnet 2: HR Department
-
Subnet:
192.168.1.64/27
-
Range:
-
Network:
192.168.1.64
-
Usable:
192.168.1.65 – 192.168.1.94
-
Broadcast:
192.168.1.95
-
🟩 Subnet 3: Finance Department
-
Subnet:
192.168.1.96/27
-
Range:
-
Network:
192.168.1.96
-
Usable:
192.168.1.97 – 192.168.1.126
-
Broadcast:
192.168.1.127
Department |
Subnet |
Usable IPs |
Broadcast IP |
IT |
192.168.1.0/26 |
192.168.1.1–62 |
192.168.1.63 |
HR |
192.168.1.64/27 |
192.168.1.65–94 |
192.168.1.95 |
Finance |
192.168.1.96/27 |
192.168.1.97–126 |
192.168.1.127 |
IPs Remaining (Optional Use):
-
192.168.1.128 – 192.168.1.255
(still unused) -
You can use them for future expansion or guest VLANs, etc.
10.2 Scenario 2:
Step 1: Base Network Info
-
Network:
192.168.1.0/24
-
Total IPs:
2⁸ = 256
-
We need: 5 equal subnets
Step 2: Formula for Number of Subnets
Formula:
2ˣ ≥ Number of Subnets Needed
Where:
-
x
= number of bits borrowed from host portion -
In
/24
, we have 8 host bits -
We borrow 3 bits because:
2³ = 8 ≥ 5
(this gives us 8 equal subnets)
/24 + 3 = /27
Step 3: Subnet Size Calculation
Formula for total IPs per subnet:
2ⁿ
Where:
-
n = remaining host bits = 8 - 3 = 5
So:
-
2⁵ = 32 IPs per subnet
-
Usable = 32 - 2 = 30 IPs (subtract network & broadcast)
Final Table – 5 Equal Subnets of /27
Subnet No.
Network Address
Usable IP Range
Broadcast Address
CIDR
Total IPs
Usable IPs
1
192.168.1.0
192.168.1.1 – 192.168.1.30
192.168.1.31
/27
32
30
2
192.168.1.32
192.168.1.33 – 192.168.1.62
192.168.1.63
/27
32
30
3
192.168.1.64
192.168.1.65 – 192.168.1.94
192.168.1.95
/27
32
30
4
192.168.1.96
192.168.1.97 – 192.168.1.126
192.168.1.127
/27
32
30
5
192.168.1.128
192.168.1.129 – 192.168.1.158
192.168.1.159
/27
32
30
Summary of Formulas Used:
Purpose
Formula
Example Used
No. of subnets needed
2^x ≥ required
2^3 = 8 ≥ 5
Total IPs per subnet
2^n
2^5 = 32
Usable IPs per subnet
2^n - 2
32 - 2 = 30
New subnet mask CIDR
/original + x
/24 + 3 = /27
Comments
Post a Comment