Solutions of All Homework Problems, CS/EE 143, Fall 2014
|
|
|
- Amos Melton
- 10 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 4-byte, 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 half-byte 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 long-term average bit rate of the connection? Assume now that A sends N packets before it waits for the first acknowledgment. Express the long-term 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 /(65-5) = 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 store-and-forward 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 signal-to-noise 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 round-trip 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 half-duplex 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 switch-hub link or the hub. Switch-hub 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 hub-switch 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 switch-switch 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 Bellman-Ford 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 current-step 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 Bellman-Ford 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 bi-directional ring, as shown in Figure 9. Suppose station is Figure 9: A bi-directional 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 end-to-end traffic rates between source and all destinations, not the link flow rates which depend on the routing. 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) 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 Bellman-Ford algorithm. If this procedure is repeated, will the routing ever converge? (a) The shortest-path (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 : Shortest-path 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 counter-clockwise 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 counter-clockwise direction in the shortest-path 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 Bellman-Ford 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 shortest-path 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 counter-clockwise. 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 (counter-clockwise) is x. Each router x has two paths, clockwise or counter-clockwise, to forward packets to the destination router (). Label the clockwise path by superscript - and the counter-clockwise 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.
21 X:.68 Y:.68.6 x y Figure 6: x(y) as a function of y. 3.6 Forward error correction code The forward error correction code discussed in the lecture (and textbook) can be represented in the matrix form as in Figure 7, i.e., C = P A, where C is a k m matrix that represents m encoded packets C C C 3 C m P P P 3 P n k = A Figure 7: Matrix representation of forward error correction. each of k bits (the m columns of C), P is a k n matrix that represents n original packets each of k bits (the n column of P ), and A is an n m - matrix that represents the coding A ij {, }. For example, the jth column of C is: n C j = P i A ij for j =,..., m. Here the summation is elementwise XOR. Let A = i= (a) 3 points. If packets C = [ ] T, C = [ ] T, C 5 = [ ] T, C 6 = [ ] T are received, find the original packets P, P, P 3, P 4. (b) 3 points. If another set of packets C = [ ] T, C 3 = [ ] T, C 4 = [ ] T, C 6 = [ ] T are received, find the original packets P, P, P 3, P 4.
22 (a) The corresponding matrices are = C = P A = P where P is the 4 4 matrix whose j-th column is the original packet P j. It amounts to inverting A to obtain P, and can be done as follows. Note that P = C 3 = [ ] T, then C = P + P and hence P = C + P = [ ] T + [ ] T = [ ] T. Similarly, C = P + P 4 and hence P 4 = C + P = C + C + P = [ ] T + [ ] T + [ ] T = [ ] T. Finally, C 4 = P + P + P 3 + P 4 and hence P 3 = C 4 + P + P + P 4 = [ ] T. Hence P =. (b) Similarly, the corresponding matrices are = C = P A = P Note that C = P + P 4 and C 3 = P + P 3 + P 4, and hence P 3 = C + C 3 = [ ] T. Then from + P 4 = [ ] T and, since 4 + P + P 3 + P 4 = [ ] T. Hence P =. C = P 3 + P 4 we have P 4 = C + P 3 = [ ] T. Then P = C C 4 = P + P + P 3 + P 4, we have P = C 3.7 Network coding, W&P, P5.4 Consider a wireless network with nodes X and Y exchanging packets via an access point Z. For simplicity, we assume that there are no link-layer acknowledgments. Suppose that X sends packets to Y at rate R packets/sec and Y sends packets to X at rate R packets/sec; all the packets are of the maximum size allowed. The access point uses network coding. That is, whenever it can, it sends the exclusive or of a packet from X and a packet from Y instead of sending the two packets separately. (a) points. coding? What is the total rate of packet transmissions by the three nodes without network (b) points. What is the total rate of packet transmissions by the three nodes with network coding? (a) Without network coding: X transmits at rate R to Z. Y transmits at rate R to Z.
23 Z transmits at rate 3R to X, Y Hence, total rate required = 6R. (b) With network coding, in every second, on average there is.5 second when Z broadcasts R packets x+y to both X and Y. In the other.5 second, Z relays R packets from X to Y. Hence, total rate required = R + R + (R+ R)/(.5+.5) = 5R. 3
24 4 Internetworking 4. W&P, P6. (a) points. How many IP addresses need to be leased from an ISP to support a DHCP server (with L ports) that uses NAT to service N clients, if every client uses at most P ports? (b) points. If M unique clients request an IP address every day from the above mentioned DHCP server, what is the maximum lease time allowable to prevent new clients from being denied access assuming that requests are uniformly spaced throughout the day, and that the addressing scheme used supports a max of N clients? (a) Consider the worst case that all the P ports of all the N clients are connected, i.e., there are NP connections. To use NAT, the DHCP server must maintain an address translation table in which every entry takes the form IP a, TCP b IP b, TCP m, where IP a is the IP address actually assigned by ISP, TCP b is an port at the NAT server, IP b is the (virtual) IP of a client that is known only by the NAT server, and TCP m is the actual port used by the client for a connection. Hence the maximum number of entries in this table is restricted by the number L of ports of the NAT server multiplied by the number S of assigned IPs, and must not be smaller than the number of connections, i.e., SL #entries in the table NP, which implies S NP L. Therefore there should at least be IP addressed assigned by the ISP. NP L (b) Suppose all the IP addresses are available at the beginning of the day (time ). Every 4 M hours there is a request of IP address from a new client, and therefore at time 4N M hours a maximum number of N clients are supported and there is no more IP address available. In that case the first client must release the IP address it has been occupying to satisfy any new request. Hence the maximum lease time hours. is 4N M 4. Insufficient IP addresses (exercise): A variant of P4. (a) Consider a type D subnet (there are 56 IP addresses in a type D network, and one of these IP addresses is used for broadcasting). Assume that 5 IP addresses are assigned to servers, then how many hosts can this subnet support if there is no DHCP service nor NAT service? (b) Assume that there is a DHCP server in the subnet, and that each host connects to the Internet 8 hours a day. How many hosts can this subnet support? (c) Assume that the DHCP server also runs the NAT protocol, and can use up to TCP ports for each dynamic IP address. Also assume that each host needs TCP connections. How many hosts can this subnet support? (a) There is a total of 56--5=4 IP addresses that can be assigned to hosts. If there is no DHCP service nor NAT service, then IP address can be assigned to at most one host. Hence, this subnet can only support 4 hosts. (b) If the subnet runs DHCP, then IP address can be assigned to different hosts if the hosts get online at different times of a day. If each host connects to the Internet 8 hours a day, then 3 hosts can share a single IP address. Hence, this subnet can support 4*3=7 hosts if DHCP service is enabled. (c) If NAT protocol is run, then multiple hosts can use the same IP address simultaneously, as long as they are assigned different port numbers. If TCP ports can be used for NAT and each host has TCP connections, then IP address can be shared by /= hosts. Hence, this subnet can 4
25 support 7*=7 hosts. 5
26 5 Transport 5. W&P, P7. (a) points. Suppose you and two friends named Alice and Bob share a Kbps DSL connection to the Internet. You need to download a MB file using FTP. Bob is also starting a MB file transfer, while Alice is watching a 5 Kbps streaming video using UDP. You have the opportunity to unplug either Alice or Bob s computer at the router, but you cannot unplug both. To minimize the transfer time of your file, whose computer should you unplug and why? Assume that the DSL connection is the only bottleneck link, and that your connection and Bob s connection have a similar round trip time. (b) points. What if the rate of your DSL connection were 5 Kbps? Again, assuming that the DSL connection were the only bottleneck link, which computer should you unplug? If I share with Bob, then each of us will get half of the link rate because we both use the same TCP algorithm for file transfer and both have the same RTT. If I share with Alice, then Alice will get 5kbps since she is using UDP without congestion control, and I will get the remaining link rate. Therefore, to maximize my own throughput: (a) I should unplug Alice, so I will get kbps. (b) I should unplug Bob, so I will get 5 5 = 35 kbps, as opposed to 5kbps if sharing with Bob. 5. W&P, P7. As shown in Figure 8, station A has an unlimited amount of data to transfer to Station E. Station A uses a sliding window transport protocol with a fixed window size. Thus, station A begins a new packet transmission whenever the number of unacknowledged packets is less than W and any previous packet being sent from A has finished transmitting. The size of the packets is bits (neglect headers). So for example if W >, station A would start sending packet at time t =, and then would send packet as soon as packet finished transmission, at time t =.33 ms. Assume that the speed of light is 3 8 meters/sec. (a) 4 points. Suppose station B is silent, and that there is no congestion along the acknowledgement path from C to A. (The only delay acknowledgements face is the propagation delay to and from the satellite.) Plot the average throughput as a function of window size W. What is the minimum window size that A should choose to achieve a throughput of 3 Mbps? Call this value W. With this choice of window size, what is the average packet delay (time from leaving A to arriving at E)? (b) 4 points. Suppose now that station B also has an unlimited amount of data to send to E, and that station B and station A both use the window size W. What throughput would A and B get for their flows? How much average delay do packets of both flows incur? (c) 4 points. What average throughput and delays would A and B get for their flows if A and B both used window size.5w? What would be the average throughput and delay for each flow if A used a window size of W and B used a window size of.5w? (a) Recalling that throughput is inverse proportional to the round-trip time, we start with calculating the round-trip time of data transfer from A to E. The timeline of data transfer from A to E is shown in Figure 9, where t s, t q, and t p denote the transmission time of a packet, queueing delay at the buffer of C, and propagation delay on a space-to-ground link respectively. The transmission time of a packet is t s =.33 ms. 6
27 Figure 8: Transmitting data from stations A, B to E. A C D E t s t q t p t p t s t p t s t p Figure 9: Timeline of data transfer from A to E. When B does not transmit, the buffer at C is empty (since incoming traffic rate is limited by the capacity of the link from A to C, which is no greater than the capacity of the output link from C to D), and 7
28 therefore the queueing delay at the buffer of C is t q =. The propagation delay on a space-to-ground link is t p = 5 4 km 3 8 m/s = 66.7ms. Hence, the round-trip time is The throughput is given by x = RTT = 3t s + t q + 4t p = 667.7ms. W pkt size RTT = W, bits 667.7ms = 3W 3 Mbps when 3W/3 3, i.e., W 3. When W > 3, the throughput is 3Mbps. Average throughput as a function of the window size W is shown in Figure. The minimum window size to throguhput (Mbps) window size (pkts) Figure : [Solution P5.] Throughput as a function of the window size. achieve a throughput of 3Mbps is W = 3. The average packet delay is (average packet delay) = 3t s + t q + t p = 334.3ms. (b) When A and B both use a window size of W, the buffer at C will build up, leading to a longer round-trip time for both flows. This increased round-trip time will slow down the throughput of both A and B. Eventually, the system comes to a steady state, where the round-trip time does not change. Now compute the steady state. Let t q denote the steady-state queueing delay at the buffer of C, and note that A and B have the same steady-state round-trip time Then the steady state throughputs of A and B are and therefore x A = x B = 5Mbps. We have It follows that RTT = W pkt size x A RTT = 3t s + t q + 4t p. x A = W pkt size RTT = = x B., bits 5Mbps =.333s. t q = RTT 3t s 4t p = ms. 8
29 Therefore the average packet delay is. CS/EE43 Networking Fall WF: :3 :55am Professor Steven Low (average packet delay) = 3t s + t q + t p = ms (c) When each has window size.5w, the two flows have combined window sizes that are sufficient to keep the pipe full. Their combined throughput will be 3 Mbps, so by symmetry each will get 5 Mbps. The round-trip delay, which is the same for A and B, can be found by: RTT =.5, bits 5Mbps = 666.7ms Subtracting the delay on the reverse path, i.e., t p = 333.3ms, we get a forward path delay of 333.3ms, which is exactly the propagation delay t p, i.e., the queueing delay is t q = (we ignored the transmission time 3t s from the RTT for simplicity). When A s window is W and B s is.5w, the two flows have combined window sizes that are sufficient to keep the pipe full. Their combined throughput will be 3Mbps. A will have twice as many packets in the pipeline as B, so their throughputs will have a ratio of :. Thus A gets Mbps and B gets Mbps. The roud-trip time for A and B is the same, which is found by:, bits.5, bits (a) Suppose RTT station = B is silent, and that there = is no congestion along the acknowledgement = ms path Mbps Mbps from C to A. (The only delay acknowledgements face is the propagation delay to and from the Subtracting satellite.) the Plot delay the onaverage the reverse throughput path, i.e., as a t function p = 333.3ms, of window we get size aw. forward What is path the minimum delay of 666.7ms for both window A andsize B. that Their A should queueing choose delay to is achieve t q = a throughput of = ms Mbps? Call (wethis ignored value the W*. With transmission time 3t s from the RTT for simplicity). this choice of window size, what is the average packet delay (time from leaving A to arriving at E)? 5.3 (b) W&P, Suppose P7.3 now that station B also has an unlimited amount of data to send to E, and that station B and station A both use the window size W*. What throughput would A and B get for As shown their inflows? Figure How, much flows average anddelay share do packets a link of with both capacity flows incur? C = Kbps. There is no other bottleneck. (c) What Theaverage round throughput trip time ofand flowdelays is. would seca and and that B get of for flow their flows is.if sec. A and Let B both x and used x denote the rates obtained by the two flows, respectively. The hosts use AIMD to regulate their flows. That window size.5w*? What would be the average throughput and delay for each flow if A used a is, as long as x + x < C, the rates increase linearly over time: the window of a flow increases by one packet window every round size of trip W* and time. B used Rates a window are estimated size of.5w*? as the window size divided by the round-trip time. Assume that as soon as x + x > C, the hosts divide their rates x and x by the factor α =.. 4. W&P: P7.3 [4 points] As shown in the figure, flows and share a link with capacity C = Kbps. There is no other bottleneck. The round trip time of flow is. sec and that of flow is. sec. Let x and x Figure : Two flows sharing a link. (a) 3 points. Draw the evolution of the vector (x, x ) over time. (b) 3 points. What is the approximate limiting value for the vector? (a) Since flow s RTT is twice that of flow s RTT, and flow s window increases at a pace that is twice that of flow s, then flow s rate (=window/rtt) increases at a pace that is 4 times that of flow s. Hence on the plot, the rates increase along a line that has a slope of /4. When x + x = C, 9
30 (a) Since B s RTT is twice that of A s RTT, A s window increases at a pace that s twice that of B s, and A s rate (=window/rtt) increases at a pace that s 4 times that of B s. Hence on the ( x x) plot, the rates increase along a line that has a slope of ¼. When x x C, both divide their rates by. immediately without feedback dealy, i.e., their new rates are 9% of those before the multiplicative decrease. Therefore, the evolution of their rates is as shown. C x.9c slope = /4 steady state slope = /4 x x C.9C C x (b) In the steady state, both rates increase at the rate of s/ti, where s = packet size in bits (assuming Figure both : use the same constant Rates change packet size ofs) two and flows Ti = RTT sharing of flow i, aand link. decrease multiplicatively by %. Therefore the rates oscillate along the double arrowed line segment indicated above, between the lines x x. 9C and x x C. To calculate the approximate steady state rates x, x, assume that x 4x and x x C. Hence, x 4C / 5 96kbps and x C / 5 4kbps. both divide their rates by. immediately, i.e., their new rates are (about) 9% of those before the multiplicative decrease. Therefore, the evolution of their rates is as shown in Fig.. (b) In the steady state, the rates oscillate along the double-arrowed line segment indicated above, between the lines x + x =.9C and x + x = C. To calculate the approximate steady-state rates 6 x, x, assume that x + x = C. Since we also have x = 4x, we get x = 4C/5 = 96kbps and x = C/5 = 4kbps. 5.4 W&P, P7.4 Consider a TCP connection between a client C and a server S. (a) 3 points. Sketch a diagram of the window size of the server S as a function of time. (b) points. Using the diagram, argue that the time to transmit N packets from S to C is approximately equal to a + bn for large N. (c) 3 points. Explain the key factors that determine the value of b in that expression for an Internet connection. Here all reasonable answers are accepted. (a) The graph depends on the protocol. But basically it looks like Figure 7. of the textbook, which is also shown in Fig. 3. (b) The total number of packets transmitted equals to the number of packets transmitted in the slow start stage and the congestion avoidance stage. For the slow start stage, you are transferring lower than the maximum rate possible, which cause a constant part a. In the congestion avoidance stage, you are transferring at the maximum rate possible, say /b, which results in a linear part bn. (c) Possible factors can be the maximum rate of Ethernet connection, efficiency of the Ethernet, RTT, routing, etc. 5.5 Window size control (exercise) Assume that a host A in Los Angeles sends packets, each of KByte, to a host B in San Francisco, through a connection of Mbps capacity. Also assume that the round-trip time of each packet is a 3
31 (c) Explain the key factors that determine the value of b in that expression for an Internet connection. Here all reasonable answers are accepted. (a) The graph depends on the protocol. But basically it looks like Figure 7. of the book. (b) The total number of packets transmitted equals to the number of packets transmitted in the Figure 3: Window size in Figure 7. of the textbook, for P5.4. slow start stage and the congestion avoidance stage. For the slow start stage, you are transferring lower than Wthe maximum rate possible, which cause a constant part a. In the congestion avoidance W stage, you are transferring at the maximum rate possible, say /b, which max results in a linear part bn. W min (c) Possible factors can be the maximum rate of Ethernet connection, efficiency of the Ethernet, RTT, routing, etc. T T time Figure 4: Window size W fluctuates piecewise linearly in time, from W min to W max, in periods of length T, which is assumed to be much bigger than the round-trip time. constant of 3ms (no jitter). (a) If A uses the window flow control mechanism7 with a constant window size W, then what is the average bit rate of the connection as a function of W? What happens as W increases to infinity? (b) Now consider the case where W fluctuates, at a much slower timescale than the round-trip time (this is not true in the TCP protocol) as in Figure 4. What is the average rate of the connection assuming W max is not too big? (a) When window size W is small, the average bit rate x is This expression holds as long as 8W/3, W pkts packet size x = round-trip time W pkts KB/pkt = 3ms = 8W 3 Mbps When window size is big, more specifically, when 8W/3 >, W packets can no longer be sent within a round-trip time. In this case, there will always be less than W unacknowledged packets after A finish transmitting a packet, and therefore A will keep transmitting packets, at the link capacity. 3
32 To summarize, the average bit rate is { 4W/65Mbps if 4W/65, x = Mbps if 4W/65 >. And the rate stablizes at Mbps as W tends to infinity. (b) Let W (t) denote the window size at time t, then the instantaneous bit rate at time t is x(t) = 4W (t)/65mbps provided W (t) is not too big (i.e., 4W (t)/65 ). It follows that the average rate of the connection is x = = T = T lim T T T T T x(t)dt 4W (t) 65 dt x(t)dt = (W min + W max ) Mbps TCP with AIMD (exercise), adapted from P5.3 Flows and share a link (the only bottleneck link) with capacity C = Mbps as in Figure 5. The round-trip time of flow is τ =.s while that of flow is τ =.s (assume that there is no jitter). Let x and x denote the throughput of flows and respectively. The hosts use AIMD to regulate their flows: When x + x C, the throughput x and x increase linearly over time: the window of a flow increases by one packet every round-trip time. Assume that the packet size is.5kbytes. When x + x > C, the hosts divide their window size by the factor α =.. Assume that flow and decrease their window sizes at most once every.ms. Throughput is estimated as the window size divided by the round-trip time. Host flow Host R R Host flow Host Figure 5: Two flows share a bottleneck link. The bottleneck link is highlighted in red. (a) Assume that at time t =, the window size of both flows is. Draw the evolution of the vector (x, x ) over time. [Hint: use matlab.] (b) What is the approximate limiting behavior for the vector? You will notice that the end-point of the vector moves on a line that go through the origin as time evolves, and you are required to give the slope of this line. 3
33 (c) Repeat (a) and (b) for α =.,.3,.4,.5. Can you find out how the slope depends on α? (a)the evolution of the vector (x, x ) over time is shown in Figure 6. The matlab code is attached throughput of flow (Mbps) 4 3 alpha=. throughput vector line with slope /4 5 5 throughput of flow (Mbps) below. Figure 6: The evolution of the vector (x, x ) over time with α =.. clear a l l ; close a l l ; clc ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% i n i t i a l i z a t i o n %%%%%%%%%%%%%%%%%%%%%%%%%%%%% % i n i t i a l i z e time stamps t r e s o l u t i o n =. ; % l e n g t h o f a time stamp. t r a n g e = 6 ; % f i n i s h i n g time. t c o u n t = floor ( t r a n g e / t r e s o l u t i o n ) ; % number o f time stamps % i n i t i a l i z e window s i z e W = ; % window s i z e o f f l o w W = ; % window s i z e o f f l o w % i n t i a l i z e round t r i p time tau =. ; % round t r i p time o f f l o w tau =. ; % round t r i p time o f f l o w % i n i t i a l i z e throughput x = zeros ( t count, ) ; % a l l o c a t i n g space f o r t hroughput o f f l o w x = zeros ( t count, ) ; % a l l o c a t i n g space f o r t horughput o f f l o w % i n i t i a l i z e l i n k c a p a c i t y 33
34 C = E6 ; % l i n k c a p a c i t y in bps P =. 5 E3 8 ; % p a c k e t s i z e in b i t s C = C / P ; % l i n k c a p a c i t y in p k t / s % i n i t i a l i z e alpha alpha =. ; % b a c k o f f parameter used in MD %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% time e v o l u a t i o n %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% for t =: t c o u n t % compute c u r r e n t throughput x ( t ) = W / tau ; % throughput o f f l o w at ( t ) t r e s o l u t i o n x ( t ) = W / tau ; % throughput o f f l o w at ( t ) t r e s o l u t i o n % update window s i z e i f x ( t)+x ( t ) >= C % i f throughput e x c e e d s l i n k c a p a c i t y i f mod( t,)== % d e c r e a s e window s i z e every. seconds W = W / alpha ; W = W / alpha ; end else W = W + ; % i n c r e a s e wndow s i z e by i f mod( t,)== % i n c r e a e window s i z e every. seconds W = W + ; end end end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% p o s t p r o c e s s i n g %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % change u n i t s x = x P / E6 ; % throughput o f f l o w in Mbps x = x P / E6 ; % throughput o f f l o w in Mbps % p l o t f i g u r e f i g = figure ( ) ; c l f ; plot ( x, x, l i n e w i d t h, ) ; hold on ; set ( gca, f o n t s i z e, 4 ) ; t i t l e ( sprintf ( alpha =%. f, alpha ) ) ; xlabel ( throughput o f f l o w (Mbps) ) ; ylabel ( throughput o f f l o w (Mbps) ) ; set ( gca, xlim, [ 8 ] ) ; set ( gca, ylim, [ 4. 5 ] ) ; plot ( [ 8 ], [ 4. 5 ], r, l i n e w i d t h, ) ; hold o f f ; legend (, throughput v e c t o r, l i n e with s l o p e /4, l o c a t i o n, northwest ) ; 34
35 print ( f i g, sprintf ( a l p h a %d. eps, alpha ), depsc ) ; (b) See P5.3. (c) The plots are shown in Figure 7. It can be observed that the slope does not depend on α. throughput of flow (Mbps) throughput of flow (Mbps) 4 3 alpha=. throughput vector line with slope /4 5 5 throughput of flow (Mbps) 4 3 alpha=.4 throughput vector line with slope /4 5 5 throughput of flow (Mbps) throughput of flow (Mbps) throughput of flow (Mbps) 4 3 alpha=.3 throughput vector line with slope /4 5 5 throughput of flow (Mbps) 4 3 alpha=.5 throughput vector line with slope /4 5 5 throughput of flow (Mbps) Figure 7: The evolution of the vector (x, x ) over time with α =.,.3,.4, TCP Vegas (exercise) KB A Mbps B Figure 8: A sends packets of KB to B via a Mbps link with KB buffer. Consider the case where A sends packets of KB to B via a Mbps link with KB buffer as in Figure 8. The propagation delay (round-trip time with the buffer being empty) is assumed to be ms. Assume that A uses TCP Vegas as the transmission control protocol, i.e., it keeps track of the minimum round- 35
36 trip time τ min and the current round-trip time τ, and updates the window size W according to W W + if τ min W τ < α τ min W W W if τ min W τ > β τ min W otherwise where α, β are TCP parameters. The parameters are chosen α < β to introduce hysteresis, which can reduce the fluctuation in window size W. Now we try to analyze the steady-state of this scenario. We start with making the following simplifications: at steady state, one has Assume α =.8 and β = 3.. W τ min W τ (α + β)/ =. τ min (a) If τ min observed by A is equal to the round-trip time without queueing delay, which is ms, then what is the window size W at steady state? How many packets are there in the buffer? (b) If τ min observed by A is equal to the round-trip time without queueing delay, plus τ e = ms, i.e., 3ms, then what is the window size W at steady state? How many packets are there in the buffer? (c) At what value of τ e will the buffer be full? Let τ e denote this value. What happens if τ e > τ e? (a) At steady state, the traffic throughput x = W P/τ, where P is the packet size, equals link capacity C. Therefore W τ = x P = C P = Mbps KB/pkt = 5pkt/s. Then, W τ min W τ The round-trip time is (α + β)/ = W 3 = W τ min τ min τ W = W = 3 + τ min τ τ = W 5pkt/s = 44ms = 3 + ms 5pkt/s = 5.5pkt. and therefore the queuing time is t q = 44 = 4ms. Hence, the number of packets in the buffer is (b) One still have The round-trip time is (average number of packets in buffer) = t q 5pkt/s = 3pkt. W = 3 + τ min W τ τ = = 3 + 3ms 5pkt/s = 6.75pkt. W 5pkt/s = 54ms and therefore the queuing time is t q = 54 = 34ms. Hence, the number of packets in the buffer is (average number of packets in buffer) = t q 5pkt/s = 4.5pkt. (c) For the buffer to be full, one needs pkt = t q 5pkt/s = t q = 6ms. 36
37 Then, the round-trip time is τ = 6 + = 8ms. The window size would be Substitute in W = 3 + τ min W/τ to obtain W = τ 5pkt/s =.5pkt. τ min = W 3 W τ = 56ms. Then τ e = τ min = 36ms. When τ e > τ e, the buffer will not be able to hold all packets, and has to drop some packets. Then, TCP Vegas will work as TCP Reno (since packet drop occurs). 37
38 6 Convex optimization, TCP modeling and equilibrium 6. Convex sets (exercise) (a) (Examples of convex sets). Three types of convex sets affine subspace, second-order cone, and the collection of semidefinite matrices are of particular interest in convex optimization, since optimization over these convex sets has found efficient algorithms. Below we prove that these sets are indeed convex.. (Affine subspace). Let A R m n and b R m for some m, n. Show that the set is convex. C = {x R n Ax = b} Let x C, x C, i.e., Ax = Ax = B. Then for any t, we have A(tx + ( t)x ) = tax + ( t)ax = (t + t)b = B, i.e., tx + ( t)x C. Hence C is convex.. (Second-order cone). Let n. For a vector x = (x, x,..., x n ) R n, introduce the l norm x := x + x + + x n. Show that the set is convex. C = {(x, t) R n R x t} Let (x, t) C, (y, s) C. Note that s, t. Then for any α, we have αx + ( α)y = n (αx i + ( α)y i ) = α i= n α x i + ( α) i= n i= n i= x i + ( α) yi + α( α) n i= n i= x i y i + α( α) n α t + ( α) s + α( α)st = (αt + ( α)s) i= y i n x i y i where the third inequality holds due to Cauchy Schwarz inequality, and the last inequality holds because (x, t) C, (y, s) C. Therefore α (x, t) + ( α) (y, s) C, and hence C is convex. 3. (Collection of semidefinite matrices). Let n and S n n denote the collection of symmetric n n real matrices. A matrix A S n n is called positive semidefinite, if x T Ax for any x R n. Let A denote A being positive semidefinite. Show that the set is convex. C = {A S n n A } Let matrix A, B C. Hence A and B. For any α, αa + ( α)b S n n. Moreover, for any x R n, we have x T (αa + ( α)b)x = αx T Ax + ( α)x T Bx Therefore αa + ( α)b, and hence C is convex. i= 38
39 (b) (Operations preserving convexity). We will explore several set operations that preserve convexity. These operations are of fundamental importance to the convex optimization theory.. (Linear transformation). Let X and Y be two linear spaces and f : X Y be linear. For example, consider X = R n, Y = R m, and f R m n. Show that if A X is convex, then f(a) = {f(x) x A} is convex. Also show that if B Y is convex, then is convex. f (B) = {x X f(x) B} For any y, y f(a), there are x, x A such that y = f(x ), y = f(x ). Since f is linear, for any λ [, ], we have f(λx + ( λ)x ) = λy + ( λ)y. Since A is convex, we have λx + ( λ)x A, and hence λy + ( λ)y f(a). Therefore f(a) is convex. For any x, x f (B), we have y := f(x ) B and y := f(x ) B. Since f is linear, for any λ [, ], we have f(λx + ( λ)x ) = λy + ( λ)y B, since B is convex. Therefore λx + ( λ)x f (B), and f (B) is convex.. (Arbitrary concatenation). Let X and Y be two linear spaces and A X, B Y be convex. The product space X Y := {(x, y) x X, y Y} with + and defined by (x, y ) + (x, y ) := (x + x, y + y ), (x, y ), (x, y ) X Y; λ(x, y) := (λx, λy), λ R, (x, y) X Y is also a linear space (you don t need to show this). For example, if X = R m and Y = R n for some m, n, then X Y = R m+n. Show that the direct product A B := {(x, y) x A, y B} is convex. (*) Argue that the direct product of arbitrary number of convex sets is convex. Consider any (x, y ), (x, y ) A B. Since both A and B are convex, for any λ [, ], we have λx +( λ)x A and λy +( λ)y B. Then λ(x, y )+( λ)(x, y ) = (λx + ( λ)x, λy + ( λ)y ) A B. Therefore A B is convex. Similar argument extends to the direct product of arbitrary finite number of convex sets. 3. (Finite sum). Let X be a linear space and A, B X be convex. Show that the set A + B := {a + b a A, b B} is convex. Argue that the sum of finite convex sets is convex. Consider x, y A+B. Then there are a x, a y A and b x, b y B such that x = a x +b x and y = a y + b y. Then for any λ [, ], we have λx + ( λ)y = λ(a x + b x ) + ( λ)(a y + b y ) = λa x + ( λ)a y + λb x + ( λ)b y. Since A and B are both convex, we have λa x + ( λ)a y A and λb x + ( λ)b y B, and therefore λx + ( λ)y A + B. Therefore A + B is convex. Similar argument extends to the sum of any finite number of convex sets. 4. (Arbitrary intersection). Let X be a linear space and A, B X be convex. Show that the intersection A B is convex. Argue that the intersection of arbitrary number of convex sets is convex. Consider x, y A B. Then x, y A and x, y B. Since A and B are both convex, for any λ [, ], we have λx + ( λ)y A and λx + ( λ)y B. Hence λx + ( λ)y A B and therefore A B is convex. Similar argument extends to the intersection of any finite number of convex sets. 39
40 5. (Union?). Let X be a linear space and A, B X be convex. Give an example where the union A B is nonconvex. Hint: It suffices to consider X = R. Consider X = R, and the sets A := {(x, y) x + y } and B := {(x, y) (x 3) + y }. It is easy to show that both A and B are convex. However, if we look at two points a = (, ) A and b = (, ) B (and therefore a, b A B), one of there convex combination (, ) + (, ) = (.5, ) lies neither in A nor in B, and hence is not in A B. Hence A B is nonconvex. 6. Convex functions (exercise) (a) (Examples of convex functions).. (Exponential). Show that the function f(x) = e ax defined on C = R, where a R, is convex.. (Entropy). Show that the function f(x) = x ln x defined on R ++ = (, ) is convex. 3. (Log-exponential). Show that the function f(x, x ) = ln(e x + e x ) defined on R is convex.. Since f (x) = a e ax > on R, f is convex.. We have f (x) = ln x + x x = ln x +, and f (x) = x > on (, + ), so f is convex. 3. The Hessian Matrix of the function f = ln(e x + e x ) is H = ( f x f x x f x x f x ) = ex+x e x + e x ( ). The eigenvalues of ( ) are and, so the eigenvalues of H are both nonnegative. Hence H is positive semidefinite on R and f is convex. (b) (Operations preserving convexity). constant, and supremum preserves convexity. We will show that addition, multiplication by positive. Show that if f and f are two convex functions on the same domain, and α, β, then αf +βf is also convex.. Show that if f and f are two convex functions on the same domain, then f = max{f, f } is also convex. Use this result to show that the function f(x, y) = x + y defined on R is convex. For any x, y in the domain of f, f, and any λ [, ], we have f i (λx+( λ)y) λf i (x)+( λ)f i (y), for i =,, by the definition of convex function. Hence (αf + βf )(λx + ( λ)y) = αf (λx + ( λ)y) + βf (λx + ( λ)y) Therefore αf + βf is convex. α(λf (x) + ( λ)f (y)) + β(λf (x) + ( λ)f (y)) = λ(αf + βf )(x) + ( λ)(αf + βf )(y). 4
41 Consider f = max{f, f }. Without loss of generality, suppose we have f(λx + ( λ)y) = f (λx + ( λ)y) f (λx + ( λ)y). Hence f(λx + ( λ)y) = f (λx + ( λ)y) λf (x) + ( λ)f (y) (by convexity of f ) λf(x) + ( λ)f(y). Hence f is convex. Since f(x, y) = x + y = max{x + y, x y, x + y, x y}, where all the four functions are convex, f is convex. (c) (Level sets are convex). If f is a convex set defined on C, show that the level sets {x C f(x) α} are convex for α R. For any fixed α R, sonsider two points x, y in the level set L α := {x C f(x) α}. For any λ [, ], we have f(λx + ( λ)y) λf(x) + ( λ)f(y) (by convexity of f) λα + ( λ)α = α. Hence λx + ( λ)y L α and the level set L α is convex. 6.3 Convex optimization (exercise) Consider the following optimization problem. Let x R n be the optimization variable and f, g,..., g k be scalar functions defined on R n where k. Let A R m n and b R m be given. The optimization problem is as follows. (P) : min f(x) s.t. Ax = b; g i (x), i =,..., k, when f, g, g,..., g k are convex, (P) is called convex. Use the knowledge we gained in previou problems to show that the feasible set C = {x Ax = b, g i (x) for i =,..., k} is convex. Hint: The set C is the intersection of k + convex sets. It is obvious that {x Ax = b} is convex. Since each of g i for i =,..., k is convex, its level set {x g i (x) } is also convex. Then C is the intersection of k + convex sets and hence is also convex. 6.4 Duality theory (exercise) We will work through the duality theory in a simple case. Consider Problem (P) in Problem.3. Let µ R m, λ R k + = [, ) k, and define where g(x) = (g (x), g (x),..., g k (x)) T. L(x, µ, λ) := f(x) + µ T (Ax b) + λ T g(x) 4
42 (a) (Unconstrained optimization). Let L(µ, λ) := min x R n L(x, µ, λ) denote the unconstrained optimization over x for a fixed µ, λ. Assume that Problem (P) has an optimal solution and denote it by x. Show that L(µ, λ) f(x ) for any µ R m and λ R k +. Let x(µ, λ) := arg min x R n L(x, µ, λ), and then L(µ, λ) = L(x(µ, λ), µ, λ) L(x, µ, λ) since x(µ, λ) is the minimizer of L(, µ, λ) given (µ, λ). Since x is feasible, we have Ax b = and g i (x ) for i =,..., k. We also have λ R k +. Hence L(µ, λ) L(x, µ, λ) = f(x ) + µ T + λ T g(x ) f(x ). (b) (Dual problem). Consider the dual problem (D) : max L(µ, λ) s.t. λ. Assume (D) has an optimal solution and denote it by (µ, λ ).. Show that L(µ, λ ) f(x ) k i= λ i g i(x ). It implies that Problem (D) provides a lower bound for Problem (P). The result in (a) still holds if we take (µ, λ) = (µ, λ ).. Assume now f, g, g,..., g k are convex. Show that the equality is attained if and only if x L(x, µ, λ ) =. The first equality, i.e., L(µ, λ ) = f(x ) + λ,t g(x ) = L(x, µ, λ ) is attained if and only if x is the minimizer of L(, µ, λ ). Since f and g i for i =,..., k are convex, L(x, µ, λ ) is a convex function of x. Then x is a minimizer if and only if x L(x, µ, λ ) =. 3. Show that if there exists (x, µ, λ) such that x is feasible for (P), (µ, λ) is feasible for (D), x L(x, µ, λ) =, and λ i g i (x) = for i =,..., k, then x solves (P) and (µ, λ) solves (D). These are called the KKT conditions. Consider an (x, µ, λ ) that satisfies the conditions above. Since x L(x, µ, λ ) =, we have L(µ, λ ) = f(x )+λ,t g(x ). Since λ,t g(x ) = k i= λ i g i(x ) =, we have L(µ, λ ) = f(x ). Hence f attains its lower bound at x, and L attains its upper bound at (µ, λ ). Therefore x solves (P) and (µ, λ ) solves (D). 6.5 Convex functions 4 points. For each of the following functions, determine if it is convex, concave, or neither. f(x) = e x on R. f(x) = x x on { (x, x ) R x >, x > }. f(x) = x x on { (x, x ) R x >, x > }. f(x) = x /x on { (x, x ) R x >, x > }. 4
43 () f (x) = e x > on R, so f is strictly convex. () The Hessian Matrix of the function f(x) = x x is H = ( f x f x x f x x f x ) = ( ) whose eigenvalues are ±. Hence H is indefinite and f is neither convex nor concave. (3) The Hessian Matrix of the function f = x x H = ( f x f x x is f x x f x ) = ( x 3 x x x x x x x 3 4 The principle minors of H are > and > ; one can also check that the eigenvalues are x 3 x x 4 x4 strictly positive for x, x >. Hence H is positive definite and f is strictly convex. (4) The Hessian Matrix of the function f(x) = x /x is H = ( f x f x x f x x f x ) ) ( ) x =. The eigenvalues of H are x x ± +. Therefore, one of the eigenvalues is positive and the other x 3 x 6 x 4 negative if x, x >. Hence H is indefinite and f is neither convex nor concave. x x x Throughput vs. fairness 6 points. Consider a linear network with L links indexed by,..., L, each of capacity c =. There are L + flows indexed by,..., L. Flows l =,..., L traverse only link l and the flow indexed by traverses all the L links. Suppose all flows have the following utility function with the same α : { x α i U i (x i ) = α, α log x i, α =. The rate at which each flow transmits is determined by the solution of the following utility maximization, subject to capacity constraints: L U i (x i ) s.t. Rx c max x i= where x = (x,..., x L ), matrix R is the routing matrix introduced in class. The expression x means x i for i =,..., L. Calculate the aggregate throughput T (α) = L i= x i(α). Explain the dependence of T (α) on α. Also comment on the dependence of fairness (how fair the link capacity is divided by the flows) on α. Note that the constraints Rx c can be written as x + x l, l =,..., L. The KKT conditions for primal and dual optimal solutions (x(α), p(α)) of the utility maximization 43
44 problem (and its dual) with parameter α are: U l (x l (α)) + p l (α) =, l =,..., L, U (x (α)) + x (α) + x l (α), l =,..., L (Primal feasibility) p l (α), l =,..., L (Dual feasibility) L p l (α) = p l (α)[x (α) + x l (α) ] =, l =,..., L (Complementary slackness) l= (Stationarity) Since U i (x i(α)) = (x i (α)) α > (which also requires x i (α) > and cannot be zero) for i =,..., L, we have p l (α) > for l =,..., L. Hence x (α) + x l (α) = for l =,..., L, due to complementary slackness. Therefore we have which implies (x (α)) α = L (x l (α)) α = L( x (α)) α l= x (α) = L α + L α x l (α) =, l =,..., L. L α + Hence the total throughput T (α) = L i= x i(α) = L L L α +. Clearly, T (α) is a decreasing function of α. However, when α increases, the difference between x (α) and x l (α), for any l =,..., L, becomes small, which means the allocation of throughputs is more fair. 6.7 TCP steady state analysis Consider the network in Fig. 9, where R R4 are routers, L L3 are links, S S3 are source hosts, and T T3 are the corresponding destination hosts. Figure 9: Network topology for TCP steady state control, P6.7. The link capacities of L, L and L3 are 5 packets/s. The one way propagation delay of each link L L3 is ms and assume there is no propagation delay between a host and a router. There are three flows: flow from S to T, flow from S to T, and flow 3 from S3 to T3. Flow starts at t=, flow starts at t=sec and flow 3 starts at t=sec. All flows use TCP Fast, i.e., the window update is W (t + ) = RTTmin RTT W (t) + α, with α = 5. 44
45 (a) 6 points. Calculate the steady-state throughput of each flow and queue length of each link, during s s, s s and after s, assuming each flow knows its RTT min (round-trip propagation delay) accurately. Assume before flow starts, all packets are buffered at L. (b) 6 points. Repeat (a) but with each flow measuring its RTT min that includes queueing delay due to other flows that started before it does. Assume before flow starts, all packets are buffered at L. (a) For each TCP source, the steady-state window size is W = RTT RTT min, which implies the steadystate rate is x = W/RTT = α RTT RTT min. Indeed, for TCP flow i, RTT i = d i + q i where d i is its round-trip propagation delay and q i is its queueing delay. When each flow knows its RTT min,i as d i, we have x i = α q i. Between s s, there is only flow in the network. It will use up all the capacity of links L L3, i.e., x = 5 pkts/s. The queueing delay is q = 5 5s = ms and the queue length of flow, which is only on link L, is 5 packets. The queue lengths on L and L3 are both. Between s s, flows and share link L, which becomes the bottleneck. Then we have x + x = 5pkts/s. Let p i denote the queueing delay on links Li, i=,, 3. Since links L, L3 are underutilized, there are no queues on them and hence p = p 3 =. Therefore x = α/p = x = 5pkts/s. The queueing delay on L is p = 5 5s = 4ms, and the queue length on L is 5pkts/s.4s = pkts. After s, flows and share link L, and flows and 3 share link L3, which both become the bottleneck links. Then we have x + x = 5pkts/s, x + x 3 = 5pkts/s. Since L is underutilized, there is no queues on L and hence p =. We have x = α/p = α/p 3 = x 3, and x = α/(p + p 3 ) = x. Hence x = 5 3 = 833.3pkts/s, and x = x 3 = 666.7pkts/s. Therefore p = p 3 = s = 3ms, and the queue length is 5pkts/s.3s = 75pkts on L and L3 each. (b) Again, consider x = α RTT RTT min. αrtt Between s s, there is only flow in the network, and the result is the same as (a). Between s s, flows and share link L, which becomes the bottleneck. There are no queues on L and L3, and hence p = p 3 =. Flow knows it RTT min, as d + ms, and hence x = α q = α. p. We still have x. = α 5 p. By solving p + 5. p = 5 we have p = sec = 5.4ms. The flow rates are x = 5/ pkts/s, and x = 5/ pkts/s. The queue length on L is pkts. After s, flows and share link L, and flows and 3 share link L3, which both become the bottleneck links. There is no queue on L and hence p =. Flow 3 knows it RTT min,3 as d 3, and hence x 3 = α/p 3. α Solving α α = 5 and = 5, we have p = s = 47.3ms, p +p 3 + p. p +p 3 + α p 3 and p 3 = s = 7.3ms. The flow rates are x = 5/( ) 67pkts/s and x = x 3 = 5/.73 83pkts/s. The queue length on L is pkts and he queue length on L3 is pkts. 45
46 Calculate the aggregate throughput T ( ) ( ). Explain the dependence of the aggregate throughput on Solution max x 7 Dynamical systems, stability of TCP optimality 7. Asymptotic (KKT) condition stability is: there exists p ( ), such that x ( ) x ( ) with equality if p l ( ), l,..., L, and 4 points. Consider the dynamical system ẋ = x x sin(x + x x ) l ( ) pl ( ), l,..., L, x ( ) p ẋ = x x sin(x + x l ( ) () ). l Since x l ( ), we have p l ( ) xl ( ), and hence x ( ) xl ( ). Then, () implies Prove that the origin is asymptotically stable. Consider x Lyapunov ( ) function xl ( ) candidate V (x) x ( = ) (x +x L ), which x ( is) zero at (, ) and positive everywhere else. We have the derivative l of V along l any system trajectory: / V (x) = x ẋ + ẋ L Hence x ( ), xl ( ), l,..., L / = x ( x x sin(x / L L + x )) + x (x x sin(x + x )) L = (x + x ) sin(x L + x and T ( ) ) xi ( ) L. which, in a neighborhood {(x, x ) x / + x i L π ɛ} (ɛ is a small positive constant) of the origin, is negative everywhere except the origin and zero at the origin. Hence V is a Lyapunov function which is Clearly, the aggregate throughput is a decreasing function of Thus, as we make the allocation more sufficient to show the origin is asymptotically stable. and more fair, the throughput gets lowered. 7. Stability of TCP 4. TCP congestion control: modeling and stability [8 points] Consider the network following Fig. network 3. model: i i U ( x) i x i s. t. Rx c, x Fix an and let x ( ) denote a solution of the utility maximization. For the linear network, the L L L x x l c, p c, p x 3 3 Figure 3: The network in P7.. Suppose the TCP algorithms are given by x (t) = p (t), x (t) = x 3 (t) = p (t), and the queue management algorithms are given by (p (t) + p (t)) /3 d dt p (t) = γ(x (t) + x 3 (t) c ), d dt p (t) = γ(x (t) + x 3 (t) c ). 46
47 (a) 6 points. Find the utility functions of the 3 flows and write down the network utility maximization problem implicitly solved by this algorithm. Hint: Write down the equilibrium condition and interpret that as the optimality condition of a network utility maximization problem. Using the optimality condition of utility maximization problem, we have U (x ) = p = x, U (x ) = p = x, U 3(x 3 ) = p + p = 8 x 3. 3 Hence we have U (x ) = log x, U (x ) = x, U 3 (x 3 ) = 4 x. 3 The utility maximization problem is max x i,i=,,3 3 U i (x i ) i= s.t. x + x 3 c x + x 3 c. (b) points. Is the equilibrium point (x, p ) unique? Explain. Yes. The primal objective function is strictly concave and hence x = [x, x, x 3] T is unique. Then [U (x ), U (x ), U 3(x 3)] T = R T p is also unique where the routing matrix ( ) R = is of full row rank. Hence p is also unique. (c) 6 points. Prove that the equilibrium point (x, p ) is asymptotically stable. Hint: Try the dual objective function as a candidate Lyapunov function. Consider the candidate Lyapunov function: V (p) := = 3 U i (x i (p)) p (x (p) + x 3 (p) c ) p (x (p) + x 3 (p) c ) i= [ 3 U i (x i (p)) x i (p) i= l= l= ] R li p l + c l p l (3) where x i (p) for i =,, 3 are given in the problem description, and are also the maximizers of the Lagrangian given p. As the dual objective function, V is minimized at p, and V (p) > V (p ) for any 47
48 p p. The derivative of V along any trajectory of the system is [ ( 3 ) V (p) = U i(x x i x i i (p)) ṗ l ṗ l R li p l x i (p) p i= l p l l= l= l= [ ] 3 = x i (p) R li ṗ l + c l ṗ l i= = = l= l= ( 3 ) ṗ l R li x i (p) c l i= ( 3 ) γ R li x i (p) c l l= l= i= ] R li ṗ l + l= c l ṗ l where the second inequality is due to U i (x i(p)) = l= R lip l, and the last inequality is due to the queue management algorithms in problem description. Hence V (p), with equality if and only if p = p (due to the uniqueness of dual optimal solution p ). Hence V is a Lyapunov function and (x, p ) = (x(p ), p ) is asymptotically stable. l= 48
49 8 Queueing systems 8. B&G, P3.9 A communication line with link rate 5 Kbps is used to serve flows, each generating Poisson traffic at a rate 5 packets/min. Packet lengths are exponentially distributed with mean Kbits. (a) 6 points. Find the average number of packets in queue waiting, the average number of packets in the system, and the average packet delay (time spent in the system), when: (i) the link is divided into independent equal-capacity channels. Each channel has an independent buffer and serves one flow. (ii) the link is shared as a single channel by the flows via statistical multiplexing. (b) 4 points. Repeat (a) if 5 of the flows generate packets at a rate of 5 packets/min, while the other 5 flows generate packets at a rate of 5 packets/min. (a) For each session of (i) and (ii), the arrival rate of one flow is λ = 5/6 =.5 pkts/sec. (i) When the link is divided into equal-capacity channels, each channel has a service rate µ = 5Kbps//Kbits = 5 pkts/sec. Then, the average packet delay (for the whole system since it is the same for every channel) is T = /(µ λ ) =.4 s. By Little s theorem, the average number of packets in every channel is N = λ T =.5.4 = pkt. Therefore, the average number of packets in the queue for every channel is Q = N λ /µ =.5 pkt. Therefore, total number of packets in the system is N = = pkts, and total number of packets waiting in the queue is Q =.5 = 5 pkts. (ii) When the link is not divided, the total arrival rate is λ = 5 pkts/sec and service rate is µ = 5 pkts/sec. Then, the average packet delay is T = /(µ λ) =.4 s By Little s theorem, average number of packets in the system is N = λt = 5.4 = pkt, and the average number of packets in the queue is Q = N λ/µ =.5 pkt. (b) For a flow (indexed by ) that generates packets at a rate of 5 pkts/min, its arrival rate is λ = 5/6 = 4.7 pkts/sec. Then, T = /(µ λ ) = /(5 4.7) =. s, and N = λ T = 4.7. = 5 pkts, and Q = N λ /µ = 4.7 pkts. For a flow (indexed by ) that generates packets at a rate of 5 pkts/min, its arrival rate is λ = 5/6 =.83 pkts/sec. Then, T = /(µ λ ) = /(5.83) =.4 s, and N = λ T =.83.4 =. pkt, and Q = N λ /µ =.3 pkt. Therefore, the average number of packets in the system is N = 5(N + N ) = 5 (5 +.) = 6 pkts, the average packet delay is T = 6/(5λ + 5λ ) =.4 s, and the average number of packets in the queue is Q = 5(Q + Q ) = 5 ( ) = pkts. When statistical multiplexing is used, the total arrival rate is λ = 5(λ + λ ) = 5( ) = 5 pkts/sec, and therefore the results is the same as in (a). 8. B&G, P3.3 6 points. Persons arrive at a taxi stand with room for W = 5 taxis according to a Poisson process with rate λ. A person boards a taxi upon arrival if one is available and otherwise waits in a line. Taxis arrive at the stand according to a Poisson process with rate µ. An arriving taxi that finds the stand full departs immediately; otherwise, it picks up a customer if at least one is waiting, or else joins the queue of waiting taxis. Use an M/M/ queue formulation to obtain the steady-state distribution of the 49
50 taxis queue when λ = and µ = per minute. Compute the average number of people waiting, and the average number of taxis waiting in steady state. Let the state X := #passengers #taxis. Then X is a Markov chain taking value in { 5, 4,...,,,,...}. Moreover, it has the same transition behavior as an M/M/ queue with arrival rate λ and service rate µ. Therefore, the stationary distribution is P (X = n) = ( ) n+5 ( λ λ ). µ µ Therefore, since λ/µ =, the average number of taxis waiting is 5 kp (X = k) = 5 ( ) k= = 4 3, and the average number of people waiting is ( kp (X = k) = λ µ k= 8.3 Jackson network ) ( λ µ ( ) 3 + ) 6 d ( k= ρk) dρ ( = λ ) ( ) 6 λ µ µ ( ρ) ρ= = 3. ( ) 4 + ρ= λ µ ( ) 5 6 points. Packets arrive at a processor/transmitter according to a Poisson process with rate α pkts/sec. Each packet takes an i.i.d. exponential time to process and transmit (with an average of /µ sec). It is then sent onto one of two networks towards its destination, with probabilities p and p = p. A packet that is sent onto Network will incur a processing/transmission time that is i.i.d. and exponentially distributed (with an average of /µ sec), after which it either arrives at the destination correctly (with probability p ), or in error (with probability p ). In the latter case, the packet must be retransmitted by the processor/transmitter. Similarly, a packet that is sent onto Network will processing/transmission time that is i.i.d. and exponentially distributed (with an average of /µ sec), and then either arrives at the destination correctly (with probability p ), or in error (with probability p ). In the latter case, it must be retransmitted by the processor/transmitter. Draw a queueing model of the system, and find the expected numbers of packets at the processor/ transmitter, in Networks and, and the expected time it takes for a packet to reach the destination correctly. The network model is shown in Fig. 3. The arrival rates at the processor/transmitter (node ) and Networks and are respectively λ, λ and λ, which satisfy λ = α + p λ + p λ λ = λ p λ = λ p 5
51 Draw a queueing model of the system, and find the expected numbers of packets at the processor/transmitter, in Networks and, and the expected time it takes for a packet to reach the destination correctly. Network model: p p -p p -p p which imply Hence Let,, be the arrival rates to the queues,,. Then, Figure p 3: p P8.3, the network model. p p ( p ) λ = λ = λ = α p p 37 p p p α p p p p p α. p p p p By Jackson s Theorem, the average numbers of packets N at the processor/transmitter and N, N in Networks and can be calculated independently at every node as in a M/M/ queue. Therefore N = N = N = λ α = µ λ βµ α λ p α = µ λ βµ p α λ p α = µ λ βµ p α where β := p p p p. By Little s Theorem, the expected time a packet spends in the system is T = N + N + N = α βµ α + p βµ p α + p βµ p α. 8.4 Optimal stochastic routing 8 points. Consider sending packets from Caltech to MIT through an intermediate node, as shown in Fig. 3. Packets are generated by the sender at CIT according to a Poisson process with rate λ packets/sec. The packet sizes are statistically independent and exponentially distributed with mean length kbits. All packets are destined for MIT. They are randomly routed through Chicago, with probability p, or Atlanta, with probability p. The nodes at Chicago and Atlanta have infinite buffers. The Chicago node has a constant transmission rate of µ kbps and the Atlanta node has a constant transmission rate of µ kbps. Suppose the signal propagation and process delays are negligible so that the total delay involves just queueing and transmission times at the intermediate nodes. 5
52 T p p N / b b p b p 4. Optimal routing [6 points] Consider sending packets from Caltech to MIT through an intermediate node, as shown: p Chicago CIT MIT p Atlanta Figure 3: P8.4, the network model. If µ = 4µ, prove that p = λ µ 3λ minimizes the expected 38 total delay, assuming that µ < λ < 5µ. Argue carefully why this is the unique minimizing routing probability. Each node, Chicago or Atlanta, can be modeled as an M/M/ queue with arrival rates λp and λ( p) pkts/sec and service rates µ and µ pkts/sec respectively. Hence, the average number of packets at Chicago is N = λp µ λp, and the average number of packets at Atlanta is N = λ( p) µ λ( p), and the total expected delay (which is a function of p) is T (p) = N + N λ = p µ λp + p 4µ λ( p). Setting T (p) = yields p = λ µ 3λ or p = 6µ λ λ Note that for queues at Chicago and Atlanta to be stable, we require λp < µ and λ( p) < 4µ, but one can check that p = 6µ λ λ does not satisfy this stability condition, and hence the expected delay will be unbounded with this routing probability. On the other hand, if µ < λ < 5µ then the routing probability p = λ µ 3λ >, and it satisfies the then T (p) < and if p > λ µ 3λ then T (p) >. minimizes the expected delay T (p). stability condition above. Moreover, if p < λ µ 3λ Therefore, p = λ µ 3λ 5
Answer: that dprop equals dtrans. seconds. a) d prop. b) d trans
Chapter 1 1) p. 98: P-6 This elementary problem begins to explore propagation delay and transmission delay, two central concepts in data networking. Consider two hosts, A and B, connected by single link
Final for ECE374 05/06/13 Solution!!
1 Final for ECE374 05/06/13 Solution!! Instructions: Put your name and student number on each sheet of paper! The exam is closed book. You have 90 minutes to complete the exam. Be a smart exam taker -
EINDHOVEN UNIVERSITY OF TECHNOLOGY Department of Mathematics and Computer Science
EINDHOVEN UNIVERSITY OF TECHNOLOGY Department of Mathematics and Computer Science Examination Computer Networks (2IC15) on Monday, June 22 nd 2009, 9.00h-12.00h. First read the entire examination. There
EXAMPLES AND PROBLEMS. Competence Based Education Internet Protocols
EXAMPLES AND PROBLEMS Competence Based Education Internet Protocols Example 1 In following figure frames are generated at node A and sent to node C through node B. Determine the minimum transmission rate
DATA COMMUNICATIONS AND NETWORKING. Solved Examples
Page 1 of 10 DATA COMMUNICATIONS AND NETWORKING Solved Examples References: STA: Stallings, Data and Computer Communications, 6 th ed. TAN: Tannenbaum, Computer Networks, 4 th ed.) 1. Given the following
Data Networks Summer 2007 Homework #3
Data Networks Summer Homework # Assigned June 8, Due June in class Name: Email: Student ID: Problem Total Points Problem ( points) Host A is transferring a file of size L to host B using a TCP connection.
Computer Networks Homework 1
Computer Networks Homework 1 Reference Solution 1. (15%) Suppose users share a 1 Mbps link. Also suppose each user requires 100 kbps when transmitting, but each user transmits only 10 percent of the time.
CS 5480/6480: Computer Networks Spring 2012 Homework 4 Solutions Due by 1:25 PM on April 11 th 2012
CS 5480/6480: Computer Networks Spring 2012 Homework 4 Solutions Due by 1:25 PM on April 11 th 2012 Important: The solutions to the homework problems from the course book have been provided by the authors.
Latency on a Switched Ethernet Network
Application Note 8 Latency on a Switched Ethernet Network Introduction: This document serves to explain the sources of latency on a switched Ethernet network and describe how to calculate cumulative latency
Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages
Part I: The problem specifications NTNU The Norwegian University of Science and Technology Department of Telematics Note! The problem set consists of two parts: Part I: The problem specifications pages
Introduction to LAN/WAN. Network Layer
Introduction to LAN/WAN Network Layer Topics Introduction (5-5.1) Routing (5.2) (The core) Internetworking (5.5) Congestion Control (5.3) Network Layer Design Isues Store-and-Forward Packet Switching Services
Computer Network. Interconnected collection of autonomous computers that are able to exchange information
Introduction Computer Network. Interconnected collection of autonomous computers that are able to exchange information No master/slave relationship between the computers in the network Data Communications.
Based on Computer Networking, 4 th Edition by Kurose and Ross
Computer Networks Ethernet Hubs and Switches Based on Computer Networking, 4 th Edition by Kurose and Ross Ethernet dominant wired LAN technology: cheap $20 for NIC first widely used LAN technology Simpler,
ESSENTIALS. Understanding Ethernet Switches and Routers. April 2011 VOLUME 3 ISSUE 1 A TECHNICAL SUPPLEMENT TO CONTROL NETWORK
VOLUME 3 ISSUE 1 A TECHNICAL SUPPLEMENT TO CONTROL NETWORK Contemporary Control Systems, Inc. Understanding Ethernet Switches and Routers This extended article was based on a two-part article that was
Basic Multiplexing models. Computer Networks - Vassilis Tsaoussidis
Basic Multiplexing models? Supermarket?? Computer Networks - Vassilis Tsaoussidis Schedule Where does statistical multiplexing differ from TDM and FDM Why are buffers necessary - what is their tradeoff,
GATE CS Topic wise Questions Computer Network
www.gatehelp.com GATE CS Topic wise Questions YEAR 23 Question. 1 Which of the following assertions is false about the internet Protocol (IP)? (A) It is possible for a computer to have multiple IP addresses
Exam 1 Review Questions
CSE 473 Introduction to Computer Networks Exam 1 Review Questions Jon Turner 10/2013 1. A user in St. Louis, connected to the internet via a 20 Mb/s (b=bits) connection retrieves a 250 KB (B=bytes) web
CH.1. Lecture # 2. Computer Networks and the Internet. Eng. Wafaa Audah. Islamic University of Gaza. Faculty of Engineering
Islamic University of Gaza Faculty of Engineering Computer Engineering Department Networks Discussion ECOM 4021 Lecture # 2 CH1 Computer Networks and the Internet By Feb 2013 (Theoretical material: page
Transport Layer Protocols
Transport Layer Protocols Version. Transport layer performs two main tasks for the application layer by using the network layer. It provides end to end communication between two applications, and implements
Faculty of Engineering Computer Engineering Department Islamic University of Gaza 2012. Network Chapter# 19 INTERNETWORK OPERATION
Faculty of Engineering Computer Engineering Department Islamic University of Gaza 2012 Network Chapter# 19 INTERNETWORK OPERATION Review Questions ٢ Network Chapter# 19 INTERNETWORK OPERATION 19.1 List
Homework Assignment #1 Solutions
Homework Assignment #1 Solutions EE122: Introduction to Communication Networks (Fall 2007) Department of Electrical Engineering and Computer Sciences College of Engineering University of California, Berkeley
TCP over Multi-hop Wireless Networks * Overview of Transmission Control Protocol / Internet Protocol (TCP/IP) Internet Protocol (IP)
TCP over Multi-hop Wireless Networks * Overview of Transmission Control Protocol / Internet Protocol (TCP/IP) *Slides adapted from a talk given by Nitin Vaidya. Wireless Computing and Network Systems Page
Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages
Part I: The problem specifications NTNU The Norwegian University of Science and Technology Department of Telematics Note! The problem set consists of two parts: Part I: The problem specifications pages
QoS issues in Voice over IP
COMP9333 Advance Computer Networks Mini Conference QoS issues in Voice over IP Student ID: 3058224 Student ID: 3043237 Student ID: 3036281 Student ID: 3025715 QoS issues in Voice over IP Abstract: This
R2. The word protocol is often used to describe diplomatic relations. How does Wikipedia describe diplomatic protocol?
Chapter 1 Review Questions R1. What is the difference between a host and an end system? List several different types of end systems. Is a Web server an end system? 1. There is no difference. Throughout
Computer Networks. Definition of LAN. Connection of Network. Key Points of LAN. Lecture 06 Connecting Networks
Computer Networks Lecture 06 Connecting Networks Kuang-hua Chen Department of Library and Information Science National Taiwan University Local Area Networks (LAN) 5 kilometer IEEE 802.3 Ethernet IEEE 802.4
Datagram-based network layer: forwarding; routing. Additional function of VCbased network layer: call setup.
CEN 007C Computer Networks Fundamentals Instructor: Prof. A. Helmy Homework : Network Layer Assigned: Nov. 28 th, 2011. Due Date: Dec 8 th, 2011 (to the TA) 1. ( points) What are the 2 most important network-layer
Region 10 Videoconference Network (R10VN)
Region 10 Videoconference Network (R10VN) Network Considerations & Guidelines 1 What Causes A Poor Video Call? There are several factors that can affect a videoconference call. The two biggest culprits
CS263: Wireless Communications and Sensor Networks
CS263: Wireless Communications and Sensor Networks Matt Welsh Lecture 4: Medium Access Control October 5, 2004 2004 Matt Welsh Harvard University 1 Today's Lecture Medium Access Control Schemes: FDMA TDMA
CSE 123: Computer Networks Fall Quarter, 2014 MIDTERM EXAM
CSE 123: Computer Networks Fall Quarter, 2014 MIDTERM EXAM Instructor: Alex C. Snoeren Name SOLUTIONS Student ID Question Score Points 1 15 15 2 35 35 3 25 25 4 15 15 5 10 10 Total 100 100 This exam is
Computer Networks - CS132/EECS148 - Spring 2013 ------------------------------------------------------------------------------
Computer Networks - CS132/EECS148 - Spring 2013 Instructor: Karim El Defrawy Assignment 2 Deadline : April 25 th 9:30pm (hard and soft copies required) ------------------------------------------------------------------------------
Network Performance: Networks must be fast. What are the essential network performance metrics: bandwidth and latency
Network Performance: Networks must be fast What are the essential network performance metrics: bandwidth and latency Transmission media AS systems Input'signal'f(t) Has'bandwidth'B System'with'H(-) Output'signal'g(t)
Computer Networks - CS132/EECS148 - Spring 2013 ------------------------------------------------------------------------------
Computer Networks - CS132/EECS148 - Spring 2013 Instructor: Karim El Defrawy Assignment 3 - Solutions Deadline : May 9 th 9:30pm (hard and soft copies required) ------------------------------------------------------------------------------
Answers to Sample Questions on Network Layer
Answers to Sample Questions on Network Layer ) IP Packets on a certain network can carry a maximum of only 500 bytes in the data portion. An application using TCP/IP on a node on this network generates
Performance of networks containing both MaxNet and SumNet links
Performance of networks containing both MaxNet and SumNet links Lachlan L. H. Andrew and Bartek P. Wydrowski Abstract Both MaxNet and SumNet are distributed congestion control architectures suitable for
APPENDIX 1 USER LEVEL IMPLEMENTATION OF PPATPAN IN LINUX SYSTEM
152 APPENDIX 1 USER LEVEL IMPLEMENTATION OF PPATPAN IN LINUX SYSTEM A1.1 INTRODUCTION PPATPAN is implemented in a test bed with five Linux system arranged in a multihop topology. The system is implemented
First Midterm for ECE374 02/25/15 Solution!!
1 First Midterm for ECE374 02/25/15 Solution!! Instructions: Put your name and student number on each sheet of paper! The exam is closed book. You have 90 minutes to complete the exam. Be a smart exam
First Midterm for ECE374 03/24/11 Solution!!
1 First Midterm for ECE374 03/24/11 Solution!! Note: In all written assignments, please show as much of your work as you can. Even if you get a wrong answer, you can get partial credit if you show your
CSE3214 Computer Network Protocols and Applications. Chapter 1 Examples and Homework Problems
CSE3214 Computer Network Protocols and Applications Chapter 1 Examples and Homework Problems Example 1 (review question 18) (1) How long does it take a packet of length 1000 bytes to propagate over a link
Seamless Congestion Control over Wired and Wireless IEEE 802.11 Networks
Seamless Congestion Control over Wired and Wireless IEEE 802.11 Networks Vasilios A. Siris and Despina Triantafyllidou Institute of Computer Science (ICS) Foundation for Research and Technology - Hellas
Referring to the above question, the end-to-end delay (transmission delay plus propagation delay) is
CS326e Quiz 3 The first correct 10 answers will be worth 1 point each. Each subsequent correct answer will be worth 0.2 points. Circle the correct answer. UTEID In the following 7 problems, we are sending
LAN Switching. 15-441 Computer Networking. Switched Network Advantages. Hubs (more) Hubs. Bridges/Switches, 802.11, PPP. Interconnecting LANs
LAN Switching 15-441 Computer Networking Bridges/Switches, 802.11, PPP Extend reach of a single shared medium Connect two or more segments by copying data frames between them Switches only copy data when
EECS 122: Introduction to Computer Networks Multiaccess Protocols. ISO OSI Reference Model for Layers
EECS 122: Introduction to Computer Networks Multiaccess Protocols Computer Science Division Department of Electrical Engineering and Computer Sciences University of California, Berkeley Berkeley, CA 94720-1776
15-441: Computer Networks Homework 2 Solution
5-44: omputer Networks Homework 2 Solution Assigned: September 25, 2002. Due: October 7, 2002 in class. In this homework you will test your understanding of the TP concepts taught in class including flow
Objectives. The Role of Redundancy in a Switched Network. Layer 2 Loops. Broadcast Storms. More problems with Layer 2 loops
ITE I Chapter 6 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 1 Objectives Implement Spanning Tree Protocols LAN Switching and Wireless Chapter 5 Explain the role of redundancy in a converged
Routing in packet-switching networks
Routing in packet-switching networks Circuit switching vs. Packet switching Most of WANs based on circuit or packet switching Circuit switching designed for voice Resources dedicated to a particular call
Attenuation (amplitude of the wave loses strength thereby the signal power) Refraction Reflection Shadowing Scattering Diffraction
Wireless Physical Layer Q1. Is it possible to transmit a digital signal, e.g., coded as square wave as used inside a computer, using radio transmission without any loss? Why? It is not possible to transmit
Internet Firewall CSIS 4222. Packet Filtering. Internet Firewall. Examples. Spring 2011 CSIS 4222. net15 1. Routers can implement packet filtering
Internet Firewall CSIS 4222 A combination of hardware and software that isolates an organization s internal network from the Internet at large Ch 27: Internet Routing Ch 30: Packet filtering & firewalls
Optimization of Communication Systems Lecture 6: Internet TCP Congestion Control
Optimization of Communication Systems Lecture 6: Internet TCP Congestion Control Professor M. Chiang Electrical Engineering Department, Princeton University ELE539A February 21, 2007 Lecture Outline TCP
Ring Local Area Network. Ring LANs
Ring Local Area Network Ring interface (1-bit buffer) Ring interface To station From station Ring LANs The ring is a series of bit repeaters, each connected by a unidirectional transmission link All arriving
Applications. Network Application Performance Analysis. Laboratory. Objective. Overview
Laboratory 12 Applications Network Application Performance Analysis Objective The objective of this lab is to analyze the performance of an Internet application protocol and its relation to the underlying
First Semester Examinations 2011/12 INTERNET PRINCIPLES
PAPER CODE NO. EXAMINER : Martin Gairing COMP211 DEPARTMENT : Computer Science Tel. No. 0151 795 4264 First Semester Examinations 2011/12 INTERNET PRINCIPLES TIME ALLOWED : Two Hours INSTRUCTIONS TO CANDIDATES
TCOM 370 NOTES 99-12 LOCAL AREA NETWORKS AND THE ALOHA PROTOCOL
1. Local Area Networks TCOM 370 NOTES 99-12 LOCAL AREA NETWORKS AND THE ALOHA PROTOCOL These are networks spanning relatively short distances (e.g. within one building) for local point-to-point and point-to-multipoint
Professor: Ian Foster TAs: Xuehai Zhang, Yong Zhao. Winter Quarter. www.classes.cs.uchicago.edu/classes/archive/2003/winter/54001-1
Professor: Ian oster Ts: Xuehai Zhang, Yong Zhao Winter Quarter www.classes.cs.uchicago.edu/classes/archive//winter/541-1 alculate the total time required to transfer a 1 KB file (RTT=1 ms, packet size
Prefix AggregaNon. Company X and Company Y connect to the same ISP, and they are assigned the prefixes:
Data Transfer Consider transferring an enormous file of L bytes from Host A to B using a MSS of 1460 bytes and a 66 byte header. What is the maximum value of L such that TCP sequence numbers are not exhausted?
Written examination in Computer Networks
Written examination in Computer Networks February 14th 2014 Last name: First name: Student number: Provide on all sheets (including the cover sheet) your last name, rst name and student number. Use the
Oscillations of the Sending Window in Compound TCP
Oscillations of the Sending Window in Compound TCP Alberto Blanc 1, Denis Collange 1, and Konstantin Avrachenkov 2 1 Orange Labs, 905 rue Albert Einstein, 06921 Sophia Antipolis, France 2 I.N.R.I.A. 2004
PictureTel H.323 Videoconferencing Network Bandwidth Analysis
PictureTel H.323 Videoconferencing Network Bandwidth Analysis by John Bartlett NSD Engineering PictureTel Corporation August 25, 1997 Introduction This document evaluates the network bandwidth required
Quality of Service versus Fairness. Inelastic Applications. QoS Analogy: Surface Mail. How to Provide QoS?
18-345: Introduction to Telecommunication Networks Lectures 20: Quality of Service Peter Steenkiste Spring 2015 www.cs.cmu.edu/~prs/nets-ece Overview What is QoS? Queuing discipline and scheduling Traffic
CSE331: Introduction to Networks and Security. Lecture 6 Fall 2006
CSE331: Introduction to Networks and Security Lecture 6 Fall 2006 Open Systems Interconnection (OSI) End Host Application Reference model not actual implementation. Transmits messages (e.g. FTP or HTTP)
The Quality of Internet Service: AT&T s Global IP Network Performance Measurements
The Quality of Internet Service: AT&T s Global IP Network Performance Measurements In today's economy, corporations need to make the most of opportunities made possible by the Internet, while managing
EECS 489 Winter 2010 Midterm Exam
EECS 489 Winter 2010 Midterm Exam Name: This is an open-book, open-resources exam. Explain or show your work for each question. Your grade will be severely deducted if you don t show your work, even if
College 5, Routing, Internet. Host A. Host B. The Network Layer: functions
CSN-s 5/1 College 5, Routing, Internet College stof 1 Inleiding: geschiedenis, OSI model, standaarden, ISOC/IETF/IRTF structuur Secties: 1.2, 1.3, 1.4, 1.5 2 Fysieke laag: Bandbreedte/bitrate Secties:
Final Exam. Route Computation: One reason why link state routing is preferable to distance vector style routing.
UCSD CSE CS 123 Final Exam Computer Networks Directions: Write your name on the exam. Write something for every question. You will get some points if you attempt a solution but nothing for a blank sheet
Transport and Network Layer
Transport and Network Layer 1 Introduction Responsible for moving messages from end-to-end in a network Closely tied together TCP/IP: most commonly used protocol o Used in Internet o Compatible with a
Performance Evaluation of Linux Bridge
Performance Evaluation of Linux Bridge James T. Yu School of Computer Science, Telecommunications, and Information System (CTI) DePaul University ABSTRACT This paper studies a unique network feature, Ethernet
CSE 473 Introduction to Computer Networks. Exam 2 Solutions. Your name: 10/31/2013
CSE 473 Introduction to Computer Networks Jon Turner Exam Solutions Your name: 0/3/03. (0 points). Consider a circular DHT with 7 nodes numbered 0,,...,6, where the nodes cache key-values pairs for 60
Local Area Networks transmission system private speedy and secure kilometres shared transmission medium hardware & software
Local Area What s a LAN? A transmission system, usually private owned, very speedy and secure, covering a geographical area in the range of kilometres, comprising a shared transmission medium and a set
RTT 60.5 msec receiver window size: 32 KB
Real-World ARQ Performance: TCP Ex.: Purdue UCSD Purdue (NSL): web server UCSD: web client traceroute to planetlab3.ucsd.edu (132.239.17.226), 30 hops max, 40 byte packets 1 switch-lwsn2133-z1r11 (128.10.27.250)
Congestion Control Review. 15-441 Computer Networking. Resource Management Approaches. Traffic and Resource Management. What is congestion control?
Congestion Control Review What is congestion control? 15-441 Computer Networking What is the principle of TCP? Lecture 22 Queue Management and QoS 2 Traffic and Resource Management Resource Management
Level 2 Routing: LAN Bridges and Switches
Level 2 Routing: LAN Bridges and Switches Norman Matloff University of California at Davis c 2001, N. Matloff September 6, 2001 1 Overview In a large LAN with consistently heavy traffic, it may make sense
IP Addressing A Simplified Tutorial
Application Note IP Addressing A Simplified Tutorial July 2002 COMPAS ID 92962 Avaya Labs 1 All information in this document is subject to change without notice. Although the information is believed to
EKSAMEN / EXAM TTM4100 18 05 2007
1.1 1.1.1...... 1.1.2...... 1.1.3...... 1.1.4...... 1.1.5...... 1.1.6...... 1.1.7...... 1.1.8...... 1.1.9...... 1.1.10.... 1.1.11... 1.1.16.... 1.1.12... 1.1.17.... 1.1.13... 1.1.18.... 1.1.14... 1.1.19....
>>> SOLUTIONS <<< c) The OSI Reference Model has two additional layers. Where are these layers in the stack and what services do they provide?
Midterm Exam for Computer Networks (CNT 4004) Fall 2013 >>> SOLUTIONS
Introduction. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross
Introduction Abusayeed Saifullah CS 5600 Computer Networks These slides are adapted from Kurose and Ross Roadmap 1.1 what is the Inter? 1.2 work edge end systems, works, links 1.3 work core packet switching,
Interconnection Networks. Interconnection Networks. Interconnection networks are used everywhere!
Interconnection Networks Interconnection Networks Interconnection networks are used everywhere! Supercomputers connecting the processors Routers connecting the ports can consider a router as a parallel
Dynamic Congestion-Based Load Balanced Routing in Optical Burst-Switched Networks
Dynamic Congestion-Based Load Balanced Routing in Optical Burst-Switched Networks Guru P.V. Thodime, Vinod M. Vokkarane, and Jason P. Jue The University of Texas at Dallas, Richardson, TX 75083-0688 vgt015000,
Solutions to the Sample Questions on Introduction
Solutions to the Sample Questions on Introduction NOTE: Pay close attention to units. A byte of storage is 8-bits, and 1 kilobits of storage is1024 bits. By convention, the rules are different between
Requirements of Voice in an IP Internetwork
Requirements of Voice in an IP Internetwork Real-Time Voice in a Best-Effort IP Internetwork This topic lists problems associated with implementation of real-time voice traffic in a best-effort IP internetwork.
First Midterm for ECE374 03/09/12 Solution!!
1 First Midterm for ECE374 03/09/12 Solution!! Instructions: Put your name and student number on each sheet of paper! The exam is closed book. You have 90 minutes to complete the exam. Be a smart exam
AN OVERVIEW OF QUALITY OF SERVICE COMPUTER NETWORK
Abstract AN OVERVIEW OF QUALITY OF SERVICE COMPUTER NETWORK Mrs. Amandeep Kaur, Assistant Professor, Department of Computer Application, Apeejay Institute of Management, Ramamandi, Jalandhar-144001, Punjab,
STANDPOINT FOR QUALITY-OF-SERVICE MEASUREMENT
STANDPOINT FOR QUALITY-OF-SERVICE MEASUREMENT 1. TIMING ACCURACY The accurate multi-point measurements require accurate synchronization of clocks of the measurement devices. If for example time stamps
ECE 333: Introduction to Communication Networks Fall 2002
ECE 333: Introduction to Communication Networks Fall 2002 Lecture 14: Medium Access Control II Dynamic Channel Allocation Pure Aloha In the last lecture we began discussing medium access control protocols
CROSS LAYER BASED MULTIPATH ROUTING FOR LOAD BALANCING
CHAPTER 6 CROSS LAYER BASED MULTIPATH ROUTING FOR LOAD BALANCING 6.1 INTRODUCTION The technical challenges in WMNs are load balancing, optimal routing, fairness, network auto-configuration and mobility
Controlled Random Access Methods
Helsinki University of Technology S-72.333 Postgraduate Seminar on Radio Communications Controlled Random Access Methods Er Liu [email protected] Communications Laboratory 09.03.2004 Content of Presentation
Homework 2 assignment for ECE374 Posted: 02/20/15 Due: 02/27/15
1 Homework 2 assignment for ECE374 Posted: 02/20/15 Due: 02/27/15 ote: In all written assignments, please show as much of your work as you can. Even if you get a wrong answer, you can get partial credit
THE UNIVERSITY OF AUCKLAND
COMPSCI 742 THE UNIVERSITY OF AUCKLAND SECOND SEMESTER, 2008 Campus: City COMPUTER SCIENCE Data Communications and Networks (Time allowed: TWO hours) NOTE: Attempt all questions. Calculators are NOT permitted.
A NOVEL RESOURCE EFFICIENT DMMS APPROACH
A NOVEL RESOURCE EFFICIENT DMMS APPROACH FOR NETWORK MONITORING AND CONTROLLING FUNCTIONS Golam R. Khan 1, Sharmistha Khan 2, Dhadesugoor R. Vaman 3, and Suxia Cui 4 Department of Electrical and Computer
COMP 361 Computer Communications Networks. Fall Semester 2003. Midterm Examination
COMP 361 Computer Communications Networks Fall Semester 2003 Midterm Examination Date: October 23, 2003, Time 18:30pm --19:50pm Name: Student ID: Email: Instructions: 1. This is a closed book exam 2. This
Lecture 15: Congestion Control. CSE 123: Computer Networks Stefan Savage
Lecture 15: Congestion Control CSE 123: Computer Networks Stefan Savage Overview Yesterday: TCP & UDP overview Connection setup Flow control: resource exhaustion at end node Today: Congestion control Resource
Lecture 16: Quality of Service. CSE 123: Computer Networks Stefan Savage
Lecture 16: Quality of Service CSE 123: Computer Networks Stefan Savage Final Next week (trust Blink wrt time/location) Will cover entire class Style similar to midterm I ll post a sample (i.e. old) final
Effects of Filler Traffic In IP Networks. Adam Feldman April 5, 2001 Master s Project
Effects of Filler Traffic In IP Networks Adam Feldman April 5, 2001 Master s Project Abstract On the Internet, there is a well-documented requirement that much more bandwidth be available than is used
Lecture 8 Performance Measurements and Metrics. Performance Metrics. Outline. Performance Metrics. Performance Metrics Performance Measurements
Outline Lecture 8 Performance Measurements and Metrics Performance Metrics Performance Measurements Kurose-Ross: 1.2-1.4 (Hassan-Jain: Chapter 3 Performance Measurement of TCP/IP Networks ) 2010-02-17
Basic Networking Concepts. 1. Introduction 2. Protocols 3. Protocol Layers 4. Network Interconnection/Internet
Basic Networking Concepts 1. Introduction 2. Protocols 3. Protocol Layers 4. Network Interconnection/Internet 1 1. Introduction -A network can be defined as a group of computers and other devices connected
Unit of Learning # 2 The Physical Layer. Sergio Guíñez Molinos [email protected] 2-2009
Unit of Learning # 2 The Physical Layer Sergio Guíñez Molinos [email protected] 2-2009 Local Area Network (LAN) Redes de Computadores 2 Historic topologies more used in LAN Ethernet Logical Bus and Physical
Operating Systems and Networks Sample Solution 1
Spring Term 2014 Operating Systems and Networks Sample Solution 1 1 byte = 8 bits 1 kilobyte = 1024 bytes 10 3 bytes 1 Network Performance 1.1 Delays Given a 1Gbps point to point copper wire (propagation
Configuring Network Address Translation (NAT)
8 Configuring Network Address Translation (NAT) Contents Overview...................................................... 8-3 Translating Between an Inside and an Outside Network........... 8-3 Local and
Communication Systems Internetworking (Bridges & Co)
Communication Systems Internetworking (Bridges & Co) Prof. Dr.-Ing. Lars Wolf TU Braunschweig Institut für Betriebssysteme und Rechnerverbund Mühlenpfordtstraße 23, 38106 Braunschweig, Germany Email: [email protected]
UPPER LAYER SWITCHING
52-20-40 DATA COMMUNICATIONS MANAGEMENT UPPER LAYER SWITCHING Gilbert Held INSIDE Upper Layer Operations; Address Translation; Layer 3 Switching; Layer 4 Switching OVERVIEW The first series of LAN switches
6.6 Scheduling and Policing Mechanisms
02-068 C06 pp4 6/14/02 3:11 PM Page 572 572 CHAPTER 6 Multimedia Networking 6.6 Scheduling and Policing Mechanisms In the previous section, we identified the important underlying principles in providing
