Latest

6/recent/ticker-posts

Data communication and networking by Forouzan chapter 19 solution

 11. What is the address space in each of the following systems? 

a. A system with 8-bit addresses 

=> 2^8 

b. A system with 16-bit addresses 

=>2^16

c. A system with 64-bit addresses

=>2^64

12. An address space has a total of 1024 addresses. How many bits are needed to represent an address.

solution: 

Let n bits are needed to represent an address.

so, 2^n = 1024

=>n= 9

13. An address space uses the three symbols 0, 1, and 2 to represent addresses. If each address is made of 10 symbols, how many addresses are available in this system?

Solution:

Since, no of symbols used= 3

no of symbols a address consists of =10

So, addresses available= 3^10

14. Change the following IP addresses from dotted-decimal notation to binary notation. 

a. 114.34.2.8 

=> 01011110 00100010 00000010 00001000

b. 129.14.6.8 

=> 10000001 00001110 00000110 00001000

c. 208.34.54.12 

=> 11010000 00100010 00110110 00001100

d. 238.34.2.1

=> 11101110 00100010 00000010 00000001

15. Change the following IP addresses from binary notation to dotted-decimal notation. 

a. 01111111 11110000 01100111 01111101 

=> 127.240.103.125

b. 10101111 11000000 11111000 00011101 

=>175.192.248.29

c. 11011111 10110000 00011111 01011101 

=>223.176.31.129

d. 11101111 11110111 11000111 00011101

=> 239.247.199.29

16. Find the class of the following IP addresses. 

a. 208.34.54.12 

=>  class C

b. 238.34.2.1 

=> class D

c. 114.34.2.8 

=> class A

d. 129.14.6.8

=> class B

17. Find the class of the following IP addresses. 

a. 11110111 11110011 10000111 11011101 

=> class E

b. 10101111 11000000 11110000 00011101 

=> class B

c. 11011111 10110000 00011111 01011101 

=> class C

d. 11101111 11110111 11000111 00011101

=> class D

18. Find the netid and the hostid of the following IP addresses. 

a. 114.34.2.8 

=> Netid=114

    Hostid=34.2.8

b. 132.56.8.6 

=> Netid=132.56

     Hostid=8.6

c. 208.34.54.12

=> Netid=208.34.54

    Hostid=12

19. In a block of addresses, we know the IP address of one host is 25.34.12.56/16. What are the first address (network address) and the last address (limited broadcast address) in this block?

Solution:

The IP address can be written as: 00011001 00100110 00001100 00111000

To obtain the first address, we will set the rightmost 32-16 bits to 0

The first address will be-

    00011001 00100110 00000000 00000000

    i.e. 25.34.0.0

To obtain the last address, we will set the rightmost 16 bits to 1.

So, the last address will be-

    00011001 00100110 11111111 11111111

    i.e. 25.34.255.255

20. In a block of addresses, we know the IP address of one host is 182.44.82.16/26. What are the first address (network address) and the last address in this block?

Solution:

The IP address can be written as-

10110110 00101100 01010010 00010000

The first address can be obtained by replacing rightmost 32-26=6 bits with 0

So, the first address will be

10110110 00101100 01010010 00000000

i.e. 182.44.82.0

The last address can be obtained by replacing last rightmost 6 bits by 1

So, the last address will be

10110110 00101100 01010010 00111111

i.e. 182.44.82.63

21. An organization is granted the block 16.0.0.0/8. The administrator wants to create 500 fixed-length subnets. 

a. Find the subnet mask. 

b. Find the number of addresses in each subnet. 

c. Find the first and last addresses in subnet 1. 

d. Find the first and last addresses in subnet 500

Solution:

Total number of addresses in the block will be:

2^(32-8)

=2^24

=16,777,216

So, each subnet will have (16,777,216)%500=33,554.432

The nearest power of 2 is 32,768

a) 

Let, mask of each subnet be n, then

2^(32-n)=32,768

=>2^(32-n)=2^15

=>32-n=15

=>n=17

So, subnet mask is 17

b)

The number of address in each subnet

= 2^(32-subnet mask)

=2^(32-17)

=2^15

=32,768

c)

The first address in first subnet is 16.0.0.0

which can be written

00010000 00000000 00000000 00000000

To obtain the last address of first subnet, we will replace the rightmost (32-17)=15 bits with 1

So, the last address will be

00010000 00000000 01111111 11111111

i.e. 16.0.127.255

  














Post a Comment

0 Comments