EXAM #1 FOR INTRODUCTION TO COMPUTER NETWORKS Fall 2002 NAME: ____________________________ SSN: ___________________ CODENAME: ________________________ Welcome to Exam #1 in Introduction to Networks. Read each problem carefully. There are eight required problems (each worth 12.5 points). You may have with you a calculator, pencils, blank paper, lucky rabbit's foot, and one 8.5 x 11 inch "formula sheet". On this formula sheet you may have anything you want (definitions, formulas, old exam answers, etc.) as hand written by you on both sides of the sheet. Photocopies, scans, or computer generated text are not allowed on this sheet. Good luck and be sure to show your work! HINTS: For most (but, not all) of the short answer questions one or two sentences (not paragraphs!) are all that is needed. For the numerical problems be sure to show your work and give all formulas used. PROBLEM #1 Answer the following questions about layered protocol models a) Sketch the OSI model. For each layer, in one sentence or less, state the purpose of the layer. --- +--------------+ | Application | - Provides access to user applications +--------------+ | Presentation | - Provide data independence (translation) +--------------+ | Session | - Manages end-to-end connections +--------------+ | Transport | - Provides reliable end-to-end data transport +--------------+ | Network | - Maintains point-to-point connections +--------------+ | Data Link | - Provides reliable point-to-point data transport +--------------+ | Physical | - Transmission of bit stream (cables, connectors, signal) +--------------+ --- b) Following are 10 functions. Identify which layer of the OSI model each function is most likely to belong to. It is possible that one or more of the below cannot be mapped to an OSI layer. If this is the case, explain why. (1) Recovering lost packets between two directly connected nodes (2) Recovering lost packets between two nodes separated by multiple hops (3) Translating between EBCDIC (an old IBM coding of letters) to ASCII (4) Defining the pin-outs in a connector used to attach to a network cable (5) Providing an interface to a visual packet monitoring program (6) Arbitrating between multiple nodes attached to a single medium (7) Translating between text in messages from Dutch to English (8) Generating error correction codes for packet error correction (9) Maintaining connection semantics beteen two directly connected nodes (10) Finding the shortest path between two nodes separated by multiple hops --- (1) = DLC, (2) = Transport, (3) = Presentation, (4) = Physical, (5) = Application, (6) = DLC, (7) = Presentation, (8) = NONE (OSI does ARQ), (9) = Network, and (10) = Transport or Session --- c) Assume a system with fixed-length 250-byte packets where each packet contains 25 bytes of headers and trailers (thus, the data payload is 225 bytes). For a 600 byte message, what is the overhead (in %) in this system? Hint: Packets with less payload than 225 bytes are "padded out" to a full length payload. --- Will need three packets, thus U = 600 / (3 * 250) = 80%. --- d) Describe two fundamentally different ways that standards can be developed. Give examples of standards groups that use these two different ways. --- Write the standard, then build it (OSI, ITI, IEEE). Build it, then standardize is (IETF). --- PROBLEM #2 Answer the following physical layer related questions: a) Name three types of media used in networks. Give the approximate data rate achievable on each type of media. Cotton string is not an acceptable answer for a media type :-). --- Coax (to many hundreds of Mbps), unshielded twisted pair (10's of Mbps for catagory 3, 150-Mbps for catagory 5), and fiber (terabits per second). --- b) What are some of the parameters of interest for comparing different types of media? Give at least six parameters. --- Seven parameters are cost per foot, bulk, stength, noise immunity, how much it radiates, lightening immunity, and how tapable. --- c) What is an advantage of Manchester coding over NRZ coding? What is a disadvantage (of Manchester over NRZ)? --- It is possible to derive the transmitter clock from a received Manchester signal thus bit sampling will be correct. Without a synchronized clock, bit sampling in NRZ signal may be off. However, Manchester requires twice the bandwidth as NRZ (two "wiggles" per bit and not just one). --- d) What is an RS-232 null modem? How is it built? --- An RS-232 null modem is used to connect two DTE's together. A null modem is two RS-232 connector wired together. It is built by "criss-crossing" the transmit and receive wires and also clear-to-send and request-to-send. --- PROBLEM #3 Consider an asynchronous transmission system with 1 start bit, 3 data bits, 1 parity bit, and 2 stop bits. Assume Pr[bit error] = 0.05 and bit errors are independent. Show your work. a) What is the maximum utilization possible on this link (assuming no errors)? --- U = 3 / (3 + 1 + 1 + 2) = 43% --- b) What is the probability that a received word has no errors? --- (1 - 0.05)^4 = 0.8145 --- c) What is the probability that a received word is detected as "good"? --- Sum(i=0, 2, 4) Cmb(4, i) p^i * (1-p)^4-i = 0.828 --- d) What is the probability that 10 words in a row are received with no errors? --- ((1 - 0.05)^4)^10 = 0.1285 --- PROBLEM #4 Consider the use of 1000-bit frames on a 1-Mbps satellite channel with a 270 millisecond delay. What is the maximum link utilization for continuous flow control (GBN) with a window size of 255 and with Pr[bit error] = 1.0e-6. --- t_fr = 1000 / 1.0e6 = 1 millisec t_pr = 270 millisec For N = 255 we have that N*t_fr < 2*t_pr + t_fr, so p = Pr[frame error] = 1 - (1 - 1.0e-6)^1000 = 0.001 U = (N * t_fr * (1 - p)) / ((1 - p + N*p)(2*t_pr + t_fr)) = 37.7% --- PROBLEM #5 Carefully describe the trade-offs between Go-Back-N (GBN) and Selective Reject (SR) Automatic Repeat Request (ARQ). Your discussion should make it clear when GBN is best suited and when Selective Reject is best suited. --- GBN will likely result in already receive packets being resent. This is wasteful of network resources. SR will resend only those packets actually detected as lost. GBN is, however, easier to implement in both the sender and receiver than is SR. So, the trade-off is in network resources versus complexity of implementation in the end nodes (sender and receiver). GBN is best suited when errors are rare and network resources (bandwidth) is not scarce. SR is best suited when errors are frequent and/or network resources are scarce. --- PROBLEM #6 Answer the following questions related to circuit switching a) Sketch a T1 frame and explain why the T1 rate is 1.544-Mbps (show your calculations). --- ++----+----+----//---+----+ || 1 | 2 | | 24 | <--- 1 bit SDEL followed be 24 slots of ++----+----+----//---+----+ 8 bits each for 193 bits total Each slot must run at 64-kbps (for PCM voice), so 8000 frames per second, or 193 bits/frame * 8000 frames/sec = 1.544 Mbps --- b) Outline how the Erlang-B formula could be used to determine how many phone lines would be needed to provision an office of 100 workers. Clearly, each worker will have a telephone, but how many phone lines should be leased between the office and the phone company switching center? Hint: It is not sufficient to simply state "Use the Erlang formula to determine how many phone lines are needed"... you must be much more detailed! Carefully state any and all assumptions that must be made. Consider only incoming calls to the office. --- We need to know the rate of arrival of phone calls and the average duration of a call. We could measure these or use past experience. We will assume that arriving calls are independent and Poisson. We should establish a Pr[block] that is acceptable to us (this is a business decision). Say, 99.999% of all calls should be connected (and then Pr[block] = 0.001%). Then we solve the Pr[block] for decreasing n (starting with n = 100) until we arrive at an unacceptable Pr[block]. This is then the number of phone lines we should lease. --- PROBLEM #7 Answer the following questions related to packet switching (PS): a) Describe datagram packet switching. --- Packet switching where each packet is invidually routed at each intermediate node. --- b) Describe virtual circuit packet switching --- Packet switching where an path is established and all packet in a connection travel on this same path. --- c) What is one significant advantage of datagram PS compared to Virtual Circuit PS? --- Datagram PS can tolerate network failures (e.g., down links or intermediate nodes) better than can VC PS. --- d) What is one significant advantage of virtual circuit compared to Datagram PS? --- VC PS can deny a connection if the network resources are not there to adequately support additional traffic. --- PROBLEM #8 Carefully and precisely describe the IEEE 802.3 MAC protocol (CSMA/CD plus BEB) for shared-medium LANs. Describe all relevant algorithms, parameters (such as minimum and maximum frame sizes), and constraints. --- CSMA/CD is Carrier Sense Multiple Access / Collision Detection and enables the sharing of a copper medium among multiple hosts. A 1-persistent CSMA algorithm is implemented as follows (for when a host has a frame to transmit): 1) If medium is idle then transmit 2) If medium is busy then wait for medium to go idle and then transmit 3) If detect a collision then xmit a brief jam signal, stop transmitting, wait a random period of time, then (1) The "wait a random period of time" is implemented with Binary Exponential Backoff (BEB) as: while (attempts < 16) k = min(attempts, 10) r = rand(0, 2^k) delay = r * slot_time A slot_time is the time it takes to transmit 64 bytes. This time determines the maximum span of an Ethernet (i.e., tpr <= tfr for frame of 64 bytes and tpr being the end-to-end propagation time). For 100-Mbps this results in a maximum span of slightly over 200 meters. The maximum frame size in Ethernet is 1500 bytes (and the minimum is 64 bytes). --- ---