Computer Networks | Set 1


Following questions have been asked in GATE CS 2012 exam.

1) The protocol data unit(PDU) for the application layer in the Internet stack is
(A) Segment
(B) Datagram
(C) Message
(D) Frame

Answer (C)
The Protocol Data Unit for Application layer in the Internet Stack (or TCP/IP) is called Message.

2) Which of the following transport layer protocolss is used to support electronic mail?
(B) IP

Answer (C)
E-mail uses SMTP as application layer protocol. SMTP uses TCP as transport layer protocol.

3) In the IPv4 addressing format, the number of networks allowed under Class C addresses is
(A) 2^14
(B) 2^7
(C) 2^21
(D) 2^24

Answer (C)
In class C, 8 bits are reserved for Host Id and 24 bits are reserved for Network Id. Out of these 24 Network Id bits, the leading 3 bits are fixed as 110. So remaining 21 bits can be used for different networks. See this for more details.

4) An Internet Service Provider(ISP) has the following chunk of CIDR-based IP addresses available with it: The ISP wants to give half of this chunk of addreses to Organization A, and a quarter to Organization B, while retaining the remaining with itself. Which of the following is a valid allocation of addresses to A and B?
(A) and
(B) and
(C) and
(D) and

Answer (A)
Since routing prefix is 20, the ISP has 2^(32-20) or 2^12 addresses. Out of these 2^12 addresses, half (or 2^11) addresses have to be given to organization A and quarter (2^10) addresses have to be given to organization B. So routing prefix for organization A will be 21. For B, it will be 22. If we see all options given in question, only options (A) and (B) are left as only these options have same number of routing prefixes. Now we need to choose from option (A) and (B).
To assign addresses to organization A, ISP needs to take first 20 bits from and fix the 21st bit as 0 or 1. Similarly, ISP needs to fix 21st and 22nd bits for organization B. If we take a closer look at the options (A) and (B), we can see the 21st and 22nd bits for organization B are considered as 0 in both options. So 21st bit of organization A must be 1. Now take the first 20 bits from and 21st bit as 1, we get addresses for organization A as

Please see GATE Corner for all previous year paper/solutions/explanations, syllabus, important dates, notes, etc.

Please write comments if you find any of the answers/explanations incorrect, or you want to share more information about the topics discussed above.

GATE CS Corner    Company Wise Coding Practice

Recommended Posts:

3 Average Difficulty : 3/5.0
Based on 1 vote(s)

Writing code in comment? Please use, generate link and share the link here.