TCP/IP Protocol Suite1Chapter 5Objectives Upon completion you will be able to:IP Addresses:Classless Addressing•Understand the concept of classless addressing•Be able to find the first and last address given an IP address•Be able to find the network address given a classless IP address•Be able to create subnets from a block of classless IP addresses•Understand address allocation and address aggregationTCP/IP Protocol Suite25.1 VARIABLE-LENGTH BLOCKSIn classless addressing variable-length blocks are assigned that belong to no class. In this architecture, the entire address space (232 addresses) is divided into blocks of different sizes.The topics discussed in this section include:RestrictionsFinding the BlockGranted BlockTCP/IP Protocol Suite3Figure 5.1Variable-length blocksTCP/IP Protocol Suite4Whichofthefollowingcanbethebeginningaddressofablockthatcontains16addresses?a.205.16.37.32b.190.16.42.44c.17.17.33.80d.123.45.24.52Example1SolutionOnlytwoareeligible(aandc).Theaddress205.16.37.32iseligiblebecause32isdivisibleby16.Theaddress17.17.33.80iseligiblebecause80isdivisibleby16.TCP/IP Protocol Suite5Whichofthefollowingcanbethebeginningaddressofablockthatcontains256addresses?a.205.16.37.32b.190.16.42.0c.17.17.32.0d.123.45.24.52Example2SolutionInthiscase,theright-mostbytemustbe0.AswementionedinChapter4,theIPaddressesusebase256arithmetic.Whentheright-mostbyteis0,thetotaladdressisdivisibleby256.Onlytwoaddressesareeligible(bandc).TCP/IP Protocol Suite6Whichofthefollowingcanbethebeginningaddressofablockthatcontains1024addresses?a.205.16.37.32b.190.16.42.0c.17.17.32.0d.123.45.24.52Example3SolutionInthiscase,weneedtochecktwobytesbecause1024=4×256.Theright-mostbytemustbedivisibleby256.Thesecondbyte(fromtheright)mustbedivisibleby4.Onlyoneaddressiseligible(c).TCP/IP Protocol Suite7Figure 5.2Format of classless addressing addressTCP/IP Protocol Suite8Table 5.1 Prefix lengthsTCP/IP Protocol Suite9Classful addressing is a special case of classless addressing.Note:TCP/IP Protocol Suite10Whatisthefirstaddressintheblockifoneoftheaddressesis167.199.170.82/27?Example4Addressinbinary:10100111110001111010101001010010Keeptheleft27bits:10100111110001111010101001000000ResultinCIDRnotation:167.199.170.64/27SolutionTheprefixlengthis27,whichmeansthatwemustkeepthefirst27bitsasisandchangetheremainingbits(5)to0s.Thefollowingshowstheprocess:TCP/IP Protocol Suite11Whatisthefirstaddressintheblockifoneoftheaddressesis140.120.84.24/20?Example5See Next SlideSolutionFigure5.3showsthesolution.Thefirst,second,andfourthbytesareeasy;forthethirdbytewekeepthebitscorrespondingtothenumberof1sinthatgroup.Thefirstaddressis140.120.80.0/20.TCP/IP Protocol Suite12Figure 5.3Example 5TCP/IP Protocol Suite13Findthefirstaddressintheblockifoneoftheaddressesis140.120.84.24/20.Example6See Next SlideSolutionThefirst,second,andfourthbytesareasdefinedinthepreviousexample.Tofindthethirdbyte,wewrite84asthesumofpowersof2andselectonlytheleftmost4(mis4)asshowninFigure5.4.Thefirstaddressis140.120.80.0/20.TCP/IP Protocol Suite14Figure 5.4Example 6TCP/IP Protocol Suite15Findthenumberofaddressesintheblockifoneoftheaddressesis140.120.84.24/20.Example7SolutionTheprefixlengthis20.Thenumberofaddressesintheblockis232−20or212or4096.Notethatthisisalargeblockwith4096addresses.TCP/IP Protocol Suite16Usingthefirstmethod,findthelastaddressintheblockifoneoftheaddressesis140.120.84.24/20.Example8See Next SlideSolutionWefoundinthepreviousexamplesthatthefirstaddressis140.120.80.0/20andthenumberofaddressesis4096.Tofindthelastaddress,weneedtoadd4095(4096−1)tothefirstaddress.TCP/IP Protocol Suite17Tokeeptheformatindotted-decimalnotation,weneedtorepresent4095inbase256(seeAppendixB)anddothecalculationinbase256.Wewrite4095as15.255.Wethenaddthefirstaddresstothisnumber(inbase255)toobtainthelastaddressasshownbelow:Example8 (Continued)140 . 120 . 80 . 015 . 255-------------------------140 . 120 . 95 . 255 Thelastaddressis140.120.95.255/20.TCP/IP Protocol Suite18Usingthesecondmethod,findthelastaddressintheblockifoneoftheaddressesis140.120.84.24/20.Example9See Next SlideSolutionThemaskhastwenty1sandtwelve0s.Thecomplementofthemaskhastwenty0sandtwelve1s.Inotherwords,themaskcomplementis00000000 00000000 00001111 11111111or0.0.15.255.Weaddthemaskcomplementtothebeginningaddresstofindthelastaddress.TCP/IP Protocol Suite19140 . 120 . 80 . 00 . 0 . 15 . 255----------------------------140 . 120 . 95 . 255Example9 (Continued)Weaddthemaskcomplementtothebeginningaddresstofindthelastaddress.Thelastaddressis140.120.95.255/20.TCP/IP Protocol Suite20Findtheblockifoneoftheaddressesis190.87.140.202/29.Example10See Next SlideSolutionWefollowtheprocedureinthepreviousexamplestofindthefirstaddress,thenumberofaddresses,andthelastaddress.Tofindthefirstaddress,wenoticethatthemask(/29)hasfive1sinthelastbyte.Sowewritethelastbyteaspowersof2andretainonlytheleftmostfiveasshownbelow:TCP/IP Protocol Suite21202➡128+64+0+0+8+0+2+0Theleftmost5numbersare➡128+64+0+0+8Thefirstaddressis190.87.140.200/29Example10 (Continued)Thenumberofaddressesis232−29or8.Tofindthelastaddress,weusethecomplementofthemask.Themaskhastwenty-nine1s;thecomplementhasthree1s.Thecomplementis0.0.0.7.Ifweaddthistothefirstaddress,weget190.87.140.207/29.Inotherwords,thefirstaddressis190.87.140.200/29,thelastaddressis190.87.140.207/20.Thereareonly8addressesinthisblock.TCP/IP Protocol Suite22Showanetworkconfigurationfortheblockinthepreviousexample.Example11See Next SlideSolutionTheorganizationthatisgrantedtheblockinthepreviousexamplecanassigntheaddressesintheblocktothehostsinitsnetwork.However,thefirstaddressneedstobeusedasthenetworkaddressandthelastaddressiskeptasaspecialaddress(limitedbroadcastaddress).Figure5.5showshowtheblockcanbeusedbyanorganization.Notethatthelastaddressendswith207,whichisdifferentfromthe255seeninclassfuladdressing.TCP/IP Protocol Suite23Figure 5.5Example 11TCP/IP Protocol Suite24In classless addressing, the last address in the block does not necessarily end in 255.Note:TCP/IP Protocol Suite25In CIDR notation, the block granted is defined by the first address and the prefix length.Note:TCP/IP Protocol Suite265.2 SUBNETTINGWhen an organization is granted a block of addresses, it can create subnets to meet its needs. The prefix length increases to define the subnet prefix length.The topics discussed in this section include:Finding the Subnet MaskFinding the Subnet AddressesVariable-Length SubnetsTCP/IP Protocol Suite27In fixed-length subnetting, the number of subnets is a power of 2.Note:TCP/IP Protocol Suite28Anorganizationisgrantedtheblock130.34.12.64/26.Theorganizationneeds4subnets.Whatisthesubnetprefixlength?Example12SolutionWeneed4subnets,whichmeansweneedtoaddtwomore1s(log24=2)tothesiteprefix.Thesubnetprefixisthen/28.TCP/IP Protocol Suite29Whatarethesubnetaddressesandtherangeofaddressesforeachsubnetinthepreviousexample?Example13See Next SlideSolutionFigure5.6showsoneconfiguration.TCP/IP Protocol Suite30Figure 5.6Example 13TCP/IP Protocol Suite31Thesitehas232−26=64addresses.Eachsubnethas232–28=16addresses.Nowletusfindthefirstandlastaddressineachsubnet.Example13 (Continued)See Next Slide1.Thefirstaddressinthefirstsubnetis130.34.12.64/28,usingtheprocedureweshowedinthepreviousexamples.Notethatthefirstaddressofthefirstsubnetisthefirstaddressoftheblock.Thelastaddressofthesubnetcanbefoundbyadding15(16−1)tothefirstaddress.Thelastaddressis130.34.12.79/28.TCP/IP Protocol Suite32Example13 (Continued)2.Thefirstaddressinthesecondsubnetis130.34.12.80/28;itisfoundbyadding1tothelastaddressoftheprevioussubnet.Againadding15tothefirstaddress,weobtainthelastaddress,130.34.12.95/28.3.Similarly,wefindthefirstaddressofthethirdsubnettobe130.34.12.96/28andthelasttobe130.34.12.111/28.4.Similarly,wefindthefirstaddressofthefourthsubnettobe130.34.12.112/28andthelasttobe130.34.12.127/28.TCP/IP Protocol Suite33Anorganizationisgrantedablockofaddresseswiththebeginningaddress14.24.74.0/24.Thereare232−24=256addressesinthisblock.Theorganizationneedstohave11subnetsasshownbelow:a.twosubnets,eachwith64addresses.b.twosubnets,eachwith32addresses.c.threesubnets,eachwith16addresses.d.foursubnets,eachwith4addresses.Designthesubnets.Example14See Next Slide For One SolutionTCP/IP Protocol Suite34Figure 5.7Example 14TCP/IP Protocol Suite351.Weusethefirst128addressesforthefirsttwosubnets,eachwith64addresses.Notethatthemaskforeachnetworkis/26.Thesubnetaddressforeachsubnetisgiveninthefigure.2.Weusethenext64addressesforthenexttwosubnets,eachwith32addresses.Notethatthemaskforeachnetworkis/27.Thesubnetaddressforeachsubnetisgiveninthefigure.Example14 (Continuted)See Next SlideTCP/IP Protocol Suite363.Weusethenext48addressesforthenextthreesubnets,eachwith16addresses.Notethatthemaskforeachnetworkis/28.Thesubnetaddressforeachsubnetisgiveninthefigure.4.Weusethelast16addressesforthelastfoursubnets,eachwith4addresses.Notethatthemaskforeachnetworkis/30.Thesubnetaddressforeachsubnetisgiveninthefigure.Example14 (Continuted)TCP/IP Protocol Suite37Asanotherexample,assumeacompanyhasthreeoffices:Central,East,andWest.TheCentralofficeisconnectedtotheEastandWestofficesviaprivate,point-to-pointWANlines.Thecompanyisgrantedablockof64addresseswiththebeginningaddress70.12.100.128/26.Themanagementhasdecidedtoallocate32addressesfortheCentralofficeanddividestherestofaddressesbetweenthetwooffices.Figure5.8showstheconfigurationdesignedbythemanagement.Example15See Next SlideTCP/IP Protocol Suite38Figure 5.8Example 15TCP/IP Protocol Suite39Thecompanywillhavethreesubnets,oneatCentral,oneatEast,andoneatWest.Thefollowingliststhesubblocksallocatedforeachnetwork:Example15 (Continued)See Next Slidea.TheCentralofficeusesthenetworkaddress70.12.100.128/27.Thisisthefirstaddress,andthemask/27showsthatthereare32addressesinthisnetwork.Notethatthreeoftheseaddressesareusedfortheroutersandthecompanyhasreservedthelastaddressinthesub-block.Theaddressesinthissubnetare70.12.100.128/27to70.12.100.159/27.NotethattheinterfaceoftherouterthatconnectstheCentralsubnettotheWANneedsnoaddressbecauseitisapoint-to-pointconnection.TCP/IP Protocol Suite40Example15 (Continued)See Next Slideb.TheWestofficeusesthenetworkaddress70.12.100.160/28.Themask/28showsthatthereareonly16addressesinthisnetwork.Notethatoneoftheseaddressesisusedfortherouterandthecompanyhasreservedthelastaddressinthesub-block.Theaddressesinthissubnetare70.12.100.160/28to70.12.100.175/28.NotealsothattheinterfaceoftherouterthatconnectstheWestsubnettotheWANneedsnoaddressbecauseitisapoint-to-pointconnection.TCP/IP Protocol Suite41Example15 (Continued)c.TheEastofficeusesthenetworkaddress70.12.100.176/28.Themask/28showsthatthereareonly16addressesinthisnetwork.Notethatoneoftheseaddressesisusedfortherouterandthecompanyhasreservedthelastaddressinthesub-block.Theaddressesin.thissubnetare70.12.100.176/28to70.12.100.191/28.NotealsothattheinterfaceoftherouterthatconnectstheEastsubnettotheWANneedsnoaddressbecauseitisapoint-to-pointconnection.TCP/IP Protocol Suite425.3 ADDRESS ALLOCATIONAddress allocation is the responsibility of a global authority called the Internet Corporation for Assigned Names and Addresses (ICANN). It usually assigns a large block of addresses to an ISP to be distributed to its Internet users. TCP/IP Protocol Suite43AnISPisgrantedablockofaddressesstartingwith190.100.0.0/16(65,536addresses).TheISPneedstodistributetheseaddressestothreegroupsofcustomersasfollows:Example16See Next Slidea.The first group has 64 customers; each needs 256 addresses.b.The second group has 128 customers; each needs 128 addressesc.The third group has 128 customers; each needs 64 addresses.TCP/IP Protocol Suite44Designthesubblocksandfindouthowmanyaddressesarestillavailableaftertheseallocations.Example16 (Continued)See Next SlideSolutionFigure5.9showsthesituation.TCP/IP Protocol Suite45Figure 5.9Example 16TCP/IP Protocol Suite46Group 1For this group, each customer needs 256 addresses. This means the suffix length is 8 (28=256). The prefix length is then 32 − 8 = 24. The addresses are:Example16 (Continued)See Next Slide1st Customer 190.100.0.0/24 190.100.0.255/242nd Customer 190.100.1.0/24 190.100.1.255/24. . .64th Customer 190.100.63.0/24 190.100.63.255/24Total = 64 ×256 = 16,384TCP/IP Protocol Suite47Group 2For this group, each customer needs 128 addresses. This means the suffix length is 7 (27=128). The prefix length is then 32 − 7 = 25. The addresses are:Example16 (Continued)See Next Slide1st Customer 190.100.64.0/25 190.100.64.127/252nd Customer 190.100.64.128/25 190.100.64.255/25· · ·128th Customer 190.100.127.128/25 190.100.127.255/25Total = 128 ×128 = 16,384TCP/IP Protocol Suite48Group 3For this group, each customer needs 64 addresses. This means the suffix length is 6 (26 = 64). The prefix length is then 32 − 6 = 26. The addresses are:Example16 (continued)See Next Slide1st Customer 190.100.128.0/26 190.100.128.63/262nd Customer 190.100.128.64/26 190.100.128.127/26· · ·128th Customer 190.100.159.192/26 190.100.159.255/26Total = 128 ×64 = 8,192TCP/IP Protocol Suite49Number of granted addresses to the ISP: 65,536Number of allocated addresses by the ISP: 40,960Number of available addresses: 24,576Example16 (continued)
MissPowerPoint 2/29/2008 |
234 |
13 |
0 |
technology
MissPowerPoint 2/29/2008 |
292 |
37 |
0 |
technology
MissPowerPoint 2/29/2008 |
331 |
59 |
0 |
technology
MissPowerPoint 2/29/2008 |
695 |
52 |
0 |
technology
MissPowerPoint 2/29/2008 |
324 |
43 |
0 |
technology
MissPowerPoint 2/29/2008 |
280 |
40 |
0 |
technology
MissPowerPoint 2/29/2008 |
441 |
70 |
0 |
technology
MissPowerPoint 2/29/2008 |
279 |
39 |
0 |
technology
joeflasher 6/30/2008 |
44 |
7 |
0 |
MissPowerPoint 2/29/2008 |
129 |
7 |
0 |
technology
MissPowerPoint 2/15/2008 |
60 |
3 |
0 |
business
jess1ca 12/14/2007 |
1112 |
141 |
1 |
technology
Semaj1212 4/23/2008 |
67 |
4 |
0 |
technology
LisaB1982 2/1/2008 |
335 |
18 |
1 |
business
ProfessionalDocument 7/17/2008 |
61 |
3 |
0 |
business
MissPowerPoint 9/24/2008 |
91 |
1 |
0 |
BUZZ
MissPowerPoint 9/24/2008 |
130 |
17 |
0 |
creative
MissPowerPoint 9/24/2008 |
103 |
17 |
0 |
creative
MissPowerPoint 9/24/2008 |
119 |
15 |
0 |
creative
MissPowerPoint 9/24/2008 |
114 |
21 |
0 |
creative
MissPowerPoint 9/24/2008 |
76 |
5 |
0 |
creative
MissPowerPoint 9/24/2008 |
100 |
14 |
0 |
creative
MissPowerPoint 9/24/2008 |
69 |
4 |
0 |
creative
MissPowerPoint 9/24/2008 |
58 |
3 |
0 |
creative
MissPowerPoint 9/24/2008 |
65 |
0 |
0 |
creative