logo

Calculating subnet masks

Subnet Mask Basics

  • A subnet mask determines which part of an IP address refers to the network and which part refers to the host.
  • In binary, the subnet mask is a series of 1s (for the network) followed by 0s (for the host).

Example:

  • Subnet Mask (Decimal): 255.255.255.0
  • Binary Form: 11111111.11111111.11111111.00000000
  • CIDR Notation: /24 (since there are 24 ones)

2. Formula for Calculating Subnet Masks

  • Subnet Mask Calculation Formula:Number of Subnets=2n\text{Number of Subnets} = 2^nNumber of Subnets=2n
    • n = number of bits borrowed from the host portion.
  • Host Calculation Formula:Usable Hosts per Subnet=2h−2\text{Usable Hosts per Subnet} = 2^h – 2Usable Hosts per Subnet=2h−2
    • h = number of host bits (subtract 2 for network and broadcast addresses)

logo

বিসিএস, ব্যাংক, শিক্ষক নিয়োগ, পিএসসি ও অন্যান্য চাকরির পরীক্ষার জন্য একটি সহায়ক প্লাটফর্ম।

Contact Us

Email: contact@openexamschool.com


© 2025 Open Exam School. All rights reserved. Developed By Nuton.