page 96. section 1.2_R4: What is a client program? What is a server

advertisement
page 96.
section 1.2_R4:
What is a client program? What is a server program? Does a server program request
and receive services from a client program?
ANS: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.
section 1.3_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.)
ANS:At time t0 the sending host begins to transmit. At time t1 = L/R1, 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 t1, it can begin
to transmit the packet to the receiving host at time t1. At time t2 = t1 + L/R2, 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/R1 + L/R2.
page 97.
section 1.4_R20:
How long does it take a packet of length 1,000 bytes to propagate over a link of
distance 2,500 km, propagation speed 2.5.108 m/s,and transmission rate 2Mbps?
More generally, how long does it take a pocket of length L to propagate over a link of
distance d, propagation speed s, and transmission rate R bps? Does this delay depend
on packet length? Does this delay depend on transmission rate?
ANS:10msec; d/s; no; no
page 98.
section 1.5_R25:
What are the five layers in the Internet protocol stack? What are the principal
responsibilities of each of these layers?
ANS: 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.5.1.
page 99._P5:
This elementary problem begins to explore propagation delay and transmission delay,
two central concepts in data networking. Consider two hosts, A and B, connected by a
single link of rate R bps. Suppose that the two hosts are separated by m meters, and
suppose the propagation speed along the link is s meters/sec. Host A is to send a
packet of size L bits to Host B.
a) d prop  m / s seconds.
b) d trans  L / R seconds.
c) d end toend  (m / s  L / R) seconds.
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
m
L
100
2.5  108   893 km.
S
R
28  10 3
page 100._P6:
Suppose users share a 1Mbps link. Also suppose each user requires 100 kbps when
transmitting, but each user transmits only 10 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?
ANS:10 users can be supported because each user requires one tenth of the
bandwidth.
b. For the remainder of this problem, suppose packet switching is used. Find the
probability that a given user is transmitting.
ANS: p  0.1 .
c. Suppose there are 40 users. Find the probability that at any given time, exactly n
users are transmitting simultaneously.(Hint:Use the binomial distribution.)
 40 
40 n
ANS:   p n 1  p  .
n
 40  n
 p 1  p 40n .
n 0  n 
9
d. ANS: 1   
page 103._P24:
In modern packet-switched networks, the source host segments long,
applications-layer messages (for example, an image or a music file) into smaller
packets and sends the packets into the network. The receiver then reassembles the
packets back into the original message. We refer to this process as message
segmentation. Figure 1.28 illustrates the end-to-end transport of a message with and
without message with and without message segmentation. Consider a message that is
7.5.106 bits long that is to be sent from source to destination in Figure 1.28.
Suppose each link in the figure is 1.5 Mbps. Ignore propagation, queuing, and
processing delays.
a. Consider sending the message from source to destination without message
segmentation. How long does it take to move the message from the source host to
the first packet switch? Keeping in mind that each switch uses store-and-forward
packet switching, what is the total time to move the message from source host to
destination host?
b. How long does it take to move the file from source host to destination host when
message segmentation is used? Compare this result with your answer in part (a)
and comment.
c. Now suppose that the message is segmented into 5,000 packets, with each packet
being 1,500 bits long. How long does it take to move the first packet from source
host to the first switch? When the first packet is being sent from the first switch to
the second switch, the second packet is being sent from the source host to the first
switch. At what time will the second packet be fully received at the first switch?
d. Discuss the drawbacks of message segmentation.
ANS:
a) Time to send message from source host to first packet switch =
7.5  10 6
sec  5 sec . With store-and-forward switching, the total time to move
1.5  10 6
message from source host to destination host = 5 sec 3 hops  15 sec
b) Time to send 1st packet from source host to first packet switch = .
1.5  10 3
sec  1 m sec . Time at which 2nd packet is received at the first switch =
6
1.5  10
time at which 1st packet is received at the second switch = 2  1 m sec  2 m sec
c) Time at which 1st packet is received at the destination host = .
1 m sec 3 hops  3 m sec . After this, every 1msec one packet will be received;
thus time at which last (5000th) packet is received =
3 m sec  4999 *1m sec  5.002 sec . It can be seen that delay in using message
segmentation is significantly less (almost 1/3rd).
d) Drawbacks:
i. Packets have to be put in sequence at the destination.
ii. Message segmentation results in many smaller packets. Since
header size is usually the same for all packets regardless of their
size, with message segmentation the total amount of header bytes is
more.
page 104._P25:
Consider sending a large file of F bits from Host A to Host B. There are two links (and
one switch) between A and B, and the links are uncongested (that is, no queuing
delays).Host A segments the file into segments of S bits each and adds 40 bits of
header to each segment, forming packets of L = 40 +S bits. Each link has a
transmission rate of R bps. Find the value of S that minimizes the delay of moving the
file from Host A to Host B. Disregard propagation delay.
ANS:
Time at which the 1st packet is received at the destination =
one packet is received at destination every
whole file = delay 
S  40
 2 sec. After this,
R
S  40
sec. Thus delay in sending the
R
S  40
F
S  40
S  40 F
 2  (  1)  (
)
 (  1)
R
S
R
R
S
To calculate the value of S which leads to the minimum delay,
d
F 1 40  S
1
delay  0  ( 
)   0  S  40 F
2
dS
R S
R
S
Download