DIT | Easy way for subnetting in computer networks


2.1   # UNDERSTAND AND EXPLAINED OF SUBNETTING WITH EXAMPLE

Subnetting is the process of dividing a larger network into smaller, more manageable sub-networks, or subnets. This helps improve network performance and security by limiting broadcast traffic and isolating network segments. In subnetting, an IP address is split into a network portion and a host portion using a subnet mask. The subnet mask determines which part of the address identifies the network and which part identifies the individual devices (hosts) within that network. By creating subnets, organizations can better allocate IP addresses, manage traffic, and implement security measures tailored to different parts of their network. A default class A, B and C network provides 16777214, 65534, 254 hosts respectively.

WHY : The way IP addresses are constructed makes it relatively simple for Internet routers to find the right network to route data into. However, in a Class A network (for instance), there could be millions of connected devices, and it could take some time for the data to find the right device. This is why subnetting comes in handy: subnetting narrows down the IP address to usage within a range of devices.

BENEFITS : Better security, smaller collision and broadcast domains, Greater administrative control and each network.

ADVANTAGES : By reducing unnecessary traffic, Subnetting improves overall performance of the network. Subnetting reduces the requirement of IP range.

DISADVANTAGES : Subnetting ads complexity in network. An experienced network administrator is required to manage the subnetted network.




2.2   # CLASSLESS INTER-DOMAIN ROUTING (CIDR) :

The slash notation (/) means how many bits are turned on (1s). Basically, the methods ISP’s use to allocate an amount of addresses to a company, a home and etc. The Internet Engineering Task Force introduced CIDR in 1993.And to replace the previous addressing architecture.

CIDR Value table:
Masks for Class A (Valid Subnet)
Networks
Subnet Mask CIDR Value Number of Subnets Number of host per subnet
255.255.255.252 /30 4,194,304 2
255.255.255.248 /29 2,097,152 6
255.255.255.240 /28 1,048,576 14
255.255.255.224 /27 524,288 30
255.255.255.192 /26 262,144 62
255.255.255.128 /25 131,072 126
255.255.255.0 /24 65,536 254
255.255.254.0 /23 32,768 510
255.255.252.0 /22 16,384 1022
255.255.248.0 /21 8192 2046
255.255.240.0 /20 4096 4094
255.255.224.0 /19 2048 8190
255.255.192.0 /18 1024 16,382
255.255.128.0 /17 512 32,766
255.255.0.0 /16 256 65,534
255.254.0.0 /15 128 131,070
255.252.0.0 /14 64 262,142
255.248.0.0 /13 32 524,286
255.240.0.0 /12 16 1,048,574
255.224.0.0 /11 8 2,094,150
255.192.0.0 /10 4 4,194,302
255.128.0.0 /9 2 8,388,606
255.0.0.0 /8 1 16,777,216

CIDR Value table:
Masks for Class B (Valid Subnet)
Networks
Subnet Mask CIDR Value Number of Subnets Number of host per subnet
255.255.255.252 /30 32,768 2
255.255.255.248 /29 8192 6
255.255.255.240 /28 4096 14
255.255.255.224 /27 2048 30
255.255.255.192 /26 1024 62
255.255.255.128 /25 512 126
255.255.255.0 /24 256 254
255.255.254.0 /23 128 510
255.255.252.0 /22 64 1022
255.255.248.0 /21 32 2046
255.255.240.0 /20 16 4094
255.255.224.0 /19 8 8190
255.255.192.0 /18 4 16,382
255.255.128.0 /17 2 32,766
255.255.0.0 /16 1 65,534

CIDR Value table:
Masks for Class C (Valid Subnet)
Networks
Subnet Mask CIDR Value Number of Subnets Number of host per subnet
255.255.255.252 /30 64 2
255.255.255.248 /29 32 6
255.255.255.240 /28 16 14
255.255.255.224 /27 8 30
255.255.255.192 /26 4 62
255.255.255.128 /25 2 126
255.255.255.0 /24 1 254

# We will use these formulas:
1)   2 range to power s > = Number of network you need (S represent subnet bits)
2)   2 range to power H – 2 > = Number of hosts on your largest segment.
3)   S + H > = Total number of host bits you have for a class of address.
4) Number of subnets = 2 range to power X – 2 (X represents number of bits borrowed)
5) Number of host = 2 range to power Y – 2 (Y represents the number of 0’s)
6) Magic number or Block size = 256 – Mask

# Decimal Equivalent of bits pattern
128 64 32 16 8 4 2 1 Value
0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 128
1 1 0 0 0 0 0 0 192
1 1 1 0 0 0 0 0 224
1 1 1 1 0 0 0 0 240
1 1 1 1 1 0 0 0 248
1 1 1 1 1 1 0 0 252
1 1 1 1 1 1 1 0 254
1 1 1 1 1 1 1 1 255

Properties:
  • Number of network limited on it.
  • Number of IP unlimited on it.
  • Its barrow from Left hand side.


2.3   # METHOD OF SUBNETTING -

Hello dear, An IP address is the combination of two addresses; network address and host address. Network address is always written first in sequence. While reading an IP address how much portion should be treated as network address and how much portion should be treated as host address is decided by an another address known as Subnet mask. An IP address is always used with Subnet mask. Without subnet mask an IP address is an ambiguous address and vice versa. Both IP address and Subnet mask consists 32 bits. These bits are divided in four octets. Octets are separated by periods and written in a sequence.We have used the two method for subnetting (Long way and Short way). If it would have to come in your mind by easy way then use it.

# FIRST ONE ITS LONG-WAY METHOD OF SUBNETTING : -

Q.1   Explain the IP address 20.0.0.0/11 in Subnetting ?

Sol.   20.000/00000.00000000.00000000
=> Number of bits (n) = 3
=> Number of network = 2 range to power n – 2 = 2x2x2 – 2 = 8 – 2 = 6
=> Number of network = 6
Truth table for network:
4 2 1 Network
0 0 1 1 (Network)
0 1 0 2 (Network)
0 1 1 3 (Network)
1 0 0 4 (Network)
1 0 1 5 (Network)
1 1 0 6 (Network)

 First network { 0 0 1 } = { 0 0 32 }
1.   20.000/00000.00000000.00000000   (0 0 32 / OFF)
=>  20.0 0 32 / 0 0 0 0 0.00000000.00000000
=>  First valid network is 20.32.0.0


2.   20.000/00000.00000000.00000000   (0 0 32 / Only last one ON)
=>  20.0 0 32 / 0 0 0 0 0.00000000.00000001
=>  Second valid IP is 20.32.0.1


3.   20.000/00000.00000000.00000000   (0 0 32 / Only last one OFF)
=>  20.0 0 32 / 0 0 0 0 0.128 64 32 16 8 4 2 1.128 64 32 16 8 4 2 0
=>  Last valid IP is 20.32.255.254


4.   20.000/00000.00000000.00000000   (0 0 32 / All are ON)
=>  20.0 0 32 / 16 8 4 2 1.128 64 32 16 8 4 2 1.128 64 32 16 8 4 2 1
=>  Broadcast IP is 20.63.255.255


5.   20.000/00000.00000000.00000000   (ON / OFF)
=>  20.128 64 32 / 00000000.00000000
=>  Broadcast IP is 20.224.0.0

Proved:
1st valid network is 20.32.0.0     |     1st valid IP is 20.32.0.1
Last valid IP is 20.63.0.254        |     Broadcast IP is 20.63.255.255
Subnet mast is 20.224.0.0


 Second network { 0 1 0 } = { 0 64 0 }
Proved:
1st valid network is 20.64.0.0     |     1st valid IP is 20.64.0.1
Last valid IP is 20.64.0.254        |     Broadcast IP is 20.95.255.255
Subnet mast is 20.224.0.0


 Third network { 0 1 1 } = { 0 64 32 }
Proved:
1st valid network is 20.96.0.0     |     1st valid IP is 20.96.0.1
Last valid IP is 20.96.0.254        |     Broadcast IP is 20.127.255.255
Subnet mast is 20.224.0.0


 Forth network { 1 0 0 } = { 128 0 0 }
Proved:
1st valid network is 20.128.0.0     |     1st valid IP is 20.128.0.1
Last valid IP is 20.128.0.254        |     Broadcast IP is 20.159.255.255
Subnet mast is 20.224.0.0


 Fifth network { 1 0 1 } = { 128 0 32 }
Proved:
1st valid network is 20.160.0.0     |     1st valid IP is 20.160.0.1
Last valid IP is 20.160.0.254        |     Broadcast IP is 20.191.255.255
Subnet mast is 20.224.0.0


 Sixth network { 1 1 0 } = { 128 64 0 }
Proved:
1st valid network is 20.192.0.0     |     1st valid IP is 20.192.0.1
Last valid IP is 20.192.0.254        |     Broadcast IP is 20.223.255.255
Subnet mast is 20.224.0.0


# SECOND ONE ITS SHORT-WAY METHOD OF SUBNETTING : -

Q.1   Explain the IP address 192.168.1.0/26 in Subnetting ?

Sol.   192.168.1.00/000000
=> Borrowed host bit are (n) = 2 (26-24)
=> Total subnet is 2 range to power N = 2x2 = 4

=> Subnet mask would be 255.255.255.192
Example 255.255.255. 0 0 / 0 0 0 0 0 0
= 255.255.255. 128 64 / 0 0 0 0 0 0   =   255.255.255.192
Subnet mask is 255.255.255.192

=> Block size would be 256 – 192 = 64
Starting counting from 0 at block of 64, so our valid subnet would be 0, 64, 128, 192
Subnet 0 192 168 1 0/26
Subnet 1 192 168 1 64/26
Subnet 2 192 168 1 128/26
Subnet 3 192 168 1 192/26

=> Number of host 2H :
Therefore, Use the formula
Total bit in IP – Bits are turned
32 – 26 = 6   => 2 range to power H = 2 range to power 6 = 2x2x2x2x2x2 = 64

=> How many valid host/subnet?
Total hosts – 2 = 64 - 2 = 62




Be updated into yourself and improve lives through DIT

Post a Comment

0 Comments