INTRODUCTION • The identifier used in the IP layer of the TCP/IP protocol suite to identify each device connected to the Internet is called the Internet address or IP address. . • An IPv4 address is a 32-bit address that uniquely and universally defines the connection of a host or a router to the Internet.

967. 3 .Note An IPv4 address is 32 bits long.294. Note The IPv4 addresses are unique and universal. Note The address space of IPv4 is 232 or 4.296.

the entire address space (232 addresses) is divided into blocks of different sizes. .• In classless addressing variable-length blocks are assigned that belong to no class. In this architecture.

111 . a.11. 11100111 11011011 10001011 01101111 d.131.239 b.Example 1(a) Change the following IPv4 addresses from binary notation to dotteddecimal notation. 11000001 10000011 00011011 11111111 c. 193.11. 129.255 c.219. 10000001 00001011 00001011 11101111 b. 11111001 10011011 11111011 00001111 Solution We replace each group of 8 bits with its equivalent decimal number a.27.139. 231.

45.34. 11110001 00001000 00111000 00001100 d.82 c.45. 221. a.56.Example 1(b) Change the following IPv4 addresses from dotted-decimal notation to binary notation. 241.78 Solution We replace each decimal number with its binary equivalent: a. 11011101 00100010 00000111 01010010 c.12 d.8.7.78 b. 111.56. 01101111 00111000 00101101 01001110 b.34. 75. 01001011 00101101 00100010 01001110 .

We may not have more than 4 bytes in an IPv4 address.20 c. b.Example 2 Find the error. c.14 d.56.78 b.8. d.045. There should be no leading zeroes (045).A mixture of binary notation and dotted-decimal notation.7.23. Each byte should be less than or equal to 255. if any.45. .67 Solution a. in the following IPv4 addresses: a. 221. 11100010. 75. 111.301.14.34.

The result is 0.3. To find the number of addresses in the range (in decimal). Solution We can subtract the first address from the last address in base 256.255 in this base.255.102.32. .Example 3 Find the number of addresses in a range if the first address is we convert this number to base 10 and add 1 to the result.0 and the last address is 146.

it was clear that a larger address space was needed as a long-term solution. • The short-term solution still uses IPv4 addresses. • With the growth of the Internet. • Although the long-range solution has already been devised and is called IPv6. a short-term solution was also devised to use the same address space.CLASSLESS ADDRESSING • Sub netting and super netting in class-ful addressing did not solve the address depletion problem. . but it is called classless addressing.

224. In the address 167. The prefix length is 8.24. the network mask is 255. .0. The mask has eight 1s and twenty-four 0s.199. c.0.156/16. The mask has sixteen 1s and sixteen 0s. the suffix length is 5. In the address 130. the network mask is 255.82/27.23. the suffix length is 24.Prefix-Suffix Length The following addresses are defined using slash notations.0. In the address 12.11.0. the suffix length is 16. a.170. the network mask is 255.0. The prefix length is 27.The prefix length is 16. The mask has twenty-seven 1s and five 0s.255.78/ b.

Bitwise NOT Operation .

Bitwise AND Operation .

Bitwise OR Operation .

The first address is 167. the first address. It is 255.170. Solution The value of n is 27. Find the number of addresses in the network. and the last address.64/27. a. we first find the complement of network mask and then OR it with the given address: last address is 167.95/27. The network mask has twenty-seven 1s and five 0s. We use the AND operation to find the first address (network address). To find the last address.255.240. b.82/27. the The .199.170.One of the addresses in a block is 167. The number of addresses in the network is 232 − n =

In other words. The mask has twenty-nine 1s. The complement is 0. we get 190. and the last address.0. we notice that the mask (/29) has five 1s in the last byte. the complement has three 1s.0.87. The number of addresses is 232−29 or 8.207/20.207/29. the number of addresses.140.87. we use the complement of the mask. To find the last address. . the last address is 190.200/29. To find the first address.Allocation Of IP to an Organization Address given is:.202/29 Solution:We follow the procedure in the previous examples to find the first address.7.87. If we add this to the first address. the first address is 190. There are only 8 addresses in this block.140.

Sign up to vote on this title
UsefulNot useful