Data Communications and Networks - Sample Midterm Examination PDF

Title Data Communications and Networks - Sample Midterm Examination
Author li tianyi
Course Data Communications and Networks
Institution New York University
Pages 13
File Size 750.2 KB
File Type PDF
Total Downloads 795
Total Views 985

Summary

Download Data Communications and Networks - Sample Midterm Examination PDF


Description

Data Communications and Networks CSCI-GA.2262-001 – Fall 2021 Dr. Jean-Claude Franchitti New York University Computer Science Department Courant Institute of Mathematical Sciences Sample Midterm Examination DISCLAIMER: This sample examination is meant to illustrate the format and the types of questions that you may have to answer as part of the upcoming midterm examination. Solutions to a subset of the questions are also provided to help illustrate how you should formulate your answers. This midterm exam covers the following data communications and networks topics covered in class: introduction and overview, the application layer, data encoding and transmission, and data link control. As the exam is rather long, it is EXTREMELY IMPORTANT to use GOOD TEST TAKING STRATEGY. That is, first answer the problems that you can answer easily and quickly, and then go to the problems that are going to take you more work. Do not waste a lot of time at the beginning trying to figure out a problem that you find difficult. The answers do not have to be in order in your exam booklet. General Directions: This is an open book test; you may bring the course text book(s) or notes to the room. No computers or electronic devices, no communication. Each question is preceded by a numeric score in parenthesis: that score indicates both the weight of the question, and a (high) estimate of how many minutes you should be spending on it. The total score is 100. The official exam period is 110 minutes. Write your answers in your exam booklet. It is not expected that you will need additional sheets, but there will be a supply of extra booklets. Be sure to write your name on any sheet that you will be submitting. Please make sure that you also observe the following: o Please provide answers to all ten (10) questions, unless stated otherwise you will not be penalized for providing a wrong answer.

o Place your name on your exam booklet(s). o Please read the questions carefully and consider all hints and assumptions provided

Problems: 1. General Q&As – (8 points) Indicate whether each of the following statement is true or false (T/F) and explain your answers if/as needed: 1a. (2 points) The internal data rates of LANs are typically much greater than those of WANs. T 1b. (2 points) Name servers are server programs that hold information about a portion of the domain name tree structure and the associated resource records (RRs). T 1c. (2 points) Synchronous time division multiplexing is only possible when the achievable data rate (sometimes called bandwidth) of the medium exceeds the data rate of digital signals to be transmitted. T 1d. (2 points) A set of devices and LANs connected by layer 2 (i.e., link layer) switches is considered to have a “flat” address space where the term “flat” means that all users share a common MAC broadcast address. T 2. Computer Networks and the Internet – (7 points) As an example of Voice over IP (VoIP), a real-time voice is being sent from Host A to Host B over a single link packet-switched network. Host A converts analog voice to a digital 128 kbps bit stream on the fly and groups the bits into 56-byte packets. The single link between Host A and Host B has a transmission rate of 5 Mbps and a propagation delay of 12 msec. Packets gathered by Host A are immediately sent to Host B and as soon as Host B receives an entire packet, it converts it to an analog signal. How much time elapses from the time a bit is created from the original analog signal at Host A until the bit is decoded as part of the analog signal at Host B?

2

Consider the first bit in a packet. Before this bit can be transmitted, all of the bits in the packet must be generated. This requires: (56x8)/(128*103) = 3.5 msec The time required to transmit the packet is: (56x8)/(50x106)sec = 8.96 usec Propagation delay = 12ms. The total delay until decoding is 3.5 msec+8.96 usec+12 msec = 15.589 msec 3. Computer Networks and the Internet – (10 points) Explain how phone calls made from a PC to an ordinary phone (e.g., via Skype) are typically supported. (Note: It is assumed here that the voice call would pass through the Internet and a telephone carrier.) See http://www.mjalali.com/blog/?p=10 for more details

3

4

5

6

7

4. Application Layer – SMTP (8 points) The following questions pertain to electronic mail applications in the Internet and the related SMTP protocol;. 4a. (2 points) Excluding the connection establishment and termination, what is the minimum number of network round trips to send a small email message using SMTP? 8

It is the message passed after connecting to smtp mail server. Client message are blue in color. You can see it need 5 round trip to send mail using smtp. R:220 Beta.ARPA Simple Mail Transfer Service Ready Sendmail 8.9.3/8.9.3 S: HELO supermanhelp.com R: 250 yahoo.com S: MAIL FROM: R: 250 OK S: RCPT TO: R: 250 OK S: DATA R: 354 Start mail input; end with "." S: . R: 250 OK 4b. (2 points) Suppose you need to send one message to three different users: [email protected], [email protected], and [email protected]. Is there any difference between sending one separate message per user and sending only one message with multiple (i.e., three) recipients? Please explain. If a separate message is sent for each of the users, one MAIL, one RCPT, and one DATA command will be issued for each of the messages, resulting in the transmission of three copies of the message data. If only one message with multiple recipients (three) is sent, one MAIL, multiple RCPT, and one DATA command will be issued, resulting in the transmission of only one copy of the message data. ----There is not much difference between sending one message to multiple users and sending one separate message per user. Most of the effects come on the sender’s side. While sending a message to multiple recipients, the message is first sent to the outgoing email server. The email server then makes a copy for each recipient and forwards them to corresponding domain. Since there are multiple recipients of same message, the server has to send them at the same time. In this case, the usage of processor of the server is higher than usual,

9

but there is benefit of saving disc space because the server keeps only one copy of the message. On the other hand, while sending separate message per user, there is no pressure on email server. The server forwards the message as it receives from the sender. But the disadvantage is that the messages with different email addresses have to be saved on the server even if the message is same. 4c. (2 points) Because SMTP uses two different port numbers (i.e., UDP ports 161 and 162), a single system can easily run both a manager and an agent. What would happen if the same port number were used for both? If the same port were used for both traps and requests, separating the manager from the agent in the same system would be difficult. 4d. (2 points) Electronic mail systems differ in the manner they handle multiple recipients. In some systems, the originating user agent or mail sender makes all the necessary copies and these are sent out independently. An alternative approach is to determine the route for each destination first. Then a single message is sent out on the common portion of the route and copies are only made when the routes diverge; this process is referred to as “mail-bagging”. Discuss the relative advantages and disadvantages of the two methods. Mail-bagging economizes on data transmission time and costs. It also reduces the amount of temporary storage that each MTA must have available to buffer messages in its possession. These factors can be very significant in electronic mail systems that process a large number of messages. Routing decisions may keep mail-bagging in mind. 5. Application Layer – HTTP and P2P – (12 points) The following questions pertain to the Internet Directory Service and the World Wide Web and the related DNS and HTTP protocols. 5a. (6 points) Prior to persistent connections, one separate TCP connection was used to fetch each URL. Analyze the advantages of persistent connections over the old HTTP paradigm of one connection per data transfer.

Prior to persistent connections, a separate TCP connection was established to fetch each URL, increasing the load on HTTP servers and causing congestion on the Internet. The use of inline images and other associated data often require a client to make multiple requests of the same server in a short amount of time. Analysis of these performance problems and results from a prototype implementation are available [26] [30]. Implementation experience and measurements of actual HTTP/1.1 (RFC 2068) implementations show

10

good results [39]. Alternatives have also been explored, for example, T/TCP [27]. Persistent HTTP connections have a number of advantages: - By opening and closing fewer TCP connections, CPU time is saved in routers and hosts (clients, servers, proxies, gateways, tunnels, or caches), and memory used for TCP protocol control blocks can be saved in hosts. - HTTP requests and responses can be pipelined on a connection. Pipelining allows a client to make multiple requests without waiting for each response, allowing a single TCP connection to be used much more efficiently, with much lower elapsed time. - Network congestion is reduced by reducing the number of packets caused by TCP opens, and by allowing TCP sufficient time to determine the congestion state of the network. - Latency on subsequent requests is reduced since there is no time spent in TCP's connection opening handshake. - HTTP can evolve more gracefully, since errors can be reported without the penalty of closing the TCP connection. Clients using future versions of HTTP might optimistically try a new feature, but if communicating with an older server, retry with old semantics after an error is reported. HTTP implementations SHOULD implement persistent connections. 5b. (6 points) Consider distributing a file of F = 15 Gbits to N peers. The server has an upload rate of us = 30 Mbps, and each peer has a download rate of di = 2 Mbps and an upload rate of u. For N = 10, 100, and 1000 and u = 300 Kbps, 700 Kbps, and 2 Mbps, prepare a chart giving the minimum distribution time for each of the combinations of N and u for both client-server distribution and P2P distribution.

11

6. Application Layer - DNS – (5 points) The following question pertains to the Internet Directory Service and the related DNS protocol. A DNS resolver typically issues a query using UDP but may also use TCP. Is there a problem using TCP for this purpose? If so, what do you suggest is the solution? 7. Link Layer – Encodings and Error-Detection & –Correction Techniques – (10 points) 7a. (3 points) For the bit stream 0101110, sketch the waveforms for NRZ-L, NRZI, Manchester, and Differential Manchester. 7b. (2 points) In a CRC error-detecting scheme, choose P(x) = x4 + x + 1. Encode the bits 10010011011. 7c. (3 points) Suppose the channel introduces an error pattern 100010000000000 (i.e., a flip from 1 to 0 or from 0 to 1 in position 1 and 5). What is received? Can the error be detected? 7d. (2 points) Repeat part (7c) with error pattern 100110000000000. 8. Link Layer – Channel Partitioning Protocols – (15 points) 8a. (7 points) In synchronous TDM, it is possible to interleave bits, one bit from each channel participating in a cycle. If the channel is using a self-clocking code to assist synchronization, might this bit interleaving introduce problems because there is not a continuous stream of bits from one source?

12

8b. (8 points) Explain in terms of data link control and physical layer concepts how error and flow control are accomplished in synchronous time division multiplexing. 9. Link Layer – Random Access Protocols – (10 points) 9a. (5 points) Suppose four active nodes – nodes A, B, C, and D – are competing for access to a channel using slotted ALOHA. Assume each node has an infinite number of packets to send. Each node attempts to transmit in each slot with probability p. The first slot is numbered slot 1, the second slot is numbered slot 2, and so on. What is the probability that node A succeeds for the first time in slot 5?, and what is the probability that the first success occurs in slot 3? 9b. (5 points) Recall that with the CSMA/CD protocol, the adapter waits K.512 bit times after a collision, where K is drawn randomly. For K = 100, how long does the adapter wait until returning to step 2 (see textbook’s chapter 5, p. 456, for the complete list of steps) for a 10 Mbps broadcast channel and for a 100 Mbps broadcast channel? 10. Link Layer – Switched LANs – (15 points) Let us consider the operation of a learning switch in the context of a network in which 6 nodes labeled A through F are star connected into an Ethernet switch. Suppose that (i) B sends a frame to E, (ii) E replies with a frame to B, (iii) A sends a frame to B, (iv) B replies with a frame to A. The switch table is initially empty. 10a. (5 points) Show the state of the switch table before and after each of these events. 10b. (10 points) For each of these events, identify the link(s) on which the transmitted frame will be forwarded, and briefly justify your answers.

13...


Similar Free PDFs