FINAL EXAM FOR INTRODUCTION TO COMPUTER NETWORKS Fall 2002 >>> SOLUTIONS <<< Welcome to the Final Exam in Introduction to Computer Networks. Read each problem carefully. There are eleven required problems (each worth 9 points and you get 1 point for putting your name on the cover sheet) and one extra credit problem worth 10 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. It is strongly recommended that you answer each problem on a separate sheet of paper. Good luck and be sure to show your work! PROBLEM #1 Answer the following questions about layered protocol models. a) Describe the layered concept. Be precise and concise. --- Layers perform unique and specific tasks and have knowledge of adjacent layers only. Use services from below and provide services above. Independent of implementation. --- b) Precisely define "protocol" and "interface". Give an example of each (a protocol and an interface). --- Protocol = complete set of rules for information interchange between same level layers at different sites. Example = TCP/IP. Interface = same, except for between consecutive layers at the same site. Example = sockets interface. --- c) Consider a three layer protocol. The layers from top to bottom are application, transport, and network. All layers use headers and the transport layer also uses a trailer. Sketch a packet showing headers and trailers for this protocol. --- +-------+-------+-------+---------------------------+-------+ | Net | Trans | Appl | Payload or user data | Trans | +-------+-------+-------+---------------------------+-------+ --- d) Assume a protocol that uses variable length packets of maximum payload size 250 bytes. In addition to the payload there are 25 bytes of header and 12 bytes of trailer in each packet. For a 600 byte message, what is the overhead (in %) for this protocol? --- 600 / 250 = 2 r 100 so three packets are needed. The total overhead is three sets of headers and trailers for 600 bytes of user data or 111 / 711 = 15.6% overhead. --- PROBLEM #2 Answer the following questions about the physical layer. a) What are some of the key parameters of interest for guided media. List at least five parameters. --- Noise immunity, low radiation, physical strength, physical size, and cost. --- b) What is the difference between UTP category 3 and UTP category 5? Be precise (it is not sufficient to say that one is "faster" than the other). --- UTP-5 has more twists per inch than UTP-3 resulting in less radiation. Hence, two pairs of UTP-5 can carry up to about 100-Mbps data rate where UTP-3 can carry a maximum data rate of about 16-Mbps. --- c) If a received signal is 50% the power level of a transmitted signal, what is the loss in dB? --- Ndb = 10*log10(P2/P1) = 10*log10(0.50) = -3db --- d) If a digital signal is sent as +5V for a "1" and 0V for a "0" can the receiver recover the sender's clock rate? Explain why or why not. --- A long sequence of 1 (or 0) bits would not have any transitions thus making it impossible for the receiver to recover a clock. Transitions are needed, at the rate (or some known multiple) of the sending clock, to be able to recover a signal. --- PROBLEM #3 Assume a 100-Mbps link of 10,000-meters in length with 5 nanoseconds per meter propagation delay. Assume constant length 400-byte data frames, 64-byte ACK frames, 10 microsecond of processing delay for each data frame, and 5 microseconds of processing time for each ACK. The sender always has data to send. Solve for link utilization (U) between a sender and a receiver assuming a stop-and-wait protocol. Show your work! --- t_pr = 10,000 * 5e-9 = 50 us t_fr = 8 * 400 / 100e6 = 32 us t_ack = 8 * 64 / 100e6 = 5.12 us We note that the processing delays are not negligible compared to these values so we must include them in our calculation of U... U = t_fr / (t_pr + t_fr + t_proc + t_ack + t_proc) = 21% If we neglected t_ack and t_proc our result would have been U = 24% which is more than 10% "off" from the real result confirming that to ignore these values would not have been correct to do. --- PROBLEM #4 Answer the following questions about circuit and packet switching. a) Describe the fundamental difference between circuit and packet switching. --- Circuit switching assigns a dedicated channel for two end-points. Packet switching shares channels. --- b) What are the two basic types of circuit switches? Give an example of each --- Space switch (e.g., crossbar) and time switch (e.g. Time-Slot Interchange). --- c) What is virtual circuit packet switching? What is datagram packet switching? What are the key advantages of each? --- In VC PS a path is established as part of a connection. In DG PS packets are individually routed. Advantage of VC PS is the ability to reject connections if network load is high. Advantage of DG PS is robustness in face of intermediate node failures. --- d) What is the Erlang formula used for? Be specific. --- To determine the blocking probability (i.e., that no servers are available to service a request) given N servers for a given rate of arrival of requests. --- PROBLEM #5 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). --- PROBLEM #6 Give the bridge tables for the two bridges in the network below. Assume that all stations have communicated with all other stations. The letter (e.g., "A") signifies a MAC address of "A" for a station at this position. Note that one of the bridges is a three-port bridge. | A --+ | | +--------------------------------+ B --+ | | | | | | +-- Bridge 1 --+ | | | | +-- C | | | +-- E +-- Bridge 2 --+ | | | | +-- D +-- F | | --- Define the port numbers on bridge 1 as 0, 1, 2 in clockwise order staring from port 0 on the left. The ports on bridge 2 are 0 and 1 (0 is left). Bridge 1 Bridge 2 ----------- ----------- MAC Direc MAC Direc A 0 A 0 B 0 B 0 C 2 C 0 D 2 D 1 E 1 E 0 F 1 F 0 ----------- ----------- --- PROBLEM #7 Suppose that you have been assigned IP address 132.128.0.0 and have 9 networks in your organization that you wish to remain distinct. Give the subnet mask. Give the subnet addresses of the 9 distinct networks. --- Will need 4 bits to hold 9 values. So, the subnet mask is: 255.255.240.0 (note that 240 = 11110000b) Subnet #1 = 132.128.16.0 Subnet #2 = 132.128.32.0 Subnet #3 = 132.128.48.0 Subnet #4 = 132.128.64.0 Subnet #5 = 132.128.80.0 Subnet #6 = 132.128.96.0 Subnet #7 = 132.128.112.0 Subnet #8 = 132.128.128.0 Subnet #9 = 132.128.144.0 --- PROBLEM #8 Below is a captured TCP/IP packet. On the last page of this exam are packet header templates. Decode the packet for the following fields: - MAC source and destination addresses - IP source and destination addresses (in standard dotted-decimal format) - TCP source and destination port numbers - Type of TCP segment (e.g., SYN, FIN, ACK, etc.) - TCP window size 00 60 CF 20 | 2B 8B 00 60 | CF 20 2B 7F | 08 00 45 00 [.`. +..`. +..E.] 00 30 C4 B2 | 40 00 80 06 | 2A 08 83 F7 | 02 10 83 F7 [.0..@...*.......] 02 0F 0B 0B | 00 50 50 20 | 0D 16 00 00 | 00 00 70 02 [.....PP ......p.] 40 00 CE 80 | 00 00 02 04 | 05 B4 01 01 | 04 02 [@.............] --- MAC source = 0060CF202B7Fh MAC dest = 0060CF202B8Bh IP source = 131.247.2.16 IP dest = 131.247.2.15 TCP source port = 2827 TCP dest port = 80 TCP type = SYN TCP window size = 16384 --- PROBLEM #9 Answer the following questions about ISDN, frame relay, and BISDN. a) What were the original goals of ISDN? Of frame relay? Of BISDN? --- ISDN = end-to-end digital voice telephony Frame relay = frame-based, billed by usage interconnection of LANs BISDN = video transport (also voice and data) --- b) Sketch a graph of offered load versus network throughput (where throughput is "good" or useful carried traffic). Show the ideal throughput behavior. Show actual, with and without flow control, behavior. Identify the points for congestion avoidance and congestion recovery in the no flow control curve. --- Goodput | | Capacity| - - - -/----------------------------------- Ideal | / +++++++++++++++++++++++++++++ Control | / + ........ | / + A B | / + . . A = congestion avoidance | / + . . B = congestion recovery | /+ . . No control | /+. . |/. . +----------------------------------------------- offered load --- c) Sketch the BISDN protocol model. --- See textbook, Figure 11.1 on page 349. --- PROBLEM #10 Answer the following questions about BISDN and ATM. a) ATM is intended to be the "perfect transport". Carefully describe the desired characteristics of a perfect transport. --- * Suitable for LAN and WAN * Suitable for carrying real-time traffic (data, voice, and video) * Speed scalable * Easy to switch * Exploit cheap h/w and cheap/plentiful bandwidth --- b) Sketch an ATM cell and identify the header fields. --- See textbook, Figure 11.4 on page 355. --- c) Briefly describe ATM AAL1 and AAL5. What are they for and (very briefly) how do the work. --- AAL1 supports CBR and includes timing information (e.g., for clock extraction at the receiver. AAL5 support data packets and includes segmentation and reassembly, and error detection via a CRC in an added packet (PDU) trailer. --- d) Briefly describe the ATM UNI. What is it for and (very briefly) how does it work. --- The ATM User Network Interface describes attachment to an ATM switch and deals with connection types (permanent or switched virtual circuit) and congestion control (e.g., ABR). --- PROBLEM #11 Answer the following questions about MPLS and VPNs a) What was the original purpose (or goal) of MPLS? What is the present purpose? --- The original purpose of MPLS was to overcome an IP routing table look-up bottleneck by using ATM switching to carry IP traffic. This look-up bottleneck has been "fixed", however MPLS is today useful for traffic engineering (being able to precisely control paths for traffic in a network). --- b) What is the goal of a VPN? --- The goal of a VPN is to provide private communications on a public network --- c) Why not use a physically private network instead of a VPN? --- A physically private network (e.g., such as leased T1's between corporate sites) is usually more expensive than just using the Internet. --- d) What are the four basic functions of a VPN? --- Authentication Access Control Data Security Tunneling --- EXTRA CREDIT: Having a feel for performance, or "the numbers", is very important. Answer the following: a) For a Gigabit Ethernet the minimum packet length is 512 bytes, for 100-Mbps the minimum packet length is 64 bytes. Compute media (or wire) speed for Gigabit and 100-Mbps Ethernet for minimum length packets. What conclusion can you draw? --- 1.0e9 / (8 * (512 + 12 + 8)) = 234,962 pkts/sec for Gigabit 1.0e8 / (8 * (64 + 12 + 8)) = 148,819 pkts/sec for 100-Mbps The "8" is for preamble and the "12" is for interframe gap. The media speed for Gigabit is less than double that of 100-Mbps for minimum size packets. To get the full gain of Gigabit, you must use large payloads. --- b) Approximately, what is the propagation delay from here to Disney World? --- It is about 70 miles (or about 370,000 feet) from here to DW. At light propagation of about 1 ft per nanosecond, the propagation delay is about 0.37 milliseconds (less than 1/2 millisecond). --- c) Given a bit error probability of 1e-5 (bit errors are assumed to be independent), what is the probability of a 1000 byte packet being error free? How about a 100 byte packet? --- Pr[no error for 1000 bytes] = (1 - 1e-5)^(8*1000) = 0.92 Pr[no error for 100 bytes] = (1 - 1e-5)^(8*100) = 0.99 --- ---