Subnet
>>What isSubnet? Whyit isused?
-Subnetislogical network,withrespecttosingle IPaddress.Yes,itispossible.Andwe all are singitwiththe helpof
SUBNET MASK. SubnetMaskis numberor we can say bitpattern that identifiesnetwork-idandhost-idfromparticularIP
address.
IP Address Class(With Decimal ranges) Default Subnet Mask (slashnotation for mask)
1 Class A (0-127) 255.0.0.0 (/8)
2 Class B (128-191) 255.255.0.0 (/16)
3 Class C(192-223) 255.255.255.0 (/24)
4 Class D (224-239) 255.255.255.255 (/32)
5 Class E (240-255) NOT HAVING SUBNET MASK
Table 1: Defaultsubnetmasksforparticular IPAddressclass.
Subnetmasksare definingthe rangesof thatclassaddressingsothat theycouldbe use inwell managedmanner.Italso
definesnumberof hostsinnetwork. indefaultmask255 indicatesnetworkaddresssection,0indicatescorrespondinghost
section. slashnotationformask iscountof 1’s in subnetmask,whichisalsoone standardmasknotation.
AndSubnetdividesnetworkinlogical differentnetworks asperorganizational requirement majorissuesare
security,addressflexibility, performance,systemmanagement,userperspective,andalsoavoidwastage of ip
addresses(ex.ifyouare usingclassC thenyouhave 254 IPaddressesandonly100 requiredthenyoucan use remained154
IP addressesforotherpurpose withsubnetting).
Fundamental needsforsubnettingof anynetwork:
a) Require numberof networksinone organization
Ex. Inour college,if we wanttolimiteverydepartmental accessthenwe have tosubnetournetworkin 5
networks(mech,prod,civil,E&TC,comp).
b) Require numberof hostsineverynetwork.
Ex. If we want to divide networkas30 hostsineverynetworkthenwehave tosubnets.
IP Addressand
SubnetMask
IP address=NetID+HostID
How to subnetting?
A)Subnetting inthe base of numberof networks:
Subnettingprocessishavingthree basicsteps.Butfirstwe decide followingscenariosandgoingwithitwe can
determine steps.
Type A:-
We have IPADDRESS =172.20.26.0, It isbelongstoClassC Addressing. ThenDefaultSUBNETMASK=255.255.255.0
Andour organizationhas3 offices(A,B,C) thenwe require 5(1,2,3,4,5) networks
You can say, itrequiresonly3networksbecause there are only3 offices,butrememberthatroutertorouter
networklinksare alsopresent.There forwe have tocreate 5 subnetsfromone priornetworks.
STEPS FOR SUBNETTING:-
 DETERMINE numberof networks : How manynetworksare requiredinparticularnetwork?
We alreadyfigure out,inourcase require numberof networksare =5
 CONVERTit to BINARY:
128 64 32 16 8 4 2 1 bits
number
0 0 0 0 0 1 0 1 5
 CALCULATE howmany bitsrequiredforthe numberof networks.
We can checkthat our numberof networks=5
Whichis inbinarywe can write withonly3 bitsi.e.=101
 RESERVE bitsinsubnetmask:
Reservingbitsmeansthat,we have toadd 1’s innetworkID whichare havingsame numberasper
calculatednumberof bitsfornetworks.
Let’sDo it.
Our DefaultSubnetMaskfor ClassC =11111111.11111111.11111111.00000000 (255.255.255.0=/24)
ReservedSubnetMask=11111111.11111111.11111111.11100000 (255.255.255.224=/27)
Reserved Bits
 FINDthe incrementforsubnets: incrementisthe range of IPaddressesforeverysubnets.
Checklast1’s bitfromsubnetmaskand derive binaryvalue forit. alwayscheckitfromrightto left
and forits binaryvalue checkfromlefttoright.
In our case, last 1 is,
11111111.11111111.11111111.11100000
Andits value is,
128 64 32 16 8 4 2 1
1 1 1 0 0 0 0 0
IncrementValue=32
 FINDRANGES withthe helpof increament:
So we have to add incrementtocreate rangesandcreate partitionsinnetwork.
172.20.26.0-172.20.26.31 NETWORK - 1
172.20.26.32-172.20.26.63 NETWORK - 2
172.20.26.64-172.20.26.95 NETWORK – 3
172.20.26.96-172.20.26.127 NETWORK – 4
172.20.26.128-172.20.26.159 NETWORK – 5
And,Here our subnettingiscompleted. We canuse these IPaddresseswith SubnetMaskas
255.255.255.224
Type B>
ClassC= 200.2.20.0 Subnetsrequired=50(can’tcreate diagramwith50 networkshere….don’tmind:) )
STEPS FOR SUBNETTING:-
 DETERMINE numberof networks:
Here alreadygiventhatrequirednetworksare = 50.
 CONVERTit to BINARY:
128 64 32 16 8 4 2 1 bits
number
0 0 1 1 0 0 1 0 50
 CALCULATE howmany bitsrequiredforthe numberof networks:6bits
50 in Binarywe can write with6 bitsi.e. =110010
 RESERVE bitsinsubnetmask:By adding6 bits
Our DefaultSubnetMaskforClassC =11111111.11111111.11111111.00000000 (255.255.255.0=/24)
ReservedSubnetMask=11111111.11111111.11111111.11111100 (255.255.255.252=/30)
ReserveBits
 FINDthe incrementforsubnets:
11111111.11111111.11111111.11111100
Andits value is,
128 64 32 16 8 4 2 1
1 1 1 1 1 1 0 0
IncrementValue=4
 FINDRANGES withthe helpof increament:
200.2.20.0 - 200.2.20.3 NETWORK - 1
200.2.20.4 - 200.2.20.7 NETWORK - 2
200.2.20.8 - 200.2.20.11 NETWORK - 3
200.2.20.12 - 200.2.20.15 NETWORK - 4
200.2.20.16 - 200.2.20.19 NETWORK - 5
---------andsoon
We can determine 50networksinclassc addressingwith4hosts pernetwork withSubnetMask
as 255.255.255.252
Rememberthat,We cant use FIRST andLAST IP addressfromnetworktheyare reservedfor
broadcastingpurpose.
Here we are having4 IP addresses, but2 are notusable,onlytwoare remained…thenyouthink
whatis the use of that subnetwhichhavingonly 2IP addresses.Yes,Theyare usedinbetweenrouters or
we can say WAN links,purposefullywe avoidwastage of IPaddresses.
Type 3>
ClassB= 151.5.0.0 DefaultMask=255.255.0.0 Subnetsrequired=100
 DETERMINE numberof networks:
It is given i.e. 100
 CONVERTit to BINARY:
128 64 32 16 8 4 2 1
0 1 1 0 0 1 0 0
100 in binary=1100100
 CALCULATE howmany bitsrequiredforthe numberof networks:
7 Bits = required for 100
 RESERVE bitsinsubnetmask:
Our DefaultSubnetMask forClassB =11111111.11111111. 00000000.00000000 (255.255.0.0=/16)
ReservedSubnetMask=11111111.11111111.11111110. 00000000 (255.255.254.0=/23)
ReserveBits
 FINDthe incrementforsubnets:
11111111.11111111. 11111110.00000000
Another twist is, you can say that last bit is after count of (8+1=9) zeros i.e. at 10th place. But it is
wrong.
Remember That: Increment count restarts at every next octet means that don’t count zeros from
last octet and count from current octet then you can value as:
128 64 32 16 8 4 2 1
1 1 1 1 1 1 1 0
Increment value = 2
 FINDRANGES withthe helpof increament:
151.5.0.0 -151.5.1.255 NETWORK - 1
151.5.2.0 – 151.5.3.255 NETWORK - 2
151.5.4.0 – 151.5.5.255 NETWORK - 3
151.5.6.0 – 151.5.7.255 NETWORK - 4
151. 5.8.0 – 151.5.9.255 NETWORK - 5
We can use these IPaddresseswithSubnetMaskas255.255.254.0
Confuse by ranges, ok we are in Class B, And increment at second-last octet not in last octet.
There for whenever we increment by two then ever one increment covers 255 address range in
it’s increment.
For Example :
151.5.0.0 to 151.5.0.255 addresses then151.5.1.0 to 151.5.1.255, these all addresses
belongs to first subnet and then with respect to increment second subnet starts form 151.5.2.0 to
next..
At this point,
Some one who having sharp memory can ask that 151.5.1.0 and 151.5.0.255 IP addresses
are not available to use. You already said that they are for broadcasting purpose. But, Remember
that what is our subnet mask, If we are using default subnet mask then it is correct, here our
subnet mask is 255.255.254.0. First and Last IP address values are variable with respect to subnet
mask. We can use these both IP addresses. Our First and last IP Addresses for first subnet is
151.5.0.0 and 151.5.1.255.
If you want to find number of networks and number of hosts, then you can use following
formulas:
number of subnets = 2x
(Where x is number of added subnet bits i.e. ones)
number of hosts in one subnet=(2x-2)
(Where x is number of zeros remained in submet mask)
At this Example:-
number of subnets = 27 =128
number of hosts = 29 -2 =512-2 =510
Type4> class A – 10.0.0.0 Default Subnet =255.0.0.0 required Subnets=500
 DETERMINE numberof networks:
It is given i.e. 500
 CONVERTit to BINARY:
512 256 128 64 32 16 8 4 2 1
0 1 1 1 1 1 0 1 0 0
500 in binary= 0111110100
Also short note here, we do not require whole binary number we only require how many bits
require to derive this decimal number in binary. In this example, we know that 500 must be less
than 512 and greater than 256 means it requires bits from 256 number i.e.9 bits.
 CALCULATE howmany bitsrequiredforthe numberof networks:
9 Bits = required for 500
 RESERVE bitsinsubnetmask:
Our DefaultSubnetMaskforClassA =11111111. 00000000. 00000000.00000000 (255.0.0.0=/8)
ReservedSubnetMask=11111111.11111111.10000000.00000000 (255.255.128.0=/17)
 FINDthe incrementforsubnets:
128 64 32 16 8 4 2 1
1 0 0 0 0 0 0 0
Increment value = 128
 FINDRANGES withthe helpof increament:
10.0.0.0 – 10.0.127.255 NETWORK - 1
10.0.128.0 – 10.0.255.255 NETWORK - 2
10.1.0.0 – 10.1.127.255 NETWORK - 3
10.1.128.0 – 10.1.255.255 NETWORK - 4
10.2.0.0 - 10.2.127.255 NETWORK - 5
10.2.128.255 – 10.2.225.255 NETWORK - 6
Incrementof 128 at Third subnetoverflowsas256 so we increase innextoctetbecause we canuse that whole
octetfor addressingwithournetworkrangingwith9bits.
Reserve Bits
B)Subnetting in the base of numberof Hosts inevery network:
Type A:-
Given:ClassC,IP Address=215.20.5.0 DefaultSubnetMask=255.255.255.0 RequiredHosts pernetwork =30
STEPS FOR SUBNETTING:-
 DETERMINE numberof HOSTS:
Already given :30 Hosts
 CONVERTit to BINARY:
128 64 32 16 8 4 2 1
0 0 0 1 1 1 0 0
30 in binary= 11100
 CALCULATE howmany bitsrequiredforthe numberof networks:
5 Bits = required for 30
 RESERVE bitsinsubnetmask:
Ok, When we are subnetting based on number of networks, we add 1’s in subnet mask left to
right. But when we are arranging setup for subnetting on basis of number of hosts, then we
have to add 0’s in subnet mask from right to left and remaining bits from subnet mask are
modified with 1’s.
DefaultSubnetMaskfor ClassC =11111111.11111111.11111111.00000000 (255.255.255.0=/24)
ReservedSubnetMask=11111111.11111111.11111111.11100000(255.255.255.224=/27)
 FINDthe incrementforsubnets:
New Subnetmask=11111111.11111111.11111111.11100000, There for
128 64 32 16 8 4 2 1
1 1 1 0 0 0 0 0
Increment value = 32, because last 1 is at value of 32 from our derived subnet mask.
 FINDRANGES withthe helpof increament:
215.20.5.0 - 215.20.5.31 NETWORK - 1
215.20.5.32-215.20.5.63 NETWORK - 2
215.20.5.64-215.20.5.95 NETWORK – 3
215.20.5.96-215.20.5.127 NETWORK – 4
215.20.5.128-215.20.5.159 NETWORK – 5
number of 1’s Added=3 number of 0s added= 5
number of subnets = 23 =8 number of hosts = 25-2 =32-2 =30
Reserved hostBits with zeros and remained aremodified as one
TypeB:
Given:ClassC,IP Address=195.5.20.0 DefaultSubnetMask=255.255.255.0 RequiredHostspernetwork= 50
STEPS FOR SUBNETTING:-
 DETERMINE numberof HOSTS:
Already given :50 Hosts
 CONVERTit to BINARY:
128 64 32 16 8 4 2 1
0 0 1 1 0 0 1 0
50 in binary= 110010
 CALCULATE howmany bitsrequiredforthe numberof networks:
6 Bits = required for 50
 RESERVE bitsinsubnetmask:
DefaultSubnetMaskfor ClassC =11111111.11111111.11111111.00000000 (255.255.255.0=/24)
ReservedSubnetMask=11111111.11111111.11111111. 11000000(255.255.255.224=/26)
 FINDthe incrementforsubnets:
NewSubnetmask=11111111.11111111.11111111.11000000, There for
128 64 32 16 8 4 2 1
1 1 0 0 0 0 0 0
Then increment value becomes 64.
 FINDRANGES withthe helpof increament: incrementwith64
215.20.5.0 - 215.20.5.63 NETWORK - 1
215.20.5.64-215.20.5.127 NETWORK - 2
215.20.5.128-215.20.5.191 NETWORK – 3
215.20.5.192-215.20.5.255 NETWORK – 4
number of 1’s Added=2 number of 0s added= 6
number of subnets = 23 =6 number of hosts = 26-2 =64-2 =62
Type C>
Given:Class B,IP Address=150.1.0.0 DefaultSubnetMask=255.255.0.0 RequiredHostspernetwork=500
 DETERMINE numberof networks:
It is given i.e. 500
 CONVERTit to BINARY:
512 256 128 64 32 16 8 4 2 1
0 1 1 1 1 1 0 1 0 0
500 in binary= 111110100
Reserved hostBits with zeros and remained aremodified as one
 CALCULATE howmany bitsrequiredforthe numberof networks:
9 Bits = required for 500
 RESERVE bitsinsubnetmask:
DefaultSubnetMaskfor ClassB =11111111.11111111. 00000000.00000000 (255.255.0.0=/16)
ReservedSubnetMask=11111111. 11111111.11111110. 00000000 (255.255.254.0=/23)
 FINDthe incrementforsubnets:
New Subnetmask=11111111.11111111.11111110.00000000, There for
128 64 32 16 8 4 2 1
1 1 1 1 1 1 1 0
Then increment value becomes 2.
 FINDRANGES withthe helpof increament: incrementwith 2inthe derivedthirdoctet.
150.1.0.0- 150.1.1.255 NETWORK - 1
150.1.2.0-150.1.3.255 NETWORK - 2
150.1.4.0-150.1.5.255 NETWORK – 3
150.1.6.0-150.1.7.255 NETWORK – 4
150.1.8.0-150.1.9.255 NETWORK – 5
number of 1’s Added=7 number of 0s added= 9
number of subnets = 27 =128 number of hosts = 29-2 =512-2 =510
TypeD>
Given:ClassA,IP Address=10.0.0.0DefaultSubnetMask=255.0.0.0 RequiredHostspernetwork=100
 DETERMINE numberof networks:
It is given i.e. 100
 CONVERTit to BINARY:
128 64 32 16 8 4 2 1
0 1 1 1 0 0 0 0
100 in binary= 1110000
 CALCULATE howmany bitsrequiredforthe numberof networks:
7 Bits = required for 100
 RESERVE bitsinsubnetmask:
DefaultSubnetMaskfor ClassB =11111111. 00000000. 00000000.00000000 (255.0.0.0=/8)
ReservedSubnetMask=11111111. 11111111. 11111111.10000000 (255.255.255.128=/25)
Remember,We have to modifyall remainingbitsinto1from everyoctet,only7 hostbitshave to be zeros.
ReserveBits with 0sModified Bits into 1
 FINDthe incrementforsubnets:
NewSubnetmask=11111111.11111111.11111111.10000000, There for
128 64 32 16 8 4 2 1
1 0 0 0 0 0 0 0
Then increment value becomes 128.
 FINDRANGES withthe helpof increament: incrementwith2inthe derivedthirdoctet.
10.0.0.0-10.0.0.127 NETWORK - 1
10.0.0.128-10.0.0.255 NETWORK - 2
10.0.1.0-10.0.1.127 NETWORK – 3
10.0.1.128-10.0.1.255 NETWORK – 4
10.0.2.0-10.0.2.127 NETWORK – 5
number of 1’s Added=17 number of 0s added= 7
number of subnets = 217 =131072 number of hosts = 27-2 =128-2 =126
Summary And Exceptions
Thisis all aboutsubnetting.If you Google forit,yougethundredsof methodsbutwhichare I have seeneasiesttheyare
describedabove. Andthere are alsosome exceptions,youhave toknow thenanditssolutionswiththese methods.
I. 2,4,8,16,32,64,128 - these networkvalues(numberof nework) are throwsoutas exception…
Ex. Requirednumberof networksare = 8
128 64 32 16 8 4 2 1
0 0 0 0 1 0 0 0
It meansthatrequirementof bitsare = 4.
But we knowthat we can derive 8,onlywith3 bitsinbinary.Thisproblemoccursdue to the binary numbers
alwayscountfrom zero.
Solution: Subtract1 whenfindingnetwork.i.e.justdecrease valueby1.
II. 3,7,15,31,63,127 - - these Hostvalues(numberof host) are throwsout as exception…
Ex. If we want 7 hosts then we have to use only3 bits.
128 64 32 16 8 4 2 1
0 0 0 0 0 1 1 1
But formulafirnumberof hosts= 2x
-2 = 23
-2 = 8-2= 6
Solution=Add1 whenfindinghosts.Inourexample,we have totake numberof hostsare 8 besidesof 7.

Subnet (1)

  • 1.
    Subnet >>What isSubnet? Whyitisused? -Subnetislogical network,withrespecttosingle IPaddress.Yes,itispossible.Andwe all are singitwiththe helpof SUBNET MASK. SubnetMaskis numberor we can say bitpattern that identifiesnetwork-idandhost-idfromparticularIP address. IP Address Class(With Decimal ranges) Default Subnet Mask (slashnotation for mask) 1 Class A (0-127) 255.0.0.0 (/8) 2 Class B (128-191) 255.255.0.0 (/16) 3 Class C(192-223) 255.255.255.0 (/24) 4 Class D (224-239) 255.255.255.255 (/32) 5 Class E (240-255) NOT HAVING SUBNET MASK Table 1: Defaultsubnetmasksforparticular IPAddressclass. Subnetmasksare definingthe rangesof thatclassaddressingsothat theycouldbe use inwell managedmanner.Italso definesnumberof hostsinnetwork. indefaultmask255 indicatesnetworkaddresssection,0indicatescorrespondinghost section. slashnotationformask iscountof 1’s in subnetmask,whichisalsoone standardmasknotation. AndSubnetdividesnetworkinlogical differentnetworks asperorganizational requirement majorissuesare security,addressflexibility, performance,systemmanagement,userperspective,andalsoavoidwastage of ip addresses(ex.ifyouare usingclassC thenyouhave 254 IPaddressesandonly100 requiredthenyoucan use remained154 IP addressesforotherpurpose withsubnetting). Fundamental needsforsubnettingof anynetwork: a) Require numberof networksinone organization Ex. Inour college,if we wanttolimiteverydepartmental accessthenwe have tosubnetournetworkin 5 networks(mech,prod,civil,E&TC,comp). b) Require numberof hostsineverynetwork. Ex. If we want to divide networkas30 hostsineverynetworkthenwehave tosubnets. IP Addressand SubnetMask IP address=NetID+HostID
  • 2.
    How to subnetting? A)Subnettinginthe base of numberof networks: Subnettingprocessishavingthree basicsteps.Butfirstwe decide followingscenariosandgoingwithitwe can determine steps. Type A:- We have IPADDRESS =172.20.26.0, It isbelongstoClassC Addressing. ThenDefaultSUBNETMASK=255.255.255.0 Andour organizationhas3 offices(A,B,C) thenwe require 5(1,2,3,4,5) networks You can say, itrequiresonly3networksbecause there are only3 offices,butrememberthatroutertorouter networklinksare alsopresent.There forwe have tocreate 5 subnetsfromone priornetworks. STEPS FOR SUBNETTING:-  DETERMINE numberof networks : How manynetworksare requiredinparticularnetwork? We alreadyfigure out,inourcase require numberof networksare =5  CONVERTit to BINARY: 128 64 32 16 8 4 2 1 bits number 0 0 0 0 0 1 0 1 5  CALCULATE howmany bitsrequiredforthe numberof networks. We can checkthat our numberof networks=5 Whichis inbinarywe can write withonly3 bitsi.e.=101  RESERVE bitsinsubnetmask: Reservingbitsmeansthat,we have toadd 1’s innetworkID whichare havingsame numberasper calculatednumberof bitsfornetworks. Let’sDo it. Our DefaultSubnetMaskfor ClassC =11111111.11111111.11111111.00000000 (255.255.255.0=/24) ReservedSubnetMask=11111111.11111111.11111111.11100000 (255.255.255.224=/27) Reserved Bits
  • 3.
     FINDthe incrementforsubnets:incrementisthe range of IPaddressesforeverysubnets. Checklast1’s bitfromsubnetmaskand derive binaryvalue forit. alwayscheckitfromrightto left and forits binaryvalue checkfromlefttoright. In our case, last 1 is, 11111111.11111111.11111111.11100000 Andits value is, 128 64 32 16 8 4 2 1 1 1 1 0 0 0 0 0 IncrementValue=32  FINDRANGES withthe helpof increament: So we have to add incrementtocreate rangesandcreate partitionsinnetwork. 172.20.26.0-172.20.26.31 NETWORK - 1 172.20.26.32-172.20.26.63 NETWORK - 2 172.20.26.64-172.20.26.95 NETWORK – 3 172.20.26.96-172.20.26.127 NETWORK – 4 172.20.26.128-172.20.26.159 NETWORK – 5 And,Here our subnettingiscompleted. We canuse these IPaddresseswith SubnetMaskas 255.255.255.224 Type B> ClassC= 200.2.20.0 Subnetsrequired=50(can’tcreate diagramwith50 networkshere….don’tmind:) ) STEPS FOR SUBNETTING:-  DETERMINE numberof networks: Here alreadygiventhatrequirednetworksare = 50.  CONVERTit to BINARY: 128 64 32 16 8 4 2 1 bits number 0 0 1 1 0 0 1 0 50  CALCULATE howmany bitsrequiredforthe numberof networks:6bits 50 in Binarywe can write with6 bitsi.e. =110010  RESERVE bitsinsubnetmask:By adding6 bits Our DefaultSubnetMaskforClassC =11111111.11111111.11111111.00000000 (255.255.255.0=/24) ReservedSubnetMask=11111111.11111111.11111111.11111100 (255.255.255.252=/30) ReserveBits
  • 4.
     FINDthe incrementforsubnets: 11111111.11111111.11111111.11111100 Anditsvalue is, 128 64 32 16 8 4 2 1 1 1 1 1 1 1 0 0 IncrementValue=4  FINDRANGES withthe helpof increament: 200.2.20.0 - 200.2.20.3 NETWORK - 1 200.2.20.4 - 200.2.20.7 NETWORK - 2 200.2.20.8 - 200.2.20.11 NETWORK - 3 200.2.20.12 - 200.2.20.15 NETWORK - 4 200.2.20.16 - 200.2.20.19 NETWORK - 5 ---------andsoon We can determine 50networksinclassc addressingwith4hosts pernetwork withSubnetMask as 255.255.255.252 Rememberthat,We cant use FIRST andLAST IP addressfromnetworktheyare reservedfor broadcastingpurpose. Here we are having4 IP addresses, but2 are notusable,onlytwoare remained…thenyouthink whatis the use of that subnetwhichhavingonly 2IP addresses.Yes,Theyare usedinbetweenrouters or we can say WAN links,purposefullywe avoidwastage of IPaddresses. Type 3> ClassB= 151.5.0.0 DefaultMask=255.255.0.0 Subnetsrequired=100  DETERMINE numberof networks: It is given i.e. 100  CONVERTit to BINARY: 128 64 32 16 8 4 2 1 0 1 1 0 0 1 0 0 100 in binary=1100100  CALCULATE howmany bitsrequiredforthe numberof networks: 7 Bits = required for 100  RESERVE bitsinsubnetmask: Our DefaultSubnetMask forClassB =11111111.11111111. 00000000.00000000 (255.255.0.0=/16) ReservedSubnetMask=11111111.11111111.11111110. 00000000 (255.255.254.0=/23) ReserveBits
  • 5.
     FINDthe incrementforsubnets: 11111111.11111111.11111110.00000000 Another twist is, you can say that last bit is after count of (8+1=9) zeros i.e. at 10th place. But it is wrong. Remember That: Increment count restarts at every next octet means that don’t count zeros from last octet and count from current octet then you can value as: 128 64 32 16 8 4 2 1 1 1 1 1 1 1 1 0 Increment value = 2  FINDRANGES withthe helpof increament: 151.5.0.0 -151.5.1.255 NETWORK - 1 151.5.2.0 – 151.5.3.255 NETWORK - 2 151.5.4.0 – 151.5.5.255 NETWORK - 3 151.5.6.0 – 151.5.7.255 NETWORK - 4 151. 5.8.0 – 151.5.9.255 NETWORK - 5 We can use these IPaddresseswithSubnetMaskas255.255.254.0 Confuse by ranges, ok we are in Class B, And increment at second-last octet not in last octet. There for whenever we increment by two then ever one increment covers 255 address range in it’s increment. For Example : 151.5.0.0 to 151.5.0.255 addresses then151.5.1.0 to 151.5.1.255, these all addresses belongs to first subnet and then with respect to increment second subnet starts form 151.5.2.0 to next.. At this point, Some one who having sharp memory can ask that 151.5.1.0 and 151.5.0.255 IP addresses are not available to use. You already said that they are for broadcasting purpose. But, Remember that what is our subnet mask, If we are using default subnet mask then it is correct, here our subnet mask is 255.255.254.0. First and Last IP address values are variable with respect to subnet mask. We can use these both IP addresses. Our First and last IP Addresses for first subnet is 151.5.0.0 and 151.5.1.255. If you want to find number of networks and number of hosts, then you can use following formulas: number of subnets = 2x (Where x is number of added subnet bits i.e. ones)
  • 6.
    number of hostsin one subnet=(2x-2) (Where x is number of zeros remained in submet mask) At this Example:- number of subnets = 27 =128 number of hosts = 29 -2 =512-2 =510 Type4> class A – 10.0.0.0 Default Subnet =255.0.0.0 required Subnets=500  DETERMINE numberof networks: It is given i.e. 500  CONVERTit to BINARY: 512 256 128 64 32 16 8 4 2 1 0 1 1 1 1 1 0 1 0 0 500 in binary= 0111110100 Also short note here, we do not require whole binary number we only require how many bits require to derive this decimal number in binary. In this example, we know that 500 must be less than 512 and greater than 256 means it requires bits from 256 number i.e.9 bits.  CALCULATE howmany bitsrequiredforthe numberof networks: 9 Bits = required for 500  RESERVE bitsinsubnetmask: Our DefaultSubnetMaskforClassA =11111111. 00000000. 00000000.00000000 (255.0.0.0=/8) ReservedSubnetMask=11111111.11111111.10000000.00000000 (255.255.128.0=/17)  FINDthe incrementforsubnets: 128 64 32 16 8 4 2 1 1 0 0 0 0 0 0 0 Increment value = 128  FINDRANGES withthe helpof increament: 10.0.0.0 – 10.0.127.255 NETWORK - 1 10.0.128.0 – 10.0.255.255 NETWORK - 2 10.1.0.0 – 10.1.127.255 NETWORK - 3 10.1.128.0 – 10.1.255.255 NETWORK - 4 10.2.0.0 - 10.2.127.255 NETWORK - 5 10.2.128.255 – 10.2.225.255 NETWORK - 6 Incrementof 128 at Third subnetoverflowsas256 so we increase innextoctetbecause we canuse that whole octetfor addressingwithournetworkrangingwith9bits. Reserve Bits
  • 7.
    B)Subnetting in thebase of numberof Hosts inevery network: Type A:- Given:ClassC,IP Address=215.20.5.0 DefaultSubnetMask=255.255.255.0 RequiredHosts pernetwork =30 STEPS FOR SUBNETTING:-  DETERMINE numberof HOSTS: Already given :30 Hosts  CONVERTit to BINARY: 128 64 32 16 8 4 2 1 0 0 0 1 1 1 0 0 30 in binary= 11100  CALCULATE howmany bitsrequiredforthe numberof networks: 5 Bits = required for 30  RESERVE bitsinsubnetmask: Ok, When we are subnetting based on number of networks, we add 1’s in subnet mask left to right. But when we are arranging setup for subnetting on basis of number of hosts, then we have to add 0’s in subnet mask from right to left and remaining bits from subnet mask are modified with 1’s. DefaultSubnetMaskfor ClassC =11111111.11111111.11111111.00000000 (255.255.255.0=/24) ReservedSubnetMask=11111111.11111111.11111111.11100000(255.255.255.224=/27)  FINDthe incrementforsubnets: New Subnetmask=11111111.11111111.11111111.11100000, There for 128 64 32 16 8 4 2 1 1 1 1 0 0 0 0 0 Increment value = 32, because last 1 is at value of 32 from our derived subnet mask.  FINDRANGES withthe helpof increament: 215.20.5.0 - 215.20.5.31 NETWORK - 1 215.20.5.32-215.20.5.63 NETWORK - 2 215.20.5.64-215.20.5.95 NETWORK – 3 215.20.5.96-215.20.5.127 NETWORK – 4 215.20.5.128-215.20.5.159 NETWORK – 5 number of 1’s Added=3 number of 0s added= 5 number of subnets = 23 =8 number of hosts = 25-2 =32-2 =30 Reserved hostBits with zeros and remained aremodified as one
  • 8.
    TypeB: Given:ClassC,IP Address=195.5.20.0 DefaultSubnetMask=255.255.255.0RequiredHostspernetwork= 50 STEPS FOR SUBNETTING:-  DETERMINE numberof HOSTS: Already given :50 Hosts  CONVERTit to BINARY: 128 64 32 16 8 4 2 1 0 0 1 1 0 0 1 0 50 in binary= 110010  CALCULATE howmany bitsrequiredforthe numberof networks: 6 Bits = required for 50  RESERVE bitsinsubnetmask: DefaultSubnetMaskfor ClassC =11111111.11111111.11111111.00000000 (255.255.255.0=/24) ReservedSubnetMask=11111111.11111111.11111111. 11000000(255.255.255.224=/26)  FINDthe incrementforsubnets: NewSubnetmask=11111111.11111111.11111111.11000000, There for 128 64 32 16 8 4 2 1 1 1 0 0 0 0 0 0 Then increment value becomes 64.  FINDRANGES withthe helpof increament: incrementwith64 215.20.5.0 - 215.20.5.63 NETWORK - 1 215.20.5.64-215.20.5.127 NETWORK - 2 215.20.5.128-215.20.5.191 NETWORK – 3 215.20.5.192-215.20.5.255 NETWORK – 4 number of 1’s Added=2 number of 0s added= 6 number of subnets = 23 =6 number of hosts = 26-2 =64-2 =62 Type C> Given:Class B,IP Address=150.1.0.0 DefaultSubnetMask=255.255.0.0 RequiredHostspernetwork=500  DETERMINE numberof networks: It is given i.e. 500  CONVERTit to BINARY: 512 256 128 64 32 16 8 4 2 1 0 1 1 1 1 1 0 1 0 0 500 in binary= 111110100 Reserved hostBits with zeros and remained aremodified as one
  • 9.
     CALCULATE howmanybitsrequiredforthe numberof networks: 9 Bits = required for 500  RESERVE bitsinsubnetmask: DefaultSubnetMaskfor ClassB =11111111.11111111. 00000000.00000000 (255.255.0.0=/16) ReservedSubnetMask=11111111. 11111111.11111110. 00000000 (255.255.254.0=/23)  FINDthe incrementforsubnets: New Subnetmask=11111111.11111111.11111110.00000000, There for 128 64 32 16 8 4 2 1 1 1 1 1 1 1 1 0 Then increment value becomes 2.  FINDRANGES withthe helpof increament: incrementwith 2inthe derivedthirdoctet. 150.1.0.0- 150.1.1.255 NETWORK - 1 150.1.2.0-150.1.3.255 NETWORK - 2 150.1.4.0-150.1.5.255 NETWORK – 3 150.1.6.0-150.1.7.255 NETWORK – 4 150.1.8.0-150.1.9.255 NETWORK – 5 number of 1’s Added=7 number of 0s added= 9 number of subnets = 27 =128 number of hosts = 29-2 =512-2 =510 TypeD> Given:ClassA,IP Address=10.0.0.0DefaultSubnetMask=255.0.0.0 RequiredHostspernetwork=100  DETERMINE numberof networks: It is given i.e. 100  CONVERTit to BINARY: 128 64 32 16 8 4 2 1 0 1 1 1 0 0 0 0 100 in binary= 1110000  CALCULATE howmany bitsrequiredforthe numberof networks: 7 Bits = required for 100  RESERVE bitsinsubnetmask: DefaultSubnetMaskfor ClassB =11111111. 00000000. 00000000.00000000 (255.0.0.0=/8) ReservedSubnetMask=11111111. 11111111. 11111111.10000000 (255.255.255.128=/25) Remember,We have to modifyall remainingbitsinto1from everyoctet,only7 hostbitshave to be zeros. ReserveBits with 0sModified Bits into 1
  • 10.
     FINDthe incrementforsubnets: NewSubnetmask=11111111.11111111.11111111.10000000,There for 128 64 32 16 8 4 2 1 1 0 0 0 0 0 0 0 Then increment value becomes 128.  FINDRANGES withthe helpof increament: incrementwith2inthe derivedthirdoctet. 10.0.0.0-10.0.0.127 NETWORK - 1 10.0.0.128-10.0.0.255 NETWORK - 2 10.0.1.0-10.0.1.127 NETWORK – 3 10.0.1.128-10.0.1.255 NETWORK – 4 10.0.2.0-10.0.2.127 NETWORK – 5 number of 1’s Added=17 number of 0s added= 7 number of subnets = 217 =131072 number of hosts = 27-2 =128-2 =126 Summary And Exceptions Thisis all aboutsubnetting.If you Google forit,yougethundredsof methodsbutwhichare I have seeneasiesttheyare describedabove. Andthere are alsosome exceptions,youhave toknow thenanditssolutionswiththese methods. I. 2,4,8,16,32,64,128 - these networkvalues(numberof nework) are throwsoutas exception… Ex. Requirednumberof networksare = 8 128 64 32 16 8 4 2 1 0 0 0 0 1 0 0 0 It meansthatrequirementof bitsare = 4. But we knowthat we can derive 8,onlywith3 bitsinbinary.Thisproblemoccursdue to the binary numbers alwayscountfrom zero. Solution: Subtract1 whenfindingnetwork.i.e.justdecrease valueby1. II. 3,7,15,31,63,127 - - these Hostvalues(numberof host) are throwsout as exception… Ex. If we want 7 hosts then we have to use only3 bits. 128 64 32 16 8 4 2 1 0 0 0 0 0 1 1 1 But formulafirnumberof hosts= 2x -2 = 23 -2 = 8-2= 6 Solution=Add1 whenfindinghosts.Inourexample,we have totake numberof hostsare 8 besidesof 7.