This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ECE 445: Computer Networks and Telecommunications Fall 2007 HW Solution 5 -- Due: November 8
Professor: Stephen Wicker TA: Prapun Suksompong 5.1 [5 pt] File transfer, remote login, and video on demand need connection-oriented service. On the other hand, credit card verification and other point-of-sale terminals, electronic funds transfer, and many forms of remote database access are inherently connectionless, with a query going one way and the reply coming back the other way. See also Figure 1.6 on p 33 of the textbook which is also given below.
Service Connectionoriented Reliable message stream Reliable byte stream Unreliable connection Unreliable datagram Connectionless Acknowledged datagram Request-reply Example Sequence of pages Remote login Digitized voice Electronic junk mail Registered mail Database query 5.5 [10 pt] Four hops means that five routers are involved. The virtual-circuit implementation of service. Fig. 1-16. Six different types uses 8 bytes of memory for 1000 sec. Note that although the cost of a router memory is 1 cent per byte when it is purchased, the cost of using it for only 1000 sec is significantly less than 1 cent per byte. This is because 1 cent per byte is the cost for using the router for two years. Assuming a 40-hour business week, a router memory can operate T = 2 52 40 3600 = 1.5 107 business sec. So, the cost of 40 bytes of memory is 1000 = 5.34 10-4 cents. 8 1 T There are five routers involved on average; hence the cost is 2.67 10-3 cents. For each packet, the datagram implementation requires transmitting 15 - 3 = 12 bytes of header over and above what the virtual-circuit implementation needs. The extra cost for 1 transmitting 200 packets over 4 hop is 4 200 106 12 = 9.6 10-3 cents. Therefore, virtual circuits are cheaper for this set of parameters. 5-1 ECE 445 5.9 [10 pt] HW Solution 5 -- Due: November 8 Fall 2007 Going via B gives (5, 0, , 12, 6, 2)+6 = (11, 6, , 18, 12, 8). Going via D gives (16, 12, , 0, 9, 10)+3 = (19, 15, , 3, 12, 13). Going via E gives (7, 6, , 9, 0, 4)+5 = (12, 11, , 14, 5, 9). Taking the minimum for each destination except C gives (11, 6, 0, 3, 5, 8). The outgoing lines are (B, B, -, D, E, B). 5.11 [5 pt] It always holds. If a packet has arrived on a line, it must be acknowledged. If no packet has arrived on a line, it must be sent there. The cases 00 (has not arrived and will not be sent) and 11 (has arrived and will be sent back) are logically incorrect and thus do not exist. 5.12 [10 pt] For an example, see the last paragraph on p 367 which continues on p 368. Suppose we have j clusters, each with k regions, each region having routers. Then, we want to find (j, k, ) such that jk = 4800 such that (j - 1) + (k - 1) + is minimized. The minimum occurs at 15 clusters, each with 16 regions, each region having 20 routers, or one of the equivalent forms, e.g., 20 clusters of 16 regions of 15 routers. (In other words, we can use any permutation of (15,16,20).) In all cases the table size is (15-1) + (16-1) + 20 = 49. 5.15 [5 pt] Node F currently has two descendants, A and D. It now acquires a third one, G, not circled because the packet that follows IFG is not on the sink tree. Node G acquires a second descendant, in addition to D, labeled F. This, too, is not circled as it does not come in on the sink tree.
I F A E H D G E C B L G H K G J O N M K N O DF L H B 5-2 packet recipients on these rounds are AC, DFIJ, DEGHIJKN, GHKN, and LMO, respectively. A total of 21 packets are generated. (b) The sink tree needs four rounds and 14 packets. 15. Node F currently has two descendants, A and D. It now acquires a third one, G, not circled because the packet that follows IFG is not on the sink tree. ECE 445 Fall Node G acquires HW Solution 5 -- in addition to D, labeled F. This, too, 2007 a second descendant, Due: November 8 is not circled as it does not come in on the sink tree.
5.16 [5 Multiple spanning trees are possible. One of One of them is: 16. pt] Multiple spanning trees are possible. them is:
C B F A E K J D I We only have getsmakepacket, it broadcasts it. However, I are satisfied.to get to I, 17. When H to the sure that the following conditions knows how so it does not broadcast. (a) The tree is a subgraph of the given graph. 18. Node H is three hops from B, so it takes three rounds to find the route. (b) Nodes A, B, C, D, E, F, I, and K are on the tree. 19. It can do it approximately, but not exactly. Suppose that there are 1024 node (c) No "unnecessarynode 300 included. (Thenode is pruned.) identifiers. If node" is is looking for tree 800, it is probably better to go clockwise, but it could happen that there are 20 actual nodes between 300 and 5.22 [10 pt] 800 going clockwise and only 16 actual nodes between them going counterclockwise. The purpose source host makes hashing function SHA-1 is to (a) Each packet emitted by theof the cryptographic either 1, 2, or 3 hops. The probability produce a very hop is p. The probability that it density is hops is same that it makes onesmooth distribution so that the node makes twoabout thep(1 - p). The all along the it makes 3 hops will always probability thatcircle. But there is (1 - p)2 . be statistical fluctuations, so the straightforward choice may be wrong. The mean path length a packet can expect to travel is then the weighted sum of these 20. Theprobabilities, or switches from 12 to 10. three node in entry 3 21. The protocol is terrible. Let time be slotted 2in units of T sec. In slot 1 the p + 2p(1 - p) + 3(1 - p) = p2 - 3p + 3. source router sends the first packet. At the start of slot 2, the second router has received the packet but cannot acknowledge it yet. At the start of slot 3, (b) The mean number of transmissions can be found by realizing that the probability of a the third router has received the packet, but it cannot acknowledge it either, successful transmission all the way is hanging. p)2 . From previous homework question so all the routers behind it are still = (1 - The first acknowledgement can (e.g. Q1.17), the expected number of transmissions is k (1 - )k-1 =
k=1 1 1 . = (1 - p)2 (c) Let N be the number of transmissions and Xk be the number of hops during the k th transmission. Then, the total number of hops required is
k=1 Xk . 5-3 ECE 445 HW Solution 5 -- Due: November 8 Fall 2007 By Wald's equation, EH = EXk EN which is simply the product of the answers from part (a) and (b). Hence, the total hops used is p2 - 3p + 3 EH = (5.1) . (1 - p)2 Alternatively, we can first find E [H|N ] and then calculate EH = E [E [H|N ]]. Note that conditioned on N = n, we always have Xn = 3. In other words, E [Xn |N = n] = 3. However, for k < n, the value of Xk can only be either 1 or 2. The corresponding expected number of hops for the case when k < n is E [Xk |N = n] = E [Xk |Xk = 3] = 1 Hence, E [H|N ] = (N - 1)h + 3. Therefore, the unconditional expected number of hops is then EH = E [E [H|N ]] = (EN - 1)h + 3 = Plugging in the expressions for h and gives (5.1). Note also that we can write EH = 3 + h(1 - ) . 1 - 1 h + 3. p p(1 - p) +2 h. p + p(1 - p) p + p(1 - p) 1 Of course, the factor is EN . It is also easy to verify that EXk = 3 + h(1 - ) by conditioning on the event [Xk = 3]; that is EXk = E [Xk |Xk = 3] P [Xk = 3] + E [Xk |Xk = 3] P [Xk = 3] . This brings us back to the fact that EH = EXk EN . 5.33 [5 pt] Encapsulate the packet in the payload field of a datagram belonging to the subnet being passed through and send it. 5-4 ...
View Full Document
- Fall '07
- Computer Networks