123

Transport Layer

Question 1
The transport layer protocols used for real time multimedia, file transfer, DNS and email, respectively are:
A
TCP, UDP, UDP and TCP
B
UDP, TCP, TCP and UDP
C
UDP, TCP, UDP and TCP
D
TCP, UDP, TCP and UDP
GATE CS 2013    Transport Layer    
Discuss it


Question 1 Explanation: 
TCP (Transmission Control Protocol) and UDP(User Datagram Protocol) are two main transport layer protocols. TCP is connection oriented and UDP is connectionless, this makes TCP more reliable than UDP. But UDP is stateless (less overhead), that makes UDP is suitable for purposes where error checking and correction is less important than timely delivery. For real time multimedia, timely delivery is more important than correctness. --> UDP For file transfer, correctness is necessary. --> TCP DNS, timely delivery is more important --> UDP Email again same as file transfer --> TCP
Question 2
Which of the following transport layer protocols is used to support electronic mail?
A
SMTP
B
IP
C
TCP
D
UDP
GATE CS 2012    Transport Layer    
Discuss it


Question 2 Explanation: 
E-mail uses SMTP as application layer protocol. TCP and UDP are two transport layer protocols. SMTP uses TCP as transport layer protocol as TCP is reliable.
Question 3
Consider an instance of TCP’s Additive Increase Multiplicative Decrease (AIMD) algorithm where the window size at the start of the slow start phase is 2 MSS and the threshold at the start of the first transmission is 8 MSS. Assume that a timeout occurs during the fifth transmission. Find the congestion window size at the end of the tenth transmission.
A
8 MSS
B
14 MSS
C
7 MSS
D
12 MSS
GATE CS 2012    Transport Layer    
Discuss it


Question 3 Explanation: 
Question 4
A layer-4 firewall (a device that can look at all protocol headers up to the transport layer) CANNOT
A
block entire HTTP traffic during 9:00PM and 5 :0OAM
B
block all ICMP traffic
C
stop incoming traffic from a specific IP address but allow outgoing traffic to the same IP address
D
block TCP traffic from a specific user on a multi-user system during 9:00PM and 5:00AM
GATE CS 2011    Transport Layer    
Discuss it


Question 4 Explanation: 
A.Can Block entire HTTP traffic by blocking TCP port 80 and it is possible because it is L4 firewall. D) As it is L4 firewall can not block packet based on user identity because it is the responsiblity of Application layer
Question 5
While opening a TCP connection, the initial sequence number is to be derived using a time-of-day(ToD) clock that keeps running even when the host is down. The low order 32 bits of the counter of the ToD clock is to be used for the initial sequence numbers. The clock counter increments once per millisecond. The maximum packet lifetime is given to be 64s. Which one of the choices given below is closest to the minimum permissible rate at which sequence numbers used for packets of a connection can increase?
A
0.015/s
B
0.064/s
C
0.135/s
D
0.327/s
GATE-CS-2009    Transport Layer    
Discuss it


Question 5 Explanation: 
The maximum packet lifetime is given to be 64 seconds in the question. Thus, a sequence number increments after every 64 seconds.
So, minimum permissible rate = 1 / 64 = 0.015 per second
 
Thus, option (A) is the answer.
 
Please comment below if you find anything wrong in the above post.
Question 6
Which of the following system calls results in the sending of SYN packets?
A
socket
B
bind
C
listen
D
connect
Transport Layer    GATE CS 2008    
Discuss it


Question 6 Explanation: 
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 socketsTCP Connection Establishment and Termination
Question 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
Transport Layer    GATE CS 2008    
Discuss it


Question 7 Explanation: 
Question 8
Which one of the following uses UDP as the transport protocol?
A
HTTP
B
Telnet
C
DNS
D
SMTP
Transport Layer    GATE-CS-2007    
Discuss it


Question 8 Explanation: 
UDP is a stateless ,connectionless and unreliable protocol. HTTP needs connection to be established and thus,uses TCP. Telnet is a byte stream protocol which again needs connection establishment ,thus uses TCP. DNS needs request and response ,it needs a protocol in which a server can answer the small queries of large number of users. As UDP is fast and stateless it is the most suitable protocol and thus,it is used in DNS querying . SMTP needs reliability and thus,uses TCP. This solution is contributed by Shashank Shanker khare //.............// DNS uses UDP. HTTP, Telnet and SMTP uses TCP. Thus, C is the correct choice.
 
Please comment below if you find anything wrong in the above post.
Question 9
Let the size of congestion window of a TCP connection be 32 KB when a timeout occurs. The round trip time of the connection is 100 msec and the maximum segment size used is 2 KB. The time taken (in msec) by the TCP connection to get back to 32 KB congestion window is _________.
A
1100 to 1300
B
800 to 1000
C
1400 to 1600
D
1500 to 1700
Transport Layer    GATE-CS-2014-(Set-1)    
Discuss it


Question 9 Explanation: 
Current size of congestion window in terms of number of segments
                            = (Size in Bytes)/(Maximum Segment Size)
                            = 32KB / 2KB 
                            = 16 MSS
          
When timeout occurs, in TCP's Slow Start algorithm, threshold is 
reduced to half which is 16KB or 8MSS. Also, slow start phase begins 
where congestion window is increased twice. 
So from 1MSS to 8 MSS window size will grow exponentially. 
Congestion window becomes 2MSS after one RTT and becomes 4MSS after
2 RTTs and 8MSS after 3 RTTs.  At 8MSS, threshold is reached and
congestion avoidance phase begins.  In congestion avoidance phase,
window is increased linearly. So to cover from 8MSS to 16MSS, it needs
8 RTTs

Together, 11RTTs are needed (3 in slow start phase and 8 in congestion
avoidance phase).
Question 10
Which one of the following socket API functions converts an unconnected active TCP socket into a passive socket.
A
connect
B
bind
C
listen
D
accept
Transport Layer    GATE-CS-2014-(Set-2)    
Discuss it


Question 10 Explanation: 
listen() marks the socket referred to by sockfd as a passive socket, that is, as a socket that will be used to accept incoming connection requests using accept(). Source: http://linux.die.net/man/2/listen
There are 26 questions to complete.
123

Company Wise Coding Practice    Topic Wise Coding Practice