4a logical laddressing

286 views

Published on

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
286
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

4a logical laddressing

  1. 1. 9.1Network Layer:Logical AddressingNetworking Fundamentals
  2. 2. 2.2The Internet Assigned Numbers Authority (IANA) is operated by theInternet Corporation for Assigned Names and Numbers (ICANN). IANA manages the IPaddress space allocations globally, cooperates with five Regional Internet Registries (RIRs) toallocate IP address blocks to Local Internet Registries who allocate it to Internet ServiceProviders and other entities. RIRs:• African Network Information Centre (AfriNIC) for Africa• American Registry for Internet Numbers (ARIN) for Canada, several parts ofthe Caribbean region, and the United States.• Asia-Pacific Network Information Centre (APNIC) for Asia, Australia, andneighboring countries• Latin American and Caribbean Network Information Centre (LACNIC) forLatin America and parts of the Caribbean region• RIPE NCC for Europe, the Middle East, and Central Asia
  3. 3. 2.3
  4. 4. 19.4IPv4 ADDRESSESIPv4 ADDRESSESAnAn IPv4 addressIPv4 address is ais a 32-bit32-bit address that uniquely andaddress that uniquely anduniversally defines the connection of a device (foruniversally defines the connection of a device (forexample, a computer or a router) to the Internet.example, a computer or a router) to the Internet.
  5. 5. 19.5The address space of IPv4 is232or 4,294,967,296.Note
  6. 6. 19.6Dotted-decimal notation and binary notation for an IPv4 addressNow to make your life easier, please write this in your note-books:12 6 3 18 4 2 6 8 4 2 1it all adds up to 255
  7. 7. 19.7Change the following IPv4 addresses from binarynotation to dotted-decimal notation.Example 1SolutionWe replace each group of 8 bits with its equivalentdecimal number and add dots for separation.
  8. 8. 19.8Change the following IPv4 addresses from dotted-decimalnotation to binary notation.Example 2SolutionWe replace each decimal number with its binaryequivalent.
  9. 9. 19.9Find the error, if any, in the following IPv4 addresses.Example 3Solutiona. There must be no leading zero (045).b. There can be no more than four numbers.c. Each number needs to be less than or equal to 255.d. A mixture of binary notation and dotted-decimalnotation is not allowed.
  10. 10. 19.10In classful addressing, the addressspace is divided into five classes:A, B, C, D, and E.Note
  11. 11. 19.11Finding the classes in binary and dotted-decimal notationIdentifies the Net(work) or block of addresses. Identifies the Host.
  12. 12. 19.12Find the class of each address.a. 00000001 00001011 00001011 11101111b. 11000001 10000011 00011011 11111111c. 14.23.120.8d. 252.5.15.111Example 4Solutiona. The first bit is 0. This is a class A address.b. The first 2 bits are 1; the third bit is 0. This is a class Caddress.c. The first byte is 14 (0 – 127); the class is A.d. The first byte is 252 (24- - 255); the class is E.
  13. 13. 19.13Number of blocks and block size in classful IPv4 addressingA 0-127 256 ^ 3B (128-191)*256 256 ^ 2C (192-223)*256^2 256 ^ 1D 1 (224-239)*256^3E 1 (240-255)*256^3
  14. 14. 19.14In classful addressing, a large part ofthe available addresses were wasted.Note
  15. 15. 19.15Default masks for classful addressingMasks help us find the Netid & Hostid, especiallyin Classless Addressing.
  16. 16. 19.16
  17. 17. 19.17• A subnet is defined by applying a bit mask, the subnet mask, to the IPaddress. If a bit is On in the mask, that equivalent bit in the address isinterpreted as a network bit. If a bit in the mask is Off, the bit belongs tothe host part of the address. The subnet is only known locally. To therest of the Internet, the address is still interpreted as a standard IPaddress.• For example, the default mask that would be associated with standardclass B addresses is 255.255.0.0. The most commonly used subnet maskextends the network portion of a class B address by an additional byte.The subnet mask that does this is 255.255.255.0. The first two bytesdefine the class B network; the third byte defines the subnet address;the fourth byte defines the host on that subnet.• However, defining subnet masks on byte boundaries is not arequirement. The subnet mask is bit-oriented and can be applied to anyaddress class. For example, a small organization could subdivide a class Caddress into four subnets with the mask 255.255.255.192.
  18. 18. 19.18Subnetting egs.
  19. 19. 19.19Subnetting egs.
  20. 20. 19.20Address Depletion - Classfuladdressing, which is almost obsolete, isreplaced with classless addressing.Note
  21. 21. 19.21Links you can explorewww.icann.org ; www.iana.org ; www.apnic.net
  22. 22. 19.22Figure shows a block of addresses, in both binary anddotted-decimal notation, granted to a small business thatneeds 16 addresses.We can see that the restrictions are applied to this block.The addresses are contiguous. The number of addressesis a power of 2 (16 = 24), and the first address is divisibleby 16. The first address, when converted to a decimalnumber, is 3,440,387,360, which when divided by 16results in 215,024,210.Example 5
  23. 23. 19.23Fig A block of 16 addresses granted to a small organization
  24. 24. 19.24In IPv4 addressing, a block of addressescan be defined as x.y.z.t /nin which x.y.z.t defines one of theaddresses and the /n defines the mask.n can take any value from 0 to 32.NoteQn. Values of n for classful addressing?
  25. 25. 19.25The first address in the block can befound by setting the rightmost32 − n bits to 0s.Note
  26. 26. 19.26A block of addresses is granted to a small organization.We know that one of the addresses is 205.16.37.39/28.What is the first address in the block?SolutionThe binary representation of the given address is11001101 00010000 00100101 00100111If we set 32−28 rightmost bits to 0, we get11001101 00010000 00100101 0010000or205.16.37.32.This is actually the block shown in earlier Figure.Example 6
  27. 27. 19.27The last address in the block can befound by setting the rightmost32 − n bits to 1s.Note
  28. 28. 19.28Find the last address for the block in Example 6.SolutionThe binary representation of the given address is11001101 00010000 00100101 00100111If we set 32 − 28 rightmost bits to 1, we get11001101 00010000 00100101 00101111or205.16.37.47This is also the block shown in earlier Figure.Example 7
  29. 29. 19.29The number of addresses in the blockcan be found by using the formula232−n.Note
  30. 30. 19.30Find the number of addresses in Example 6.Example 8SolutionThe value of n is 28, which means that numberof addresses is 2 32−28or 16.
  31. 31. 19.31Another way to find the first address, the last address, andthe number of addresses is to represent the mask as a 32-bit binary number. This is particularly useful when weare writing a program to find these pieces of information.In Example 5 the /28 can be represented as11111111 11111111 11111111 11110000(twenty-eight 1s and four 0s).Finda. The first addressb. The last addressc. The number of addresses.Example 9
  32. 32. 19.32Solutiona. The first address can be found by ANDing the givenaddresses with the mask. ANDing here is done bit bybit.Example 9 (continued)
  33. 33. 19.33b. The last address can be found by ORing the givenaddresses with the complement of the mask. ORinghere is done bit by bit. The result of ORing 2 bits is 0 ifboth bits are 0s; the result is 1 otherwise. Thecomplement of a number is found by changing each 1to 0 and each 0 to 1.Example 9 (continued)
  34. 34. 19.34c. The number of addresses can be found bycomplementing the mask, interpreting it as a decimalnumber, and adding 1 to it.Example 9 (continued)
  35. 35. 19.35The first address in a block isnormally not assigned to any device;it is used as the network address thatrepresents the organizationto the rest of the world. In above eg.205.16.37.32 is the network address.Note
  36. 36. 19.36Two levels of hierarchy in an IPv4 address : No SubnettingsuffixEg. area code & telephone no.
  37. 37. 19.37
  38. 38. 19.38Variable Length Subnet Masks (VLSM)In the previous example of subnetting, notice that the same subnet mask was applied for allthe subnets. This means that each subnet has the same number of available host addresses. Youcan need this in some cases, but, in most cases, having the same subnet mask for all subnetsends up wasting address space.
  39. 39. 19.39Configuration and addresses in the subnetted network- Each router has an IP address for each subnetwork to which it is attached and each subnetwork has an IP address forthe router to which it is attached.- The more host bits you use for a subnet mask, the more subnets you have available. However, the more subnetsavailable, the less host addresses available for the net.
  40. 40. 19.40Qn. Take address 29, 45 & 50 from the 3 subnets and find the subnet address.
  41. 41. 19.41Three-level hierarchy in an IPv4 address : SubnettingEg. area code, telephone no.(EPABX) & extn no.
  42. 42. 19.42An ISP is granted a block of addresses starting with190.100.0.0/16 (65,536 addresses). The ISP needs todistribute these addresses to three groups of customers asfollows:a. The first group has 64 customers; each needs 256addresses.b. The second group has 128 customers; each needs 128addresses.c. The third group has 128 customers; each needs 64addresses.Design the subblocks and find out how many addressesare still available after these allocations.Example 10
  43. 43. 19.43SolutionExample 10 (continued)Group 1For this group, each customer needs 256 addresses. Thismeans that 8 (log2 256) bits are needed to define eachhost. The prefix length is then 32 − 8 = 24. The addressesare
  44. 44. 19.44Example 10 (continued)Group 2For this group, each customer needs 128 addresses. Thismeans that 7 (log2 128) bits are needed to define eachhost. The prefix length is then 32 − 7 = 25. The addressesare
  45. 45. 19.45Example 10 (continued)Group 3For this group, each customer needs 64 addresses. Thismeans that 6 (log264) bits are needed to each host. Theprefix length is then 32 − 6 = 26. The addresses areNumber of granted addresses to the ISP: 65,536Number of allocated addresses by the ISP: 40,960Number of available addresses: 24,576Figure shows the situation.
  46. 46. 19.46An example of address allocation and distribution by an ISP
  47. 47. 19.47An Organisation is granted a block of addresses startingwith 204.17.5.0/24. It needs to distribute these addressesto four Depts. as follows:a. The first Dept. needs 128 addresses.b. The second Dept. needs 64 addresses.c. The third and fourth Depts. each need 32 addresses.Design the subnets and support your answer with anillustrative diagram.Assignment

×