COMPUTER NETWORKS (MCA) – QUIZ 4
October 8, 2016
Which transport protocol will you use for developing an application which is based on wireless networks such as 802.11?
(Ans: Since 802.11 is an unreliable medium, the preferred transport layer protocol is TCP unless the application itself does not require reliability.)
What is the demultiplexing field in UDP or TCP?
(Ans: Destination Port)
If the path from the source to the destination has the following MTUs on the links of the path – 1500, 1500, 3100, 576, 1500, 3100 – what is the size of the MSS in TCP?
(Ans: Path MTU is the minimum MTU of the path – 576. MSS is 576-40 = 536.)
An application uses UDP to send 7000 bytes of data in a single message on a path with MTU = 1500 and there is an error in one of the fragments transmitted. The application is a reliable application and so retransmits the 7000B again. How much more data is transmitted by this application as compared to it using TCP as the transport protocol?
(Ans: UDP transmits 14000B – since this will be split into segments of 1460 and there will be five segments and only one is lost, TCP transmits 8460B – i.e., 5540B more data is transmitted by UDP)
What is the problem with estimating RTT when a segment is retransmitted?
(Ans: There is no way to decide whether the ack. received is to the first or second transmission. In one case we have an unnecessarily long timeout interval keeping the line idle and in the other we have a shorter time interval than the real one. This leads to too many retransmissions and so adds to the congestion.)
When a retransmission timeout occurs, what does Karn's algorithm propose that TCP should do?
(Ans: Karn's algorithm states that no RTT estimate should be made with this sample. Instead, the timeout should be exponentially backed off and a retransmission made.)
What is the purpose of the URG bit in TCP?
(Ans: URG is set to indicate that the segment carries out-of-order data.)
What is the purpose of the PSH bit in TCP?
(Ans: PSH bit is set to indicate that there should be no buffering for the data in question. Typically used by interactive applications.)
The segments of data sent in a new connection have 100B, 200B, 300B, 200B and 100B. The acknowledgments received are 101, 101, 601, 601 and 901 without a retransmission timeout. What is the order in which the datagrams may have been received?
(Ans: The first segment should return an ack of 101 since it is the next expected in-sequence byte. When it is received again, it means that the second segment has not reached but some other segment has reached the receiver. You cannot tell which segment yet. When the next segment's ack comes and it is 601, you know that 600B have been received in sequence. This means that the second and third segments have been received and so on. )
Why does TCP header have a header length field whereas UDP does not?
(Ans: Because TCP has options unlike UDP.)
Which of client and server does active and passive TCP socket open?
(Ans: The server opens a listening socket and just waits for connections – therefore it is called passive open (look up the meaning of passive vs active in the dictionary). The client actually initiates the connection through the 3-way handshake and so is called active open.)
Why are ports used in UDP and TCP and not process IDs of the client/server processes?
(Ans: Process IDs need not be same when run across machines or even within one machine across different times. Thus, they cannot be used to identify a server process by a client trying to reach it.)
What is the difference between window and MSS in TCP?
(Ans: Window is the buffer space available in the receiver – it represents the maximum amount of data that can be transmitted to the receiver without getting any ack. MSS represents the maximum amount of data that can be sent in a single segment.)
What are the contents of the pseudo header used in UDP and TCP checksum calculations and why?
(Ans: )
What is the method for TCP to open a connection?
(Ans: Open uses 3-way SYN handshake and Close uses 3-way FIN handshake.)
Give an example of an application where UDP is better than TCP? Why?
(Ans: An application which requires less latency and no reliability such as video streaming
where the loss of a single datagram does not affect the user experience)
When does a source get an ICMP_DEST_UNREACH/NET_UNREACH message?
(Ans: Whenever a router does not find a matching entry for the destination IP address)
An operating system sets the DF bit to 1 by default. What ICMP message is sent if the datagram size is more than the Path MTU?
(Ans: ICMP_DEST_UNREACH/DF_BIT_IS_SET_BUT_FRAG_NEEDED)
Given the topology and H1 tries to ping H3, what ICMP message does it get as reply?
A fragment is lost due to noise on the path to the destination. What ICMP message, if any, does the source get?
(Ans: It gets the ICMP message TIME_EXCEEDED/REASSEMBLY TIMER EXPIRED)
If a datagram is lost due to noise, what ICMP message, if any, does the source get?
(Ans: It does not get any ICMP message)
Given the topology and the routing table entries, what happens when H1 tries to ping to the machine with a host IP not found?
What is a well-known port number?
(Ans: The port number of a standard application whose port is decided by IANA)
How is the port number of a client connection obtained?
(Ans: The kernel gives the next available free port no as the client port)
Can a server have the port number decided by the operating system? Give the reason.
(Ans: The server needs the port no. to be fixed. So, the kernel cannot give the port to a server)
A client is trying to reach a web server on a system. But, at the time the client is connecting, the web server process has crashed. What, if any , ICMP message will be sent to the client?
(Ans: ICMP_DEST_UNREACH/PORT_UNREACH)
How is a socket defined?
(Ans: The 5-tuple (SIP, DIP, SP, DP and Proto))
What is the difference between message-oriented and stream-oriented services?
(Ans: The message oriented service delivers the messages as given to the network layer whereas the stream-oriented protocol can combine/divide the messages given by the application before giving to the network layer)
What is sliding window used for?
(Ans: Flow control)
What type of ack does TCP use? What is the advantage of this type of ack?
(Ans: Cumulative ack. Advantage is that when acks are lost, segments/acks are reordered, it allows an application to infer the data that has been delivered without explicit acks for every segment. It allows for delayed acks that combine ack for multiple received segments also)