GATE 2008
185 questions
MCQ 1851-mark 52 · 2-mark 133
Questions 171–175 of 185
If a class B network on the Internet has a subnet mask of 255.255.248.0, what is the maximum number of hosts per subnet?
Answer: (C)
A class B address has 16 network bits and 16 host bits. The mask 255.255.248.0 has in the third octet, so the mask has one bits. These 5 extra bits are the subnet bits.
The number of zeros in the mask is the number of host bits: 3 (third octet) 8 (fourth octet) bits.
Host addresses per subnet . Two of them are reserved: the all-zeros address (subnet ID) and the all-ones address (directed broadcast address).
Usable hosts
(D) forgets to remove the two reserved addresses.
Answer: (C)
The number of zeros in the mask is the number of host bits: 3 (third octet) 8 (fourth octet) bits.
Host addresses per subnet . Two of them are reserved: the all-zeros address (subnet ID) and the all-ones address (directed broadcast address).
Usable hosts
(D) forgets to remove the two reserved addresses.
Answer: (C)
The three way handshake for TCP connection establishment is shown below.
Which of the following statements are TRUE?
S1: Loss of SYN + ACK from the server will not establish a connection
S2: Loss of ACK from the client cannot establish the connection
S3: The server moves in the state machine on no packet loss
S4: The server moves in the state machine on no packet loss
Which of the following statements are TRUE?
S1: Loss of SYN + ACK from the server will not establish a connection
S2: Loss of ACK from the client cannot establish the connection
S3: The server moves in the state machine on no packet loss
S4: The server moves in the state machine on no packet loss
Answer: (B)
S1 (true). The client moves to ESTABLISHED only when it receives the server's SYN+ACK. If that segment is lost, the client stays in SYN_SENT, so this exchange does not set up a connection.
S2 (false). After sending the last ACK, the client is already in ESTABLISHED. If the ACK is lost, the server stays in SYN_RCVD and resends its SYN+ACK after a timeout. The client answers again with an ACK (or its first data segment, which also carries the ACK), and the server then reaches ESTABLISHED. So the connection can still be set up.
S3 (false). SYN_SENT is a client state, entered when the client sends its SYN (active open). The server never enters it in this handshake.
S4 (true). The server waits in LISTEN, receives the SYN and sends SYN+ACK (state SYN_RCVD), then receives the final ACK and goes to ESTABLISHED.
So only S1 and S4 are true.
Answer: (B)
S2 (false). After sending the last ACK, the client is already in ESTABLISHED. If the ACK is lost, the server stays in SYN_RCVD and resends its SYN+ACK after a timeout. The client answers again with an ACK (or its first data segment, which also carries the ACK), and the server then reaches ESTABLISHED. So the connection can still be set up.
S3 (false). SYN_SENT is a client state, entered when the client sends its SYN (active open). The server never enters it in this handshake.
S4 (true). The server waits in LISTEN, receives the SYN and sends SYN+ACK (state SYN_RCVD), then receives the final ACK and goes to ESTABLISHED.
So only S1 and S4 are true.
Answer: (B)
Which of the following statements are TRUE?
S1: TCP handles both congestion and flow control
S2: UDP handles congestion but not flow control
S3: Fast retransmit deals with congestion but not flow control
S4: Slow start mechanism deals with both congestion and flow control
S1: TCP handles both congestion and flow control
S2: UDP handles congestion but not flow control
S3: Fast retransmit deals with congestion but not flow control
S4: Slow start mechanism deals with both congestion and flow control
Answer: (B)
S1 (true). TCP controls congestion with the congestion window (cwnd) and flow control with the receiver's advertised window. The sender uses the smaller of the two.
S2 (false). UDP has no congestion control and no flow control. It just sends datagrams.
S3 (true). When the sender gets three duplicate ACKs, it resends the missing segment at once instead of waiting for the timeout. This is a reaction to packet loss in the network, so it belongs to congestion control. The receiver's window is what handles flow control.
S4 (false). Slow start grows cwnd to find the network's capacity. It is a congestion control mechanism only; flow control is done by the advertised window.
So S1 and S3 only.
Answer: (B)
S2 (false). UDP has no congestion control and no flow control. It just sends datagrams.
S3 (true). When the sender gets three duplicate ACKs, it resends the missing segment at once instead of waiting for the timeout. This is a reaction to packet loss in the network, so it belongs to congestion control. The receiver's window is what handles flow control.
S4 (false). Slow start grows cwnd to find the network's capacity. It is a congestion control mechanism only; flow control is done by the advertised window.
So S1 and S3 only.
Answer: (B)
In the slow start phase of the TCP congestion control algorithm, the size of the congestion window
Answer: (D)
In slow start, the congestion window (cwnd) starts at 1 MSS and grows by 1 MSS for every ACK received. Every segment sent in one round trip is acknowledged, so cwnd doubles each round trip time (RTT): 1, 2, 4, 8, and so on. This is exponential growth.
Take the following value:
In the figure, cwnd goes 1, 2, 4, 8 up to RTT 3, where it reaches ssthresh. After that the algorithm switches to congestion avoidance, and cwnd grows by 1 per RTT (9, 10, 11, ...), which is linear. So linear growth is not the slow start phase.
Answer: (D)
Take the following value:
In the figure, cwnd goes 1, 2, 4, 8 up to RTT 3, where it reaches ssthresh. After that the algorithm switches to congestion avoidance, and cwnd grows by 1 per RTT (9, 10, 11, ...), which is linear. So linear growth is not the slow start phase.
Answer: (D)
What is the maximum size of data that the application layer can pass on to the TCP layer below?
Answer: (A)
TCP works as a byte stream. The application can hand it any amount of data, and TCP itself breaks that data into segments.
Answer: Any size
Answer: Any size