Share:
Notifications
Clear all

Subnetting

1 Posts
1 Users
0 Reactions
447 Views
(@tridandik)
Posts: 12
Active Member
Topic starter
 

Subnetting is the process of dividing a larger network into smaller, more manageable sub-networks, known as subnets. It helps in efficient use of IP addresses and enhances network security and performance.

Why Subnetting?

  • Efficient IP address use: Prevents wastage of IP addresses.
  • Improved network management: Makes it easier to manage and troubleshoot networks.
  • Increased security: Subnetting can isolate parts of a network, reducing the impact of security breaches.

Key Concepts in Subnetting

  1. IP Address:

    • An IP address is a unique identifier for a device on a network.
    • It is typically written in the form xxx.xxx.xxx.xxx (IPv4), where each xxx is a value between 0 and 255 (8 bits per octet, 32 bits in total).
  2. Subnet Mask:

    • A subnet mask determines which part of the IP address refers to the network and which part refers to the host.
    • The subnet mask is often written in the same dotted-decimal format (e.g., 255.255.255.0).
    • It can also be represented in CIDR notation as /xx (e.g., 192.168.1.0/24).
  3. Network and Host Portions:

    • Network Portion: The part of the IP address that identifies the specific network.
    • Host Portion: The part that identifies the specific device or host within that network.

Subnetting Steps

  1. Determine the Network Address:

    • Identify the network address from the given IP address and subnet mask.
  2. Calculate the Subnet Mask:

    • Convert the subnet mask into binary. For example, 255.255.255.0 becomes 11111111.11111111.11111111.00000000.
    • Count the number of 1s in the binary subnet mask to find the prefix length (e.g., /24).
  3. Divide the Network into Subnets:

    • You can subnet further by borrowing bits from the host portion of the IP address. Each bit borrowed doubles the number of subnets but halves the number of hosts per subnet.
    • For example, if you start with a /24 network (255.255.255.0), you can create subnets like /25 (255.255.255.128) or /26 (255.255.255.192).
  4. Calculate the Number of Subnets and Hosts:

    • Subnets: The number of subnets is calculated by the formula: Number of Subnets=2n\text{Number of Subnets} = 2^n Where n is the number of bits borrowed from the host portion.
    • Hosts: The number of usable host addresses in each subnet is given by: Number of Hosts=2h−2\text{Number of Hosts} = 2^h - 2 Where h is the number of remaining host bits (subtracting 2 for the network and broadcast addresses).

Example of Subnetting

Consider a network with the IP address 192.168.1.0/24 and you want to divide it into subnets:

Step 1: Start with the original network:

  • Network: 192.168.1.0/24 (subnet mask 255.255.255.0).
  • This gives you 256 IP addresses (from 192.168.1.0 to 192.168.1.255).

Step 2: Subnetting into 2 subnets:

  • To divide into 2 subnets, borrow 1 bit from the host portion of the IP address. This changes the subnet mask to /25.
    • The new subnet mask: 255.255.255.128.
    • This divides the network into 2 subnets:
      1. Subnet 1: 192.168.1.0/25 (range: 192.168.1.0 - 192.168.1.127).
      2. Subnet 2: 192.168.1.128/25 (range: 192.168.1.128 - 192.168.1.255).

Step 3: Calculate the number of hosts in each subnet:

  • Each subnet has 2^7 - 2 = 126 usable host addresses (since 7 bits are left for hosts, and 2 addresses are reserved for the network and broadcast addresses).

Subnetting Example Breakdown:

  • Original Network: 192.168.1.0/24
  • Subnet Mask: 255.255.255.0
  • Subnets: 192.168.1.0/25 and 192.168.1.128/25
  • Usable Hosts per Subnet: 126 hosts

Common Subnetting Notations:

  • /24 = 255.255.255.0 (Standard class C network, 256 IPs).
  • /25 = 255.255.255.128 (Divides into 2 subnets, 128 IPs per subnet).
  • /26 = 255.255.255.192 (Divides into 4 subnets, 64 IPs per subnet).
  • /27 = 255.255.255.224 (Divides into 8 subnets, 32 IPs per subnet).

Summary of Subnetting Benefits:

  • Optimized IP Address Usage: Avoids wasting addresses by allocating the correct number of addresses for each subnet.
  • Improved Network Security: Can isolate subnets to minimize the spread of issues.
  • Better Performance: Reduces traffic by confining local traffic within a subnet.

Subnetting is a crucial skill for network administrators and anyone working with IP addresses in order to design, manage, and scale networks efficiently.

 
Posted : 02/12/2024 9:54 pm
Share: