
IPv4 (Internet Protocol Version 4) is a Layer 3 (Network Layer) protocol used to uniquely identify devices on a network.
It provides:
IPv4 address length = 32 bits
An IPv4 address is divided into:
Example:
192.168.1.10
Each number (192, 168, 1, 10) is called an octet.
Each octet ranges from:
00000000 → 0
11111111 → 255
Example:
IP Address:
192.168.1.10
Binary form:
192 = 11000000
168 = 10101000
1 = 00000001
10 = 00001010
Full binary:
11000000.10101000.00000001.00001010
An IPv4 address has two main parts:
Example:
192.168.1.10/24
So:
When IPv4 was designed in the early Internet era:
IPv4 was introduced in 1981 under:
👉 Internet Engineering Task Force (IETF)
Documented in:
👉 RFC 791
IPv4 uses Dotted Decimal Notation:
Decimal format → 192.168.1.1
Binary format → 11000000.10101000.00000001.00000001
Each octet value range:
| Bits | Decimal Range |
|---|---|
| 8 bits | 0 – 255 |

Here we classify IPv4 addresses based on their usage and scope.
The main types are:
A Public IP address is an IP address that is:
It allows devices to communicate outside their local network.
Public IPs are managed by:
👉 Internet Assigned Numbers Authority (IANA)
And distributed by ISPs.
8.8.8.8
142.250.183.14
(Example: 8.8.8.8 belongs to Google DNS)
🔁 There are 5 classes in Public IPv4 address :-
📌 Definition
A Private IP address is:
Private IP ranges are defined in:
👉 RFC 1918
| Class | Range |
| 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 |
Because IPv4 addresses are limited (2³² ≈ 4.3 Billion).
To save public IPs, private IPs are used internally and converted using:
👉 NAT (Network Address Translation)
Your home network:
192.168.1.10
192.168.1.20
These are private IPs.
Router converts them into one public IP to access Internet.
A Loopback IP address is used:
It sends traffic back to the same device.
127.0.0.0 – 127.255.255.255
Most common:
127.0.0.1
Called:
👉 Localhost
Example:
ping 127.0.0.1
If reply comes → TCP/IP stack working
APIPA stands for:
Automatic Private IP Addressing
Also called:
Link-Local Address
It is automatically assigned when:
169.254.0.0 – 169.254.255.255
It cannot access Internet.
A Subnet Mask is a 32-bit number used to:
Separate the Network portion and Host portion of an IP address.
It tells us:
IP Address:
192.168.1.10
Subnet Mask:
255.255.255.0
Here:
Because:
255 = 11111111 (in binary)
Binary rule:
Example:
255.255.255.0
11111111.11111111.11111111.00000000
So:
| Class | Default Mask |
| A | 255.0.0.0 |
| B | 255.255.0.0 |
| C | 255.255.255.0 |
CIDR = Classless Inter-Domain Routing
It was introduced to:
Instead of writing subnet mask like:
255.255.255.0
We write:
/24
This means:
24 bits are network bits.
192.168.1.10/24
Means:
Because:
/24 = 255.255.255.0
| CIDR | Subnet Mask |
| /8 | 255.0.0.0 |
| /16 | 255.255.0.0 |
| /24 | 255.255.255.0 |
Before CIDR:
After CIDR:
If we write:
192.168.1.0/26
/26 means:
26 bits network
6 bits host
Hosts available:
2⁶ - 2 = 62 host
👉 Start your IT journey with our 45 Days Job-Oriented Internship – Learn Networking, Subnetting & Real IT Skills!
https://www.evisiontechnoserve.com/internships/it/45-days-job-internship-program-live