
A Subnet Mask is a 32-bit number used to divide an IP address into:
👉 Subnet mask tells:
Which part is network and which part is host
IP Address: 192.168.1.10
Subnet Mask: 255.255.255.0
👉 Meaning:
Subnet mask uses:
Subnet Mask: 255.255.255.0
Binary:
11111111.11111111.11111111.00000000
👉 First 24 bits = Network
👉 Last 8 bits = Host
| Class | Subnet Mask | CIDR |
| A | 255.0.0.0 | /8 |
| B | 255.255.0.0 | /16 |
| C | 255.255.255.0 | /24 |
CIDR (Classless Inter-Domain Routing) is a method of representing IP addresses using a slash notation (/).
👉 CIDR tells how many bits are used for network
192.168.1.0/24
👉 /24 means:
| Subnet Mask | CIDR |
| 255.0.0.0 | /8 |
| 255.255.0.0 | /16 |
| 255.255.255.0 | /24 |
| 255.255.255.128 | /25 |
| 255.255.255.192 | /26 |
| 255.255.255.224 | /27 |
| 255.255.255.240 | /28 |
| 255.255.255.248 | /29 |
| 255.255.255.252 | /30 |
👉 Count number of 1s in subnet mask
Example:
255.255.255.0
→ 24 ones → /24
A subnet mask is a 32-bit number used to separate the network portion and host portion of an IP address.
CIDR is a method of representing IP addresses using slash notation to indicate the number of bits used for the network portion.
Subnet mask is written in dotted decimal format, while CIDR is a shorthand representation using slash notation.
🧠 Memory Trick
👉 Mask = Division
👉 CIDR = Count of Network Bits
👉 Explore IP Addressing and Subnetting concepts
https://www.evisiontechnoserve.com/internships/it/45-days-job-internship-program-live