Skip to document

Tut Problems + Answers Merged

NetFun Tutorial Work All written out
Course

Networking Fundamentals (41092)

238 Documents
Students shared 238 documents in this course
Academic year: 2019/2020
Uploaded by:
Anonymous Student
This document has been uploaded by a student, just like you, who decided to remain anonymous.
University of Technology Sydney

Comments

Please sign in or register to post comments.

Related Studylists

Network Fundamentalsnetfun

Preview text

Week 1. Tutorial Problems

R11. Suppose there is exactly one packet switch between a sending host and a receiving host. The transmission rates between the sending host and the switch and between the switch and the receiving host are R1 and R2, respectively. Assuming that the switch uses store-and-forward packet switching, what is the total end-to-end delay to send a packet of length L? (Ignore queuing, propagation delay, and processing delay.) a. Now assume packet length L=1500 byte, R1=1Mbps, R2=2Mbps, calculate the end- to-end Delay. b. Now assume packet length L=1200 byte, R1=3Mbps, R2=2Mbps, calculate the end- to-end Delay.

R13. Suppose users share a 2 Mbps link. Also suppose each user transmits continuously at 1 Mbps when transmitting, but each user transmits only 20 percent of the time. (See the discussion of statistical multiplexing in Section 1.) a. When circuit switching is used, how many users can be supported? b. For the remainder of this problem, suppose packet switching is used. Why will there be essentially no queuing delay before the link if two or fewer users transmit at the same time? Why will there be a queuing delay if three users transmit at the same time? c. Find the probability that a given user is transmitting. d. Suppose now there are three users. Find the probability that at any given time, all three users are transmitting simultaneously. Find the fraction of time during which the queue grows. e. Suppose now there are four users. Find the fraction of time during which the queue grows.

P3. Consider an application that transmits data at a steady rate (for example, the sender generates an N-bit unit of data every k time units, where k is small and fixed). Also, when such an application starts, it will continue running for a relatively long period of time. Answer the following questions, briefly justifying your answer: a) Would a packet-switched network or a circuit-switched network be more appropriate for this application? Why? b) Suppose that a packet-switched network is used and the only traffic in this network comes from such applications as described above. Furthermore, assume that the sum of the application data rates is less than the capacities of each and every link. Is some form of congestion control needed? Why?

P8. Suppose users share a 3 Mbps link. Also suppose each user requires 150 kbps when transmitting, but each user transmits only 10 percent of the time. (See the discussion of packet switching versus circuit switching in Section 1.) a) When circuit switching is used, how many users can be supported? b) For the remainder of this problem, suppose packet switching is used. Find the probability that a given user is transmitting. c) Suppose there are 120 users. Find the probability that at any given time, exactly n users are transmitting simultaneously. (Hint: Use the binomial distribution.)

Week 1. Tutorial Problem Solutions

R11. At time t 0 the sending host begins to transmit. At time t 1 = L/R 1 , the sending host completes transmission and the entire packet is received at the router (no propagation delay). Because the router has the entire packet at time t 1 , it can begin to transmit the packet to the receiving host at time t 1. At time t 2 = t 1 + L/R 2 , the router completes transmission and the entire packet is received at the receiving host (again, no propagation delay). Thus, the end-to-end delay is L/R 1 + L/R 2. a. Delay = 15008/1000000 + 15008/2000000 = 0=18ms b. Delay = 12008/3000000 + 12008/2000000 = 0=8ms

R13. a) 2 users can be supported because each user requires half of the link bandwidth. b) Since each user requires 1Mbps when transmitting, if two or fewer users transmit simultaneously, a maximum of 2Mbps will be required. Since the available bandwidth of the shared link is 2Mbps, there will be no queuing delay before the link. Whereas, if three users transmit simultaneously, the bandwidth required will be 3Mbps which is more than the available bandwidth of the shared link. In this case, there will be queuing delay before the link. c) Probability that a given user is transmitting = 0.

d) Probability that all three users are transmitting simultaneously = 3 ( ) 1 33

3
3 −
 −


p p

= (0) 3 = 0_._ Since the queue grows when all the users are transmitting, the fraction of time during which the queue grows (which is equal to the probability that all three users are transmitting simultaneously) is 0. e) The queue grows when more than two users are transmitting simultaneously. The fraction of time during which the queue grows (which is equal to the probability that three or four users are transmitting simultaneously) is: C(4,3)*p 3 (1-p)4-3+C(4,4)p 4 (1-p)4- =40 3 *0 + 0 4 = 0.

Problem 3 a) A circuit-switched network would be well suited to the application, 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 without significant waste. In addition, the overhead costs of setting up and tearing down connections are amortized over the lengthy duration of a typical application session.

b) In the worst case, all the applications simultaneously transmit over one or more network links. However, since each link has sufficient bandwidth to handle the sum of all of the applications' data rates, no congestion (very little queuing) will occur. Given such generous link capacities, the network does not need congestion control mechanisms.

Problem 8 a) 20 users can be supported. b) p = 1..

c) pn ( ) p n

n

− −


 120
1
120

.

Week 2. Tutorial Problem Solutions

Problem 6 a) dprop = m / s seconds.

b) dtrans = L / R seconds.

c) dendto −− end =( m / s + L / R ) seconds.

d) The last 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 already reached Host B. g) Want

( 5 10 ) 536

56 10
1208

= Rs =  3  =

L

m km.

Problem 10 The first end system requires L/R 1 to transmit the packet onto the first link; the packet propagates over the first link in d 1 /s 1 ; the packet switch adds a processing delay of dproc ; after receiving the entire packet, the packet switch connecting the first and the second link requires L/R 2 to transmit the packet onto the second link; the packet propagates over the second link in d 2 /s 2. Similarly, we can find the delay caused by the second switch and the third link: L/R 3 , dproc , and d 3 /s 3. Adding these five delays gives dend-end = L/R 1 + L/R 2 + L/R 3 + d 1 /s 1 + d 2 /s 2 + d 3 /s 3 + dproc+ dproc

To answer the second question, we simply plug the values into the equation to get 6 + 6 + 6

  • 20+16 + 4 + 3 + 3 = 64 msec.

Problem 11 Because bits are immediately transmitted, the packet switch does not introduce any delay; in particular, it does not introduce a transmission delay. Thus, dend-end = L/R + d 1 /s 1 + d 2 /s 2 + d 3 /s 3

For the values in Problem 10, we get 6 + 20 + 16 + 4 = 46 msec.

Problem 12 The arriving packet must first wait for the link to transmit 4 *1,500 bytes = 6,750 bytes or 54,000 bits. Since these bits are transmitted at 2 Mbps, the queuing delay is 27 msec. Generally, the queuing delay is ( nL + ( L - x ))/ R.

Week 3. Tutorial Problems

P1. True or false? a) A user requests a Web page that consists of some text and three images. For this page, the client will send one request message and receive four response messages. b) Two distinct Web pages (for example, mit/research and mit/students) can be sent over the same persistent connection. c) With nonpersistent connections between browser and origin server, it is possible for a single TCP segment to carry two distinct HTTP request messages. d) The Date: header in the HTTP response message indicates when the object in the response was last modified. e) HTTP response messages never have an empty message body.

P3. Consider an HTTP client that wants to retrieve a Web document at a given URL. The IP address of the HTTP server is initially unknown. What transport and application-layer protocols besides HTTP are needed in this scenario?

P4. Consider the following string of ASCII characters that were captured by Wireshark when the browser sent an HTTP GET message (i., this is the actual content of an HTTP GET message). The characters <cr><lf> are carriage return and line-feed characters (that is, the italized character string <cr> in the text below represents the single carriage-return character that was contained at that point in the HTTP header). Answer the following questions, indicating where in the HTTP GET message below you find the answer. GET /cs453/index HTTP/1<cr><lf> Host: gaia.cs<cr><lf> User-Agent: Mozilla/5 (Windows;U; Windows NT 5; en-US; rv:1) Gecko/20040804 Netscape/7 (ax) <cr><lf> Accept:ext/xml, application/xml, application/xhtml+xml, text/html;q=0, text/plain;q=0, image/png,/;q=0<cr><lf> Accept-Language: en-us, en;q=0<cr><lf> Accept-Encoding: zip, deflate<cr><lf> Accept-Charset: ISO-8859-1, utf-8;q=0,*;q=0<cr><lf> Keep-Alive: 300<cr><lf> Connection:keep-alive<cr><lf> <cr><lf> a. What is the URL of the document requested by the browser? b. What version of HTTP is the browser running? c. Does the browser request a non-persistent or a persistent connection? d. What is the IP address of the host on which the browser is running? e. What type of browser initiates this message? Why is the browser type needed in an HTTP request message?

P5. The text below shows the reply sent from the server in response to the HTTP GET message in the question above. Answer the following questions, indicating where in the message below you find the answer. HTTP/1 200 OK<cr><lf>

Week 3. Tutorial Problem Solutions

Problem 1 a) F – images need to be requested subsequently. b) T – when one page contains the link of the other. c) F – separate TCP connections for distinct requests d) F – Date: time of the response e) F – e. 404 could have empty message body

Problem 3 Application layer protocols: DNS and HTTP Transport layer protocols: UDP for DNS; TCP for HTTP

Problem 4 a) The document request was gaia.cs.umass/cs453/index. The Host : field indicates the server's name and /cs453/index indicates the file name. b) The browser is running HTTP version 1, as indicated just before the first <cr><lf> pair. c) The browser is requesting a persistent connection, as indicated by the Connection: keep- alive. d) This is a trick question. This information is not contained in an HTTP message anywhere. So there is no way to tell this from looking at the exchange of HTTP messages alone. One would need information from the IP datagrams (that carried the TCP segment that carried the HTTP GET request) to answer this question. e) Mozilla/5. The browser type information is needed by the server to send different versions of the same object to different types of browsers.

Problem 5

a) The status code of 200 and the phrase OK indicate that the server was able to locate the document successfully. The reply was provided on Tuesday, 07 Mar 2008 12:39: Greenwich Mean Time. b) The document index was last modified on Saturday 10 Dec 2005 18:27:46 GMT. c) There are 3874 bytes in the document being returned. d) The first five bytes of the returned document are : <!doc. The server agreed to a persistent connection, as indicated by the Connection: Keep-Alive field

Problem 7 The total amount of time to get the IP address is RTT 1 + RTT 2 ++ RTTn.

Once the IP address is known, RTTO elapses to set up the TCP connection and another RTTO elapses to request and receive the small object. The total response time is 2 RTTo + RTT 1 + RTT 2 ++ RTTn

Problem 8

a) RTT 1 ++ RTTn + 2 RTTo + 8  2 RTTo = 18 RTTo + RTT 1 ++ RTTn.

b) Non-persistent HTTP with 5 parallel connections, so first batch 5 parallel connections, and second batch 3 parallel connections. RTT 1 ++ RTTn + 2 RTTo + 2  2 RTTo = 6 RTTo + RTT 1 ++ RTTn

c) Persistent connection with pipelining. This is the default mode of HTTP. RTT 1 ++ RTTn + 2 RTTo + RTTo

= 3 RTTo + RTT 1 ++ RTTn.

Was this document helpful?

Tut Problems + Answers Merged

Course: Networking Fundamentals (41092)

238 Documents
Students shared 238 documents in this course
Was this document helpful?
41092 Network Fundamentals
Kurose & Keith, Computer Networking: A Top-Down Approach, 7th Edition. Pearson
1
Week 1. Tutorial Problems
R11. Suppose there is exactly one packet switch between a sending host and a receiving
host. The transmission rates between the sending host and the switch and between the
switch and the receiving host are R1 and R2, respectively. Assuming that the switch uses
store-and-forward packet switching, what is the total end-to-end delay to send a packet of
length L? (Ignore queuing, propagation delay, and processing delay.)
a. Now assume packet length L=1500 byte, R1=1Mbps, R2=2Mbps, calculate the end-
to-end Delay.
b. Now assume packet length L=1200 byte, R1=3Mbps, R2=2Mbps, calculate the end-
to-end Delay.
R13. Suppose users share a 2 Mbps link. Also suppose each user transmits continuously at 1
Mbps when transmitting, but each user transmits only 20 percent of the time. (See the
discussion of statistical multiplexing in Section 1.3.)
a. When circuit switching is used, how many users can be supported?
b. For the remainder of this problem, suppose packet switching is used. Why will there
be essentially no queuing delay before the link if two or fewer users transmit at the
same time? Why will there be a queuing delay if three users transmit at the same
time?
c. Find the probability that a given user is transmitting.
d. Suppose now there are three users. Find the probability that at any given time, all
three users are transmitting simultaneously. Find the fraction of time during which
the queue grows.
e. Suppose now there are four users. Find the fraction of time during which the queue
grows.
P3. Consider an application that transmits data at a steady rate (for example, the sender
generates an N-bit unit of data every k time units, where k is small and fixed). Also, when
such an application starts, it will continue running for a relatively long period of time.
Answer the following questions, briefly justifying your answer:
a) Would a packet-switched network or a circuit-switched network be more
appropriate for this application? Why?
b) Suppose that a packet-switched network is used and the only traffic in this network
comes from such applications as described above. Furthermore, assume that the
sum of the application data rates is less than the capacities of each and every link. Is
some form of congestion control needed? Why?
P8. Suppose users share a 3 Mbps link. Also suppose each user requires 150 kbps when
transmitting, but each user transmits only 10 percent of the time. (See the discussion of
packet switching versus circuit switching in Section 1.3.)
a) When circuit switching is used, how many users can be supported?
b) For the remainder of this problem, suppose packet switching is used. Find the
probability that a given user is transmitting.
c) Suppose there are 120 users. Find the probability that at any given time, exactly n
users are transmitting simultaneously. (Hint: Use the binomial distribution.)