为了正常的体验网站,请在浏览器设置里面开启Javascript功能!

计算机网络第三版答案英文版

2017-09-28 50页 doc 533KB 33阅读

用户头像

is_079973

暂无简介

举报
计算机网络第三版答案英文版计算机网络第三版答案英文版 Computer Networking: A Top-Down Approach Featuring the Internet Solutions to Review Questions and Problems Version Date: December 1, 2002 ndThis document contains the solutions to review questions and problems for the 2 edition of Computer Networ...
计算机网络第三版答案英文版
计算机网络第三版英文版 Computer Networking: A Top-Down Approach Featuring the Internet Solutions to Review Questions and Problems Version Date: December 1, 2002 ndThis document contains the solutions to review questions and problems for the 2 edition of Computer Networking: A Top-Down Approach Featuring the Internet by Jim Kurose and Keith Ross. These solutions are being made available to instructors ONLY. Please do NOT copy or distribute this document to others (even other instructors). We?ll be happy to provide a copy (up-to-date) of this solution manual ourselves to anyone who asks. All material ? copyright 1996-2002 by J.F. Kurose and K.W. Ross. All rights reserved Chapter 1 Review Questions 1. There is no difference. Throughout this text, the words “host” and “end system” are used interchangeably. End systems include PCs, workstations, Web servers, mail servers, Internet-connected PDAs, WebTVs, etc. 2. Suppose Alice, an ambassador of country A wants to invite Bob, an ambassador of country B, over for dinner. Alice doesn?t simply just call Bob on the phone and say, “come to our dinner table now”. Instead, she calls Bob and suggests a date and time. Bob may respond by saying he?s not available that particular date, but he is available another date. Alice and Bob continue to send “messages” back and forth until they agree on a date and time. Bob then shows up at the embassy on the agreed date, hopefully not more than 15 minutes before or after the agreed time. Diplomatic protocols also allow for either Alice or Bob to politely cancel the engagement if they have reasonable excuses. 3. A networking program usually has two programs, each running on a different host, communicating with each other. The program that initiates the communication is the client. Typically, the client program requests and receives services from the server program. 4. The Internet provides its applications a connection-oriented service (TCP) and a connectionless service (UDP). Each Internet application makes use of one these two services. The two services will be discussed in detail in Chapter 3. Some of the principle characteristics of the connection-oriented service are: , Two end-systems first “handshake” before either starts to send application data to the other. , Provides reliable data transfer, i.e., all application data sent by one side of the connection arrives at the other side of the connection in order and without any gaps. , Provides flow control, i.e., it makes sure that neither end of a connection overwhelms the buffers in the other end of the connection by sending to many packets to fast. , Provides congestion control, i.e., regulates the amount of data that an application can send into the network, helping to prevent the Internet from entering a state of grid lock. The principle characteristics of connectionless service are: , No handshaking , No guarantees of reliable data transfer , No flow control or congestion control 5. Flow control and congestion control are two distinct control mechanisms with distinct objectives. Flow control makes sure that neither end of a connection overwhelms the buffers in the other end of the connection by sending to many packets to fast. Congestion control regulates the amount of data that an application can send into the network, helping to prevent congestion in the network core (i.e., in the buffers in the network routers). 6. The Internet?s connection-oriented service provides reliable data transfer by using acknowledgements and retransmissions. When one side of the connection doesn?t receive an acknowledgement (from the other side of the connection) for a packet it transmitted, it retransmits the packet. 7. A circuit-switched network can guarantee a certain amount of end-to-end bandwidth for the duration of a call. Most packet-switched networks today (including the Internet) cannot make any end-to-end guarantees for bandwidth. 8. In a packet switched network, the packets from different sources flowing on a link do not follow any fixed, pre-defined pattern. In TDM circuit switching, each host gets the same slot in a revolving TDM frame. 9. At time t the sending host begins to transmit. At time t= L/R, the sending host 01 1 completes transmission and the entire packet is received at the router (no propagation delay). Because the router has the entire packet at time t1, it can begin to transmit the packet to the receiving host at time t. At time t = t + L/R, the router completes 1212 transmission and the entire packet is received at the receiving host (again, no propagation delay). Thus, the end-to-end delay is L/R + L/R. 12 10. In a VC network, each packet switch in the network core maintains connection state information for each VC passing through it. Some of this connection state information is maintained to a VC-number translation table. (See page 25) 11. The cons of VCs include (i) the need to have a signaling protocol to set-up and tear- down the VCs; (ii) the need to maintain connection state in the packet switches. For the pros, some researchers and engineers argue that it is easier to provide QoS services - such as services that guarantee a minimum transmission rate or services that guarantee maximum end-to-end packet delay – when VCs are used. 12. One advantage of message segmentation is that it allows for pipelined transmission over a series of links, as discussed in the text. (See also online Java applet.) Imagine the store-and-forward delays in sending an MP3 or a DVD video as a single message! Another advantage is that without it, small messages can get stuck behind large messages in router buffers. 13. 1. Dial-up modem over telephone line: residential; 2. DSL over telephone line: residential or small office; 3. Cable to HFC: residential; 4. 100 Mbps switched Etherent: company; 5. Wireless LAN: mobile; 6. Cellular mobile access (for example, WAP): mobile 14. A tier-1 ISP connects to all other tier-1 ISPs; a tier-2 ISP connects to only a few of the tier-1 ISPs. Also, a tier-2 ISP is a customer of one or more tier-1 15. A POP is a group of one or more routers in an ISPs network at which routers in other ISPs can connect. NAPs are localized networks at which many ISPs (tier-1, tier-2 and lower-tier ISPs) can interconnect. 16. HFC bandwidth is shared among the users. On the downstream channel, all packets emanate from a single source, namely, the head end. Thus, there are no collisions in the downstream channel. 17. Ethernet LANs have transmission rates of 10 Mbps, 100 Mbps, 1 Gbps and 10 Gbps. For an X Mbps Ethernet (where X = 10, 100, 1,000 or 10,000), a user can continuously transmit at the rate X Mbps if that user is the only person sending data. If there are more than one active user, then each user cannot continuously transmit at X Mbps. 18. Ethernet most commonly runs over twisted-pair copper wire and “thin” coaxial cable. It also can run over fibers optic links and thick coaxial cable. 19. Dial up modems: up to 56 Kbps, bandwidth is dedicated; ISDN: up to 128 kbps, bandwidth is dedicated; ADSL: downstream channel is .5-8 Mbps, upstream channel is up to 1 Mbps, bandwidth is dedicated; HFC, downstream channel is 10-30 Mbps and upstream channel is usually less than a few Mbps, bandwidth is shared. 20. The delay components are processing delays, transmission delays, propagation delays, and queuing delays. All of these delays are fixed, except for the queuing delays, which are variable. 21. Five generic tasks are error control, flow control, segmentation and reassembly, multiplexing, and connection setup. Yes, these tasks can be duplicated at different layers. For example, error control is often provided at more than one layer. 22. The five layers in the Internet protocol stack are – from top to bottom – the application layer, the transport layer, the network layer, the link layer, and the physical layer. The principal responsibilities are outlined in Section 1.7.2. 23. Routers process layers 1 through 3. (This is a little bit of a white lie, as modern routers sometimes act as firewalls or caching components, and process layer four as well.) Chapter 1 Problems Problem 1. There is no single right answer to this question. Many protocols would do the trick. Here's a simple answer below: Messages from ATM machine to Server Msg name purpose -------- ------- HELO Let server know that there is a card in the ATM machine ATM card transmits user ID to Server PASSWD User enters PIN, which is sent to server BALANCE User requests balance WITHDRAWL User asks to withdraw money BYE user all done Messages from Server to ATM machine (display) Msg name purpose -------- ------- PASSWD Ask user for PIN (password) OK last requested operation (PASSWD, WITHDRAWL) OK ERR last requested operation (PASSWD, WITHDRAWL) in ERROR AMOUNT sent in response to BALANCE request BYE user done, display welcome screen at ATM Correct operation: client server HELO (userid) --------------> (check if valid userid) <------------- PASSWD PASSWD --------------> (check password) <------------- OK (password is OK) BALANCE --------------> <------------- AMOUNT WITHDRAWL --------------> check if enough $ to cover withdrawl <------------- OK ATM dispenses $ BYE --------------> <------------- BYE In situation when there's not enough money: HELO (userid) --------------> (check if valid userid) <------------- PASSWD PASSWD --------------> (check password) <------------- OK (password is OK) BALANCE --------------> <------------- AMOUNT WITHDRAWL --------------> check if enough $ to cover withdrawl <------------- ERR (not enough funds) error msg displayed no $ given out BYE --------------> <------------- BYE Problem 2. a) A circuit-switched network would be well suited to the application described, because the application involves long sessions with predictable smooth bandwidth requirements. Since the transmission rate is known and not bursty, bandwidth can be reserved for each application session circuit with no significant waste. In addition, we need not worry greatly about the overhead costs of setting up and tearing down a circuit connection, which are amortized over the lengthy duration of a typical application session. b) Given such generous link capacities, the network needs no congestion control mechanism. In the worst (most potentially congested) case, all the applications simultaneously transmit over one or more particular network links. However, since each link offers sufficient bandwidth to handle the sum of all of the applications' data rates, no congestion (very little queueing) will occur. Problem 3. a) We can n connections between each of the four pairs of adjacent switches. This gives a maximum of 4n connections. b) We can n connections passing through the switch in the upper-right-hand corner and another n connections passing through the switch in the lower-left-hand corner, giving a total of 2n connections. Problem 4. Tollbooths are 100 km apart, and the cars propagate at 100km/hr. A tollbooth services a car at a rate of one car every 12 seconds.(a) There are ten cars. It takes 120 seconds, or two minutes, for the first tollbooth to service the 10 cars. Each of these cars have a propagation delay of 60 minutes before arriving at the second tollbooth. Thus, all the cars are lined up before the second tollbooth after 62 minutes. The whole process repeats itself for traveling between the second and third tollbooths. Thus the total delay is 124 minutes. (b) Delay between tollbooths is 7*12 seconds plus 60 minutes, i.e., 61 minutes and 24 seconds. The total delay is twice this amount, i.e., 122 minutes and 48 seconds. Problem 5. (L,h)/Ra) The time to transmit one packet onto a link is . The time to deliver the first Q(L,h)/R(L,h)/Rof the packets to the destination is . Every seconds a new M packet from the remaining packets arrives at the destination. Thus the total latency M,1 is . t,(Q,M,1)(L,h)/Rs (Q,M,1)(L,2h)/Rb) (LM,2h)/Rc) The time required to transmit the message over one link is . The time Q(LM,2h)/RQrequired to transmit the message over links is . d) Because there is no store-and-forward delays at the links, the total delay is . t,(h,ML)/Rs Problem 7. F/SFirst assume that is an integer. The delay is S,hF1Fh,,,,,,,1,F,S,h,, ,,,,,,RSRS,,,,,, hwhere = 40. F/SIf is not an integer, then the delay is F,,F,S,h,,S,hF1F,,,,S,,,,,,,,. ,1,,F,S,2h,h,,,,,,,,,,RSRRS,,,,,,,,,, In general, the delay is 1F,,,, F,h,S,h,,,,RS,,,, which is approximately equal to 1hF,,F,h,S,. ,,RS,, hFTaking the derivative of and setting to 0 gives S,S . S,Fhmin Problem 8. a) d,m/s seconds. prop b) seconds. d,L/Rtrans c) seconds. d,(m/s,L/R)end,to,end d) The bit is just leaving Host A. e) The first bit is in the link and has not reached Host B. f) The first bit has reached Host B. g) Want L1008km. ,,m,S,2.5,10,8933R28,10 Problem 9. Consider the first bit in a packet. Before this bit can be transmitted, all of the bits in the packet must be generated. This requires 48,8sec=6msec. 364,10 The time required to transmit the packet is 48,8384,sec=sec. 61,10 Propagation delay = 2 msec. The delay until decoding is 384,6msec +sec + 2msec = 8.384msec A similar analysis shows that all bits experience a delay of 8.384 msec. Problem 10. a) 10 users can be supported because each user requires one tenth of the bandwidth. p,0.1b) . 40,,40,nnc) . ,,p1,p,,,,n,, 940,,,n40nd) . ,,1,p1,p,,,,,nn,0,, We use the central limit theorem to approximate this probability. Let X be independent j ,,random variables such that PX,1,p. j 40,,,,,,1,PX,10“11 or more users” ,P,j,,,j1,, 40,,40X,4,,,j6,j1,,,,PXP,10,, ,j,,,,400.10.9400.10.9,,,,,,,j1,,,, 6,, ,,,PZ,,PZ,3.16,,3.6,, ,0.999 when is a standard normal r.v. Thus “10 or more users”. Z,,,0.001P Problem 11. a) 10,000 MM,,,Mnnb) ,,,,p1,p,,,n,,1nN,, Problem 12. LN/RIt takes seconds to transmit the packets. Thus, the buffer is empty when a N batch of packets arrive. N The first of the packets has no queueing delay. The 2nd packet has a queueing delay N (n,1)L/RL/Rof seconds. The th packet has a delay of seconds. n The average delay is NN,1111(1)(1)LLN,NLN,(1)/n,LR,n,,. ,,22NRNRNRn,1n,0 Problem 13. L/Ra) The transmission delay is . The total delay is ILLL/R,, R(1,I)R1,I x,L/Rb) Let . xTotal delay = 1,ax Problem 14. qQN,1da) There are nodes (the source host and the routers). Let denote the proc qRprocessing delay at the th node. Let be the transmission rate of the th link and let qq qqqdd,L/R. Let be the propagation delay across the th link. Then qproptrans Qqqq,,d,d,d,d. ,,,endtoendproctransprop,1q qdb) Let denote the average queueing delay at node . Then qqueue Qqqqq,,d,d,d,d,d. ,,,endtoendproctranspropqueue,1q Problem 15. The command: traceroute -q 20 www.eurecom.fr will get 20 delay measurements from the issuing host to the host, www.eurecom.fr. The average and standard deviation of these 20 measurements can then be collected. Do you see any differences in your answers as a function of time of day? Problem 16. a) 40,000 bits b) 40,000 bits c) the bandwidth-delay product of a link is the maximum number of bits that can be in the link d) 1 bit is 250 meters long, which is longer than a football field e) s/R Problem 17. 25 bps Problem 18. a) 40,000,000 bits b) 400,000 bits c) .25 meters Problem 19. a) t + t = 400 msec + 40 msec = 440 msec transprop b) 10 * (t + 2 t) = 10*(40 msec + 80 msec) = 1.2 sec transprop Problem 20. a) 150 msec b) 1,500,000 bits c) 600,000,000 bits Problem 21. Let?s suppose the passenger and his/her bags correspond to the data unit arriving to the top of the protocol stack. When the passenger checks in, his/her bags are checked, and a tag is attached to the bags and ticket. This is additional information added in the Baggage layer if Figure 1.20 that allows the Baggage layer to implement the service or separating the passengers and baggage on the sending side, and then reuniting them (hopefully!) on the destination side. When a passenger then passes through security, and additional stamp is often added to his/her ticket, indicating the at the passenger has passed through a security check. This information is used to ensure (e.g., by later checks for the security information) secure transfer of people. Chapter 2 Review Questions 1. The Web: HTTP; file transfer: FTP; remote login: Telnet; Network News: NNTP; e- mail: SMTP. 2. The host that initiates the communication session is the client. 3. The IP address of the destination hosts and the port numbers of the destination socket. 4. You probably use a browser and a mail reader on a daily basis. You may also use an FTP user agent, a Telnet user agent, an audio/video player user agent (such as a Real Networks player), an instant messaging agent, a P2P file-sharing agent, etc. 6. A protocol uses handshaking if the two communicating entities first exchange control packets before sending data to each other. SMTP uses handshaking at the application layer whereas HTTP does not. 7. The applications that use those protocols require that all application data is received in the correct order and without gaps. TCP provides this service whereas UDP does not. 8. In both cases, the site must keep a database record for the user. With HTTP authentication, the user first registers with the site. During each subsequent visit, the user provides a username and password, which allows the site to identify the user and update the user?s record. With cookies, the user does not explicitly provide a username and password each time it visits the site. However, browser identifies the user by sending the user?s cookie number each time the user accesses the site. 10. In persistent HTTP without pipelining, the browser first waits to receive a HTTP response from the server before issuing a new HTTP request. In persistent HTTP with pipelining, the browser issues requests as soon as it has a need to do so, without waiting for response messages from the server. 11. FTP uses two parallel TCP connections, one connection for sending control information (such as a request to transfer a file) and another connection for actually transferring the file. Because the control information is not sent over the same connection that the file is sent over, FTP sends control information out of band. 12. Message is sent from Alice?s host to her mail server over HTTP. Alice?s mail server then sends the message to Bob?s mail server over SMTP. Bob then transfers the message from his mail server to his host over POP3. 13. Will contain the header line Content-Type: application/msexcel . 15. With download and delete, after a user retrieves its messages from a POP server, the messages are deleted. This poses a problem for the nomadic user, who may want to access the messages from many different machines (office PC, home PC, etc.). In the download and keep configuration, messages are not deleted after the user retrieves the messages. This can also be inconvenient, as each time the user retrieves the stored messages from a new machine, all of non-deleted messages will be transferred to the new machine (including very old messages). 16. See online Java applet. 17. A host?s authoritative name server provides the “official” translation of a hostname to an IP address (among other things). A host?s local name server is a proxy to the DNS system: the host first queries its local name server for a mapping; the local name server then obtains the mapping on the behalf of the querying host. 18. Yes an organization?s mail server and Web server can have the same alias for a host name. The MX record is used to map the mail server?s host name to its IP address. 19. You can find a link to nslookup at the online site. 20. With the UDP server, there is no welcoming socket, and all data from different clients enters the server through this one socket. With the TCP server, there is a welcoming socket, and each time a client initiates a connection to the server, a new socket is created. Thus, to support n simultaneous connections, the server would need n+1 sockets. 21. For the TCP application, as soon as the client is executed, it attempts to initiate a TCP connection with the server. If the TCP server is not running, then the client will fail to make a connection. For the UDP application, the client does not initiate connections (or attempt to communicate with the UDP server) immediately upon execution. 22. Web caching can bring the desired content “closer” to the user, perhaps to the same LAN to which the user?s host is connected. Web caching can reduce the delay for all objects, even objects that are not cached, since caching reduces the traffic on links. 23. Web caches can (and often do!) use the conditional GET for checking freshness. The idea is exactly the same as for user-host caching. 24. DNS is often used for redirection in a CDN. When a host receives an HTML page from a Web server, the page can contain references to objects in the CDN. The host will then do a DNS lookup to get the IP address of the CDN. DNS can then redirect the host to best CDN server for the host. 25. The overlay network in a P2P file sharing system consists of the nodes participating in the file sharing system and the logical links between the nodes. There is a logical directed link (a “directed edge” in graph theory terms) from node A to node B if node A sends datagrams that are explicitly addressed to node B?s IP address. An overlay network does not include routers. With Gnutella, when a node wants to join the Gnutella network, it first discovers (“out of band”) the IP address of one or more nodes already in the network. It then sends join messages to these nodes. When the node receives confirmations, it becomes a member of the of Gnutella network. Nodes maintain their logical links with periodic refresh messages. 26. Three companies as of this writing (August 2002) are KaZaA, Groove, and eDonkey. Chapter 2 Problems Problem 1. a) F b) T c) F d) F Problem 2. Access control commands: USER, PASS, ACT, CWD, CDUP, SMNT, REIN, QUIT. Transfer parameter commands: PORT, PASV, TYPE STRU, MODE. Service commands: RETR, STOR, STOU, APPE, ALLO, REST, RNFR, RNTO, ABOR, DELE, RMD, MRD, PWD, LIST, NLST, SITE, SYST, STAT, HELP, NOOP. Problem 3. SFTP: 115, NNTP: 119. Problem 4. Application layer protocols: DNS and HTTP Transport layer protocols: UDP for DNS; TCP for HTTP Problem 5. Persistent connections are discussed in section 8 of RFC 2616 (the real goal of this question was to get you to retrieve and read an RFC). Sections 8.1.2 and 8.1.2.1 of the RFC indicate that either the client or the server can indicate to the other that it is going to close the persistent connection. It does so by including the including the connection-token "close" in the Connection-header field of the http request/reply. Problem 6. The total amount of time to get the IP address is . RTT,RTT,?,RTT12n Once the IP address is known, elapses to set up the TCP connection and another RTTO elapses to request and receive the small object. The total response time is RTTO 2RTT,RTT,RTT,?,RTTo12n Problem 7. a) RTT,?,RTT,2RTT,3,2RTT1noo . ,8RTT,RTT,?,RTTo1n b) RTT,?,RTT,2RTT,2RTT1noo . ,4RTT,RTT,?,RTTo1n c) RTT,?,RTT,2RTT,RTT1noo . ,3RTT,RTT,?,RTTo1n Problem 8. HTTP/1.0: GET, POST, HEAD. HTTP/1.1: GET, POST, HEAD, OPTIONS, PUT, DELETE, TRACE, CONNECT. See RFCs for explanations. Problem 10. UIDL abbreviates “unique-ID listing”. When a POP3 client issues the UIDL command, the server responds with the unique message ID for all of the messages present in the users mailbox. This command is useful for “download and keep”. By keeping a file that lists the messages retrieved in earlier sessions, the client can use the UIDL command to determine which messages on the server have already been seen. Problem 11. a) If you run TCPClient first, then the client will attempt to make a TCP connection with a non-existent server process. A TCP connection will not be made. b) UDPClient doesn't establish a TCP connection with the server. Thus, everything should work fine if you first run UDPClient, then run UDPServer, and then type some input into the keyboard. c) If you use different port numbers, then the client will attempt to establish a TCP connection with the wrong process or a non-existent process. Errors will occur. Problem 12. See Web-server programming assignment for this chapter for guidance. Problem 13. a) The time to transmit an object of size L over a link or rate R is L/R. The average time is the average size of the object divided by R: ,= (900,000 bits)/(1,500,000 bits/sec) = .6 sec The traffic intensity on the link is (1.5 requests/sec)(.6 msec/request) = .9. Thus, the average access delay is (.6 sec)/(1 - .9) = 6 seconds. The total average response time is therefore 6 sec + 2 sec = 8 sec. b) The traffic intensity on the access link is reduced by 40% since the 40% of the requests are satisfied within the institutional network. Thus the average access delay is (.6 sec)/[1 – (.6)(.9)] = 1.2 seconds. The response time is approximately zero if the request is satisfied by the cache (which happens with probability .4); the average response time is 1.2 sec + 2 sec = 3.2 sec for cache misses (which happens 60% of the time). So the average response time is (.4)(0 sec) + (.6)(3.2 sec) = 1.92 seconds. Thus the average response time is reduced from 8 sec to 1.92 sec. Problem 14. a) umass.edu is directed to cache-1; eurecom.fr is directed to cache-2; upenn.edu is directed to cache-1; wimba.com is directed to cache-1; w3c.org is directed to cache-0; ietf.org is directed to cache-2; awl.com is directed to cache-1. b) This hashing scheme only takes into account the hostname part of the URL. Thus all browser requests for these objects will be directed to cache-1. For each of these objects, the first request to cache-1 will be a cache miss; cache-1 will retrieve the document from the origin server (at UPenn) and then forward the document to the requesting browser. The subsequent requests for the same object will be cache hits, and will be satisfied directly from cache-1. c) It turns out that the www.upenn.edu objects still belong in cache-1. However, the cache in which other objects belong may change. For example, a www.eurecom.fr object now belongs in a different cache. This results in a cache miss for the first request for the www.eurecom.fr object. Although subsequent requests for the same object will be cache hits, now two caches have a copy of the object. Eventually, the object will be purged from the original cache since it no longer gets requests for that object. Problem 15. a) The base document of the second request is likely an HTML file. Since only foo.com?s images are distributed through the CDN, the HTTP request will be sent all the way to www.foo.com for the HTML file. Thus, yes, the origin server will be contacted. b) We can assume that the IP addresses for both www.foo.com and www.cdn.com are stored in the local DNS name server before the second request. Thus, neither the authoritative nor the root DNS servers are contacted in this example. Problem 16. a) Before the browser sends an HTTP request, it queries DNS for the IP address of the www.foo.com. If the DNS query reaches the authoritative server for www.foo.com, the authoritative name server will return the IP address of the best CDN server (often the closest) to satisfy the request. The HTTP request will be sent directly to the CDN server. After this first query, this hostname-to-IP address mapping will be in the cache of the local DNS name server. Hence, subsequent HTTP requests for other foo.com objects will be handled directly by the CDN server. In conclusion, none of the HTTP requests reaches the origin server. b) One obvious advantage is that average response times experienced by users will be smaller, since all objects are served directly out of CDN server. One obvious disadvantage is that content provider no longer has control about which objects are distributed by the CDN and which are distributed directly by the content provider. Problem 17. No. Because the link is full duplex, you have 128 kbps in each direction, and the uploading does not interfere with the downloading. Problem 18. Alice sends her query to at most N neighbors. Each of these neighbors forwards the query to at most M = N-1 neighbors. Each of those neighbors forwards the query to at most M neighbors. Thus the maximum number of query messages is 2(K-1)N + NM + NM + … + NM 2(K-1)= N(1 + M + M + … + M ) K= N(1-M)/(1-M) K= N[(N-1)- 1]/(N-2) . Problem 19. With the original line, UDPClient does not specify a port number when it creates the socket. In this case, the code lets the underlying operating system choose a port number. With the replacement line, when UDPClient is executed, a UDP socket is created with port number 5432 . UDPServer needs to know the client port number so that it can send packets back to the correct client socket. Glancing at UDPServer, we see that the client port number is not “hard-wired” into the server code; instead, UDPServer determines the client port number by unraveling the datagram it receives from the client (using the .getPort() method). Thus UDP server will work with any client port number, including 5432. UDPServer therefore does not need to be modified. Before: Client socket = x (chosen by OS) Server socket = 9876 After: Client socket = 5432 Server socket = 9876 Chapter 3 Review Questions 1. Source port number y and destination port number x. 2. An application developer may not want its application to use TCP?s congestion control, which can throttle the application?s sending rate at times of congestion. Often, designers of IP telephony and IP videoconference applications choose to run their applications over UDP because they want to avoid TCP?s congestion control. Also, some applications do not need the reliable data transfer provided by TCP. 3. Yes. The application developer can put reliable data transfer into the application layer protocol. This would require a significant amount of work and debugging, however. 4. a) false b) false c) true d) false e) true f) false g) false 5. a) 20 bytes b) ack number = 90 6. 3 segments. First segment: seq = 43, ack =80; Second segment: seq = 80, ack = 44 ; Third segment; seq = 44, ack = 81 7. R/2 8. False, it is set to half of the current value of the congestion window. Chapter 3 Problems Problem 1. source port destination port numbers numbers 467 23 a) AS , 513 23 b) BS , 23 467 c) SA , 23 513 d) SB , e) Yes. f) No. Problem 2. Suppose the IP addresses of the hosts A, B, and C are a, b, c, respectively. (Note that a,b,c are distinct.) To host A: Source port =80, source IP address = b, dest port = 26145, dest IP address = a To host C, left process: Source port =80, source IP address = b, dest port = 7532, dest IP address = c To host C, right process: Source port =80, source IP address = b, dest port = 26145, dest IP address = c Problem 3. 01010101 11000101,01110000 11000101 ,01001100 00010001 One's complement = 1 1 1 0 1 1 1 0. To detect errors, the receiver adds the four words (the three original words and the checksum). If the sum contains a zero, the receiver knows there has been an error. All one-bit errors will be detected, but two-bit errors can be undetected (e.g., if the last digit of the first word is converted to a 0 and the last digit of the second word is converted to a 1). Problem 4. Suppose the sender is in state “Wait for call 1 from above” and the receiver (the receiver shown in the homework problem) is in state “Wait for 1 from below.” The sender sends a packet with sequence number 1, and transitions to “Wait for ACK or NAK 1,” waiting for an ACK or NAK. Suppose now the receiver receives the packet with sequence number 1 correctly, sends an ACK, and transitions to state “Wait for 0 from below,” waiting for a data packet with sequence number 0. However, the ACK is corrupted. When the rdt2.1 sender gets the corrupted ACK, it resends the packet with sequence number 1. However, the receiver is waiting for a packet with sequence number 0 and (as shown in the home work problem) always sends a NAK when it doesn't get a packet with sequence number 0. Hence the sender will always be sending a packet with sequence number 1, and the receiver will always be NAKing that packet. Neither will progress forward from that state. Problem 5. To best answer this question, consider why we needed sequence numbers in the first place. We saw that the sender needs sequence numbers so that the receiver can tell if a data packet is a duplicate of an already received data packet. In the case of ACKs, the sender does not need this info (i.e., a sequence number on an ACK) to tell detect a duplicate ACK. A duplicate ACK is obvious to the rdt3.0 receiver, since when it has received the original ACK it transitioned to the next state. The duplicate ACK is not the ACK that the sender needs and hence is ignored by the rdt3.0 sender. Problem 6. The sender side of protocol rdt3.0 differs from the sender side of protocol 2.2 in that timeouts have been added. We have seen that the introduction of timeouts adds the possibility of duplicate packets into the sender-to-receiver data stream. However, the receiver in protocol rdt.2.2 can already handle duplicate packets. (Receiver-side duplicates in rdt 2.2 would arise if the receiver sent an ACK that was lost, and the sender then retransmitted the old data). Hence the receiver in protocol rdt2.2 will also work as the receiver in protocol rdt 3.0. Problem 7. Suppose the protocol has been in operation for some time. The sender is in state “Wait for call from above” (top left hand corner) and the receiver is in state “Wait for 0 from below”. The scenarios for corrupted data and corrupted ACK are shown in Figure 1. Sender sends M0 M0 corrupted Packet garbled, receiver A1 resends last ACK (A1) Sender ignores A1 Corrupted Timeout: sender M0 data resends M0 A0 M1 A1 M0 sender sends M0 A0 sender sends M1 M1 Corrupted ACK A1 corrupted Ignore ACK M1 Timeout: sender resends M1 A1 M0 Figure 1: rdt 3.0 scenarios: corrupted data, corrupted ACK Problem 8. Here, we add a timer, whose value is greater than the known round-trip propagation delay. We add a timeout event to the “Wait for ACK or NAK0” and “Wait for ACK or NAK1” states. If the timeout event occurs, the most recently transmitted packet is retransmitted. Let us see why this protocol will still work with the rdt2.1 receiver. , Suppose the timeout is caused by a lost data packet, i.e., a packet on the sender- to-receiver channel. In this case, the receiver never received the previous transmission and, from the receiver's viewpoint, if the timeout retransmission is received, it look exactly the same as if the original transmission is being received. , Suppose now that an ACK is lost. The receiver will eventually retransmit the packet on a timeout. But a retransmission is exactly the same action that is take if an ACK is garbled. Thus the sender's reaction is the same with a loss, as with a garbled ACK. The rdt 2.1 receiver can already handle the case of a garbled ACK. Problem 9. The protocol would still work, since a retransmission would be what would happen if the packet received with errors has actually been lost (and from the receiver standpoint, it never knows which of these events, if either, will occur). To get at the more subtle issue behind this question, one has to allow for premature timeouts to occur (which is not what the question asked, sorry). In this case, if each extra copy of the packet is ACKed and each received extra ACK causes another extra copy of the current packet to be sent, the number of times packet is sent will increase without n bound as approaches infinity. n Problem 10. M0 A0 M1 A1 M0 M0 old version of M0 A0 accepted! M1 A1 Problem 11. In a NAK only protocol, the loss of packet x is only detected by the receiver when packet x+1 is received. That is, the receivers receives x-1 and then x+1, only when x+1 is received does the receiver realize that x was missed. If there is a long delay between the transmission of x and the transmission of x+1, then it will be a long time until x can be recovered, under a NAK only protocol. On the other hand, if data is being sent often, then recovery under a NAK-only scheme could happen quickly. Moreover, if errors are infrequent, then NAKs are only occasionally sent (when needed), and ACK are never sent – a significant reduction in feedback in the NAK-only case over the ACK-only case. Problem 12. It takes 8 microseconds (or 0.008 milliseconds) to send a packet. in order for the sender to be busy 90 percent of the time, we must have util,0.9,(0.008n)/30.016 or approximately 3377 packets. n Problem 13. In our GBN reliable data transfer protocol, the sender keep sending packets until it n,1receives a NAK. A NAK is generated for packet only if all packets up to have n been correctly received. That is, is always the smallest sequence number of a packet n that is yet to be received. When the receives a NAK for packet , it simply begins ending n again from packet onwards. This is like the GBN protocol in the text, except that there n is no maximum number of unacknowledged packets in the pipeline. Note the sender can't actually know how many packets are unacknowledged. If the current sequence number if k and the last NAK was for packet , then there may be as many as n k,(n,1)unacknowledged packets in the pipeline. Note also that a receiver does not know that packet n is missing until a packet with a higher sequence number is received! (The "gap" in the sequence numbers of received packets tells the receiver that a packet in the gap is lost). Thus, when the data rate is low (i.e., a large amount of time between packet transmissions), it will take longer for a receiver to notice a missing packet than when the data rate is high. Problem 14. In our solution, the sender will wait until it receives an ACK for a pair of messages (seqnum and seqnum+1) before moving on to the next pair of messages. Data packets have a data field and carry a two-bit sequence number. That is, the valid sequence numbers are 0, 1, 2, and 3. (Note: you should think about why a 1-bit sequence number space of 0, 1 only would not work in the solution below.) ACK messages carry the sequence number of the data packet they are acknowledging. The FSM for the sender and receiver are shown in Figure 2. Note that the sender state records whether (i) no ACKs have been received for the current pair, (ii) an ACK for seqnum (only) has been received, or an ACK for seqnum+1 (only) has been received. In this figure, we assume that the seqnum is initially 0, and that the sender has sent the first two data messages (to get things going). A timeline trace for the sender and receiver recovering from a lost packet is shown below: Figure 2: Sender and receiver for Problem 3.11 Sender Receiver make pair (0,1) send packet 0 Packet 0 drops send packet 1 receive packet 1 buffer packet 1 send ACK 1 receive ACK 1 (timeout) resend packet 0 receive packet 0 deliver pair (0,1) send ACK 0 receive ACK 0 Problem 15. This problem is a variation on the simple stop and wait protocol (rdt3.0). Because the channel may lose messages and because the sender may resend a message that one of the receivers has already received (either because of a premature timeout or because the other receiver has yet to receive the data correctly), sequence numbers are needed. As in rdt3.0, a 0-bit sequence number will suffice here. The sender and receiver FSM are shown in Figure 3. In this problem, the sender state indicates whether the sender has received an ACK from B (only), from C (only) or from neither C nor B. The receiver state indicates which sequence number the receiver is waiting for. Problem 16. a) Here we have a window size of N=3. Suppose the receiver has received packet k-1, and has ACKed that and all other preceeding packets. If all of these ACK's have been received by sender, then sender's window is [k, k+N-1]. Suppose next that none of the ACKs have been received at the sender. In this second case, the sender's window contains k-1 and the N packets up to and including k-1. The sender's window is thus [k-N,k-1]. By these arguments, the senders window is of size 3 and begins somewhere in the range [k-N,k]. b) If the receiver is waiting for packet k, then it has received (and ACKed) packet k-1 and the N-1 packets before that. If none of those N ACKs have been yet received by the sender, then ACK messages with values of [k-N,k-1] may still be propagating back. Because the sender has sent packets [k-N, k-1], it must be the case that the sender has already received an ACK for k-N-1. Once the receiver has sent an ACK for k-N-1 it will never send an ACK that is less that k-N-1. Thus the range of in-flight ACK values can range from k-N-1 to k-1. Figure 3. Sender and receiver for Problem 3.12 Problem 17. Because the A-to-B channel can lose request messages, A will need to timeout and retransmit its request messages (to be able to recover from loss). Because the channel delays are variable and unknown, it is possible that A will send duplicate requests (i.e., resend a request message that has already been received by B). To be able to detect duplicate request messages, the protocol will use sequence numbers. A 1-bit sequence number will suffice for a stop-and-wait type of request/response protocol. A (the requestor) has 4 states: , “Wait for Request 0 from above.” Here the requestor is waiting for a call from above to request a unit of data. When it receives a request from above, it sends a request message, R0, to B, starts a timer and makes a transition to the “Wait for D0” state. When in the “Wait for Request 0 from above” state, A ignores anything it receives from B. , “Wait for D0”. Here the requestor is waiting for a D0 data message from B. A timer is always running in this state. If the timer expires, A sends another R0 message, restarts the timer and remains in this state. If a D0 message is received from B, A stops the time and transits to the “Wait for Request 1 from above” state. If A receives a D1 data message while in this state, it is ignored. , “Wait for Request 1 from above.” Here the requestor is again waiting for a call from above to request a unit of data. When it receives a request from above, it sends a request message, R1, to B, starts a timer and makes a transition to the “Wait for D1” state. When in the “Wait for Request 1 from above” state, A ignores anything it receives from B. , “Wait for D1”. Here the requestor is waiting for a D1 data message from B. A timer is always running in this state. If the timer expires, A sends another R1 message, restarts the timer and remains in this state. If a D1 message is received from B, A stops the timer and transits to the “Wait for Request 0 from above” state. If A receives a D0 data message while in this state, it is ignored. The data supplier (B) has only two states: , “Send D0.” In this state, B continues to respond to received R0 messages by sending D0, and then remaining in this state. If B receives a R1 message, then it knows its D0 message has been received correctly. It thus discards this D0 data (since it has been received at the other side) and then transits to the “Send D1” state, where it will use D1 to send the next requested piece of data. , “Send D1.” In this state, B continues to respond to received R1 messages by sending D1, and then remaining in this state. If B receives a R1 message, then it knows its D1 message has been received correctly and thus transits to the “Send D1” state. Problem 18. In order to avoid the scenario of Figure 3.26, we want to avoid having the leading edge of the receiver's window (i.e., the one with the “highest” sequence number) wrap around in the sequence number space and overlap with the trailing edge (the one with the "lowest" sequence number in the sender's window). That is, the sequence number space must be large enough to fit the entire receiver window and the entire sender window without this overlap condition. So - we need to determine how large a range of sequence numbers can be covered at any given time by the receiver and sender windows (see Problem 13). Suppose that the lowest-sequence number that the receiver is waiting for is packet m. In this case, it's window is [m,m+w-1] and it has received (and ACKed) packet m-1 and the w-1 packets before that, where w is the size of the window. If none of those w ACKs have been yet received by the sender, then ACK messages with values of [m-w,m-1] may still be propagating back. If no ACKs with these ACK numbers have been received by the sender, then the sender's window would be [m-w,m-1]. Thus, the lower edge of the sender's window is m-w, and the leading edge of the receivers window is m+w-1. In order for the leading edge of the receiver's window to not overlap with the trailing edge of the sender's window, the sequence number space must thus be big enough to accommodate 2w sequence numbers. That is, the sequence number k,2wspace must be at least twice as large as the window size, . Problem 19. t0a) True. Suppose the sender has a window size of 3 and sends packets 1, 2, 3 at . At (t1,t0)(t2,t1)t1t2 the receiver ACKS 1, 2, 3. At the sender times out and t3resends 1, 2, 3. At the receiver receives the duplicates and re-acknowledges 1, 2, t4t13. At the sender receives the ACKs that the receiver sent at and advances its t2window to 4, 5, 6. At t5 the sender receives the ACKs 1, 2, 3 the receiver sent at . These ACKs are outside its window. b) True. By essentially the same scenario as in (a). c) True. d) True. Note that with a window size of 1, SR, GBN, and the alternating bit protocol are functionally equivalent. The window size of 1 precludes the possibility of out-of-order packets (within the window). A cumulative ACK is just an ordinary ACK in this situation, since it can only refer to the single packet within the window. Problem 20. 32There are possible sequence numbers. 2,4,294,967,296 a) The sequence number does not increment by one with each segment. Rather, is increments by the number of bytes of data sent. So the size of the MSS is irrelevant -- the maximum size file that can be sent from A to B is simply the number of bytes 32representable by . 2,4.19 Gbytes 32,,2,2,941,758b) The number of segments is . 66 bytes of header get added to each ,,1460,, segment giving a total of 194,156,028 bytes of header. The total number of bytes 327transmitted is bits. 2,194,156,028,3,591,10 Thus it would take 3,591 seconds = 59 minutes to transmit the file over a 10~Mbps link. Problem 21. (n)EstimatedRTTDenote for the estimate after the nth sample. (1) EstimatedRTT,SampleRTT1 (2) EstimatedRTT,xSampleRTT,(1,x)SampleRTT12 (3) EstimatedRTT,xSampleRTT1 ,(1,x)[xSampleRTT,(1,x)SampleRTT]23 ,xSampleRTT,(1,x)xSampleRTT12 2 ,(1,x)SampleRTT3 (4)(3) EstimatedRTT,xSampleRTT,(1,x)EstimatedRTT1 ,xSampleRTT,(1,x)xSampleRTT12 23 ,(1,x)xSampleRTT,(1,x)SampleRTT34 b) n,1nj()EstimatedRTT,x(1,x)SampleRTT ,jj,1 n ,(1,x)SampleRTTn c) ,x()j,EstimatedRTT,(1,x)SampleRTT ,j1,xj1, ,1j,.9SampleRTT ,j9j1, The weight given to past samples decays exponentially. Figure 4: Lack of TCP convergence with linear increase, linear decrease Problem 22. JFK Problem 23. At any given time t, SendBase – 1 is the sequence number of the last byte that the sender knows has been received correctly, and in order, at the receiver. The actually last byte received (correctly and in order) at the receiver at time t may be greater if there are acknowledgements in the pipe. Thus SendBase–1 , LastByteRcvd Problem 24. When, at time t, the sender receives an acknowledgement with value y, the sender knows for sure that the receiver has received everything up through y-1. The actual last byte received (correctly and in order) at the receiver at time t may be greater if y , SendBase or if there are other acknowledgements in the pipe. Thus y-1 , LastByteRvcd Problem 25. Suppose packets n, n+1, and n+2 are sent, and that packet n is received and ACKed. If packets n+1 and n+2 are reordered along the end-to-end-path (i.e., are received in the order n+2, n+1) then the receipt of packet n+2 will generate a duplicate ack for n and would trigger a retransmission under a policy of waiting only for second duplicate ACK for retransmission. By waiting for a triple duplicate ACK, it must be the case that two packets after packet are correctly received, while n+1 was not received. The designers n of the triple duplicate ACK scheme probably felt that waiting for two packets (rather than 1) was the right tradeoff between triggering a quick retransmission when needed, but not retransmitting prematurely in the face of packet reordering. Problem 26. a) TCP slowstart is operating in the intervals [1,6] and [23,26] b) TCP congestion advoidance is operating in the intervals [6,16] and [17,22] thc) After the 16 transmission round, packet loss is recognized by a triple duplicate ACK. If there was a timeout, the congestion window size would have dropped to 1. ndd) After the 22 transmission round, segment loss is detected due to timeout, and hence the congestion window size is set to 1. e) The threshold is initially 32, since it is at this window size that slowtart stops and congestion avoidance begins. f) The threshold is set to half the value of the congestion window when packet loss is detected. When loss is detected during transmission round 16, the congestion thwindows size is 42. Hence the threshold is 21 during the 18 transmission round. g) The threshold is set to half the value of the congestion window when packet loss is detected. When loss is detected during transmission round 16, the congestion thwindows size is 42. Hence the threshold is 21 during the 18 transmission round. stndh) During the 1 transmission round, packet 1 is sent; packet 2-3 are sent in the 2 rdtransmission round; packets 4-7 are sent in the 3 transmission round; packets 8-thth15 are sent in the 4 transmission round; packets15-31 are sent in the 5 thtransmission round; packets 32-63 are sent in the 6 transmission round; packets thth64 – 96 are sent in the 7 transmission round. Thus packet 70 is sent in the 7 transmission round. i) The congestion window and threshold will be set to half the current value of the congestion window (8) when the loss occurred. Thus the new values of the threshold and window will be 4. Problem 27. Refer to Figure 4. In Figure 4(a), the ratio of the linear decrease on loss between connection 1 and connection 2 is the same - as ratio of the linear increases: unity. In this case, the throughputs never move off of the AB line segment. In Figure 4(a), the ratio of the linear decrease on loss between connection 1 and connection 2 is 2:1. That is, whenever there is a loss, connection 1 decreases its window by twice the amount of connection 2. We see that eventually, after enough losses, and subsequent increases, that connection 1's throughput will go to 0, and the full link bandwidth will be allocated to connection 2. Figure 4: Lack of TCP convergence with linear increase, linear decrease Problem 28. If TCP were a stop-and-wait protocol, then the doubling of the time out interval would suffice as a congestion control mechanism. However, TCP uses pipelining (and is therefore not a stop-and-wait protocol), which allows the sender to have multiple outstanding unacknowledged segments. The doubling of the timeout interval does not prevent a TCP sender from sending a large number of first-time-transmitted packets into the network, even when the end-to-end path is highly congested. Therefore a congestion-control mechanism is needed to stem the flow of “data received from the application above” when there are signs of network congestion. Problem 29. In this problem, there is no danger in overflowing the receiver since the receiver?s receive buffer can hold the entire file. Also, because there is no loss and acknowledgements are returned before timers expire, TCP congestion control does not throttle the sender. However, the process in host A will not continuously pass data to the socket because the send buffer will quickly fill up. Once the send buffer becomes full, the process will pass data at an average rate or R << S. Problem 30 a) The loss rate, , is the ratio of the number of packets lost over the number of packets L sent. In a cycle, 1 packet is lost. The number of packets sent in a cycle is W/2WWW,,,,1,?,W,(,n) ,,,222,,,n0 W/2WW,,1,,,n ,,,22,,,n0 WWW/2(W/2,1),,,,1, ,,222,, 22WWWW,,,, 4284 332 ,W,W84 Thus the loss rate is 1L, 332W,W84 83322L,8/3WW,b) For large, . Thus or . From the text, we WW,,W3L84 therefore have 38MSS,,average throughput 43LRTT 1.22,MSS, RTT,L Problem 31. The minimum latency is 2RTT+O/R. The minimum W that achieves this latency is RTT,S/R,,W,minw:w, ,,S/R,, RTT,,,,1 . ,,S/R,, R min latency W 28 Kbps 28.77 sec 2 100 Kbps 8.2 sec 4 1 Mbps 1 sec 25 10 Mbps 0.28 sec 235 Problem 32. a) number of windows that cover the object K, 01k,1 ,min{k:3,3,?,3,O/S} k,,,13,k,OS min:/ ,,,13,, k ,min{k:3,1,2O/S} ,log(1,2O/S),,3 b) Q is the number of times the server would idle for an object of infinite size. SS,,k,1Q,kRTT,,,max:30 ,,RR,, RTT,, ,1,log(1,) 3,,SR/,, c) PO,,2RTT,stalllatency ,kR,1k POSS,,,1kRTTRTT ,,2,,,3 ,,,RRR,,,1k PO(3,1)S,,2RTT,P(RTT,S/R), R2R Problem 33. R O/R P Min Latency with latency slow start 28 Kbps 29.25 s 3 31.25 sec 33.18 sec 100 Kbps 8.19 s 5 10.19 sec 13.86 sec 1 Mbps 819 msec 7 2.81 sec 9.26 sec 10 Mbps 82 msec 7 2 sec 9 sec Problem 34. a) T b) T c) F d) F Problem 35. a) SS,,k,1Q,kRTT,,,max:20 ,,RR,, RTT,,k,1,maxk:2,1, ,,S/R,, ,,RTT,, ,max:,log1,,1 kk,,,,2S/R,,,, ,,RTT,, ,log1,,1,,2,,S/R,,,, b) Beginning with the equation for latency on page 277, we note that the term within the brackets is non-zero only for k , Q. So we can replace the K-1 in the summand with P +and remove the […] restriction. Applying the identity to the resulting equation gives the desired result (after a little algebraic manipulation). Problem 36. TS/R,RTTWhen the sever sends a segment, it has to wait a time of for the k,1acknowledgement to arrive. The transmission time of the kth window is . The (S/R)2 idle time for the kth window is ,TSS,,k1, ,RTT,2,,RR,, The number of idle periods, Q, is TSS,,k,1Q,kRTT,,,max:20 ,,RR,, RTT,,k,1,maxk:2,T, ,,S/R,, ,,RTT,,,max:,log,,1kkT ,,,,2S/R,,,, RTT,,,, ,logT,,1,,2,,S/R,,,, P,min(Q,K,1)The number of times the server idles is . The latency is POTSS,,,1kRTTRTTlatency,2,,,,2 ,,,RRR,,,1k which simplifies to OTSSS,,PRTTPRTTTlatency ,2,,,,(2,1),(,1) ,,RRRR,, Problem 37. The fraction of the response time that is due to slow start is y/(x+y) where x = 2 RTT + PO/R and y = P (RTT + S/R) – (2 – 1) S/R Chapter 4 Review Questions 1. Datagram-based network layer: path determination; forwarding. Additional function of VC-based network layer: call setup. 2. ATM service models: CBR, VBR, ABR, UBR. See section 4.1.1 for the descriptioins. 3. Link state algorithms: Computes the least-cost path between source and destination using complete, global knowledge about the network. Distance-vector routing: The calculation of the least-cost path is carried out in an iterative, distributed manner. A node only knows the neighbor to which it should forward a packet in order to reach given destination along the least-cost path, and the cost of that path from itself to the destination. 4. Routers are aggregated into autonomous systems (ASs). Within an AS, all routers run the same intra-AS routing protocol. Special gateway routers in the various ASs run the inter-autonomous system routing protocol that determines the routing paths among the ASs. The problem of scale is solved since an intra-AS router need only know about routers within its AS and the gateway router(s) in its AS. 5. No. Each AS has administrative autonomy for routing within an AS. 6. 1 1 0 1 1 1 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 1 1 1 0 0 7. 24 8. No 9. 8 interfaces; 4 routing tables 10. 50% overhead 11. 2,980 bytes of data allocated to 7 fragments. Each fragment has 422 in the identification field. The offsets for the 7 fragments are 0, 480, 960, 1440, 1920, 2400, 2880. 12. No. The advertisement tells D that it can get to z in 11 hops by way of A. However, D can already get to z by way of B in 7 hops. Therefore, there is no need to modify the entry for z in the table. If, on the other hand, the advertisement said that A were only 4 hops away from z by way of C, then D would indeed modify its forwarding table. 13. With OSPF, a router periodically broadcasts routing information to all other routers in the AS, not just to its neighboring routers. This routing information sent by a router has one entry for each of the router?s neighbors; the entry gives the distance from the router to the neighbor. A RIP advertisement sent by a router contains information about all the networks in the AS, although this information is only sent to its neighboring routers. 14. “sequence of ASs on the routes” 15. See “Principles in Practice” on page 331 16. switching via memory; switching via a bus; switching via an interconnection network 17. need for buffers at input port: multiple packets arriving to switch at same time may need to go to output port; need for buffers at output port: switching fabric may not be faster than line speed 18. See Section 4.7.1 19. Yes, because the entire IPv6 datagram (including header fields) is encapsulated in an an IPv4 datagram 20. With multiple unicasts, if there are N receivers then the sender must send N copies of the packet. This implies that the sender must know the identities of the N receivers (so that the unicast packets can be addressed) 21. False. 22. IGMP is a protocol run only between the host and its first-hop multicast router. IGMP allows a host to specify (to the first-hop multicast router) the multicast group it wants to join. It is then up to the multicast router to work with other multicast routers (i.e., run a multicast routing protocol) to ensure that the data for the host-joined multicast group is routed to the appropriate last-hop router and from there to the host. 23. In a group-shared tree, all senders send their multicast traffic using the same routing tree. With source-based tree, the multicast datagrams from a given source are routed over s specific routing tree constructed for that source; thus each source may have a different source-based tree and a router may have to keep track of several source- based tress for a given multicast group. 24. a) True. B) False 25. DVMRP: source-based tree. PIM-dense-mode: source-based tree. PIM-sparse-mode: group-shared tree. You can?t answer the questions about CBT (which uses a group- shared tree) or MOSPF (which uses source-based trees), since the second edition of the text does not describe these algorithms (sorry!). Chapter 4 Problems Problem 1. a) With a connection-oriented network, every router failure will involve the routing of that connection. At a minimum, this will require the router that is “upstream” from the failed router to establish a new downstream part of the path to the destination node, with all of the requisite signaling involved in setting up a path. Moreover, all of the router on the initial path that are downstream from the failed node must take down the failed connection, with all of the requisite signaling involved to do this. With a connectionless datagram network, no signaling is required to either set up a new downstream path or take down the old downstream path. We have seen, however, that routing tables will need to be updated (e.g., either via a distance vector algorithm or a link state algorithm) to take the failed router into account. We have seen that with distance vector algorithms, this routing table change can sometimes be localized to the area near the failed router. Thus, a datagram network would be preferable. Interesting, the design criteria that the initial ARPAnet be able to function under stressful conditions was one of the reasons that a datagram architecture was chosen for this Internet ancestor. b) In order for a router to determine the delay (or a bound on delay) along an outgoing link, it would need to know the characteristics of the traffic from all sessions passing through that link. That is, the router must have per-session state in the router. This is possible in a connection-oriented network, but not with a connectionless network. Thus, a connection-oriented network would be preferable. Problem 2. ABCDEF ABCEF ABCF ABDCEF ABDEF ABDECF ADBCF ADBCEF ADCEF ADCF ADEF ADECF ACF ACBDEF ACDEF ACEF Problem 3. N a b c d E g h inf inf inf 3,f 1,f 6.f inf e inf inf 4,e 2,e 6,f inf ed inf 11,d 3,d 3,d inf edc 7,c 5,c 3,d inf edcg 7,c 5,c 17,g edcgb 6,b 7,b edcgba 7,b Problem 4. a) from node A to all nodes (note: ties broken in favor of leftmost column) N b c d e f g h 1,a 4,a inf inf inf inf inf b 3,b b,10 inf inf 5,b 3,b bc 4,c 6,c inf 5,b 3,b bch 4,c 6,c inf 5,b bchd 5,d 7,d 5,b bchde 6,e 5,b bchdeg 6,e b) from node B to all nodes (note: ties broken in favor of leftmost column) N a c d e f g h 1,b 2,b 9,b inf inf 4,b 2,b a 2,b 9,b inf inf 4,b 2,b ac 3,c 5,c inf 4,b 2,b ach 3,c 5,c inf 4,b achd 4,d 6,d 4,b achde 5,e 4,b achdeg 5,e c) from node C to all nodes (note: ties broken in favor of leftmost column) N a b d e f g h 4,c 2,c 1,c 3,c inf inf inf d 4,c 2,c 2,d 4,d 2,d inf db 3,b 2,d 4,d 2,d 4,b dbe 3,b 3,e 2,d 4,b dbeg 3,b 3,e 4,b dbega 3,e 4,b dbegaf 4,b d) from node D to all nodes (note: ties broken in favor of leftmost column) N a b c e f g h inf 9,d 1,d 1,e 3,d 1,d inf c 5,c 3,c 1,e 3,d 1,d inf ce 5,c 3,c 2,e 1,d inf ceg 5,c 3,c 2,e 15,g cegf 5,c 3,c 15,g cegfb 4,b 6,b cegfba 6,b e) from node E to all nodes (note: ties broken in favor of leftmost column) N a b c d f g h inf inf 3,e 1,e 1,f inf inf d inf 10,d 2,d 1,f 2,d inf df inf 10,d 2,d 2,d inf dfc 6,c 4,c 2,d inf dfcg 6,c 4,c 16,g dfcgb 5,b 6,b dfcgba 6,b f) from node G to all nodes (note: ties broken in favor of leftmost column) N a b c d e f h inf 4,g inf 1,g inf 6,g 14,g d inf 4,g 2,d 2,d 4,d 14,g dc 6,c 4,c 2,d 4,d 14,g dce 6,c 4,c 3,e 14,g dcef 6,c 4,c 14,g dcefb 5,b 6,b dcefba 6,b g) from node H to all nodes (note: ties broken in favor of leftmost column) N a b c d e f g inf 2,h inf inf inf inf 14,h b 3,b 4,b 11,b inf inf 6,b ba 4,b 11,b inf inf 6,b bac 4,c 7,c inf 6,b bacd 6,d 8,d 6,b bacde 7,e 6,b bacdeg 7,e Problem 5. The distance table in E is: via b c d to a 6 4 13 b 5 5 14 c 8 2 11 d 9 3 10 Problem 6. The wording of this question was a bit ambiguous. We meant this to mean, “the number of iterations from when the algorithm is run for the first time” (that is, assuming the only information the nodes initially have is the cost to their nearest neighbors). We assume that the algorithm runs synchronously (that is, in one step, all nodes compute their distance tables at the same time and then exchange tables). At each iteration, a node exchanges distance tables with its neighbors. Thus, if you are node A, and your neighbor is B, all of B's neighbors (which will all be one or two hops from you) will know the shortest cost path of one or two hops to you after one iteration (i.e., after B tells them its cost to you). dLet be the “diameter” of the network - the length of the longest path without loops d,1between any two nodes in the network. Using the reasoning above, after iterations, dall nodes will know the shortest path cost of or fewer hops to all other nodes. Since dany path with greater than hops will have loops (and thus have a greater cost than that d,1path with the loops removed), the algorithm will converge in at most iterations. ASIDE: if the DV algorithm is run as a result of a change in link costs, there is no a priori bound on the number of iterations required until convergence unless one also specifies a bound on link costs. Problem 7. The distance table in X is: via W Y to W 1 ? Y ? 4 A 6 10 Note that there is not enough information given in the problem (purposefully!) to determine the distance table entries D(W,Y) and D(Y,W). To know these values, we would need to know Y's minimum cost to W, and vice versa. Since X's least cost path to A goes through W, a change in the link cost c(X,W) will cause X to inform its neighbors of a new minimum cost path to A, Since X's least cost path to A does not go through Y, a change in the link cost c(X,Y) will not cause X to inform its neighbors of a new minimum cost path to A. Problem 8. The distance table in X, Y, Z are: DX via DY via DZ via to Y Z to X Z to X Y Y 2 8 X 2 4 X 7 3 Z 3 7 Z 5 1 Y 9 1 Although Y's distance table has changed as a result of this iteration, its minimum cost paths to various destinations have not changed and hence Y will not send out its distance tables. X's and Z's tables have not changed as a result of their iteration and hence they will not send out their tables. Thus, the algorithm has converged after this iteration. Problem 9. via via DX Y Z DX Y Z to Y 5 inf to Y 5 8 Z inf 2 Z 11 2 via via DX Y Z DX Y Z to Y 5 inf to Y 5 8 Z inf 6 Z 7 6 via via DX Y Z DX Y Z to Y 6 inf to Y 6 7 Z inf 2 Z 11 2 Problem 10. We show below a simplified finite statement machine for the case that the DHCP client specifically requests DHCP service via the DHCP discover message. (Not shown below and not discussed in the text is the case where DHCP servers active advertise their services by sending DHCP server advertisements, see RFC 2131 for details). In our FSM below, the notation DHCPdiscover(transactionID) refers to sending a DHCP discover message with the specified transaction ID. In the “gather offers” state the DHCP client maintains two timers: a “fast timer” that is used to retransmit DHCP discover messages if no replies are received, and a “slow timer” that causes the DHCP client to leave the “gather offers” state (to either the failure state, if no DHCP server offers have been received, or to the “wait ACK” state) when it times out. , DHCPdiscover(transactionID) DHCPoffer(rcvd_transactionID) && noffers = 0 transactionID==rcvd_transactionID) start slowtimer record address of offering server start fasttimer noffers = noffers+1 DHCPoffer(rcvd_transactionID) && (transactionID != rcvd_transactionID) , gather offers fasttimer timeout && noffers==0 resend DHCPdiscover slowtimer timeout retart fastimer && noffers==0 , slowtimer timeout && noffers>0 pick among DHCP offers DHCPrequest(transactionID) restart both timers fasttimer timeout wait resend DHCPrequest Fail ACK restart fasttimer slowtimer timeout , DHCPACK(rcvd_transactionID) && (transactionID != rcvd_transactionID) , DHCPACK(rcvd_transactionID) && transactionID==rcvd_transactionID) , DHCP done Problem 11 Since full AS path information is available from an AS to a destination in BGP, loop detection is simple – if a BGP peer receives a route that contains its own AS number in the AS path, then using that route would result in a loop. Problem 12 One way for C to force B to hand over all of B?s traffic to D on the east coast is for C to only advertise its route to D via its east coast peering point with C. Problem 13 x B x B w w A A C y C y W’s view of the topology X’s view of the topology In the above solution, X does not know about the AC link since X does not receive an advertised route to w or to y that contain the AC link (i.e., X receives no advertisement containing both AS A and AS C on the path to a destination. Problem 14. The minimal spanning tree has G connected to D at a cost of 1, E connected to D at a cost of 1; C connected to D at a cost of 1; C connected to B at a a cost of 2; B connected to A at a cost of 1. We can argue informally that the tree cost is minimal as follows. C, D, E, and G can be connected to each other at a cost of 3. One can't do any better than that. In order to connect A in to any of C, D, E, G, the minimum cost is 3 (via B). Problem 15. Since there is no network layer protocol to identify hosts participating in a group, this must be done at a higher layer. In practice, this is done using an application-level protocol over IP multicast. See Problem 23. Problem 16. The cost of sending one packet to all 32 receivers via multicast is 62. With multicast, the packet traverses a link exactly once. There are 62 links in a binary tree of depth 5. If the packet is unicast to all receivers, then each of the 32 receivers is sent an individual packet. Each packet must travel across five links (recall the tree depth is 5) from the source to any receiver. Hence the cost is 32*5=160. We see there is a significant savings using multicast in this case. Problem 17. Here's a rough sketch of how an application level group-participant-identification (GPI) protocol would work. We'll assume the application entities use a separate multicast channel in the GPI protocol. There are two key components: , Each application periodically sends an “I am in this group” message, giving it's host identity, into the multicast control channel. This message is then received by all other participants. , Each application maintains a timer for each of the other participants. If it doesn't hear an "I am in this group" message from a group participant within the timeout interval, it removes the participant from its participant list. An alternative approach would have been for a participant to explicitly remove itself from the group. In this latter case, if the participant died, it would remain in everyone's group list forever. For this reason, we prefer the “soft-state” mechanism in the former approach. But either answer is OK; it's a matter of taste. Problem 18. With the new link cost, the Steiner tree connects A to C; B to C; C to E; and F to E. In order to prove this is a minimal cost tree, we could generate all possible spanning trees connecting these 4 nodes and verify that the tree described above indeed has minimum cost. Problem 19. The center-based tree for the topology shown in the original figure connects A to D; B to C; E to C; and F to C (all directly). This center-based tree is different from the minimal spanning tree shown in the figure. Problem 20. The least cost path tree connects F directly to E. B's path to E is BDE. A's path to E is ACE. Problem 21. See Figure 5. Problem 22. Reverse path forwarding would still work. RPF uses the unicast cost only to determine from which incoming link it will receive and forward (downstream) multicast packets. Packets arriving from other links are dropped. RPF would also work (arguably not as efficiently) if one forwarded only the packet arriving on the most costly path to the source. Figure 5: Solution to Problem 16 Problem 23. In the center-based tree the total traffic intensity (upstream + downstream traffic) is 4 on links AC, BC, EC, and FC. There is one unit of traffic emanating from nodes A, B, E, F and three units of traffic coming downstream from C that was sent by the other three nodes. The source tree rooted at A has one unit of traffic on AB, AC, CE, and CF. The source tree rooted at B has 1 unit of traffic on AB, BD, DE, EF. The source tree rooted at E has one unit of traffic on EF, ED. DB, EC and CA. The source tree rooted at F has one unit of traffic on FE, ED, DB, FC, and CA. Summing these up, the union of the source rooted trees generates: 3 units on CA; 2 units on CF; 2 units on AB; 3 units on BD; 3 units on ED; 3 units on EF; and 2 units on CE. Note that no link has 4 units of traffic, while four of the links in the center-based tree have 4 units of traffic on them. Thus, in this example, we can say that the center-based tree tends to concentrate traffic. Problem 24. Since MOSP builds source-specific trees, its state complexity is S*G. PIM SM builds a single center-based tree for the group and hence has state complexity G. PIM DM is like DVMRP and thus has a complexity of S*G. Problem 25. 32,4,28 bits are available for multicast addresses. Thus, the size of the multicast 28N,2address space is . The probability that two groups choose the same address is 1,28,9 ,2,3.73,10N The probability that 1000 groups all have different addresses is N,(N,1),(N,2)(N,999)12999?,,,,,,,1,1,?1, ,,,,,,1000NNNN,,,,,, Ignoring cross-product terms, this is approximately equal to 1,2,?,999999,1000,,1,,1,,0.998 ,,N2N,, Problem 26. The IP router at the end of the tunnel will use the protocol number in the „Upper Layer Protocol” field of the IP packet to determine which upper layer protocol to pass the IP packet. Thus, IP doesn't really know that the IP packet contains a multicast datagram. This is only discovered when the upper layer protocol (which will perform the multicast copy and routing) “opens” the IP datagram it is handed by the IP layer. Problem 27. a) Recall that in distance vector routing, information about a change in destination passes only between neighboring nodes, whcn the neighboring nodes exhange routing updates/information. (The is in contrast to link state routing, where all changes in routing are broadcast to all routers, and thus all routers learn about changes in the network after just one link state broadcast). Thus, all routers will not be able to route to the mobile node immediately, under the assumption of distance vector routing. b) Under distance vector routing, different routers may indeed have a different view of the visited network for the mobile node. A router will not know about the changed visited network until that information propagates to it via the pair-wise exchanges of routing information between routers on the path to the mobile node. c) The timescale is roughly on the order of the diameter of the network (i.e., the length of the longest source-destination path). This is because routing information propagates only via pair-wise exchange between neighboring routers on the path. Thus the time it would take to propagate information from any point in the network to any other point is, in worst case, on the order of the diameter of the network Problem 28. If the correspondent is mobile, then any datagrams destined to the correspondent would have to pass through the correspondent’s home agent. The foreign agent in the network being visited would also need to be involved, since it is this foreign agent that notifies the correspondent?s home agent of the location of the correspondent. Datagrams received by the correspondent?s home agent would need to be encapsulated/tunneled between the correspondent?s home agent and foreign agent, (as in the case of the encapsulated diagram at the top of Figure 4.61. Problem 29. Because datagrams must be first forward to the home agent, and from there to the mobile, the delays will generally be longer than via direct routing. Note that it is possible, however, that the direct delay from the correspondent to the mobile (i.e., if the datagram is not routed through the home agent) could actually be smaller than the sum of the delay from the correspondent to the home agent and from there to the mobile. It would depend on the delays on these various path segments. Note that indirect routing also adds a home agent processing (e.g., encapsulation) delay. Problem 30. First, we note that chaining was discussed at the end of section 4.9.2. In the case of chaining using indirect routing through a home agent, the following events would happen: , The mobile node arrives at A, A notifies the home agent that the mobile is now visiting A and that datagrams to the mobile should now be forwarded to the specified care-of-address (COA) in A. , The mobile node moves to B. The foreign agent at B must notify the foreign agent at A that the mobile is no longer resident in A but in fact is resident in B and has the specified COA in B. From then on, the foreign agent in A will forward datagrams it receives that are addressed to the mobile?s COA in A to the mobile?s COA in B. , The mobile node moves to C. The foreign agent at C must notify the foreign agent at B that the mobile is no longer resident in B but in fact is resident in C and has the specified COA in C. From then on, the foreign agent in B will forward datagrams it receives (from the foreign agent in A) that are addressed to the mobile?s COA in B to the mobile?s COA in C. Note that when the mobile goes offline (i.e., has no address) or returns to its home network, the datagram-forwarding state maintained by the foreign agents in A, B and C must be removed. This teardown must also be done through signaling messages. Note that the home agent is not aware of the mobile?s mobility beyond A, and that the correspondent is not at all aware of the mobile?s mobility. In the case that chaining is not used, the following events would happen: , The mobile node arrives at A, A notifies the home agent that the mobile is now visiting A and that datagrams to the mobile should now be forwarded to the specified care-of-address (COA) in A. , The mobile node moves to B. The foreign agent at B must notify the foreign agent at A and the home agent that the mobile is no longer resident in A but in fact is resident in B and has the specified COA in B. The foreign agent in A can remove its state about the mobile, since it is no longer in A. From then on, the home agent will forward datagrams it receives that are addressed to the mobile?s COA in B. , The mobile node moves to C. The foreign agent at C must notify the foreign agent at B and the home agent that the mobile is no longer resident in B but in fact is resident in C and has the specified COA in C. The foreign agent in B can remove its state about the mobile, since it is no longer in B. From then on, the home agent will forward datagrams it receives that are addressed to the mobile?s COA in C. , When the mobile goes offline or returns to its home network, the datagram-forwarding state maintained by the foreign agent in C must be removed. This teardown must also be done through signaling messages. Note that the home agent is always aware of the mobile?s current foreign network. However, the correspondent is still blissfully unaware of the mobile?s mobility. Problem 31. Two mobiles could certainly have the same care-of-address in the same visited network. Indeed, if the care-of-address is the address of the foreign agent, then this address would be the same. Once the foreign agent decapsulates the tunneled datagram and determines the address of the mobile, then separate addresses would need to be used to send the datagrams separately to their different destinations (mobiles) within the visited network. Chapter 5 Review Questions 1. Although each link guarantees that an IP datagram sent over the link will be received at the other end of the link without errors, it is not guaranteed that IP datagrams will arrive at the ultimate destination in the proper order. With IP, datagrams emerging from the same TCP connection can take different routes in the network, and therefore arrive out of order. TCP is still needed to provide the receiving end of the application the byte stream in the correct order. Also, IP can lose packets due to routing loops or equipment failures. 2. framing: there is also framing in IP and TCP; link access; reliable delivery: there is also reliable delivery in TCP; flow control: there is also flow control in TCP; error detection: there is also error detection in IP and TCP; error correction; full duplex: TCP is also full duplex. 3. 1 4. There will be a collision in the sense that while a node is transmitting it will start to receive a packet from the other node. 5. Slotted Aloha: 1, 2 and 4 (slotted ALOHA is only partially decentralized, since it requires the clocks in all nodes to be synchronized). Token ring: 1, 2, 3, 4. 6. In polling, a discussion leader allows only one participant to talk at a time, with each participant getting a chance to talk in a round-robin fashion. For token ring, there isn?t a discussion leader, but there is wine glass that the participants take turns holding. A participant is only allowed to talk if the participant is holding the wine glass. 7. When a node transmits a frame, the node has to wait for the frame to propagate around the entire ring before the node can release the token. Thus, if L/R is small as compared to t, then the protocol will be inefficient. prop 4832128 8. 2 LAN addresses; 2 IPv4 addresses; 2 IPv6 addresses. 9. C?s adapter will process the frames, but the adapter will not pass the datagrams up the protocol stack. If the LAN broadcast address is used, then C?s adapter will both process the frames and pass the datagrams up the protocol stack. 10. An ARP query is sent in a broadcast frame because the querying host does not which adapter address corresponds to the IP address in question. For the response, the sending node knows the adapter address to which the response should be sent, so there is no need to send a broadcast frame (which would have to be processed by all the other nodes on the LAN). 11. No it is not possible. Each LAN has its own distinct set of adapters attached to it, with each adapter having a unique LAN address. 12. The three Ethernet technologies have identical frame structures. 13. 20 million transitions per second. th14. After the 5 collision, the adapter chooses from {0, 1, 2, …, 31}. The probability that it chooses 4 is 1/32. It waits 204.8 microseconds. 15. When a receiving station correctly and completely receives a frame, it needs to send an acknowledgement to the transmitting station. The acknowledgement should be sent and correctly received before some other station attempts to transmit a frame. By making SIFS much smaller than DIFS, the receiving station can transmit its acknowledgement before other stations think that the channel is clear. 16. No, there wouldn?t be an advantage if the RTS and CTS frames were long. The short RTS and CTS frames enable the sender and receiver to quickly notify neighboring nodes that they shouldn?t transmit for a specified period of time. If the RTS were long, then during the long RTS, a neighbor of the receiver which is hidden to the sender could start to transmit, causing a collision before the reservation is made. 17. No 18. To allow the receiving side of the TC sublayer to determine where new cells begin. 19. Yes, it fills in the HEC field. Chapter 5 Problems Problem 1. rightmost column and bottom row are for parity bits. The 1 0 1 0 0 1 0 1 0 0 1 0 1 0 0 1 0 1 1 1 0 0 0 1 1 Problem 2. Suppose we begin with the initial two-dimensional parity matrix: 0 0 0 0 1 1 1 1 0 1 0 1 1 0 1 0 With a bit error in row 2, column 3, the parity of row 2 and column 3 is now wrong in the matrix below: 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1 0 Now suppose there is a bit error in row 2, column 2 and column 3. The parity of row 2 is now correct! The parity of columns 2 and 3 is wrong, but we can't detect in which rows the error occurred! 0 0 0 0 1 0 0 1 0 1 0 1 1 0 1 0 The above example shows that a double bit error can be detected (if not corrected). Problem 3. To compute the Internet checksum, we add up the values at 16-bit quantities: 00000000 00000001 00000010 00000011 00000100 00000101 00000110 00000111 00001000 00001001 ------------------------- 00010100 00011001 The one's complement of the sum is 11101011 11100110. Problem 4. If we divide 1001 into 10101010000 we get 10010111, with a remainder of R = 001. Problem 5. The output is -1,+1,-1,+1,-1,+1,-1,+1 +1,-1,+1,-1,+1,-1,+1,-1 Problem 6. Sender 2's output before the adder is +1,-1,+1,+1,+1,-1,+1,+1 +1,-1,+1,+1,+1,-1,+1,+1 Problem 7. 2 d,(2,0,2,0,2,,2,0,0)*(1,,1,1,1,1,,1,1,1)/8,(2,2,2,2)/8,10 2 d,(0,,2,0,2,0,0,2,2)*(1,,1,1,1,1,,1,1,1)/8,(2,2,2,2)/8,11 Problem 8. a) N,1 E(p),Np(1,p) N,1N,2 E'(p),N(1,p),Np(N,1)(1,p) N,2 ,N(1,p)((1,p),p(N,1)) 1E'(p),0,p*, N b) 1N,(1)111,1,1NNNEpN,,,,, (*)(1)(1)1NNN,1N 111N lim(1,),1lim(1,),N,,,,NNNe Thus 1Ep lim(*),N,,e Problem 9. 2(N,1) E(p),Np(1,p) 2(N,2)2(N,3) E'(p),N(1,p),Np2(N,1)(1,p) 2(N,3) ,N(1,p)((1,p),p2(N,1)) 1E'(p),0,p*, 2N,1 N12(N,1)Ep,, (*)(1)N,N,2121 111limE(p*),,, N,,2e2e Problem 10. Pure Aloha has an efficiency of zero for almost all values of . See Figure 6. p Figure 6: Efficiency of Aloha and Slotted Aloha Problem 11. The length of a polling round is N(Q/R,t). poll NQThe number of bits transmitted in a polling round is . The maximum throughput therefore is NQR, tRNQRt(/,)pollpoll1,Q Problem 12. a), b), c) See Figure 7. Figure 7: Solution to problem 12 d) Forwarding table in determines that the datagram should be routed to interface 1.A 111.111.111.002. 2. Host uses ARP to determine the LAN address for 111.111.111.002, namely A 22-22-22-22-22. 3. The adapter in creates and Ethernet packet with Ethernet destination address A 22-22-22-22-22-22. 4. The first router receives the packet and extracts the datagram. The forwarding table in this router indicates that the datagram is to be routed to 122.222.222.003. 5. The first router then uses ARP to obtain the associated Ethernet address, namely 55-55-55-55-55-55. 6. The process continues until the packet has reached Host . F e) ARP in must now determine the LAN address of 111.111.111.002. Host sends out AA an ARP query packet within a broadcast Ethernet frame. The first router receives the query packet and sends to Host an ARP response packet. This ARP response packet is A carried by an Ethernet frame with Ethernet destination address 00-00-00-00-00-00. Problem 13. Wait for 51,200 bit times. For 10 Mbps, this wait is 351.2,10bits,5.12msec 610,10bps For 100 Mbps, the wait is 512 ,sec. Problem 14. t,0t,576At transmits. At , would finish transmitting. In the worst case, AAB t,224t,224,225,449begins transmitting at time . At time 's first bit arrives at B 449,576. Because , aborts before completing the transmission of the packet, as it AA is supposed to do. Thus cannot finish transmitting before it detects that transmitted. This implies that if AB does not detect the presence of a host, then no other host begins transmitting while AAis transmitting. Problem 15. Event Time, t 0 and begin transmission AB 225 and detect collision AB 273 and finish transmitting jam signal AB 273+225 = 498 's last bit arrives at ; detects an idle channel AAB 498+96=594 A starts transmitting 273+512 = 785 B returns to Step2 B must sense idle channel for 96 bit times before it transmits 594+225=819 A?s transmission reaches B Because 's retransmission reaches before 's scheduled retransmission time, ABBBrefrains from transmitting while retransmits. Thus and do not collide. Thus the AAB factor 512 appearing in the exponential backoff algorithm is sufficiently large. Problem 16. 81/(1,5a),.5t,d/(1.8,10)We want or, equivalently, a,.2,t/t. m/sec propproptrans 8),5.76,dd,265and bitsbits/secsec. Solving for we obtain t,(576)/(10trans meters. For the 100 Mbps Ethernet standard, the maximum distance between two hosts is 200 m. For transmitting station A to detect whether any other station transmitted during A's 8/1.8,10,2.94,interval, must be greater than 2t,2,265mm/secsec. Because tproptrans 2.94,5.76, A will detect 's signal before the end of its transmission. B Problem 17. a) Let be a random variable denoting the number of slots until a success: Y m,1, P(Y,m),,(1,,) ,where is the probability of a success. 1/,This is a geometric distribution, which has mean . The number of consecutive wasted slots is that X,Y,1 ,1, x,E[X],E[Y],1,, N,1 ,,Np(1,p) N,11,Np(1,p)x, N,1Np(1,p) kk,,efficiency N,11,Np(1,p)k,xk,N,1Np(1,p) b) Maximizing efficiency is equivalent to minimizing , which is equivalent to maximizing x 1,,. We know from the text that is maximized at p,. N c) k,efficiency 1N,11,(1,)Nk,1N,1(1,)N kklim,,efficiency N,,1,1/ek,e,1k,1/e kk,,d) Clearly, approaches 1 as . k,e,1 Problem 18. a) 900m20bits,4, 862,10m/sec10,10bps ,6,6,(4.5,10,8,10)sec ,12.5,sec b) t,0, At time , both and transmit. AB t,12.5,sec, At time , detects a collision. A t,25,sec, At time last bit of 's aborted transmission arrives at . AB t,37.5,sec, At time first bit of 's retransmission arrives at . AB 1000bits, At time t,37.5,sec,,137.5,sec 's packet is completely A610,10bps delivered at . B 12.5,sec,5,100,sec,512.5,secc) Problem 19. a) The key to the design is to build a network with a backbone. This is done by putting a multiport fiber repeater in WC2, and connecting four ports of this repeater to bridges: Each bridge has one fiber port and one coax port. We put the marketing bridge in WC1, the support and manufacturing bridges in WC2, and the engineering bridge in WC3. b) Here we use a design similar to part (a) except we replace the thin coax cables with UTP hubs, and we use bridges that have one fiber port and one UTP port. Note that the maximum length of a UTP connection is 100 m. For this reason, the design just outlined may not suffice for the manufacturing, which may have hosts more than 100 m away from WC2. To solve this problem we put a second bridge for manufacturing in WC1. This bridge is connected to the multiport fiber repeater by fiber. Problem 20. a) “high-priority bits” can be sent in a measurement interval. Thus CIR,Tc CIR,T,,c ,,L,, packets can be sent in a measurement interval. b) R,TCIR,T,,,,cc, ,,,,LL,,,, Problem 21. The maximum number of high-priority packets that can pass in a measurement interval is CIR,T,,cN, ,,L,, Each packet has L bits, so that maximum size of object is CIR,T,,cO,L,N,L,CIR,T c,,L,, Problem 22. L,8a) The time required to fill bits is L,8L sec,msec.364,108 L,1,500,b) For the packetization delay is 1500 msec,187.5msec.8 L,48,For the packetization delay is 48 msec,6msec.8 c) L,8,40Store-and-forward delay ,R L,1,500For , the delay is 1500,8,4012 sec,msec,77,sec6155155,10 L,48,,1,secFor store-and-forward delay . d) Store-and-forward delay is small for both cases for typical ATM link speeds. However, L,1500packetization delay for is too large for real-time voice applications. Chapter 6 Review Questions 1. Streaming stored audio/video: pause/resume, re-positioning, fast-forward; real-time interactive audio and video: people communicating and responding in real time. 2. Camp 1: No fundamental changes in TCP/IP protocols; add bandwidth where needed; also use caching, content distribution networks, and multicast overlay networks. Camp 2: Provide a network service that allows applications to reserve bandwidth in the network. Camp 3, differentiated service: introduce simple classifying and policing schemes at the edge of the network, and give different datagrams different levels of service according to their class in the router queues. 3. Figure 6.1: simple, doesn?t require meta file or streaming server; Figure 6.2: allows media player to interact directly with the web server, doesn?t require a streaming server; Figure 6.3: media player interacts directly with a streaming server, which has been designed for the specific streaming application. 4. End-to-end delay is the time it takes a packet to travel across the network from source to destination. Delay jitter is the fluctuation of end-to-end delay from packet to the next packet. 5. A packet that arrives after its scheduled playout time can not be be played out. Therefore, from the perspective of the application, the packet has been lost. 6. First scheme: send a redundant encoded chunk after every n chunks; the redundant chunk is obtained by exclusive OR-ing the n original chunks. Second scheme: send a lower-resolution low-bit rate scheme along with the original stream. Interleaving does not increase the bandwidth requirements of a stream. 7. RTP streams in different sessions: different multicast addresses; RTP streams in the same session: SSRC field; RTP packets are distinguished from RTCP packets by using distinct port numbers. 8. Reception report packets: includes info about fraction of packets lost, last sequence number, interarrival jitter; sender report packets: timestamp and wall clock time of most recently generated RTP packet, number of packets sent, number of bytes sent ; source description packets: e-mail address of the sender, the sender?s name, the application that generates the RTP stream. 9. In non-preemptive priority queuing, the transmission of a packet is not interrupted once it has begun. In preemptive priority queuing, the transmission of a packet will be interrupted if a higher priority packet arrives before transmission completes. This would mean that portions of the packet would be sent into the network as separate chunks; these chunks would no longer all have the appropriate header fields. For this reason, preemptive priority queuing is not used. 10. A scheduling discipline that is not work conserving is time division multiplexing, whereby a rotating frame is partitioned into slots, with each slot exclusively available to a particular class. 11. Scalability: Per-flow resource reservation implies the need for a router to process resource reservations and maintain per-flow state for each flow passing through the router. Flexibly service: The Intserv framework provides for a small number of pre- specified service classes. Chapter 6 Problems Problem 3. x(t) will continue to grow until the client buffer becomes full. Once the client buffer dbecomes full, the client application will drain the receive TCP buffer at rate . TCP flow x(t)control will then throttle the sender's transmission rate so that the average of after dthe client buffer becomes full is approximately . Problem 4. No, they are not the same thing. The client application reads data from the TCP receive buffer and puts it in the client buffer. If the client buffer becomes full, then application will stop reading from the TCP receive buffer until some room opens up in the client buffer. Problem 5. 160,ha) bytes are sent every 20 msec. Thus the transmission rate is (160,h),8 Kbps,(64,.4h)Kbps20 b) IP header: 20bytes UDP header: 8bytes RTP header: 12bytes h=40 bytes (a 25% increase in the transmission rate!) Problem 6. (n)da) Denote for the estimate after the nth sample. (1) d,r,t44 (2)d,u(r,t),(1,u)(r,t) 3344 (3),,d,u(r,t),(1,u)u(r,t),(1,u)(r,t) 223344 2 ,u(r,t),(1,u)u(r,t),(1,u)(r,t)223344 (4)(3) d,u(r,t),(1,u)d11 23 ,u(r,t),(1,u)u(r,t),(1,u)u(r,t),(1,u)(r,t)11223344 b) n,1(n)jnd,u(1,u)(r,t),(1,u)(r,t) ,jjnnj,1 c) ,u()j,d,(1,u)(r,t) ,jj1,uj1, ,1j,.9(r,t) ,jj9,j1 The weight given to past samples decays exponentially. Problem 7. (n)va) Denote for the estimate after the nth sample. Let . ,,r,tjjj (1)(1)v,,,d (=0) 4 (2)(2)(1)v,u,,d,(1,u),,d 34 (3)(3)(2)v,u,,d,(1,u)v 2 (3)(2)2(1),u,,d,u(1,u),,d,(1,u),,d 234 (4)(4)(3)v,u,,d,(1,u)v 1 (4)(3)2(2),u,,d,(1,u)u,,d,u(1,u),,d 123 3(1),(1,u),,d 4 (4)(3)2(2),,,u,,d,(1,u),,d,(1,u),,d 123 3(1),(1,u),,d 4 b) n,1njnjn(),1(,,1)(1)v,u(1,u),,d,(1,u),,d ,jnj,1 Problem 8. a) r – t + r-t + …+r-t= (n-1)d 1122n-1n-1 n-1 Substituting this into the expression for d gives n rt,n1,nndd ,,,1nnnn b) The delay estimate in part (a) is an average of the delays. It gives equal weight to recent delays and to “old” delays. The delay estimate in Section 6.3 gives more weight to recent delays; delays in the distant past have relatively little impact on the estimate. Problem 9. The two procedures are very similar. They both use the same formula, thereby resulting in exponentially decreasing weights for past samples. One difference is that for estimating average RTT, the time when the data is sent and when the acknowledgement is received is recorded on the same machine. For the delay estimate, the two values are recorded on different machines. Thus the sample delay can actually be negative. Problem 10. a) If there is packet lost, then other packets may have been transmitted in between the two received packets. b) Let denote the sequence number of the ith received packet. If Si t,t,20msecii,1 and S,S,1ii,1 then packet I begins a new talkspurt. Problem 11. a) Both schemes require 25% more bandwidth. The first scheme has a playback delay of 5 packets. The second scheme has a delay of 2 packets. b) The first scheme will be able to reconstruct the original high-quality audio encoding. The second scheme will use the low quality audio encoding for the lost packets and will therefore have lower overall quality. c) For the first scheme, many of the original packets will be lost and audio quality will be very poor. For the second scheme, every audio chunk will be available at the receiver, although only the low quality version will be available for every other chunk. Audio quality will be acceptable. Problem 12. The interarrival jitter J is defined to be the mean deviation (smoothed absolute value) of the difference D in packet spacing at the receiver compared to the sender for a pair of packets. As shown in the equation below, this is equivalent to the “relative transit time” for the two packets; the relative transit time is the difference between a packet's RTP timestamp and the receiver's clock at the time of arrival. If is the RTP timestamp for Ti packet and is the time of arrival in RTP timestamp units for packet i, then for two iri packets i and j, D is defined as D(i,j),(r,r),(s,s),(r,s),(r,s) ijijjjii The interarrival jitter is calculated continuously as each data packet i is received, using this difference D for that packet and the previous packet i-1 in order of arrival (not necessarily in sequence), according to the formula |D(i,j),J|J,J, 16 Whenever a reception report is issued, the current value of J is sampled. Problem 13. a) As discussed in Chapter 2, UDP sockets are identified by the two-tuple consisting of destination IP address and destination port number. So the two packets will indeed pass through the same socket. b) Yes, Alice only needs one socket. Bob and Claire will choose different SSRC?s, so Alice will be able distinguish between the two streams. Another question we could have asked is: How does Alice?s software know which stream (ie SSRC) belongs to Bob and which stream belongs to Alice? Indeed, Alice?s software may want to display the sender?s name when the sender is talking. Alice?s software gets the SSRC to name mapping from the RTCP source description reports. Problem 14 a) The session bandwidth is 4* 100 kbps = 400 kbps. Five percent of the session bandwidth is 20 kbps. b) Sends each user is both a sender and receiver, each user gets 5 kbps for RTCP packets (receiver reports, sender reports, and source description packets). Problem 15. a) Like HTTP, all request and response methods are in ASCII text. RTSP also has methods (SETUP, PLAY, PAUSE), and the server responds with standardized reply codes. Yes, using the GET method, HTTP can be used to request a stream. b) RTSP messages use different port numbers than the media streams. Thus RTSP is out-of-band. HTTP objects are sent within the HTTP response message. Thus HTTP is in-band. HTTP does not keep session state: each request is handled independently. RTSP uses the Session ID to maintain session state. For example, in the lab (programming assignment) for this chapter, the RTSP server is in one several states for each session ID. When in the pause state, the server stores the number of the frame at which the pause occurred. Problem 17. a) true b) true c) No, RTP streams can be sent to/from any port number. See the SIP example in Section 6.4.3 d) No, typically they are assigned different SSRC values. e) True f) False, she is indicating that she wishes to receive GSM audio g) False, she is indicating that she wishes to receive audio on port 48753 h) True, 5060 for both source and destination port numbers i) True j) False, this is a requirement of H.323 and not SIP. Problem 18. a) One possible sequence is 1 2 1 3 1 2 1 3 1 2 1 3 … Another possible sequence is 1 1 2 1 1 3 1 1 2 1 1 3 1 1 2 1 1 3 … b) 1 1 3 1 1 3 1 1 3 1 1 3 … Problem 19. r,p,b,1.See figure below. For the second leaky bucket, Problem 20. No. Figure: Solution to problem 19 Problem 21. Let be a time at which flow 1 traffic starts to accumulate in the queue. We refer to ,,as the beginning of a flow-1 busy period. Let be another time in the same flow-1 t,, [,,t]busy period. Let be the amount of flow-1 traffic transmitted in the interval . T(,,t)1 Clearly, W1T,(,t),R(t,,) 1W,j Let be the amount of flow-1 traffic in the queue at time t. Clearly, Q(t)1 Q(t),b,r(t,,),T(,,t)1111 W1,b,r(t,,),R(t,,) 11W,j ,,W1,,,,b(t,)rR ,,11W,,,j,, W1r,RSince , . Thus the maximum amount of flow-1 traffic in the queue Q(t),b111W,j WR1is . The minimal rate at which this traffic is served is . b1W,j Thus, the maximum delay for a flow-1 bit is b1,d. maxWR/W,j1 Chapter 7 Review Questions Question 1. Confidentiality is the property that the original plaintext message can not be determined by an attacker who intercepts the ciphertext-encryption of the original plaintext message. Message integrity is the property that the receiver can detect whether the message sent (whether encrypted or not) was altered in transit. The two are thus different concepts, and one can have one without the other. An encrypted message that is altered in transmit may still be confidential (the attacker can not determine the original plaintext) but will not have message integrity if the error is undetected. Similarly, a message that is altered in transit (and detected) could have been sent in plaintext and thus would not be confidential. Question 2. A passive intruder only monitors (“sniffs”, intercepts) messages. An active intruder can also monitor traffic, but will also actively send messages into the network Question 3. One important difference between symmetric and public key systems is that in symmetric key systems both the sender and receiver must know the same (secret) key. In public key systems, the encryption and decryption keys are distinct. The encryption key is known by the entire world (including the sender), but the decryption key is known only by the receiver. Question 4. In this case, a known plaintext attack is performed. If, somehow, the message encrypted by the sender was chosen by the attacker, then this would be a chosen-plaintext attack. Question 5. If each user wants to communicate with N other users, then each pair of users must have a shared symmetric key. There are N*(N-1)/2 such pairs and thus there are N*(N-1)/2 keys. With a public key system, each user has a public key which is known to all, and a private key (which is secret and only known by the user). There are thus 2N keys in the public key system. Question 6. A nonce is used to ensure that the person being authenticated is “live.” Nonces thus are used to combat playback attacks. Question 7. Once in a lifetimes means that the entity sending the noce will never again use that value to check whether another entity is “live”. Question 8. In a man-in-the-middle attacker, the attacker interposes him/herself between the sender and receiver, often performing some transformation (e.g., re-encoding or altering) of data between the sender and receiver. Man-in-the-middle attacks can be particularly pernicious since (as shown in Figure 7.13) the sender and receiver will each receive what the other has sent and since they are using encryption would think that they have achieved confidentiality. Question 9. Suppose Bob sends an encrypted document to Alice. To be verifiable, Alice must be able to convince herself that Bob sent the encrypted document. To be non-forgeable, Alice must be able to convince herself that only Bob could have sent the encrypted document (e.g.,, non one else could have guess a key and encrypted/sent the document) To be non-reputiable, Alice must be able to convince someone else that only Bob could have sent the document. To illustrate the latter distinction, suppose Bob and Alice share a secret key, and they are the only ones in the world who know the key. If Alice receives a document that was encrypted with the key, and knows that she did not encrypt the document herself, then the document is known to be verifiable and non-forgeable (assuming a suitably strong encryption system was used). However, Alice can not convince someone else that Bob must have sent the document, since in fact Alice knew the key herself and could have encrypted/sent the document. Question 10. One requirement of a message digest is that given a message M, it is very difficult to find another message M’ that has the same message digest and, as a corollary, that given a message digest value it is difficult to find a message M’’ that has that given message digest value. We have “message integrity” in the sense that we have reasonable confidence that given a message M and its signed message digest that the message was not altered since the message digest was computed and signed. This is not true of the Internet checksum, where we saw in Figure 7.18 that it easy to find two messages with the same Internet checksum. Question 11. A public-key signed message digest is “better” in that one need only encrypt (using the private key) a short message digest, rather than the entire message. Since public key encryption with a technique like RSA is expensive, it?s desirable to have to sign (encrypt) a smaller amount of data than a larger amount of data. Question 12. The message associated with a message digest value need not be encrypted. Encrypting the message provides for confidentiality, which the message digest provides for integrity – two different goals. Question 13. A key distribution center is used to create a distribute a symmetric session key for two communicating parties, requiring only that the two parties each have their own symmetric key that allows them to encrypt/decrypt communication to/from the key distribution center. A certification authority binds an individual?s identity with a public key. The CA signs that key with its (the CAs) private key. Thus, given the public key of a CA, one can retrieve the CA-signed public key for an entity, verify the CA?s signature, and then have the CA-certified public key for an entity. Question 14. The AH provides for authentication and message integrity, while ESP provides for authentication, integrity, and confidentiality. Chapter 7 Problems Problem 1. The encoding of “This is an easy problem” is “uasi si my cmiw lokngch”. The decoding of “rmij'u uamu xyj” is “wasn't that fun”. Problem 2. If Trudy knew that the words “bob” and “alice” appeared in the text, then she would know the ciphertext for b,o,a,l,i,c,e (since “bob” is the only palindrome in the message, and “alice” is the only 5-letter word. If Trudy knows the ciphertext for 7 of the letters, then she only needs to try 19!, rather than 26!, plaintext-ciphertext pairs. The difference 910.between 19! and 26! is 26*25*24...*20, which is 3315312000, or approximately Problem 3. Every letter in the alphabet appears in the phrase “The quick fox jumps over the lazy brown dog.” Given this phrase in a chosen plaintext attack (where the attacker has both the plain text, and the ciphertext), the Caesar cipher would be broken - the intruder would know the ciphertext character for every plaintext character. However, the Vigenere cipher does not alway translate a given plaintext character to the same ciphertext character each time, and hence a Vigenere cipher would not be immediately broken by this chosen plaintext attack. Problem 4. p,3q,11.q,11.n,33e,9We are given and We thus have and Choose (it might be a good idea to give students a hint that 9 is a good value to choose, since the resulting calculations are less likely to run into numerical stability problems than other (p,1)*(q,1),20d,9choices for ) since 3 and have no common factors. Choose e. e*d,81e*d,1,80also so that and thus is exactly divisible by 20. We can now n,33e,9d,9.perform the RSA encryption and decryption using , and letter m m**e ciphertext = m**e mod 33 h 8 134217728 29 e 5 1953125 20 l 12 5159780352 12 l 12 5159780352 12 o 15 38443359375 3 ciphertext c**d m = c**d mod n letter 29 14507145975869 8 h 20 512000000000 5 e 12 5159780352 12 l 12 5159780352 12 l 3 19683 15 o Problem 5. Bob does not know if he is talking to Trudy or Alice initially. Bob and Alice share a secret key Kthat is unknown to Trudy. Trudy wants Bob to authenticate her (Trudy) A-B as Alice. Trudy is going to have Bob authenticate himself, and waits for Bob to start: 1. Bob-to-Trudy: “I am Bob” Commentary: Bob starts to authenticate himself. Bob?s authentication of himself to the other side then stops for a few steps. 2. Trudy-to-Bob: “I am Alice” Commentary: Trudy starts to authenticate herself as Alice 3. Bob-to-Trudy: “R” Commentary: Bob responds to step 2 by sending a nonce in reply. Trudy does not yet know K(R) so she can not yet reply. A-B 4. Trudy-to-Bob: “R” Commentary: Trudy responds to step 1 now continuing Bob?s authentication, picking as the nonce for Bob to encrypt, the exact same value that Bob sent her to encrypt in Step 3. 5. Bob-to-Trudy: “K(R)” Bob completes his own authentication of himself A-B to the other side by encrypting the nonce he was sent in step 4. Trudy now has K(R). (Note: she does not have, nor need, K A-BA-B 6. Trudy-to-Bob: “K(R)” Trudy completes her authentication, responding to A-B the R that Bob sent in step 3 above with K(R). Since Trudy has returned A-B the properly encrypted nonce that Bob send in step 3, Bob thinks Trudy is Alice! Problem 6. This wouldn't really solve the problem. Just as Bob thinks (incorrectly) that he is authenticating Alice in the first half of Figure 7.14, so too can Trudy fool Alice into thinking (incorrectly) that she is authenticating Bob. The root of the problem that neither Bob nor Alice can tell is the public key they are getting is indeed the public key of Alice of Bob. Problem 7. As discussed in section 7.4.2, full blown encryption is more computationally complex than a message digest such as MD5. Problem 8. The message I O U 2 0 0 . 8 9 B O B has the same checksum. Problem 9. If Alice wants to ensure that the KDC is live (that is, the message she will be receiving ack from the KDC are not part of a playback attack), she can include a nonce, R0 in the initial message () to the KDC. The KDC would then include R) in the K(A,B,R0)A,KDC reply back to Alice, thus proving the KDC is indeed live. Note that it is already assumed that only the KDC and Alice know the key to decrypt . K(A,B,R0)A,KDC Problem 10. The message from Alice is encoded using a key that is only known to Alice and the KDC. Therefore the KDC knows (by definition) that anyone using the key must be Alice. It is interesting to think about what damage Trudy could do if she obtains Alice's key. In this case, she can impersonate Alice to anyone; see also the answer to question 11. Problem 11. If the KDC goes down, no one can communicate securely, as a first step in communication (see Figure 7.19) is to get the one-time session key from the KDC. If the CA goes down, then as along as the CA's public key is known, one can still communicate securely using previously-issued certificates (recall that once a certificate is issued, the CA is not explicitly involved in any later communication among parties using the CA's certificate. Of course, if the CA goes down, no new certificates can be issued. Problem 12. P1 111.11.11.1 222.22.6.6 deny deny(R2) deny(R2) (hacker subnet) (corp.net) P2 111.11.11.1 222.22.22.2 permit permit(R1) deny(R2) (hacket subnet) (special subnet) P3 111.11.6.6 222.22.22.2 permit permit(R1) permit(R1) (univ. net, not (special subnet) hacker subnet) P4 111.11.6.6 222.22.6.6 deny deny(R3) deny(R3) (univ. net, not (corp. net) hacker subnet) Under the ordering R1, R2, R3, removing R2 would have no effect. Note that under this ordering, R2 is only involved in the denial of P1. Since P1 would also be denied under R3, the removal of P2 would have no effect. Under the ordering R2, R1, R3, if R2 is removed then P2 would be admitted. Problem 13. + K A- K(H(m)) A+ H(m ) . K( ) A- - m, (H(m)) KK(m, )K(H(m)) ASA. K( ) Scompare - . H( ) - KInternet H(m ) S m - . K( ) B+ K(K ) BS- K B Chapter 8 Review Questions Question 1. A network manager would like to have network management capabilities when (a) a component of the network fails, (b) a component of the network is about to fail, and is acting “flaky” (c) a component of the network has been compromised from a security standpoint and is attacking the network, e.g., by launching a DOS attack by flooding the network with packets, (d) traffic levels exceed a certain threshold on a link, causing packets to be dropped, (e) everything is running smoothly (in order to know that everything is running smoothly and there are no problems). There are many additional reasons as well. Question 2. Performance management, fault management, configuration management, accounting management, security management. Question 3. Network management is more narrowly defined, as it focuses on the resources in the monitoring their functions and controlling their operation. These resources are network – combined (used) in various ways to implement services. Note that while the network resources may all be functioning as they should, they may not be sufficient to implement a service with a given level of performance; this latter concern is an aspect of service management. Question 4. , Managing entity: control the collection, processing, analysis, display of network management information, and is used by the network manager to control the devices in the network. , Managed device: a piece of network equipment that is under the control of the managing entity. , Management agent: a software process running on a managed device that communicated with the managing entity and takes action on the managed device under the control of the managing entity. , MIB: pieces of information associated with all of the managed objects in a device. , Network management protocol: runs between the managing entity of the management agents on the managed devices, allowing the agents to alert the managing entity to potential problems, and allowing the managing entity to send commands to the management agents. Question 5. The SMI is a data-definition language used to defined the pieces of information in an SNMP MIB. Question 6. The trap message is sent by the management agent to the managing entity (and requires no response from the managing entity). A request-response message is sent by the managing entity, with the response coming back from the management agent. Question 7. GetRequest, GetNextRequest, GetBulkRequest, SetRequest, InformRequest, Response, Trap Question 8. The SNMP engine is the part of an SNMP implementation that handles the dispatching, processing, authentication, access control, and timeliness of he SNMP messages. See Figure 8.5. Question 9. The ASN.1 object identifier tree provides a standard way to name objects. Question 10. The role of the presentation layer is to allow the sending and receiving of data in a machine-independent format (i.e., without regard to the particular storage and architectural conventions of the sender and receiver). Question 11. The Internet does not have presentation layer. It is up to the implementers of protocols to make sure that data is sent and received in the desired format. Question 12. In TLV encoding, each piece of data is tagged with its type, length, and value. Chapter 8 Problems Problem 1. Request response mode will generally have more overhead (measured in terms of the number of messages exchanged) for several reasons. First, each piece of information received by the manager requires two messages: the poll and the response. Trapping generates only a single message to the sender. If the manager really only wants to be notified when a condition occurs, polling has more overhead, since many of the polling messages may indicate that the waited-for condition has not yet occurred. Trapping generates a message only when the condition occurs. Trapping will also immediately notify the manager when an event occurs. With polling, the manager needs will need to wait for half a polling cycle (on average) between when the event occurs and the manager discovers (via its poll message) that the event has occurred. If a trap message is lost, the managed device will not send another copy. If a poll message, or its response, is lost the manager would know there has been a lost message (since the reply never arrives). Hence the manager could repoll, if needed. Problem 2. Often, the time when network management is most needed is in times of stress, when the network may be severely congested and packets are being lost. With SNMP running over TCP, TCP's congestion control would cause SNMP to back-off and stop sending messages at precisely the time when the network manager needs to send SNMP messages. Problem 3. 1.3.6.1.2.1.5 Problem 4. Microsoft file formats are under 1.2.840.113556.4 (see section 8.3.2) Problem 5. Your probably be under 1.2.840 Problem 6. 3 7 'J' 'a' 'c' 'k' 's' 'o' 'n' 2 2 1 15
/
本文档为【计算机网络第三版答案英文版】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。 本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。 网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。

历史搜索

    清空历史搜索