# 1 Data Networks Summer 2007 Midterm Exam ProblemsPoints 1 2 3 4 5 Total Name: _________________________ Email: _________________________ Student ID: _____________________.

## Presentation on theme: "1 Data Networks Summer 2007 Midterm Exam ProblemsPoints 1 2 3 4 5 Total Name: _________________________ Email: _________________________ Student ID: _____________________."— Presentation transcript:

1 Data Networks Summer 2007 Midterm Exam ProblemsPoints 1 2 3 4 5 Total Name: _________________________ Email: _________________________ Student ID: _____________________

2 1 (20 points) Circuit switching vs datagram packet switching. (a)State two reasons why circuit switching can provide more predictable communication performance than datagram packet switching. (6 points) (b)Assume you wish to transfer an n-byte file along a path composed of the source, destination, 3 point-to-point links, and 2 switches. Suppose each link has a propagation delay of 20 ms, bandwidth of 2 Mbps, and that the switches support both circuit and datagram packet switching. Thus you can either break the file up into 1 KB packets, or set up a circuit through the switches and send the file as one contiguous bit stream. Suppose that packets have 24 bytes of packet header information and 1000 bytes of payload, that store-and-forward packet processing at each switch incurs a 1 ms delay after the packet has been completely received, that packets may be sent continuously without waiting for acknowledgements, and that circuit setup requires a 1 KB message to make one round- trip on the path incurring a 1 ms delay at each switch after the message has been completely received, and the delay at the destination is zero. Assume switches introduce no delay to data traversing a circuit. You should ignore the circuit teardown. You may also assume that file size is a multiple of 1000 bytes. For what file size n bytes is the total latency incurred before the entire file arrives at the destination less for circuits than for packets? (14 points) For packet, total transmission time is: Tp = (n/1000) * (1024*8/2M) + 3*20ms + 2*(1ms + 1024*8/2M) = n*4.096u + 70.192ms For circuit: Tc = (3*1000*8/2M + 3*20ms + 2*1ms)*2 + (n/1000) * (1000*8/2M) + 3 * 20ms = 208ms + n*4u So, for Tc < Tp, n*4u+ 208ms < n*4.096u+ 70.192ms n > 1.4355MB Guaranteed bandwidth or time slot, fixed network path.

3 2 (20 points) Broadcast and switched Ethernet. (a)State two reasons why broadcast Ethernet, where all hosts on the network share one single channel (i.e. wire) and CSMA/CD (carrier sense multiple access/collision detect) is used to arbitrate media access among the hosts, cannot support a large number of hosts spread across a large geographic area. (6 points) (b)A network based on Ethernet bridges (i.e. a switched Ethernet) does not use any routing protocol like distance vector or link-state to compute forwarding tables at the Ethernet bridges. Instead it uses two primitives: flooding and address learning. Briefly explain how these two mechanisms work together to let Ethernet bridges create forwarding tables. You may assume that the network has a tree topology. (14 points) If a bridge doesn’t know the destination address, flood packet, packet will reach destination. Each bridge notices the incoming port for each source address in the flooded packets and caches the port for subsequent forwarding to the previously seen source address. (1)To implement collision detection correctly, the maximum propagation delay of the network must be limited and related to the minimum packet size, thus as the physical length of the network increase, the minimum packet size must also increase, leading to inefficiency when sending small messages. (2)Since the medium is shared and has a limited bandwidth/capacity, performance will be very poor when a large number of hosts are sharing the medium.

5 4 (20 points) Consider the simple network in the figure below, in which A and B exchange distance-vector routing information. All links have cost 1. Suppose the distance vector routing information has already converged, and now the A-E link fails. (a)Give a sequence of routing table updates that leads to a routing loop between A and B. (8 points) (b)Describe an addition to the basic distance-vector routing algorithm that will prevent the problem identified in (a). Show how it solves the problem in this specific case. (6 points) (c)Describe a generalization of the distance-vector routing algorithm that avoids the problem identified in (a) regardless of the network topology. (6 points) E E A A B B DestCostNext B1B E1E DestCostNext A1A E2A Node A Node B time A-E fails DestCostNext B1B Einfty- DestCostNext B1B E3B DestCostNext B1B E3E DestCostNext A1A E2A DestCostNext A1A E2A DestCostNext A1A E4A Split horizon, with or without poison reverse, eliminates the problem in this case. With split horizon, a node does not advertise a route to the node that it uses as a next hop to a given destination. With poison reverse, a node advertises a cost of infinity to the node that it uses as a next hop to a given destination. A path-vector algorithm eliminates the problem in any topology. With path-vector, nodes advertise the full path, thus allowing all nodes to check for routing loops.

6 5 (20 points) Sliding window based retransmission protocols. (a)In the stop and go protocol (i.e. the sliding window size is one packet), what is the minimum number of bits required to encode the sequence number for the protocol to work correctly? (3 points) (b)If sequence number is not used, the resulting “broken” stop and go protocol may fail to transfer data correctly. Describe a specific scenario that explains the problem of not using sequence number in stop and go. (7 points) (c)Assuming there is never any packet corruption or loss along a network path, therefore retransmission is never needed, what are the two primary factors that determine the overall throughput (in bits per second) of a data transfer using a sliding window protocol? (3 points) (d)State a mathematical formula to describe how the two factors determine the throughput.. (2 points) (e)What problems can arise if the retransmission timeout value is chosen arbitrarily? Be as specific as possible. (5 points) 1 bit Suppose the acknowledgement for the first packet is lost, and the sender retransmits the first packet after a timeout, then the receiver would mistake the retransmitted first packet as the second packet when no sequence number is used. The sliding window size and the round-trip delay. Window size in bits Round trip delay in seconds Throughput = If the RTO is chosen to be smaller than the RTT, then many unnecessary packet retransmission will result and waste network bandwidth. If the RTO is chosen to be much larger than the RTT, then the retransmission of a lost packet will be unnecessarily delayed, leading to poor performance.

7 (Extra work space)

8

9