Posted On September 19, 2025

SUBNET MASK AND DEFAULT GATEWAY

admin 0 comments
>> Cybersecurity Journey - Semester 1 >> SUBNET MASK AND DEFAULT GATEWAY

SUBNET MASK

  • Think of IP address as your house number in a big city.
  • The subnet mask decides which part of the IP is the “area/street” and which part is the “house number”.

Example:
IP Address: 192.168.1.25
Subnet Mask: 255.255.255.0

  • 255 means “fixed area” (network part).
  • 0 means “house number can change” (host part).

So here:

  • 192.168.1 = Network (street)
  • .25 = Host (house)

With 255.255.255.0, you can have 254 devices (from .1 to .254) in that network.


DEFAULT GATEWAY

  • The default gateway is like the main gate of your colony.
  • Inside the colony, houses talk directly.
  • But if you want to go outside the colony (different network), you need to go through the main gate (router).

Example:

  • Your PC: 192.168.1.25
  • Friend’s PC (same network): 192.168.1.50 → talk directly.
  • Want to reach Google (142.250.183.206)?
    → Your PC sends data to the default gateway (e.g., 192.168.1.1),
    → The gateway then takes it outside to the internet.

In short:

  • Subnet Mask = Splits the IP into network part vs device part.
  • Default Gateway = The exit point (router IP) to talk to outside networks (like the internet).

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

WHAT IS CYBERSECURITY ?

Cybersecurity is the practice of protecting computer systems, networks, applications, and data from digital threats…

WEEKELY RECAP

🔹 Public vs. Private IP AddressesI learned how public IPs allow devices to connect to…

What is DNS?

DNS (Domain Name System) is like the phonebook of the internet. It translates domain names…