IP Addressing – Complete Beginner-Friendly Guide (Easy to Understand)
🔍 What is an IP Address?
An IP Address (Internet Protocol Address) is a logical address used to identify every device connected to a network or the internet.
Just like your home has a unique address, computers and devices also get an address so they can send and receive data.
- IP address works at Network Layer (Layer 3) of the OSI Model.
- IPv4 uses 32 bits
- IPv6 uses 128 bits
An IP address has two parts:
1️⃣ Network Part → tells which network you belong to
2️⃣ Host Part → identifies the specific device inside that network
All devices in the same network share the same network prefix, but each device must have a unique host number.
IP Addresses are assigned by IANA (Internet Assigned Numbers Authority) — the global authority for IP allocation.
🌐 Types of IP Addresses
1️⃣ IPv4 (32-bit)
Example: 192.168.1.10
2️⃣ IPv6 (128-bit)
Example: 2400:cb00:2048:1::c629:d7a2
“v” stands for version → IPv4 = version 4, IPv6 = version 6.
🖥️ How to Check Your IP Address (Windows)
✔ Method 1 – Using CMD
- Open Search → type cmd → press Enter
- On the black window (Command Prompt), type:
ipconfig - Press Enter → You will see your IP Address.
✔ Method 2 – Using Network Settings
- Press Windows Key + R
- Type:
ncpa.cpl - Press Enter → Network Connections will open
- Right-click your connected network → Properties → Details
- You can now see your IP address
🧩 IPv4 Address Classes
IPv4 is divided into 5 classes, based on the first octet:
| Class | First Octet Range | Binary Start | Prefix | Subnet Mask | Network Bits | Host Bits |
|---|---|---|---|---|---|---|
| A | 1 – 126 | 0xxxxxxx | /8 | 255.0.0.0 | 8 | 24 |
| B | 128 – 191 | 10xxxxxx | /16 | 255.255.0.0 | 16 | 16 |
| C | 192 – 223 | 110xxxxx | /24 | 255.255.255.0 | 24 | 8 |
| D | 224 – 239 | 1110xxxx | Multicast | – | – | |
| E | 240 – 255 | 1111xxxx | Experimental | – | – |
Class D & E are not used for device configuration.
🎯 How to Identify IP Address Class Easily
Just look at the first octet:
✔ Class A
- Binary: 0xxxxxxx
- Decimal range: 1 to 126
✔ Class B
- Binary: 10xxxxxx
- Decimal range: 128 to 191
✔ Class C
- Binary: 110xxxxx
- Decimal range: 192 to 223
✔ Class D & E
- Reserved for special uses
🔧 APIPA Address
APIPA = Automatic Private IP Addressing
Windows assigns APIPA when it cannot reach a DHCP Server.
APIPA Range:
➡ 169.254.0.0 – 169.254.255.255
This helps devices communicate inside the LAN, but not with the internet.
🔐 Static IP vs Dynamic IP
✔ Static IP
- Manually assigned
- Never changes
- Used for servers, CCTV, routers, etc.
✔ Dynamic IP
- Assigned automatically by DHCP
- Changes every time you reconnect
🌍 Private vs Public IP Address
🔸 Private IP
Used inside your LAN (home, office).
Not reachable from the internet.
Private IP ranges:
- Class A → 10.0.0.0 – 10.255.255.255
- Class B → 172.16.0.0 – 172.31.255.255
- Class C → 192.168.0.0 – 192.168.255.255
🔸 Public IP
- Provided by your ISP
- Globally unique
- Needed for internet access
Your router converts private → public using NAT (Network Address Translation).
🧮 What is Subnet Mask?
A Subnet Mask identifies network bits and host bits.
- 255 = Network bit
- 0 = Host bit
Examples:
| Class | Mask | Meaning |
|---|---|---|
| A | 255.0.0.0 | N.H.H.H |
| B | 255.255.0.0 | N.N.H.H |
| C | 255.255.255.0 | N.N.N.H |
✏ How to Calculate Subnet Mask from Prefix
Rule:
👉 Replace all network bits with 1 and host bits with 0
Example
IP = 192.168.1.0/24
- /24 → 24 network bits, 8 host bits
Binary of IP:
11000000.10100000.00000001.00000000
Now apply subnet mask:
11111111.11111111.11111111.00000000
Convert back to decimal:
➡ 255.255.255.0
This is the subnet mask.
✅ Summary (Easy to Remember)
- IP = Logical Address (Layer 3)
- IPv4 = 32-bit, IPv6 = 128-bit
- Classes A, B, C used for networks
- Private IP stays inside LAN
- Public IP connects to internet
- APIPA = 169.254.x.x
- DHCP gives dynamic IP
- Subnet mask decides network & host parts