CS447 – Network and Data Communication Midterm Exam No. 2 (SOLUTIONS) Spring, 2006 3:30 – 4:45 P.M. March 28, 2006 This exam is a closed-book and close note exam. There are 7 questions in this exam. You have 75 minutes to finish the 7 questions. Write your answers on separated pieces of papers. To avoid grading problems, staple your solution papers in the ascending order in the question numbers. In this exam, timing will be strictly enforced, and when exam is over, please do not write anything on your solution papers. If you need to write anything after exam is over, you need to get a permission from the instructor. Please do NOT open this exam until you are told you can. Student ID (Last 4 Digits): ________________________ Notice 1: For each question in this exam, recommended time is specified. It is not necessary for you to exactly follow the recommended time, but it is advised that you pace yourself in such a way that you do not spend too much time on a particular question. Recommended time implies the amount of details you are expected to answer. For example, if 2 minutes are recommended, you are NOT expected to write a long paragraph for your solution and what is expected is a brief (but correct) answer (you may be able to answer even by correct keywords for such questions). Although recommended time is specified, it is essentially your responsibility to pace yourself. Time may not be enough for everyone, but an exam is fair if everyone is given the same amount of time for the same questions. Notice 2: The instructor will be willing to answer any question if there is anything wrong in the questions. However, the instructor will NOT answer any question regarding how to solve questions. 1 QUESTION #1 (10 minutes) (1) Show the organization of the synchronous statistical TDM (show its structure and the major components using a figure). Also describe what is the particular problem in the synchronous TDM the synchronous statistical TDM tries to solve? The primary problem in the synchronous TDM is inefficiency in using slots. Since the slot assignments are fixed in the synchronous TDM, empty slots need to be transferred to maintain the slot order (at the de-multiplexer side). To solve the inefficiency problem in the synchronous TDM, each slot in a frame carries the slot header to tell the de-multiplexer which output port each slot should be forwarded to (instead of using the slot order). Shared multiplexed-line Frame Output lines Input lines Slot Multiplexer De-Multiplexer Slot Header Slot Payload (2) Show the "four-layer protocol architecture" in TCP/IP. Show how the four layers overlap the OSI seven-layer model. CS 447 Network and Data Communication, Project Phase 2 Application Layer NFS (Network File Server) Presentation Layer XDR (External Data Rep.) Session Layer RPC (Remote Proc. Call) Transport Layer Network Layer Datalink Layer Telnet, FTP, SMTP, rlogin, DNS, HTTP, rcp, finger, etc. Applicationlayer protocol TCP IP UDP ARP Network Hardware Physical Layer App_Protocol_1/003 2 RARP Transportlayer protocol Networklayer protocol (3) Show the internal structure in the FTP client and server process (also show the types of connections and port numbers used). CS 447 Network and Data Communication, Project Phase 2 FTP Architecture FTP Server (FTP Daemon) FTP Client Port #21 GUI Client PI Commands Server PI Disk Client DTP FTP Client Files Port #20 Disk Server DTP FTP Server • PI = Protocol Interpreter • DTP = Data Transfer Process App_Protocol_1/005 (4) What are the three different types of switches we discussed in the classroom? Mention the name of the three different types of switches (you do not have describe how they work). Cross-bar switches TDM switches Bus switches (5) What are the three types of major switching networks? Circuit-Switching Switching Networks Virtual Circuit Packet-Switching Switching Networks Switching Networks Packet-Switching Switching Networks Datagram Packet-Switching Switching Networks 3 QUESTION #2 (10 minutes) (1) Complete the following table Factors Examples Circuit-Switching Virtual Circuit Datagram ATM, Public Telephone ISDN, Frame Relay Internet Resource Sharing NO YES YES Dedicated Paths YES YES NO YES NO NO YES YES NO YES YES NO Continuous Transmission Path-setup in advance Busy signal if dest. busy Major delay Path setup delay Path setup delay Packet routing (2) One of the disadvantages in the virtual circuit packet switching, compared to the datagram packet switching, is the path set up delay. Try to mention one more possible disadvantage. Recovery from link failures will be more difficult in the virtual circuit packet switching (or more time consuming) than in datagram packet switching. That is because in the virtual packet switching, routing is performed only once at beginning of a session and will not be performed while data transmission continues. Even if a link failure happens in the middle of data transmission, new route can be discovered in the datagram packet switching. (3) Regarding the two dimensions in routing algorithms (“where” and “when”), what options are available in each of the two dimensions (you do not have to describe them, but name the options – those we discussed in our lecture)? Which routing methods (mention for both "when" and "where") does the Internet use? i. Options in the dimension of “when”: (a) When a path is set up (at the beginning of a session) at a router (b) When each and every packet arrives at a router ii. Options in the dimension of “where”: (a) At every router (distributed routing) (b) At a transmitting router (source routing) (c) At a special routing server (centralized routing) For the Internet: Routing Time: For every packet (whenever a switch/router receives any packet) Routing Place: Distributed routing (at every router) 4 (4) What are the “external operation” and “internal operation” of a packet switching network? External operation: how a network transfers data from the view point of users. Internal operation: how a network actually transmits data (5) What are the internal and external operations in the Internet? Internal operation = Datagram External operation = virtual circuit QUESTION #3 (10 minutes) Find the shortest distance to every other nodes using Bellman-Ford’s algorithm. You are currently at router D and your task is to find the shortest distance to all the other routers in the network (right). Show all your work. Credit will be given to a correct work (show the procedure to find the shortest distances, as we did in the classroom). Links are connected only to nodes (i.e., two links can not be connected without a node). A 2 1 E B 1 5 1 2 D 5 2 G 2 C 5 F Hops 0 1 2 3 4 5 A 7 6 6 B 7 6 6 C 6 5 5 5 D 0 0 0 0 0 0 5 E 1 1 1 1 1 F 10 10 8 8 G 5 3 3 3 3 QUESTION #4 (up to 10 minutes) Suppose we have a TDM switch (as shown in the picture below). The TDM switch has 93 ports (and all of the ports are used). The peak transmission rate for each link is 1.5Mbps (assume 1M = 106). Assume that the link utilization = 65% for all of the 93 links. Eight-byte interleave (slot payload of 8 bytes) is used for frame encoding. Ignore any other overhead. Question: In order for this TDM switch to be a non-blocking switch, what is the minimum link bandwidth (the shared link between the multiplexer and de-multiplexer) required for this TDM switch? Show all your work. 10% of the credit for the correct solution. 90% of the credit is for showing a correct work that leads to the correct solution. Multiplexer De-Multiplexer Output Line #1 Input Line #2 Output Line #2 Input Line #1 Output Line #93 Input Line #93 • Input lines, 1.5Mbps each Solution: ? Mbps multiplexed shared link • Line utilization = 65% First, calculate the total input rate. 93 links × (1.5Mbps 0.65) = 90.675Mbps. Next, we need to find the header overhead. Since we have 93 input lines, we need: Ceiling (log2(93)) = 7 bits in each slot header Since the payload size = 8 bytes (= 64 bits), the slot size is 71 bits (= 64 + 7). Assuming that the required bandwidth in the multiplexed shared link is x bps, then the following equation should hold: 90.675 Mbps:x = 64:71 Solving the above equation for x, we will get: x = 100.558 Mbps 6 QUESTION #5 (up to 7.5 minutes) Define the following parameters for a switching network: A = overhead (header) bits per packet B = message length in bits C = propagation delay per hop in second D = data rate, in bits per second (bps), on all links E = fixed packet size in bits F = call set up time G = number of hops between two given end systems Assume there is no transmission error. (1) Derive a general expression for the required transmission delay (the amount of the time required from the beginning of a transmission to the time the receiver receives the last bit in the message) using datagram packet switching. For this question, you can present your solution in the blank space below: Your solution: (G C) + (G – 1) (E/D) + (ceiling (B/(E - A) (E/D)) Required Transmission Time (2) Plot the expected transmission delay when the packet payload size changes (for datagram packet switching) in the following graph (you do * NOT * have to calculate exact transmission time, but all what I would like to see is the pattern (you can present your solution in the graph below)). However, make sure to present your solution in such a way that I understand your idea. It is your responsibility to emphasize your idea in your solution (any solution that lacks proper emphasis will * NOT * get the full credit). 0 Packet Payload Size (in bits) 7 QUESTION #6 (up to 10 minutes): This is Question #8.14 in the exercise questions in Chapter 10 (with a minor change). A synchronous non-statistical TDM is to be used to combine four 4.8Kbps and two 9.6Kbps signals for transmission over a single leased line. For framing, a block of 7-bit pattern of “1010101” is inserted for each 64 data bits. The reframing algorithm (at the receiving de-multiplexer) is as follows: 1. Arbitrary select a bit position 2. Consider the block of 7 contiguous bits starting at the position (the position selected in 1 above). 3. Observe that block of 7 bits each frame for 12 consecutive frames. 4. If at least 10 out of the 12 blocks match the framing pattern, the de-multiplexer is “in frame”. Otherwise, advance the selected bit position by one bit and repeat from step (2) above. Question: What is the minimum reframe time? What is the maximum reframe time? What is the average reframe time? If you need any assumption to answer these questions, clearly describe your assumption(s). A given assumptions: (1) In the receiving buffer in the de-multiplexer, it is assumed that a couple thousands of bits are always buffered for reframing (and new bits keep coming in to the de-multiplexer). (2) There will be no “fake match” due to coincidental matching to payload bits by coincidence. Solution: In order for the de-multiplexer to reframe the received bits, the de-multiplexer needs to scan 852 bits (12 frames (64 payload bits + 7 pattern bits)) and perform 12 matches (one matching test for each of the 12 frames). Let us assume that the required latency to perform the above is T (any time unit). In the best case, we need T for only once (the first attempt successfully hits at least 10 matching). In the worst case, we need to repeat T for 71 times (71 T) (on the 71th trial, we got at least 10 matching). In the average case, at least 10 matches should happen on 36th trial (36 T). 8 QUESTION #7 (15 minutes) The Internet uses the distributed routing (as we discussed in the classroom). In the distributed routing, each router knows only two things: the minimum cost to reach a destination and the next-hop router for the minimum-cost path. Surprisingly, each router in the Internet core does not know anything else in transmitting IP packets from millions of different sources to millions of different destinations. Assume that Dijkstra’s minimum-path algorithm is used in the Internet. If there are more than one distinct path that end up with the same minimum cost (i.e., those routes result in a “tie” in their cost) between an origin node and a destination node, answer the following two questions. Especially for this question, I assume it is your responsibility to provide a solution neat enough for me to read and understand. Any presentation of solutions that I could not read will result in zero credit (I am sorry to announce this, but I can not give any credit for which I can not read). (i) Can each router still calculate the minimum-cost and minimum cost route? Please answer by “YES” or “NO” with a briefly description. Yes. Finding the cost of the minimum-path cost is still possible, especially if we have a priority scheme for breaking a tie. In Dijkstra’s shortest-path algorithm, one of the possible ways to handle this is to use some priority scheme. Example for such a priority scheme is the router ID (or the IP address of the first router in a tie – the router with smaller ID will have the highest priority). If routers with the same shortest cost appear as the fringe nodes, you can pick up the router with the smallest router ID. (ii) Can a routing loop happen just because of multiple minimum-cost paths in the Internet? A routing loop is a situation where a chain of the “next-hop routers” makes a circle (not necessarily only by three routers, more routers could involve) so that what you transmit using the path will never reach the destination (as constructed by the same correct Dijkstra’s minimum-path algorithm individually executed at each router in the Internet)? Prove or disprove the possibility of routing loops. R Sender (Origin) X A P Receiver (Destination) B Y Q Assume that every link has a positive cost in an integer. The network topology (including links) is fixed (will not dynamically change). No bit error during any packet transmission. All the routing tables are also correct. Routing metric is the statistically assigned link cost (not based on any dynamically changing metric, such as traffic load or queuing delay at routers). Solution: (next page) 9 Proof: Routing loop is impossible with the given assumptions in Dijkstra's shortest-path algorithm. This conclusion can be derived from the following property in Dijkstra's shortest-path algorithm. In Dijkstra's shortest-path algorithm, each intermediate router (node) is connected exactly once. That is because, (a) only non-fringe nodes can be fringe nodes, (b) only fringe nodes can be connected and once a node is connected, and (c) once a node is connected, the node can never be a fringe node any more. The above idea can be visualized as below: A X If we are at node A (i.e., we start at node A). In order for a routing loop to happen, the tail of a path must come back to one of the previously-connected node. This means that at least one node (node X) is connected more than once. As described above, each node will be connected exactly once in Dijkstra's shortest-path algorithm no matter if there are multiple paths of the same minimum cost. This disproves that a routing loop can happen just because of multiple paths to a destination. __________________________________________________________________________ CS447 – Network and Data Communication, Midterm Exam #2, Spring 2006, March 28, 2006. 10
© Copyright 2026 Paperzz