Open In App
Related Articles

Computer Networks | Set 7

Improve Article
Save Article
Like Article

Following questions have been asked in GATE CS 2008 exam.

1) Which of the following system calls results in the sending of SYN packets?
(A) socket
(B) bind
(C) listen
(D) connect

Answer (D)
socket() creates a new socket of a certain socket type, identified by an integer number, and allocates system resources to it.
bind() is typically used on the server side, and associates a socket with a socket address structure, i.e. a specified local port number and IP address.
listen() is used on the server side, and causes a bound TCP socket to enter listening state.
connect() is used on the client side, and assigns a free local port number to a socket. In case of a TCP socket, it causes an attempt to establish a new TCP connection.

When connect() is called by client, following three way handshake happens to establish the connection in TCP.
1) The client requests a connection by sending a SYN (synchronize) message to the server.
2) The server acknowledges this request by sending SYN-ACK back to the client.
3) The client responds with an ACK, and the connection is established.

Sources: Berkeley sockets, TCP Connection Establishment and Termination

2) 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.

3) If a class B network on the Internet has a subnet mask of, what is the maximum number of hosts per subnet?
(A) 1022
(B) 1023
(C) 2046
(D) 2047

Answer (C)
The binary representation of subnet mask is 11111111.11111111.11111000.00000000. There are 21 bits set in subnet. So 11 (32-21) bits are left for host ids. Total possible values of host ids is 2^11 = 2048. Out of these 2048 values, 2 addresses are reserved. The address with all bits as 1 is reserved as broadcast address and address with all host id bits as 0 is used as network address of subnet.
In general, the number of addresses usable for addressing specific hosts in each network is always 2^N – 2 where N is the number of bits for host id.

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

Level Up Your GATE Prep!
Embark on a transformative journey towards GATE success by choosing Data Science & AI as your second paper choice with our specialized course. If you find yourself lost in the vast landscape of the GATE syllabus, our program is the compass you need.

Last Updated : 13 Dec, 2022
Like Article
Save Article
Similar Reads