Netmask Calculation:
From: | To: |
A netmask is a 32-bit number that divides an IP address into network and host portions. It's used to determine which part of an IP address belongs to the network and which part belongs to the host.
The calculator uses the following formula:
Where:
Details: Netmasks are essential for network configuration, routing, and determining the size of a subnet. They help in dividing networks into smaller sub-networks (subnets).
Tips: Enter the CIDR notation (e.g., 24 for /24). The value must be between 0 and 32. The calculator will output the corresponding netmask in dotted-decimal notation.
Q1: What is CIDR notation?
A: CIDR (Classless Inter-Domain Routing) notation represents an IP address and its routing prefix in the format like /24, where the number indicates the number of network bits.
Q2: What are common netmask values?
A: Common values include 255.255.255.0 (/24), 255.255.0.0 (/16), and 255.0.0.0 (/8).
Q3: Can I calculate the inverse (CIDR from netmask)?
A: Yes, by counting the number of consecutive 1 bits in the netmask's binary representation.
Q4: Why do we subtract from 255.255.255.255?
A: This operation effectively sets all host bits to 0 while keeping network bits as 1.
Q5: What's the difference between netmask and wildcard mask?
A: Wildcard mask is the inverse of netmask, used in access control lists and routing protocols.