View
246
Download
0
Category
Preview:
Citation preview
8/8/2019 Basic Sub Netting
1/28
1
Subnetting BasicsSubnetting Basics
Michael D. MannMichael D. Mann
Copyright 2009 by : Michael D. Mann Copyright 2009 by : Michael D. Mann
8/8/2019 Basic Sub Netting
2/28
2
Subnetting BasicsSubnetting Basics
Prerequisite KnowledgePrerequisite Knowledge
Class 1st OctetRange
Valid NetworkNumbers
TotalNetworks
for this
class
Number ofhosts per
network
AN.H.H.H
1 -126 1.0.0.0 to
126.0.0.0
126 224 2
16,777,214
B
N.N.H.H
128 191 128.0.0.0 to
191.255.0.0
16,384 216 2
65,534
CN.N.N.H
192 223 192.0.0.0 -
223.255.255.0
2,097,152 28 2
254
N =
networkoctet H=
host octet
8/8/2019 Basic Sub Netting
3/28
3
Subnetting BasicsSubnetting Basics
Prerequisite KnowledgePrerequisite Knowledge
DefinitionsDefinitions
Network ID : all host bits are set to 0
192.168.32.0000 0000Ex : 192.168.32.0 /24
Broadcast ID : all host bits are set to 1
192.168.32.1111 1111
Ex : 192.168.32.255 /24
IP Address : any value in between
192.168.32.0000 00011111 1110
Ex : 192.168.32.1 - .254 /24
8/8/2019 Basic Sub Netting
4/28
4
Subnetting BasicsSubnetting Basics
Prerequisite KnowledgePrerequisite Knowledge
Binary Number SystemBinary Number System
1 BYTE = 8 BITS : 1010 0001
Each bit position has an associated PLACE VALUE as indicated :
27 26 25 24 23 22 21 20
1 0 1 0 0 0 0 1
Add up the place values wherever you have a 1 bit27 + 25 + 20 = 16110
1100 00102 = 19410?
This is how you convert from binary to decimal
8/8/2019 Basic Sub Netting
5/28
5
Subnetting BasicsSubnetting Basics
Prerequisite KnowledgePrerequisite Knowledge
A subnet mask gives meaning to a network address space
Class A default subnet mask : 255.0.0.0 ( /8 )
Class B default subnet mask : 255.255.0.0 ( /16 )
Class C default subnet mask : 255.255.255.0 ( /24 )
8/8/2019 Basic Sub Netting
6/28
6
Subnetting BasicsSubnetting Basics
A subnet mask is logically ANDed with a network address spacein order to return the network and subnetwork space
The logical AND Truth Table
AND
1
1 0
0
1 0
00
Click once to see the result of 1 AND 1
8/8/2019 Basic Sub Netting
7/28
7
Subnetting BasicsSubnetting Basics
A subnet mask is logically ANDed with a network address space
in order to return the network and subnetwork space
Ex1 : 192.168.32.145 /24 (no subnetting)
1100 0000. 1010 1000. 0010 0000. 1001 0001
255.255.255.0
Default mask :
1111 1111. 1111 1111. 1111 1111. 0000 0000
AND Result : 1100 0000. 1010 1000. 0010 0000. 0000 0000
192. 168. 32. 0
Notice how only the network address is returned (192.168.32.0)
8/8/2019 Basic Sub Netting
8/28
8
Subnetting BasicsSubnetting BasicsExample
Concept :
Math :
Let x represent the number of bits required.
Let y represent the number of subnets required.
Find out how manybits to borrow from the host octet to create
Equations : 2x >=y and 2x < y * 2, substitute 4 for y :
Notes :
The value for y is usually given in the problem.
Find a value for x that satisfiesBOTH
equations.
Class C 192.168.32.0 /24 :
subnet the address space to create 4 subnets.
the number ofsubnets you need.
Equations : 2x >=4 and 2x < 8
8/8/2019 Basic Sub Netting
9/28
9
Subnetting BasicsSubnetting BasicsExample
Math :
Let x represent the number of bits required for4 subnets.
Let y represent the number of subnets required.
Equations : 2x >=y and 2x < y * 2, substitute 4 for y :
The value of x that satisfies BOTHequations =
Class C 192.168.32.0 /24 :
subnet the address space to create 4 subnets.
Equations : 2x >=4 and 2x < 8
27 =
128 26 =
64 25 =
3
2 24 =
16 23 =
8 22 =
4 21 =
2 20 =
1
Powers of base 2 :
Solution :
?2
Note : x = log y / log 2
8/8/2019 Basic Sub Netting
10/28
10
Subnetting BasicsSubnetting Basics
Ex : 192.168.3
2.145 /26
(subnetted)1100 0000. 1010 1000. 0010 0000. 1001 0001
255.255.255.192
Custom mask :
1111 1111. 1111 1111. 1111 1111. 1100 0000
AND Result : 1100 0000. 1010 1000. 0010 0000. 1000 0000
192. 168. 32. 128
Notice the networkandsubnet address is returned (192.168.32.128)
What is the host ID ? 10 010001 (17)
Example
Class C 192.168.32.145 /24 :
subnet the address space to create 4 subnets.
8/8/2019 Basic Sub Netting
11/28
11
Subnetting BasicsSubnetting BasicsEquationsEquations
To find the number of subnets use : 2x = number of subnets
Where x = number of bits required
To find the number of hosts use : 2x 2 = number of hosts
Where x = number of bits required
You must subtract 2 to account for the 2 IPS that cannot
be used for hosts : host bits =all 0s and host bits =all 1s
(See slide 3)
8/8/2019 Basic Sub Netting
12/28
12
Subnetting BasicsSubnetting Basics
Subnetting is the process of subSubnetting is the process of sub--dividing a networkdividing a network
Network Space : 192.168.32.0 /24
192.168.32.0 /24
This blue box represents the whole network space
28 - 2 = 254 total hosts
8/8/2019 Basic Sub Netting
13/28
13
Subnetting BasicsSubnetting BasicsSubnetting is the process of subSubnetting is the process of sub--dividing a networkdividing a network
Network Space : 192.168.32.00 000000 /26
Custom created mask /26 = 255.255.255.11 000000
Class C default mask /24 = 255.255.255.0000 0000
First Subnet =00 000000 Second Subnet =01 000000
Third Subnet =10 000000 Fourth Subnet =11 000000
Subnet Bits and Host Bits
8/8/2019 Basic Sub Netting
14/28
14
Subnetting BasicsSubnetting BasicsSubnetting is the process of subSubnetting is the process of sub--dividing a networkdividing a network
Network Space : 192.168.3
2.00 000000 /26
.0
00
26 2 =
62hosts
.64
01
26 2 =
62hosts
.128
10
26 2 =
62hosts
.192
11
26 2 =
62hosts
This blue box represents the sub-divided network space
8/8/2019 Basic Sub Netting
15/28
15
Subnetting BasicsSubnetting Basics
The new subThe new sub--divided network :divided network :
.0
00
26 2 =
62hosts
.64
01
26 2 =
62hosts
.128
10
26 2 =
62hosts
.192
11
26 2 =
62hosts
Subnet 1 : 192.168.32.00 /26
Subnet 2 : 192.168.32.6464 /26
Subnet 3 : 192.168.32.128128 /26Subnet 4 : 192.168.32.192192 /26
Notice how the subnet addressessubnet addresses are multiples of6464
8/8/2019 Basic Sub Netting
16/28
16
Subnetting BasicsSubnetting Basics
The MULTIPLIER :The MULTIPLIER :
Subnet 1 : 192.168.32.00 /26 Subnet 2 : 192.168.32.6464 /26
Subnet 3 : 192.168.32.128128 /26 Subnet 4 : 192.168.32.192192 /26
Notice how the subnet addressessubnet addresses are multiples of6464
The number6464 is called the MultiplierMultiplier.
Custom created subnet mask : 255.255.255.192
Shortcut to find the Multiplier :256
192 =6464
Concept :192 in Binary =11 000000 ( /26 )
Find the Least Significant Subnet Bit : 11 000000
Take its Place Value : 26 =6464
8/8/2019 Basic Sub Netting
17/28
17
Subnetting BasicsSubnetting Basics
The new subThe new sub--divided network :divided network :
.0
00
26 2 =
62hosts
.64
01
26 2 =
62hosts
.128
10
26 2 =
62hosts
.192
11
26 2 =
62hosts
Subnet 1 Subnet Address :
Subnet 1 Minimum Host :
Subnet 1 Maximum Host :
Subnet 1 Broadcast :
192.168.32.0/26 > 00
192.168.32.1 /26 > 00
192.168.32.62 /26 > 00
192.168.32.63 /26 > 00
000000
000001
111110
111111
8/8/2019 Basic Sub Netting
18/28
18
Subnetting BasicsSubnetting Basics
The new subThe new sub--divided network :divided network :
.0
00
26 2 =
62hosts
.64
01
26 2 =
62hosts
.128
10
26 2 =
62hosts
.192
11
26 2 =
62hosts
Subnet 2 Subnet Address :
Subnet 2 Minimum Host :
Subnet 2 Maximum Host :
Subnet 2 Broadcast :
192.168.32.64/26 > 01
192.168.32.65 /26 > 01
192.168.32.126 /26 > 01
192.168.32.127 /26 > 01
000000
000001
111110
111111
8/8/2019 Basic Sub Netting
19/28
19
Subnetting BasicsSubnetting Basics
The new subThe new sub--divided network :divided network :
.0
00
26 2 =
62hosts
.64
01
26 2 =
62hosts
.128
10
26 2 =
62hosts
.192
11
26 2 =
62hosts
Subnet 3 Subnet Address :
Subnet 3 Minimum Host :
Subnet 3 Maximum Host :
Subnet 3 Broadcast :
192.168.32.128/26 > 10
192.168.32.129 /26 > 10
192.168.32.190 /26 > 10
192.168.32.191 /26 > 10
000000
000001
111110
111111
8/8/2019 Basic Sub Netting
20/28
20
Subnetting BasicsSubnetting Basics
The new subThe new sub--divided network :divided network :
.0
00
26 2 =
62hosts
.64
01
26 2 =
62hosts
.128
10
26 2 =
62hosts
.192
11
26 2 =
62hosts
Subnet 4 Subnet Address :
Subnet 4 Minimum Host :
Subnet 4 Maximum Host :
Subnet 4 Broadcast :
192.168.32.192/26 > 11
192.168.32.193 /26 > 11
192.168.32.254 /26 > 11
192.168.32.255 /26 > 11
000000
000001
111110
111111
8/8/2019 Basic Sub Netting
21/28
21
Three Types ofThree Types of
Subnetting QuestionsSubnetting Questions
Those that deal with Those that deal with
The number of HOSTSThe number of HOSTS
The number of SUBNETSThe number of SUBNETS
The MULTIPLIERThe MULTIPLIER
8/8/2019 Basic Sub Netting
22/28
22
The Number of HOSTSThe Number of HOSTS
Given (Class C) : 192.168.32.66 /27
How many HOSTS can be supported per subnet?
/27 = 000
Subnet bits
00000
Host bits
2255 22= 3030
You must subtract 2 because of the 32 possible combinations,
the following combinations are not useable for host IDs :
all host bits =0, this is a network and/or subnetwork ID
all host bits =1, this is a broadcast ID.
This leaves 30 out of the 32 combinations for host IDs
8/8/2019 Basic Sub Netting
23/28
23
The Number of SubnetsThe Number of Subnets
Given (Class C) : 192.168.32.66 /27
How many Subnets can be supported?
/27 = 000
Subnet bits
00000
Host bits
2233 = 88
You can support up to 8 subnets with 3 subnet bits
8/8/2019 Basic Sub Netting
24/28
24
The MULTIPLIERThe MULTIPLIER
Given : 192.168.32.66 /27
What subnet contains this IP address ?
Step 1 : Find the multiplier : M =32 (see slide 15)
Step 2 : Divide the subnetted octet by M and drop the fractional portion
of the answer :
66 / 32 = 2.0625
Step 3 : Multiply M by the integer result from Step 2 :
32 * 2 =64
The subnet that contains this IP address is Subnet 64
8/8/2019 Basic Sub Netting
25/28
25
Class B Network Example
172.16.0.0/16
10101100.00010000.00000000.00000000
Required : 45 subnets each having at least 500 hosts
How manybits are required to represent 45 subnets ?
6bits are required : 26 = 64
10101100.00010000.00000000.00000000Network bits Subnet bits Host bits
Are 10 host bits enough to represent 500 hosts ?Yes
Why ? 210 2 = 1022 - more than enough for 500 hosts!
8/8/2019 Basic Sub Netting
26/28
26
Class B Network Example
172.16.0.0/22
10101100.00010000.00000000.00000000
10101100.00010000.00000100.00000001
10101100.00010000.00000111.11111110
Minimum host with subnet ID 4
Maximum host with subnet ID 4
172.16.4.1 /22
172.16.7.254 /22
8/8/2019 Basic Sub Netting
27/28
27
Class B Network Example
172.16.0.0/22
10101100.00010000.00000000.00000000
10101100.00010000.00000100.00000001
10101100.00010000.00000111.11111110
Minimum host with subnet ID 4
Maximum host with subnet ID 4
172.16.44.1 /22
172.16.77.254 /22
Notice the change in the 33rdrd octetoctet even though we are still in
the same subnet
8/8/2019 Basic Sub Netting
28/28
28
Internet ResourcesInternet Resources
www.semsim.com/ccna/tutorial/subnetting/subnetting.html
www.learntosubnet.com
http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800a67f5.shtml
Recommended