DEV Community

Manoj Kumar
Manoj Kumar

Posted on

blog on IP address and Subnet

🌐 Understanding IP Address and Subnetting (Simple & Human-Friendly Guide)

Hi everyone,

Today I’m going to explain a very important networking concept in a simple way — IP Address and Subnetting.

At first, these topics may feel confusing, but once you understand the basics, it becomes very interesting šŸ‘


šŸ“Œ What is an IP Address?

An IP Address (Internet Protocol Address) is like a home address for your device on the internet.

šŸ‘‰ Just like your house has an address so people can find it,

šŸ‘‰ your computer or mobile also has an IP address so data can reach it.


šŸ” Example

192.168.1.1
Enter fullscreen mode Exit fullscreen mode

This is a typical IPv4 address.


🧠 Types of IP Address

1. Public IP

  • Given by your Internet Service Provider (ISP)
  • Used to communicate over the internet

2. Private IP

  • Used inside a local network (like home WiFi)
  • Example: 192.168.x.x

šŸŒ IPv4 vs IPv6

IPv4

  • Format: 4 numbers separated by dots
  • Example: 192.168.1.1
  • Limited addresses (~4 billion)

IPv6

  • Format: hexadecimal numbers
  • Example: 2001:0db8:85a3::8a2e:0370:7334
  • Huge number of addresses

šŸ’” What is Subnetting?

Subnetting means dividing a large network into smaller networks (subnets).

šŸ‘‰ Think like this:

A big apartment → divided into smaller flats

Same way, a network → divided into smaller parts


ā“ Why Subnetting is Needed?

  • Improves network performance
  • Reduces traffic
  • Better security
  • Easy to manage large networks

🧩 How Subnetting Works?

Every IP address has two parts:

  1. Network Part → identifies the network
  2. Host Part → identifies the device

šŸ”¢ Subnet Mask

A subnet mask is used to separate the network and host parts.

Example:

IP Address:   192.168.1.10
Subnet Mask:  255.255.255.0
Enter fullscreen mode Exit fullscreen mode

šŸ‘‰ Here:

  • 192.168.1 → Network
  • 10 → Host

🧠 Simple Explanation

  • Subnet mask tells: šŸ‘‰ "Which part is network?" šŸ‘‰ "Which part is device?"

⚔ CIDR Notation

Instead of writing subnet mask, we use CIDR notation.

Example:

192.168.1.0/24
Enter fullscreen mode Exit fullscreen mode

šŸ‘‰ /24 means first 24 bits are network


šŸ” Subnetting Example

If you have:

Network: 192.168.1.0/24
Enter fullscreen mode Exit fullscreen mode

You can divide into:

  • 192.168.1.0/26
  • 192.168.1.64/26
  • 192.168.1.128/26
  • 192.168.1.192/26

šŸ‘‰ Each is a smaller subnet


šŸ–„ļø Real-Life Example

In a college:

  • Admin block → one subnet
  • Lab → another subnet
  • Library → another subnet

This avoids network congestion šŸ‘


⚔ Advantages of Subnetting

āœ” Better performance

āœ” Improved security

āœ” Efficient IP usage

āœ” Easy troubleshooting


🧠 Why this is Important?

  • Very common in networking interviews
  • Used in real-world networks (companies, colleges, cloud)
  • Helps in understanding how the internet works

āœ… Conclusion

To summarize:

  • IP Address = Identity of a device
  • Subnetting = Dividing network into smaller parts
  • Subnet Mask = Defines network & host

Once you understand this, networking becomes much easier šŸš€


Thanks for reading 😊

Top comments (0)