In: Computer Science
Question 1 Match the prefix lengths with the correct corresponding subnet masks. /11 /26 /30 /23 /25 A. 255.255.255.252 B. 255.224.0.0 C. 255.255.255.128 D. 255.255.254.0 E. 255.255.255.192
You are designing an IP address scheme for a client. The client has the 205.44.98.0 /24 address block to use and needs to accommodate at least 12 subnets and 10 hosts per subnet. What should the prefix length be for this scheme?
Question (1)
(A) 255.255.255.252 (In binary : 11111111.11111111.11111111.11111100)
Let us observe the last octet of this address: (because rest of the first three octet are complete by 255)
11111100
As it has last two remaining bits as 00 i.e. unoccupied, hence it can used for host assignment. This gives the remaining 6 bits to be used for subnet i.e. for masking. Finally we conclude with a total of:
8 (1st octet) + 8 (2nd octet) + 8 (3rd octet) + 6 (4th octet) = 30
Hence the right mask is /30
(B) Similar to above explanation, let us expand the 255.224.0.0 :
11111111.11100000.00000000.00000000
This gives a subnet-mask of 11 bits (as highlighted in bold)
Hence the right mask is /11
(C) Similar to explanation in part (A), let us expand the 255.255.255.128:
11111111.11111111.11111111.10000000
This gives a subnet-mask of 25 bits (as highlighted in bold)
Hence the right mask is /25
(D) Similar to explanation in part (A), let us expand the 255.255.254.0:
11111111.11111111.11111110.00000000
This gives a subnet-mask of 23 bits (as highlighted in bold)
Hence the right mask is /23
(E) Similar to explanation in part (A), let us expand the 255.255.255.192:
11111111.11111111.11111111.11000000
This gives a subnet-mask of 26 bits (as highlighted in bold)
Hence the right mask is /26
Question (2)
Let us convert the given IP address 205.44.98.0/24 to binary form:
11001101.00101100.01100010.00000000
As given, first 8 octets i.e. 24 bits are occupied for network address, we need to utilize last 8 bits for 12 subnets with 10 host each.
For 12 subnets we need to reserve atleast first 4 bits of the last octet because 23<=12<=24 (4 binary bits provide 16 numeric combination)
Hence, remaining 4 bits (out of 8 in the last octet) can sufficiently provide upto 24=16 host addresses, hence this subnetting will induce 4 bits further in the mask giving a prefix length of 28 for the proposed scheme.
Hope this helps!
************ PLEASE THUMBS UP!!!!!!! ************
In case of any clarification, please comment!