Subnetting supernetting

wacasr12 894 views 59 slides Nov 04, 2021
Slide 1
Slide 1 of 59
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59

About This Presentation

Networking


Slide Content

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Subnetting/Supernetting
and
Classless Addressing

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
CONTENTS
•SUBNETTING
•SUPERNETTING
•CLASSLESS ADDRSSING

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
SUBNETTING
5.1

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
IP addresses are designed with
two levels of hierarchy.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 5-1
A network with two levels of
hierarchy (not subnetted)

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 5-2
A network with three levels of
hierarchy (subnetted)

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 5-3
Addresses in a network with
and without subnetting

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 5-4
Hierarchy concept in a telephone number

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 5-5
Default mask and subnet mask

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Finding the Subnet Address
Given an IP address, we can find the
subnet address by applying the mask to the
address. We can do this in two ways:
straight or short-cut.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Straight Method
In the straight method, we use binary
notation for both the address and the
mask and then apply the AND operation
to find the subnet address.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Example 1
Whatisthesubnetworkaddressifthe
destinationaddressis200.45.34.56andthe
subnetmaskis255.255.240.0?

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Solution
11001000 00101101 00100010 00111000
11111111 11111111 1111000000000000
11001000 00101101 0010000000000000
The subnetwork address is 200.45.32.0.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Short-Cut Method
**If the byte in the mask is 255, copy
the byte in the address.
**If the byte in the mask is 0, replace
the byte in the address with 0.
**If the byte in the mask is neither 255
nor 0, we write the mask and the address
in binary and apply the AND operation.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Example 2
Whatisthesubnetworkaddressifthe
destinationaddressis19.30.80.5andthe
maskis255.255.192.0?
Solution
See Figure 5.6

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 5-6
Example 2

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 5-7
Comparison of a default mask and
a subnet mask

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
The number of subnets must be
a power of 2.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Example 3
Acompanyisgrantedthesiteaddress
201.70.64.0(classC).Thecompanyneeds
sixsubnets.Designthesubnets.
Solution
Thenumberof1sinthedefault
maskis24(classC).

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Solution (Continued)
Thecompanyneedssixsubnets.Thisnumber
6isnotapowerof2.Thenextnumberthatis
apowerof2is8(2
3
).Weneed3more1sin
thesubnetmask.Thetotalnumberof1sin
thesubnetmaskis27(24+3).
Thetotalnumberof0sis5(32-27).The
maskis

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Solution (Continued)
11111111 11111111 1111111111100000
or
255.255.255.224
Thenumberofsubnetsis8.
Thenumberofaddressesineachsubnet
is2
5
(5isthenumberof0s)or32.
SeeFigure5.8

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 5-8
Example 3

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Example 4
Acompanyisgrantedthesiteaddress
181.56.0.0(classB).Thecompanyneeds
1000subnets.Designthesubnets.
Solution
Thenumberof1sinthedefaultmaskis16
(classB).

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Solution (Continued)
Thecompanyneeds1000subnets.This
numberisnotapowerof2.Thenextnumber
thatisapowerof2is1024(2
10
).Weneed10
more1sinthesubnetmask.
Thetotalnumberof1sinthesubnetmaskis
26(16+10).
Thetotalnumberof0sis6(32-26).

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Solution (Continued)
Themaskis
11111111111111111111111111000000
or
255.255.255.192.
Thenumberofsubnetsis1024.
Thenumberofaddressesineachsubnetis2
6
(6isthenumberof0s)or64.
SeeFigure5.9

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 5-9
Example 4

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 5-10
Variable-length subnetting

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
SUPERNETTING
5.2

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 5-11
A supernetwork

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Rules:
**The number of blocks must be a power of 2 (1,
2, 4, 8, 16, ...).
**The blocks must be contiguous in the address
space (no gaps between the blocks).
**The third byte of the first address in the
superblock must be evenly divisible by the number
of blocks. In other words, if the number of blocks is
N, the third byte must be divisible by N.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Example 5
Acompanyneeds600addresses.Whichof
thefollowingsetofclassCblockscanbe
usedtoformasupernetforthiscompany?
198.47.32.0198.47.33.0198.47.34.0
198.47.32.0198.47.42.0198.47.52.0198.47.62.0
198.47.31.0198.47.32.0198.47.33.0198.47.52.0
198.47.32.0198.47.33.0198.47.34.0198.47.35.0

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Solution
1:No,thereareonlythreeblocks.
2:No,theblocksarenotcontiguous.
3:No,31inthefirstblockisnotdivisibleby4.
4:Yes,allthreerequirementsarefulfilled.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
In subnetting,
we need the first address of the
subnet and the subnet mask to
define the range of addresses.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
In supernetting,
we need the first address of
the supernet
and the supernet mask to
define the range of addresses.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 5-12
Comparison of subnet, default,
and supernet masks

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Example 6
Weneedtomakeasupernetworkoutof16
classCblocks.Whatisthesupernetmask?
Solution
Weneed16blocks.For16blocksweneedto
changefour1sto0sinthedefaultmask.Sothe
maskis
11111111 11111111 1111000000000000
or
255.255.240.0

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Example 7
Asupernethasafirstaddressof205.16.32.0anda
supernetmaskof255.255.248.0.Arouterreceivesthree
packetswiththefollowingdestinationaddresses:
205.16.37.44
205.16.42.56
205.17.33.76
Whichpacketbelongstothesupernet?

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Solution
Weapplythesupernetmasktoseeifwecanfind
thebeginningaddress.
205.16.37.44AND255.255.248.0205.16.32.0
205.16.42.56AND255.255.248.0205.16.40.0
205.17.33.76AND255.255.248.0205.17.32.0
Onlythefirstaddressbelongstothissupernet.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Example 8
Asupernethasafirstaddressof205.16.32.0anda
supernetmaskof255.255.248.0.Howmanyblocksarein
thissupernetandwhatistherangeofaddresses?
Solution
Thesupernethas211s.Thedefaultmaskhas24
1s.Sincethedifferenceis3,thereare2
3
or8
blocksinthissupernet.Theblocksare205.16.32.0
to205.16.39.0.Thefirstaddressis205.16.32.0.
Thelastaddressis205.16.39.255.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
CLASSLESS
ADDRESSING
5.3

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 5-13
Variable-length blocks

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Number of Addresses in a Block
There is only one condition on the number
of addresses in a block; it must be a power
of 2 (2, 4, 8,...). A household may be given
a block of 2 addresses. A small business
may be given 16 addresses. A large
organization may be given 1024 addresses.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Beginning Address
The beginning address must be evenly divisible
by the number of addresses. For example, if a
block contains 4 addresses, the beginning
address must be divisible by 4. If the block has
less than 256 addresses, we need to check only
the rightmost byte. If it has less than 65,536
addresses, we need to check only the two
rightmost bytes, and so on.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Example 9
Whichofthefollowingcanbethebeginningaddressofa
blockthatcontains16addresses?
205.16.37.32
190.16.42.44
17.17.33.80
123.45.24.52
Solution
Theaddress205.16.37.32iseligiblebecause32is
divisibleby16.Theaddress17.17.33.80iseligible
because80isdivisibleby16.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Example 10
Whichofthefollowingcanbethebeginningaddressofa
blockthatcontains1024addresses?
205.16.37.32
190.16.42.0
17.17.32.0
123.45.24.52
Solution
Tobedivisibleby1024,therightmostbyteofan
addressshouldbe0andthesecondrightmostbyte
mustbedivisibleby4.Onlytheaddress17.17.32.0
meetsthiscondition.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 5-14
Slash notation

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Slash notation is also called
CIDR
notation.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Example 11
Asmallorganizationisgivenablockwiththebeginning
addressandtheprefixlength205.16.37.24/29(inslash
notation).Whatistherangeoftheblock?
Solution
Thebeginningaddressis205.16.37.24.Tofindthe
lastaddresswekeepthefirst29bitsandchangethe
last3bitsto1s.
Beginning:11001111 00010000 00100101 00011000
Ending : 11001111 00010000 00100101 00011111
There are only 8 addresses in this block.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Example 12
WecanfindtherangeofaddressesinExample11by
anothermethod.Wecanarguethatthelengthofthesuffix
is32-29or3.Sothereare2
3
=8addressesinthisblock.
Ifthefirstaddressis205.16.37.24,thelastaddressis
205.16.37.31(24+7=31).

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
A block in classes A, B, and C
can easily be represented in slash
notation as
A.B.C.D/ n
where nis
either 8 (class A), 16 (class B), or
24 (class C).

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Example 13
Whatisthenetworkaddressifoneoftheaddressesis
167.199.170.82/27?
Solution
Theprefixlengthis27,whichmeansthatwemust
keepthefirst27bitsasisandchangetheremaining
bits(5)to0s.The5bitsaffectonlythelastbyte.
Thelastbyteis01010010.Changingthelast5bits
to0s,weget01000000or64.Thenetworkaddress
is167.199.170.64/27.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Example 14
Anorganizationisgrantedtheblock130.34.12.64/26.
Theorganizationneedstohavefoursubnets.Whatarethe
subnetaddressesandtherangeofaddressesforeach
subnet?
Solution
Thesuffixlengthis6.Thismeansthetotalnumber
ofaddressesintheblockis64(2
6
).Ifwecreate
foursubnets,eachsubnetwillhave16addresses.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Solution (Continued)
Letusfirstfindthesubnetprefix(subnetmask).
Weneedfoursubnets,whichmeansweneedtoadd
twomore1stothesiteprefix.Thesubnetprefixis
then/28.
Subnet1:130.34.12.64/28to130.34.12.79/28.
Subnet2:130.34.12.80/28to130.34.12.95/28.
Subnet3:130.34.12.96/28to130.34.12.111/28.
Subnet4:130.34.12.112/28to130.34.12.127/28.
SeeFigure5.15

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 5-15
Example 14

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Example 15
AnISPisgrantedablockofaddressesstartingwith
190.100.0.0/16.TheISPneedstodistributethese
addressestothreegroupsofcustomersasfollows:
1.Thefirstgrouphas64customers;eachneeds256addresses.
2.Thesecondgrouphas128customers;eachneeds128addresses.
3.Thethirdgrouphas128customers;eachneeds64addresses.
Designthesubblocksandgivetheslashnotationforeach
subblock.Findouthowmanyaddressesarestillavailable
aftertheseallocations.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Solution
Group1
Forthisgroup,eachcustomerneeds256addresses.
Thismeansthesuffixlengthis8(2
8
=256).The
prefixlengthisthen32-8=24.
01:190.100.0.0/24190.100.0.255/24
02:190.100.1.0/24190.100.1.255/24
………………………………… ..
64:190.100.63.0/24190.100.63.255/24
Total=64256=16,384

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Solution (Continued)
Group2
Forthisgroup,eachcustomerneeds128addresses.
Thismeansthesuffixlengthis7(2
7
=128).The
prefixlengthisthen32-7=25.Theaddresses
are:
001:190.100.64.0/25190.100.64.127/25
002:190.100.64.128/25190.100.64.255/25
003:190.100.127.128/25190.100.127.255/25
Total=128128=16,384

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Solution (Continued)
Group3
Forthisgroup,eachcustomerneeds64addresses.
Thismeansthesuffixlengthis6(2
6
=64).The
prefixlengthisthen32-6=26.
001:190.100.128.0/26190.100.128.63/26
002:190.100.128.64/26190.100.128.127/26
…………………………
128:190.100.159.192/26190.100.159.255/26
Total=12864=8,192

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Solution (Continued)
Numberofgrantedaddresses:65,536
Numberofallocatedaddresses:40,960
Numberofavailableaddresses:24,576
Tags