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
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.
19.5The address space of IPv4 is232or 4,294,967,296.Note
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
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.
19.8Change the following IPv4 addresses from dotted-decimalnotation to binary notation.Example 2SolutionWe replace each decimal number with its binaryequivalent.
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.
19.10In classful addressing, the addressspace is divided into five classes:A, B, C, D, and E.Note
19.11Finding the classes in binary and dotted-decimal notationIdentifies the Net(work) or block of addresses. Identifies the Host.
19.12Find the class of each address.a. 00000001 00001011 00001011 11101111b. 11000001 10000011 00011011 11111111c. 18.104.22.168d. 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.
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
19.14In classful addressing, a large part ofthe available addresses were wasted.Note
19.15Default masks for classful addressingMasks help us find the Netid & Hostid, especiallyin Classless Addressing.
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.
19.20Address Depletion - Classfuladdressing, which is almost obsolete, isreplaced with classless addressing.Note
19.21Links you can explorewww.icann.org ; www.iana.org ; www.apnic.net
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
19.23Fig A block of 16 addresses granted to a small organization
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?
19.25The first address in the block can befound by setting the rightmost32 − n bits to 0s.Note
19.26A block of addresses is granted to a small organization.We know that one of the addresses is 22.214.171.124/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 0010000or126.96.36.199.This is actually the block shown in earlier Figure.Example 6
19.27The last address in the block can befound by setting the rightmost32 − n bits to 1s.Note
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 00101111or188.8.131.52This is also the block shown in earlier Figure.Example 7
19.29The number of addresses in the blockcan be found by using the formula232−n.Note
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.
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
19.32Solutiona. The first address can be found by ANDing the givenaddresses with the mask. ANDing here is done bit bybit.Example 9 (continued)
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)
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)
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.184.108.40.206 is the network address.Note
19.36Two levels of hierarchy in an IPv4 address : No SubnettingsuffixEg. area code & telephone no.
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.
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.
19.40Qn. Take address 29, 45 & 50 from the 3 subnets and find the subnet address.
19.41Three-level hierarchy in an IPv4 address : SubnettingEg. area code, telephone no.(EPABX) & extn no.
19.42An ISP is granted a block of addresses starting with220.127.116.11/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
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
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
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.
19.46An example of address allocation and distribution by an ISP
19.47An Organisation is granted a block of addresses startingwith 18.104.22.168/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