NOW WE WILL LEARN HOW TO CALUCLATE SUBNET WITHOUT AN IP CALCULATOR SOFTWARE/APPLICATION
What is Subnetting for?
Seubnetting is done to divide the block of each IP address into multiple IP address blocks. From the block that the range of IP address is much made so as to form a fewer IP address range. Before proceeding further, it is better if we know and understand in advance some of the terms that are often used in subnetting as below.
- Subnet mask is part of IP address that can describe number of host from a network. An example of a subnetmask, 255.255.255.0 (decimal subnetmask) is then converted to a binary number to 11111111.11111111.11111111.00000000 (binary subnetmask).
- Network address is an IP address the address is used to represent from a set of hosts that are joined in a network. Its function is to mark a network to be distinguished from other networks. Because of its function, the network address is also used to send packets from LAN to LAN or network one to another network.
- Broadcast address is an address that an IP address uses to send packets to all hosts on a network / LAN. Unlike the network address, the broadcast address is not intended to send packets to other networks.
- Classless Inter-Domain Routing (CIDR) is used to allocate the number of addresses that exist in a particular block. For example 192.168.0.0/24, in that example the merged CIDR is "/ 24" which is also often called by notation. In this case, we can see also the number of hosts available. / 24 then if implemented to a binary number becomes 11111111.11111111.11111111.00000000, by looking at these numbers then we can know the number of hosts available
- Valid host / valid IP is the IP address the address can be used by the host. For example in the IP address range 192.168.1.0/24, then the host number of valid hosts is 192.168.1.1 - 192.168.1.254. While the first IP address 192.168.1.0 is the Network address and the second IP address 192.168.1.255 is a broadcast address.
Subnet mask | CIDR | Subnet mask | CIDR | Subnet mask | CIDR | |||
---|---|---|---|---|---|---|---|---|
255.0.0.0 | /8 | 255.255.0.0 | /16 | 255.255.255.0 | /24 | *) | ||
255.128.0.0 | /9 | 255.255.128.0 | /17 | 255.255.255.128 | /25 | |||
255.192.0.0 | /10 | 255.255.192.0 | /18 | 255.255.255.192 | /26 | |||
255.224.0.0 | /11 | 255.255.224.0 | /19 | 255.255.255.224 | /27 | |||
255.240.0.0 | /12 | 255.255.240.0 | /20 | 255.255.255.240 | /28 | |||
255.248.0.0 | /13 | 255.255.248.0 | /21 | 255.255.255.248 | /29 | |||
255.252.0.0 | /14 | 255.255.252.0 | /22 | 255.255.255.252 | /30 | |||
255.254.0.0 | /15 | 255.255.254 | /23 |
*) Class C start at here.
How to calculate Subnetting wihout IP Calculator App???
I will explain this calculation with an example question
- 220.100.10.1/25 Specify what netmask, network address, broadcast address, valid IP, and total valid IP!
Answer :
As I explained earlier, CIDR is the binary of the netmask with the number of bits per octate is 8bit.
- Binary of subnet mask : 11111111.11111111.11111111.100000000
- Decimal of Subnet mask : 255.255.255.128 --> [read-how-to]
- Focus to binary of subnet mask (last block) = 10000000
We'll defined y as total of "1" in that number and x as total of "0".
So, y = 1 and x = 7 - Total Subnet = 2y = 21 = 2 subnets
- Total hosts / Valid IP = 2x - 2 = 27 - 2 = 128 - 2 = 126
- Key = 256 - end block of seubnet mask number (decimal)
Key = 256 - 128 = 128 - Network address = First Network address is start with 0 and maximum number of network address not more than 255
Network address = 0 , 0 + Key, (0 + Key) +key, ((0 + Key) +key) + key + ... + ...
Network address = 0 , 0 + 128
network address = 0 and 128 - Broadcast address = Network address + key - 1 (Maximum number of Broadcast is 255)
Broadcast address = 0 + 128 -1 and 128 +128 -1
Broadcast address = 127 and 255 - First Valid IP/Host = Network address + 1
First Valid IP/Host = 0 + 1 and 128 + 1
First Valid IP/Host = 1 and 129 - Last Valid IP/Host = Broadcast address -1
Last Valid IP/Host = 128 - 1 and 255 - 1
Last Valid IP/Host = 127 and 254
It can to be explained in table:
IP Address | 220.100.10.1 | - |
---|---|---|
Subnet mask | 255.255.255.128 | 255.255.255.128 |
Subnets | (subnet1) | (subnet2) |
Network address | 220.100.10.0 | 220.100.10.128 |
Broadcast address | 220.100.10.127 | 220.100.10.255 |
Fist Valid IP | 220.100.10.1 | 220.100.10.129 |
Last Valid IP | 220.100.10.127 | 220.100.10.254 |
Total Host / Subnet | 126 | 126 |
) the answer for above question is subnet 1, because the IP address 220.100.10.1 is valid for subnet 1, subnet 2 not valid for those IP.
- 198.200.20.200/26
- Identify subnetmask = 11111111.11111111.11111111.11000000
subnet mask = 255.255.255.192
I will answer with my own way - Key = 256 - end number of subnet mask
Key = 256 - 192
Key = 64
Key will finish our question - total subnet = 256 / key --> 256 is default formula
total subnet = 256 / 64
total subnet = 4 - total valid IP/host = key - 2
total valid IP/host = 64 - 2
total valid IP/host = 62 - network address = 0, 64, 128, 192 (multiple of key)
- broadcast address = 63,127,191,255 (same like first way)
- so, which one the valid subnet for this IP?
valid network for IP 198.200.20.200 is = 64 x (some number) = (the result is no more than end of host IP)
=64 x 3 = 192 --> 198.200.20.192 this is the valid network address
so if we wei write it to table
IP Address | 198.200.20.200/26 |
---|---|
subnet mask | 255.255.255.192 |
network addr. | 198.200.20.200 |
broadcasrt addr. | 198.200.20.255 |
firt valid ip | 192.200.20.193 |
last valid ip | 192.200.20254 |
total hosts/subnet | 62 |
Its up to you which one you like to use. I hope my post is helpful.
Image and text credits :pintarkomputer.com
Please read my previous post :
Introducing IP Address Part #1
Introducing IP Address Part #2
Introducing IP Address Part #3
Congratulations @ecomp! You have completed some achievement on Steemit and have been rewarded with new badge(s) :
Award for the number of upvotes
Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here
If you no longer want to receive notifications, reply to this comment with the word
STOP
Congratulations @ecomp! You have completed some achievement on Steemit and have been rewarded with new badge(s) :
You got your First payout
Award for the total payout received
Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here
If you no longer want to receive notifications, reply to this comment with the word
STOP