🌐 What is a Subnet Mask?

 

 

📖 Definition

Subnet Mask is a 32-bit number used to divide an IP address into:

  • Network ID (network portion)
  • Host ID (device portion)

 

🧠 Simple Meaning

👉 Subnet mask tells:
Which part is network and which part is host

 

📍 Example

IP Address: 192.168.1.10
Subnet Mask: 255.255.255.0

👉 Meaning:

  • Network → 192.168.1
  • Host → 10

 

🔢 How Subnet Mask Works (Binary Concept)

Subnet mask uses:

  • 1 → Network bits
  • 0 → Host bits

 

📊 Example in Binary

Subnet Mask: 255.255.255.0

Binary:

11111111.11111111.11111111.00000000

👉 First 24 bits = Network
👉 Last 8 bits = Host

 

📌 Common Default Subnet Masks

ClassSubnet MaskCIDR
A255.0.0.0/8
B255.255.0.0/16
C255.255.255.0/24

 

🧠 What is CIDR?

 

📖 Definition

CIDR (Classless Inter-Domain Routing) is a method of representing IP addresses using a slash notation (/).

 

🧠 Simple Meaning

👉 CIDR tells how many bits are used for network

 

📍 Example

192.168.1.0/24

👉 /24 means:

  • First 24 bits = Network
  • Remaining bits = Host

 

🔄 Subnet Mask ↔ CIDR Conversion

Subnet MaskCIDR
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

 

⚡ Why Subnetting is Needed?

  • Efficient use of IP addresses
  • Better network management
  • Improved security
  • Reduced network traffic

 

🧠 Easy Trick to Remember CIDR

👉 Count number of 1s in subnet mask

Example:

255.255.255.0
→ 24 ones → /24

 

🎯 Key Exam Points

  • Subnet mask divides network & host
  • CIDR uses “/” notation
  • 1 = Network, 0 = Host
  • /24 = 255.255.255.0
  • Used in subnetting

 

🎓 Interview-Ready Answers

 

❓ What is a subnet mask?

A subnet mask is a 32-bit number used to separate the network portion and host portion of an IP address.

 

❓ What is CIDR?

CIDR is a method of representing IP addresses using slash notation to indicate the number of bits used for the network portion.

 

❓ Difference between Subnet Mask and CIDR?

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