Solutions of All Homework Problems, CS/EE 143, Fall 2014


 Amos Melton
 1 years ago
 Views:
Transcription
1 Solutions of All Homework Problems, CS/EE 43, Fall 4 Prof. Steven Low. TAs: Changhong Zhao, Jianchi Chen Last updated: /3/4 Introduction to Internet. W&P, P. Points. How many hosts can one have on the Internet if each one needs a distinct IP address? Since the IP(v4) address is 4byte, there can potentially be 3 distinct addresses.. Adapted from W&P, P.3 8 Points. Imagine that all routers have 7 ports. There are 6 hosts to be connected. Assume you can organize the hosts and routers any way you like. Your goal is to design the network structure as well as the assignment of addresses so as to (i) minimize the number of routers required, (ii) minimize the size of the routing table required in each router. (a) 4 Points. Describe your network structure and explain why your design gives the minimum number of routers. (b) 4 Points. Describe your scheme for assigning addresses and routing. Explain why your design gives the minimum routing table size in each router. The routers will be arranged in a tree topology, with each of 6 of the ports representing the next halfbyte in the network address. The 7th port would be the link to the parent router. The root router would have a dead 7th port, and so there would be a routing table of size 6 on the first router, and 7 on every other router. This would be of the form: (prefix, halfbyte, unmatched) routes to the port indexed by halfbyte, where prefix is the total specified address on the parent router that points to this router on its 7th port; default route goes to port 7; the root router is just: (halfbyte, unmatched) routes to the port indexed by halfbyte. The total number of routers we use is = This is optimal because: (a) Consider all the routers and hosts as vertex and links as edge. Then in the result graph, it should be a tree, otherwise we can further remove edges and/or vertexes to simplify the graph. Assume we have N routers. For each router, we have 7 ports. For each host, we have port. The total number of edges should be no less than the total number of vertex minus, which is (N + 6 ) to provide
2 connectivity. Also we have the number of edges should be no larger than half of the total ports, which is (7N + 6 )/. Hence we have (7N + 6 )/ (N + 6 ), so N (b) The routing table at every router except the root has only 7 entries, which is minimum with a router fanout of 7..3 W&P, P.4 3 Points. Assume that a host A in Berkeley sends packets with a bit rate of Mbps to a host B in Boston. Assume also that it takes 3ms for the first acknowledgment to come back after A sends the first packet. Say that A sends one packet of Kbyte and then waits for an acknowledgment before sending the next packet, and so on. What is the longterm average bit rate of the connection? Assume now that A sends N packets before it waits for the first acknowledgment. Express the longterm average bit rate of the connection as a function of N. [Note: Mbps = 6 bits per second; ms = millisecond = 3 second.] It takes KB/Mbps =.8ms to transmit one packet. When N =, the connection transfers packet per RTT, i.e., KB per 3.8ms 3ms. This represents a throughput of KB/.3s = 6.5 kbps. (If you use KB =,4 bits instead of, bits, then the throughput will be 63 kbps.) It is OK to ignore the packet transmission time (.8ms) since it is order of magnitude smaller than the propagation delay of 3ms. When N is small enough (see below), the sender sends N packets, and then stops and waits for the first ACK which arrives after one RTT of 3.8ms 3ms. Therefore the throughput is N KB/3ms = 6.5N kbps. KB Let K be the largest integer such that K Mbps 3.8 ms, i.e., K =, 66. When N K, the sender would have already received the first ACK when it finishes transmitting N packets, and therefore can immediately transmit the N + st packet. In this case, the throughput is Mbps. In summary, the throughput is: { 6.5N kbps if N <, 66 throughput = Mbps if N, 66 = min {6.5N kbps, Mbps}.4 B&G,.9: Horizontal and vertical parity checks 4 Points. A horizontal and vertical parity check of size K by L takes (K ) binary sequences each of length (L ) bits and outputs K binary sequences each of length L bits such that if these sequences are arranged into an K by L matrix, then each row and each column will have an even number of s. The parity check works as follows. To send (K ) data sequences each of length (L ) bits, the sender sends the K by L matrix. The receiver checks the parity of each row and each column. If there is any row or column that has odd parity, an error is detected. (a) Points. Give an example of a pattern of six errors that cannot be detected by horizontal and vertical parity checks. (b) Points. Find the number of different patterns of four errors that will not be detected by horizontal and vertical parity checks. (a) Any 6 bit errors in the following entry of the K L matrix will not be detected: (i, j ), (i, j ), (i, j ), (i, j 3 ), (i 3, j 3 ), (i 3, j ), because every row and every column has zero or bit errors which maintains valid parity of the matrix. (b) Any 4 bit errors distributed such that every row and every column has zero or bit errors will not
3 be detected. There are such configurations. ( K ) ( ) L = KL(K )(L ) 4.5 Adapted from B&G, P3. Points. Customers arrive at a fast food restaurant at a rate of five per minute and wait to receive their order for an average of minutes. Customers eat in the restaurant with probability / and carry out their order without eating with probability /. A meal requires an average of minutes. What is the average number of customers in the restaurant? For customers who carry out their orders, the average time spent in the restaurant is minutes; for those who eat in, the average time spent is 3 minutes. Therefore, the average time spent in the restaurant over all customers equals minutes. Applying Littles law, this means the average number of customers in the restaurant equals 5 =..6 Capacity constrained network design 3 Points. Two nodes A and B need to be connected via a communication link. On average, it is estimated that packets will arrive at A destined for B each second, each packet having an average size of Kbyte. There are two design choices: (i) you build a single link with rate Mbps between A and B, (ii) you build two parallel 5Mbps links, and send a packet arriving at A randomly via either link. Assume each link is equipped with an infinite sized buffer. Assuming the M/M/ formula for the delay on a link, compute the average packet delay in each case. Which design choice is better? Can you explain why? You may ignore packet propagation times. In case (i), the link service rate equals Mbps/8Kb = 5 pkts/sec. Therefore, the mean delay equals /(5) = 4 ms. In case (ii), each link has a service rate of 65 pkts/sec, and sees an arrival rate of 5 pkts/sec. The mean delay therefore is /(655) = 8ms. The first design choice is better since if you double the arrival rate as well as the service rate in an M/M/ queue, the average waiting time decreases by a factor of /..7 W&P: P.6 3 Points. Consider a router in the backbone of the Internet. Assume that the router has 4 ports, each attached to a Gbps link. Say that each link is used at 5% of its capacity by connections that have an average throughput of kbps. How many connections go through the router at any given time? Say that the connections last an average of minute. How many new connections are set up that go through the router in any given second, on average? Aggregate average throughput per link is Gbps 5% = 5Mbps. Hence average number of connections per link is 5Mbps/kbps = 75, and average number of connections at the router is 75 4 = 8,. Then Littles Law implies the number of new connections set up at the router: λ = N/T = 8, /6 = 3 connections/sec. 3
4 CS/EE43 Networking Fall WF: :3 :55am Professor Steven Low Aggregate average throughput per link = Gbps x 5% = 5Mbps. Hence, average #connections per link = 5Mbps / kbps = 75, and average #connections/router = 75 x 4 = 8,. Little s Law then implies: = N / T = 8, / 6 = 3 connections/sec..8 W&P, P.7 8. W&P, P.7 [4 points] We would like to transfer KB ( Byte=8 bits) file across a network from node A to node F. Packets have a length of KB (neglecting header). The path from node A to node F passes through 5 links, and 4 intermediate nodes. Each of the links is a Km optical fiber with a rate 4 Points. We would like to transfer KB ( Byte=8 bits) file across a network from node A to node of Mbps (assume speed of light in optical fiber is.x F. Packets have a length of KB (neglecting header). The 8 m/s). The 4 intermediate nodes are path from node A to node F passes through store and forward devices, and each intermediate node must perform a 5 s routing table 5 links, and 4 intermediate look up after receiving nodes. a packet Eachbefore of the it can links is a Km optical fiber with a rate of Mbps (assume speed of light in optical fiber is. 8 begin sending it on the outgoing link. How long does it take to send the entire file across the network? m/s). The 4 intermediate nodes are storeandforward devices, and each intermediate node must perform a 5 µs routing table look up after receiving a packet before it can begin sending it on the outgoing link. How long does it take to send the entire file across the network? Timing diagram: Look at the time diagram Figure. A B C D T T T3 T T T3 Let: Let: link propagation delay = T = km / (x 8 m/s) =.5 ms packet transmission time = T = kb/mbps =.8 ms Figure : Time diagram of packets transferred through 5 links and 4 intermediate nodes. link propagation delay = T = km / ( 8 m/s) =.5 ms packet transmission time = T = kb/mbps =.8 ms node processing time = T 3 =.5 ms. Assume A starts transmission at time, then: The time at which B receives and finishes processing first packet is T B = T + T + T 3. The time at which C receives and finishes processing first packet is T C = T B + T + T + T 3 = T B. The time at which D receives and finishes processing first packet is T D = 3T B. 5 The time at which F receives the first packet is T F = 4T B + T + T since F does not need to look up the routing table. Therefore, the time at which F receives all packets is T F + 9T = 4(T + T + T 3 ) + T + T = 5T + 4T + 4T 3 = = 9.65 ms. 4
5 .9 W&P, P.9 3 Points. Consider the case of GSM cell phones. GSM operates at 7.88 Kbps and uses a spectrum spanning KHz. What is the theoretical SNR (in db) that these phones need for operation? In reality, the phones use a SNR of db. Use Shannons theorem to calculate the theoretical capacity of the channel, under this signaltonoise ratio. How does the utilized capacity compare with the theoretical capacity? (a) By Shannon s formula C = W log ( + SNR), we have 7.88kbps = khz log ( + SNR). Hence, required SNR is 7.88 =.557 = log (.557) db =.9 db. (b) With SNR = db, Shannon capacity = khz log (+) = 69 kbps. Therefore, the utilization is 7.88/69 = 39%.. IP addresses Points. Consider an IPv4 subnet with private IP address space /4. If each IP interface in the subnet needs a distinct IP address, then how many IP interfaces can there be in the subnet? [Hint: to obtain the right answer, please look up what is a broadcast address online.] There is a total of 8 = 56 IP addresses in this subnet. One of these IP addresses (the one whose last 8 digits are all ) should be reserved for broadcasting, leaving 55 IP addresses for physical interfaces. Hence, a maximum number of 55 IP interfaces is allowed in the subnet.. Network operations 6 Points. Assume that host A sends a file of KByte ( Byte=8 bits) to host F. Host A segments the file into packets, each of KB (why packets instead of?). The path from A to F passes through 5 links and 4 routers. Each link is a km optical fiber with Mbps capacity (the speed of light in an optical fiber is. 8 m/s). East router performs a 5µs routing table look up after receiving a whole packet, before forwarding the packet to an output port. How long does it take for the file to reach F? (Assume that a router can look up the routing table for multiple packets simultaneously.) The KByte file is segmented into packets of KB instead of, since each packet has header (so that the data in a packet is less than KB) and redundant packets may be introduced for forward error correction. Let B, C, D, E denote the four intermediate routers on the path from A to F, and let t p, t s, t l denote the propagation time of a link, transmission time of a packet, and table lookup time respectively. The timeline of the overall data transmission is shown in Figure 9. It is clear from the figure that the overall transmission time is T = 4(t p + t s + t l ) + t p + t s = 5t p + 6t s + 4t l km KB = m/s Mbps + 4 5µs = 5.5ms + 6.8ms + 4.5ms =.5ms. 5
6 A B C D E F t p t s t l t p t s t l t p t s t l t p t s t l t p t s t s Figure : Timeline of the data transfer from A to F. Here B, C, D, E represent the four routers on the path from A to F, and t p, t s, t l represent the propagation time of a link, transmission time of a packet, and table lookup time, respectively. 6
7 Ethernet. W&P, P3. 3 Points. Consider the Slotted ALOHA MAC protocol. There are N nodes sharing a medium, and time is divided into slots. Each packet takes up a single slot. If a node has a packet to send, it attempts transmission with a certain probability. The transmission succeeds if no other node attempts transmission in that slot. Now, suppose that we want to give differentiated services to these nodes, i.e., we want different nodes to get a different share of the medium. The scheme we choose works as follows: If node i has a packet to send, it will try to send the packet with probability p i. Assume that every node has a packet to send all times. In such a situation, will the nodes indeed get a share of the medium in the ratio of their probability of access? Consider a given slot. Since every node has a packet to send and transmits with probability p i, the probability of success for any node i is p i ( p j ) = p i β p i j i where β := N j= ( p j) is independent of any user j. Therefore, the share of the media any user i gets is proportional to. W&P, P3.4 pi p i, not to p i. 4 Points. Consider a commercial Mbps Ethernet configuration with one hub (i.e., all end stations are in a single collision domain). (a) Point. Find the Ethernet efficiency for transporting 5 byte packets (including Ethernet overhead) assuming that the propagation delay between the communicating end stations is always 5.6 µs, and that there are many pairs of end stations trying to communicate. (b) Points. Recall that the maximum efficiency of Slotted Aloha is /e. Find the threshold for the frame size (including Ethernet overhead) such that Ethernet is more efficient than Slotted Aloha if the fixed frame size is larger than this threshold. Explain why Ethernet becomes less efficient as the frame size becomes smaller. (a) Following the derivation of efficiency of the text, we have where Now Therefore A = η = + 3.4A A := PROP TRANS. TRANS = packet transmission time = 5.6 µs 49.6 µs =.65, and hence efficiency η = 5 8 bits Mbps = 8%. 7 = 49.6 µs.
8 (b) Let the Ethernet frame size be s bits, then and We want s such that which implies s TRANS = s bits Mbps = s µs A = PROP TRANS = PROP. s η = 34 PROP e PROP s = e = 56.6 bits..78 A smaller frame size implies a larger A, which implies a smaller efficiency. Note that on average, an interval of length (e )PROP gets wasted between successful transmissions. A smaller frame size implies therefore that the fraction of time spent transmitting data successfully is smaller..3 W&P, P3.5 4 Point. Ethernet standards require a minimum frame size of 5 bits in order to ensure that a node can detect any possible collision while it is still transmitting. This corresponds to the number of bits that can be transmitted at Mbps in one roundtrip time. It only takes one propagation delay, however, for the first bit of an Ethernet frame to traverse the entire length of the network, and during this time, 56 bits are transmitted. Why, then, is it necessary that the minimum frame size be 5 bits instead of 56? A station detects collision by listening and comparing what it hears on the wire with what it transmits. Therefore, if it transmits for a roundtrip time, it can compare the signal it detects on the wire with what it just transmitted onto the wire, and a collision is detected if they are different. If it transmits only for RTT, it would have stopped transmitting before the signal from the other end reaches it, and hence miss the detection. This is illustrated in Figure 3..4 Switch vs Hub, W&P, P3.7 6 Points. In the network shown in Figure 4, all of the devices want to transmit at an average rate of R Mbps, with equal amounts of traffic going to every other node. Assume that all of the links are halfduplex and operate at Mbps and that the medium access control protocol is perfectly efficient. Thus, each link can only be used in one direction at a time, at Mbps. There is no delay to switch from one direction to the other. (a) 3 Points. What is the maximum value of R? (b) 3 Points. The hub is now replaced with another switch. What is the maximum value of R now? Denote the flows on links as in Figure 5. (a) There are two potential bottlenecks: the switchhub link or the hub. Switchhub link bottleneck: Each node generates 7 flows, each of rate R/7, to each of the other nodes. Therefore the rate crossing the link from switch to link is X = R = 6 7 R. 8
9 CS/EE43 Networking Fall WF: :3 :55am Professor Steven Low CS/EE43 Networking Fall WF: :3 :55am Professor Steven Low from the root; the rest are all blocked ports), no LAN segment will use Bridge 8 to send or receive Ethernet frames. Therefore, removing Bridge 8 has no effect on the spanning tree, except that it has one fewer leaf node now. 5. W&P, P3.7 [4 points.] In the network shown below, all of the devices want to transmit at an average rate of R Mbps, with equal amounts of traffic going to every other node. Assume that all of the links are halfduplex W&P, and P3.6 operate [4 points] at Mbps and that the media access control protocol is perfectly 4. Figure 3: Diagram Consider efficient. demonstrating the Thus, corporate each link Ethernet can only why shown be used the minimum the in one figure direction frame below. at should Each a time, switch at be transmitted is Mbps. labeled There with is its no for ID. RTT in order to delay to switch from one direction to the other. successfully detect collision. (a) What is the maximum value of R? [ points] (a) Determine which links get deactivated after the Spanning Tree Algorithm runs, and indicate (b) The hub is now replaced with another switch. What is the maximum value of R now? [ them points] on the diagram by putting a small X through the deactivated links. [3 points] Figure 4: An ethernet. Each circle represents a host, that wants to send an aggregate of R Mbps traffic, (b) A disgruntled employee wishes to disrupt the network, so she plans on unplugging central evenly to other hosts. Bridge 8. How does this affect the spanning tree and the paths that Ethernet frames follow? [ point] Figure 5: Flows in the hubswitch ethernet. 9
10 The rate crossing the link from hub to switch is Y = 4R since the hub repeats all input flows on all links except from they come from. Then we have X + Y Mbps = R 5.9 Mbps. Hub bottleneck: Take any link, say, from hub to node A. The total rate of traffic on this link is the sum of all input traffic to the link except its own: S A = 3R + X = ( )R = 37 7 R. This traffic shares the link with the traffic from A to hub, which has the rate R. Therefore, S A + R Mbps = ( )R Mbps = R 5.9 Mbps. Hence, both bottlenecks impose the same upper bound for R. (b) When the hub is replace with a switch, then X = Y and the switchswitch link is the only bottleneck. X = 3 R Mbps = R.875 Mbps. 7.5 Spanning Tree Protocol, W&P, P3.6 6 Points. Consider the network topology shown in Figure 6, where,,..., 8 denote 8 switches interconnecting 9 Ethernets. Figure 6: Each circle represents a switch, interconnecting 9 Ethernets. (a) 3 Points. Determine which links get deactivated after the Spanning Tree protocol runs, and indicate them on the diagram by putting a small X through the deactivated links. (b) 3 Points. A disgruntled employee wishes to disrupt the network, so she plans on unplugging central bridge switch 8. How does this affect the spanning tree and the paths that Ethernet packets follow? (a) The STP operates as follows:
11 CS/EE43 Networking Fall WF: :3 :55am Professor Steven Low (a) The STP operates as follows:. The bridge with the smallest ID will be the root (Bridge ). The. bridge Each with bridge the finds smallest a shortest ID will path be to the root, where (Bridge link ). cost is simply hop count (# bridges en route to root). The port on a bridge through which it roots is called a root. Each bridge finds a shortest path to the root, where link cost is simply hop count (# bridges en port (RP). route to root). The port on a bridge through which it roots is called a root port (RP). 3. A tie is broken by choosing the port / path where the next hop (bridge) has a smallest 3. A tie isid. broken by choosing the port / path where the next hop (bridge) has a smallest ID. 4. Each LAN segment will choose a bridge towards the root; the port on the bridge that s 4. Each LAN chosen segment by the will LAN choose segment a is bridge called towards a designated the root; port (DP). the port on the bridge thats chosen by the5. LAN A tie segment is broken is by called the LAN a designated choosing a bridge port (DP). with the smallest ID. 5. A tie is broken by the LAN choosing a bridge with the smallest ID. For the following figure, In Figure 7: BP: blocked port BP: blocked port DP: designated DP: designated port (incoming port (incoming chosen chosen by LAN) by LAN) RP: rootrp: port root (outgoing port (outgoing chosen chosen by bridge). by bridge) Note that LAN chooses Bridge over 8 become of smaller bridge ID. (b) Since Bridge 8 has no DP (it only has RP which will be used by Bridge 8 to send / receive Figure 7: Spanning Tree Protocol. Note that LAN chooses Bridge over 8 because of smaller bridge ID. (b) Since Bridge 8 has no DP (it only has RP which will be used by Bridge 8 to send / receive from the root; the rest are all blocked ports), no LAN segment will use Bridge 8 to send or receive Ethernet frames. Therefore, removing Bridge 8 has no effect on the spanning tree, except that it has one fewer leaf node now.
12 .6 Aloha (a) (Equal Share). Assume that n hosts share a medium using the slotted ALOHA protocol: at every time slot, each host attempts to send a packet with probability p. A host succeeds to send a packet at a given time slot if and only if it is the only host that sends a packet at that time slot.. Points. What is the probability that a host sends a packet successfully at a give time slot?. Points. What is the probability P{a packet sent} that a packet be sent at a given time slot? 3. 4 Points. What choice of p maximizes the probability P{a packet sent}? How does this maximum probability behave as n? (b) (Unequal Share). Assume that n hosts share a medium using the slotted ALOHA protocol, but at every time slot, each host attempts to send a packet with a different probability. More specifically, let N := {,..., n} denote the collection of hosts and assume that host i attempts to send a packet with probability p i (, ) at every time slot for i =,..., n.. Points. What is the probability P i := P{i sends a packet successfully} that host i N sends a packet successfully at a given time slot?. Points. What is the ratio P : P : P 3 : : P n? This ratio characterizes the share of medium among the hosts. Is the share of medium proportional to the probabilities p i that hosts attempt to send packets, i.e., is the ratio P : P : P 3 : : P n equal to p : p : p 3 : : p n? 3. (*) 5 Points. Assume n i= p i = and let P := n i= P i denote the probability that a packet gets successfully transmitted at a given time slot. Prove that (p, p, p 3,..., p n ) = (/n, /n,..., /n) minimizes P, i.e., (/n, /n,..., /n) is the solution to min n p i ( p j ) i= j i s.t. p i, i =,..., n; n p i =. It means that equal share of the medium minimizes the throughput. (a) Answers given in the lecture/textbook. i= (b) same answer as Problem. in this set; 3. Consider the nontrivial case where n 3. Let P (p) := n i= p i j i ( p j). Consider any p = (p,..., p n ) ( n,..., n ) which satisfies n i= p i = and p i, i Let M := max i=,...,n p i, and m := min i=,...,n p i. Hence we have M > n > m. Without loss of generality, let p = M and p = m, then p = (M, m,..., p n ). Let p = ( M+m, M+m,..., p n ). It is
13 sufficient to show P (p) > P (p ). We have n P (p) P (p ) = [M( m) + ( M)m] n ( p j ) + ( m)( M) = > = = M + m ( M + m ( (M + m) Mm) 4 j=3 i=3 n ) ( p j ) + ( M + m n ) j=3 i=3 n n ( p j ) ( p j ) j=3 ( (M + m) Mm) n 4 n p i i=3 j=3 i=3 p i ( p j ) j,,i n i=3 p i j,,i ( (M + m) Mm) n p i ( p i ) ( p j ) 4 i=3 j,,i ( (M + m) Mm) n ( p i )p i ( p j ) 4 i=3 j,,i p i ( p j ) ( p j ) j,,i p i j,,i ( p j ) () n i=3 p i j,,i ( p j ) () where the inequality in () is because (M + m) 4Mm > for M m and n i=3 p i <, and the inequality in () is because p i since otherwise p i > M, which leads to a contradiction. 3
14 3 Routing 3. Longest prefix matching (exercise) Point. Consider the following routing table. IP output port / /6 Which outport should a packet be forwarded to, if its destination IP address is ? The IP address matches the first 4 bits of the first entry, and only 6 bits for the second entry. Hence, the packet should be forwarded to port according to longest prefix matching. 3. Static routing, W&P, P5. Consider the network topology depicted in Figure 8. Each link is marked with its weight/cost. Figure 8: Network topology with link weights. (a) 3 points. Run Dijkstras algorithm on the above network to determine the routing table for node 3. (b) 3 points. Repeat (a) using BellmanFord algorithm. (a) The steps of Dijkatra s algorithm are: steps F D, pred D, pred D4, pred D5, pred D6, pred D7, pred 3 inf,, 3 8, 3 inf, inf, inf, 3, 3, 8, 3 inf, inf, inf, 3,, 8, 3 7, inf, 6, 3 3,,,7 8, 3 7,, 7 4 3,,,7,5 8, 3 9, 5 5 3,,,7,5,4 9,5 6 3,,,7,5,4,6 where F is the set of points for which the shortest distance and path to node 3 have been determined, Di 4
15 denotes the currentstep shortest distance from node i to node 3, and pred stands for the predecessor of node i on its shortest path to node 3. D3 = at initialization. Hence the routing table for node 3 is: (b) The steps of BellmanFord algorithm are: destination next node steps D, pred D, pred D4, pred D5, pred D6, pred D7, pred inf,, 3 8, 3 inf, inf, inf, 3,, 3 8, 3 9, 4 inf, inf, 3,, 3 8, 3 7,, 5 6, 3 3,, 3 8, 3 7, 9, 5 6, 4 3,, 3 8, 3 7, 9, 5 6, where D3 = at initialization. The resulting routing table of node 3 is the same as (a). 3.3 Dynamic routing Consider 5 stations connected in a bidirectional ring, as shown in Figure 9. Suppose station is Figure 9: A bidirectional ring topology. the only sender, and it sends packets to all other stations,, 3, 4 at rates 4, 3,, packets/sec, respectively. Note that these are endtoend traffic rates between source and all destinations, not the link flow rates which depend on the routing. These endtoend sourcetodestination rates and the routing decision jointly induce a traffic pattern on the network and hence flow rates on the links. (a) 3 points. Table shows the routing tables at each station. For each station, the first column is D (destination) and the second column is NN (next node). Indicate in a diagram the routes from station to stations,, 3, 4 as implemented by the routing table. 5
16 These end to end source to destination rates and the routing decision jointly induce a traffic pattern on the network and hence flow rates on the links. (a) The routing tables at each station is as shown below (for each station, the first column is D (destination) and the second column is NN (next node)). Table : Routing tables of stations Station Station Station Station Station Station Station 3 Station 3 Station 4 4 D NN D NN D NN D NN D NN NN D NN D NN 3 D NN 4 D NN Indicate in 3a diagram the 3 routes from 3 station 3 to stations 4,, 3, 4 as implemented by the routing table (b) Suppose the flow rate on a link is used as the cost of that link ( of them). Use the Dijkstra (b) 3 points. Suppose algorithm the to compute flow ratethe onshortest a link is paths usedfrom as the station cost of to that all other link stations. (there are links in total). Use the Dijkstra algorithm to compute the (new) shortest paths from station to all other stations. (c) Compute the new flow rates and then the shortest paths from station to all other stations, (c) 3 points. using Compute the Bellman Ford the new flow algorithm. rates and Will thenrouting shortest ever converge? paths from station to all other stations, using the BellmanFord algorithm. If this procedure is repeated, will the routing ever converge? (a) The shortestpath (a) The tree shortest path from station tree implemented is such that by that the routing all traffic table goes is: all clockwise, traffic goes asclockwise, shown inas Fig.. shown: Figure : Shortestpath tree in P3.3 (a). (b) The costs (flow rates) on the links induced by the routing table are as shown in Fig.. Note that all links in the counterclockwise direction have zero costs. The steps of Dijkstra s algorithm are shown in the table below: steps F D, pred D, pred D3, pred D4, pred, inf, inf,,,4, inf,, 4,4,3,, 3 3,4,3,, 4,4,3,, Therefore, all traffic is routed in the counterclockwise direction in the shortestpath tree, exactly opposite to the routing used in (a), as shown in Fig.. (c) The costs (flow rates) on the links induced by the routing in (b) are as shown in Fig. 3. Note that all links in the clockwise direction have zero costs. The steps of BellmanFord algorithm are: 6
17 that all links in the counter clockwise direction have zero costs. CS/EE43 Networking Fall WF: :3 :55am Professor Steven Low 4 6 CS/EE43 Networking 3 Fall WF: :3 :55am Professor Steven Low 3 Dijkstra computation: 4 Figure : t F Network D, topology pred D, with predlink D3, costs pred(flow D4, rates) pred in P3.3 (b)., Inf, Inf,,, 4, 3 Inf,, 4, 4, 3 4,, 3 3, 4, 3,, (c) The 4 costs, (flow 4, 3,, rates) on the links induced by the routing table are as shown below. Note that all links in the clockwise direction now have zero cost. 3 Therefore, all traffic is routed in the counter clockwise direction in the shortest path tree, exactly opposite to the routing used in the previous period, as shown: Figure : New shortest path tree calculated in P3.3 (b). (c) The costs (flow rates) on the links induced by the routing table are as shown below. Note that all links in the clockwise direction now have zero 9 cost Bellman Ford computation: Figure 3: t D, pred D, Network pred 9 topology D3, pred with D4, link 4 pred costs (flow rates) in P3.3 (c). 7, steps D, Inf, pred Inf, D, pred, D3, pred D4, pred 3, inf, inf,,,, 9, 4,,,,, Bellman Ford computation: 3,,,, 3 4,,,, 3 t D, pred D, pred D3, pred D4, pred, Inf, Inf, 7,
18 Therefore, all traffic is routed in the clockwise direction in the shortestpath tree, exactly the same as the routing used in (a), as shown in Fig.. Indeed, the routing updates will continue to oscillate across routing update periods, between the results of (a) and (b), and will never converge. 3.4 Dynamic routing (exercise) Consider the case where H sends Mbps traffic to H via one of two links as in Figure 4, either through R or through R. Consider the dynamic routing case where the routing table is updated every 3 minutes. When the routing table is updated, the link weight at a link is computed by the following equation: weight = Mbps + average throughput over the past 3 minutes. capacity Assume that at t =, the routing table is updated, and at t = ms, H starts sending traffic to H. Mbps R Mbps H H 4Mbps R 4Mbps Figure 4: A sends packets of KB to B via a Mbps link with KB buffer. Give the traffic throughput through Routers R and R at t =, 4, 7,... minutes. At t =, the traffic is on both paths (H R H and H R H). Therefore the link weights are t = H H R / / R /4 /4 After running the shortest algorithm, H decides to choose the path via R, during 3 minutes. At t = 3, the traffic is on the path via R and Mbps on the path via R. Therefore the link weights are t = 3 H H R / / R 3/4 3/4 After running the shortest algorithm, H decides to choose the path via R, during 3 6 minutes. At t = 6, the traffic is Mbps on the path via R and on the path via R. Therefore the link weights are t = 6 H H R 3/ 3/ R /4 /4 8
19 After running the shortest algorithm, H decides to choose the path via R, during 6 9 minutes. Then at t = 9, the situation is the same as t = 3, and routing starts oscillating every 6 minutes. As a result, the traffic throughput is shown below. t R Mbps Mbps R Mbps Mbps Mbps 3.5 Routing on a continuum of nodes (exercise) Consider the network given in Figure 5. Each point represents a router, connected to its neighbors Figure 5: Network topology for problem 3.5. via links of capacity. The links form the ring. Lable the routers by x [, ), and give router two labels: and. Assume that all traffic have the same destination: router. Let r(x) denote the source rate at x for x [, ), and assume r(x) = x. (a) (Static Routing). Consider the following static routing strategy: pick a y (, ), let every router x (, y) forwards packets clockwise, and every router x (y, ) forwards packets counterclockwise. What is the traffic throughput f (x, y) at link x for x (, y), and what is the traffic throughput f + (x, y) at link x for x (y, )? Use the expression of the queueing delay for the M/M/ queue. What is the queueing delay d s (x, y) at link x for x (, y), and what is the queueing delay d + s (x, y) at link x for x (y, )? Let d s (y) := sup x (,y) d s (x, y) denote the maximum queueing delay over links x (, y), i.e., over the links that forward packets clockwise. And let d + s (y) := sup x (y,) d + s (x, y) denote the maximum queueing delay over links x (y, ), i.e., over the links that forward packets counterclockwise. What is d + s (y) and d s (y)? Assume that the propagation delay d i (x) from x to (clockwise) is x, and that the propagation delay d + i (x) from x to (counterclockwise) is x. Each router x has two paths, clockwise or counterclockwise, to forward packets to the destination router (). Label the clockwise path by superscript  and the counterclockwise path by superscript +, and define costs D + (x, y) := d + s (y) + d + i (x), D (x, y) := d s (y) + d i (x) 9
20 for the two paths. For what values of x is D + (x, y) equal to D (x, y)? Let x(y) denote the x where D + (x, y) = D (x, y). Use matlab (or other tools) to draw x(y) as y increases from to, when does the line intersect z(y) = y? Let y denote the y (, ) where x(y) intersects z(y). Show that < x < y D (x, y) < D + (x, y), y < x < D (x, y) > D + (x, y) when y = y. That is, when x < y, the left path has smaller cost, and the right path has bigger cost. This is considered stationary. Give an interpretation of why this is called stationary. (b) (Dynamic Routing). Let s extend (a) to the dynamic routing case where routing y is updated over time. Let y k denote the routing strategy at time k =,,... and assume y k+ = x(y k ) for k =,,,... For what initial values of y does the sequence {y k } y converge? (a). Hence we have f (x, y) = f + (x, y = y x x y r(s)ds = y x, x (, y) r(s)ds = x y, x (y, ) d s (x, y) = f (x, y) = y, + x x (, y) d + s (x, y) = f + (x, y) = x, + y x (y, ) d s (y) = d s (, y) = y. Let, and hence we have. d + s (y) = d + s (, y) = y D (x, y) = y + x = y + x = D+ (x, y) x(y) = ( + y y ) See Fig. 6. The unique solution of x(y) = y on [, ] is y = When < x < y we have D (x, y ) < D (y, y ) = D (x(y ), y ) = D + (x(y ), y ) = D + (y, y ) < D + (x, y ) We can show D (x, y ) > D + (x, y ) when y < x <, in a similar way. When y = y, the routing protocol happens to guarantee that all the nodes select the shorter path, and there is no motivation for them to deviate to any other routing. (b) Let y := sup{y [, ] x(y) = } and y := inf{y [, ] x(y) = }. From Fig. 6 we see that x (y) > for y [y, y], which implies that y k+ = x(y k ) will not converge, unless y = y.
Rate adaptation, Congestion Control and Fairness: A Tutorial. JEANYVES LE BOUDEC Ecole Polytechnique Fédérale de Lausanne (EPFL)
Rate adaptation, Congestion Control and Fairness: A Tutorial JEANYVES LE BOUDEC Ecole Polytechnique Fédérale de Lausanne (EPFL) September 12, 2014 2 Thanks to all who contributed to reviews and debugging
More informationFEW would argue that one of TCP s strengths lies in its
IEEE JOURNAL ON SELECTED AREAS IN COMMUNICATIONS, VOL. 13, NO. 8, OCTOBER 1995 1465 TCP Vegas: End to End Congestion Avoidance on a Global Internet Lawrence S. Brakmo, Student Member, IEEE, and Larry L.
More informationGateway Adaptive Pacing for TCP across Multihop Wireless Networks and the Internet*
Gateway Adaptive Pacing for TCP across Multihop Wireless Networks and the Internet* Sherif M. ElRakabawy, Alexander Klemm, and Christoph Lindemann University of Leipzig Department of Computer Science Augustusplatz
More informationChord: A Scalable Peertopeer Lookup Service for Internet Applications
Chord: A Scalable Peertopeer Lookup Service for Internet Applications Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek, Hari Balakrishnan MIT Laboratory for Computer Science chord@lcs.mit.edu
More informationWhat s the Difference? Efficient Set Reconciliation without Prior Context
hat s the Difference? Efficient Set Reconciliation without Prior Context David Eppstein Michael T. Goodrich Frank Uyeda George arghese,3 U.C. Irvine U.C. San Diego 3 ahoo! Research ABSTRACT e describe
More informationSplitStream: HighBandwidth Multicast in Cooperative Environments
SplitStream: HighBandwidth Multicast in Cooperative Environments Miguel Castro Peter Druschel 2 AnneMarie Kermarrec Animesh Nandi 2 Antony Rowstron Atul Singh 2 Microsoft Research, 7 J J Thomson Avenue,
More informationEquationBased Congestion Control for Unicast Applications
EquationBased Congestion Control for Unicast Applications Sally Floyd, Mark Handley ATT Center for Internet Research at ICSI (ACIRI) Jitendra Padhye University of Massachusetts at Amherst Jörg Widmer
More informationMining Data Streams. Chapter 4. 4.1 The Stream Data Model
Chapter 4 Mining Data Streams Most of the algorithms described in this book assume that we are mining a database. That is, all our data is available when and if we want it. In this chapter, we shall make
More informationAchieving High Utilization with SoftwareDriven WAN
Achieving High Utilization with SoftwareDriven WAN ChiYao Hong (UIUC) Srikanth Kandula Ratul Mahajan Ming Zhang Vijay Gill Mohan Nanduri Roger Wattenhofer (ETH) Microsoft Abstract We present SWAN, a
More informationCongestion Avoidance and Control
Congestion Avoidance and Control Van Jacobson Lawrence Berkeley Laboratory Michael J. Karels University of California at Berkeley November, 1988 Introduction Computer networks have experienced an explosive
More informationGetting Started. 16Channel VoIP Gateway Card. Model No. KXTDA0490
16Channel VoIP Gateway Card Getting Started Model No. KXTDA0490 Thank you for purchasing a Panasonic 16Channel VoIP Gateway Card. Please read this manual carefully before using this product and save
More informationImproving Tor using a TCPoverDTLS Tunnel
Improving Tor using a TCPoverDTLS Tunnel Joel Reardon Google Switzerland GmbH Brandschenkestrasse 110 Zürich, Switzerland reardon@google.com Ian Goldberg University of Waterloo 200 University Ave W.
More informationNetwork Layer Support for Service Discovery in Mobile Ad Hoc Networks
Network Layer Support for Service Discovery in Mobile Ad Hoc Networks Ulaş C. Kozat and Leandros Tassiulas Department of Electrical and Computer Engineering and Institute for Systems Research University
More informationVeriFlow: Verifying NetworkWide Invariants in Real Time
VeriFlow: Verifying NetworkWide Invariants in Real Time Ahmed Khurshid, Xuan Zou, Wenxuan Zhou, Matthew Caesar, P. Brighten Godfrey University of Illinois at UrbanaChampaign {khurshi1, xuanzou2, wzhou10,
More informationPERFORMANCE OF VOIP SERVICES ON A DOCSIS NETWORK TARGETED BY A DENIAL OF SERVICE ATTACK
PERFORMANCE OF VOIP SERVICES ON A DOCSIS NETWORK TARGETED BY A DENIAL OF SERVICE ATTACK A Thesis Presented to the Graduate School of Clemson University In Partial Fulfillment of the Requirements for the
More informationLossy Links, Low Power, High Throughput
Lossy Links, Low Power, High Throughput Simon Duquennoy simonduq@sics.se Fredrik Österlind fros@sics.se Swedish Institute of Computer Science Box 163, SE169 Kista, Sweden Adam Dunkels adam@sics.se Abstract
More informationThe Predecessor Attack: An Analysis of a Threat to Anonymous Communications Systems
The Predecessor Attack: An Analysis of a Threat to Anonymous Communications Systems MATTHEW K. WRIGHT, MICAH ADLER, and BRIAN NEIL LEVINE University of Massachusetts Amherst and CLAY SHIELDS Georgetown
More informationDDoS Attack and Defense: Review of Some Traditional and Current Techniques
1 DDoS Attack and Defense: Review of Some Traditional and Current Techniques Muhammad Aamir and Mustafa Ali Zaidi SZABIST, Karachi, Pakistan Abstract Distributed Denial of Service (DDoS) attacks exhaust
More informationBetter Never than Late: Meeting Deadlines in Datacenter Networks
Better Never than Late: Meeting Deadlines in Datacenter Networks Christo Wilson Hitesh Ballani Thomas Karagiannis Ant Rowstron christowilson@umail.ucsb.edu hiballan@microsoft.com thomkar@microsoft.com
More informationMeasured Capacity of an Ethernet: Myths and Reality
S E P E M B E R 1 9 8 8 WRL Research Report 88/4 Measured Capacity of an Ethernet: Myths and Reality David R. Boggs Jeffrey C. Mogul Christopher A. Kent d i g i t a l Western Research Laboratory 1 Hamilton
More informationLightweight Network Support for Scalable EndtoEnd Services
Lightweight Network Support for Scalable EndtoEnd Services Kenneth L. Calvert James Griffioen Su Wen Laboratory for Advanced Networking University of Kentucky {calvert,griff,suwen}@netlab.uky.edu ABSTRACT
More informationNetwork Support for Mobile Multimedia Using a Selfadaptive Distributed Proxy
Network Support for Mobile Multimedia Using a Selfadaptive Distributed Proxy Zhuoqing Morley Mao HoiSheung Wilson So Byunghoon Kang Randy H. Katz University of California at Berkeley {zmao,so,hoon,randy}@cs.berkeley.edu
More informationOvercast: Reliable Multicasting with an Overlay Network
Overcast: Reliable Multicasting with an Overlay Network John Jannotti David K. Gifford Kirk L. Johnson M. Frans Kaashoek James W. O Toole, Jr. Cisco Systems {jj,gifford,tuna,kaashoek,otoole}@cisco.com
More informationPacket Classification for Core Routers: Is there an alternative to CAMs?
Packet Classification for Core Routers: Is there an alternative to CAMs? Florin Baboescu, Sumeet Singh, George Varghese Abstract A classifier consists of a set of rules for classifying packets based on
More informationRobust Set Reconciliation
Robust Set Reconciliation Di Chen 1 Christian Konrad 2 Ke Yi 1 Wei Yu 3 Qin Zhang 4 1 Hong Kong University of Science and Technology, Hong Kong, China 2 Reykjavik University, Reykjavik, Iceland 3 Aarhus
More informationOPRE 6201 : 2. Simplex Method
OPRE 6201 : 2. Simplex Method 1 The Graphical Method: An Example Consider the following linear program: Max 4x 1 +3x 2 Subject to: 2x 1 +3x 2 6 (1) 3x 1 +2x 2 3 (2) 2x 2 5 (3) 2x 1 +x 2 4 (4) x 1, x 2
More informationA Googlelike Model of Road Network Dynamics and its Application to Regulation and Control
A Googlelike Model of Road Network Dynamics and its Application to Regulation and Control Emanuele Crisostomi, Steve Kirkland, Robert Shorten August, 2010 Abstract Inspired by the ability of Markov chains
More informationPacket over SONET C H A P T E R
C H A P T E R 9 Packet over SONET SONET is a timedivision multiplexing (TDM) architecture that was designed to carry voice traffic. All traffic in SONET is broken down into slots of 64kbps DS0 increments.
More informationQuality of Service Routing
REPORT 1(54) ` Quality of Service Routing State of the Art Report Summary Quality of Service (QoS) routing is concerned with routing traffic such that the QoS requirements of the carried traffic are met.
More informationImplementation, Simulation of Linux Virtual Server in ns2
Implementation, Simulation of Linux Virtual Server in ns2 CMPT 885 Special Topics: High Performance Networks Project Final Report Yuzhuang Hu yhu1@cs.sfu.ca ABSTRACT LVS(Linux Virtual Server) provides
More information