🔍

Understanding Subnet Masks

Jul 7, 2024

Understanding Subnet Masks

Introduction

  • Subnet Mask Topic: Explanation of what a subnet mask is and its significance in networking.

Basics of IP Addresses

  • IP Address: Identifier for a computer or device on a network.
  • IPv4 Address: 32-bit numeric address divided into four octets (e.g., 192.168.1.1).
    • Each octet ranges from 0 to 255.
  • Parts of an IP Address:
    • Network Address/ID: Unique identifier for a network.
    • Host Address/ID: Unique identifier for hosts within a network.

Subnet Masks Explained

  • Subnet Mask: Number similar to an IP address that distinguishes the network and host portions of the IP address.
  • Binary Format: Computers read IP addresses and subnet masks as binary numbers (1s and 0s).
  • 8-bit Octet Chart: Helps convert IP addresses and subnet masks to binary.
    • Each bit has a value doubling from right to left (1, 2, 4, 8, etc.).

Converting IP Address to Binary

  1. 192 in Binary: 11000000
  2. 168 in Binary: 10101000
  3. 1 in Binary: 00000001
  4. 0 in Binary: 00000000

Converting Subnet Mask to Binary

  • 255 in Binary: 11111111
  • 224 in Binary (explained with bits): 11100000
  • Example Subnets:
    1. 255.255.0.0: Network portion in the first two octets.
    2. 255.255.255.0: Network portion in the first three octets.
    3. 255.255.255.224: Network portion includes part of the third octet.

Importance of Network and Host Parts

  • Purpose: To manage and divide large networks into smaller networks (subnets).
  • Broadcasts: How computers locate each other in a network, affected by network size.
  • Routers: Used to separate networks and control broadcast traffic, enhancing network performance.
  • Subnetting: Process of dividing a large network into smaller subnets using subnet masks.

Example of Subnetting

  • Small Business Scenario:
    • Initial Network: 12 computers on a single network.
    • Goal: Separate into 3 smaller networks.
    • Method: Change subnet mask to divide the network using bits.

Subnet Masks and Number of Hosts

  • Borrowing Bits: Changes the default subnet mask to create more networks.
    1. Borrowing 1 bit: 2 subnets, 126 hosts each.
    2. Borrowing 2 bits: 4 subnets, 62 hosts each.
    3. Borrowing 3 bits: 8 subnets, 30 hosts each.
    4. ...up to 7 bits resulting in unusable hosts.

Subnet Classes and CIDR Notation

  • IP Address Classes (A, B, C) with corresponding default subnet masks.
    • Class A: Large organizations (up to 16 million hosts).
    • Class B: Medium to large organizations (up to 65,000 hosts).
    • Class C: Small organizations, homes (up to 254 hosts).
  • CIDR Notation: Classless Inter-Domain Routing
    • E.g., /24 for a subnet mask with 24 bits as 1s.
    • Other examples: /25, /26, /8.

Conclusion

  • Recommendation: Additional learning resources like audiobooks for networking concepts.
  • Support: Encourage subscriptions and using affiliate links for supporting the channel.