Computer Networks
Computer Networks
The protocol data unit(PDU) for the application layer in the Internet stack is [GATE CSE 2012]
(A) Segment
(B) Datagram
(C) Message
(D) Frame
Solution: (C)
The Protocol Data Unit for the Application layer in the Internet Stack (or TCP/IP) is called Message.
2. Which of the following transport layer protocols is used to support electronic mail? [GATE CSE
2012]
(A) SMTP
(B) IP
(C) TCP
(D) UDP
Solution: (C)
E-mail uses SMTP as an application layer protocol. SMTP uses TCP as a transport layer protocol.
3. In the IPv4 addressing format, the number of networks allowed under Class C addresses is [GATE
CSE 2012]
(A) 2^14
(B) 2^7
(C) 2^21
(D) 2^24
Solution: (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:245.248.128.0/20. The ISP wants to give half of this chunk of addresses 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? [GATE CSE 2012]
(A) 245.248.136.0/21 and 245.248.128.0/22
(B) 245.248.128.0/21 and 245.248.128.0/22
(C) 245.248.132.0/22 and 245.248.132.0/21
(D) 245.248.136.0/22 and 245.248.132.0/21
Solution: (A)
Since the 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 a 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 the question, only options (A) and (B) are left as only these options have the same
number of routing prefixes. Now we need to choose from options (A) and (B).
To assign addresses to organization A, ISP needs to take the first 20 bits from 245.248.128.0 and fix
the 21st bit as 0 or 1. Similarly, ISP needs to fix the 21st and 22nd bits for organization B. If we take a
closer look at 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
245.248.128.0 and the 21st bit as 1, we get addresses for organization A as 245.248.136.0/21
5. Which one of the following is not a client-server application? [GATE CSE 2010]
(C) Email
(D) ping
6. The maximum window size for data transmission using the selective reject protocol with n-bit
frame sequence numbers is:
(a) 2^n
(b) 2^(n-1)
(c) 2^n – 1
(d) 2^(n-2)
Answer (b)
In Selective Reject (or Selective Repeat), maximum size of window must be half of the maximum
sequence number.
7. In the slow start phase of the TCP congestion control algorithm, the size of the congestion window
(A) does not increase
(B) increases linearly
(C) increases quadratically
(D) increases exponentially
Answer (D)
Although the name is slow start, during the slow start phase, window size is increased by the number
of segments acknowledged, which means window size grows exponentially. This happens until either
an acknowledgment is not received for some segment or a predetermined threshold value is reached.
See this for more details.
8. What is the maximum size of data that the application layer can pass on to the TCP layer below?
(A) Any size
(B) 2^16 bytes-size of TCP header
(C) 2^16 bytes
(D) 1500 bytes
Answer (A)
Application layer can send any size of data. There is no limit defined by standards. The lower layers
divides the data if needed.
9. A computer on a 10Mbps network is regulated by a token bucket. The token bucket is filled at a
rate of 2Mbps. It is initially filled to capacity with 16Megabits. What is the maximum duration for
which the computer can transmit at the full 10Mbps?
(A) 1.6 seconds
(B) 2 seconds
(C) 5 seconds
(D) 8 seconds
Answer (B)
Answer (C)
DNS primarily uses User Datagram Protocol (UDP) on port number 53 to serve requests. DNS queries
consist of a single UDP request from the client followed by a single UDP reply from the server.