Subnet Calculator

Subnet Calculator

Subnet Calculator

Subnet Calculator

How Subnetting Works

Subnetting is a way to divide a large network into smaller, more manageable subnetworks (subnets). This helps improve security, reduce congestion, and optimize IP address allocation.

Understanding IP Addresses

An IP (Internet Protocol) address is a unique identifier assigned to each device on a network. There are two types of IP addresses:

  1. IPv4 (e.g., 192.168.1.1) – 32-bit address divided into four octets (e.g., 192.168.1.1).
  2. IPv6 (e.g., 2001:db8::1) – 128-bit address designed to support more devices.

Each IPv4 address consists of:

  • Network portion: Identifies the subnet a device belongs to.
  • Host portion: Identifies the specific device in that subnet.

Subnet Mask and CIDR Notation

A subnet mask defines how many bits are allocated to the network and host portions. It’s often represented in two ways:

  1. Dotted Decimal Notation: 255.255.255.0
  2. CIDR Notation: /24 (meaning the first 24 bits are for the network)

For example:

  • IP: 192.168.1.1/24
  • Subnet Mask: 255.255.255.0
  • Network Address: 192.168.1.0
  • Broadcast Address: 192.168.1.255
  • Usable Hosts: 192.168.1.1 to 192.168.1.254 (total 254 usable hosts)

How IP Addresses Are Assigned

IP addresses are assigned dynamically or statically:

1. Dynamic IP Assignment (DHCP)

  • DHCP (Dynamic Host Configuration Protocol) automatically assigns IP addresses from a pool.
  • Used in homes, offices, and large-scale networks to prevent conflicts and simplify management.
  • Example: Your router gives devices IPs like 192.168.1.10, 192.168.1.11, etc.

2. Static IP Assignment

  • Manually configured IPs, useful for servers, printers, and network devices that require a fixed address.
  • Example: A web server might have a fixed public IP like 203.0.113.50.

3. Private vs. Public IPs

  • Private IPs (e.g., 192.168.1.x, 10.0.0.x) are used inside local networks.
  • Public IPs are assigned by ISPs (Internet Service Providers) to allow global internet access.

 

subnet calculator