You are on page 1of 4

Solutions to Assignment1

Name: Jingyang Li

ID: 5100309313

Email: xianyun9527@gmail.com

Problem6: In this problem we consider sending real-time voice from Host


A to Host B over a packet-switched network(VoIP). Host A converts analog
voic to a digital 64 kbps bit stream on the fl y. Host A then groups the bits
into 56-byte packets. There is one link between HostA and B; its transmisiion rate is 2 Mbps and its propagation delay is 10 msec. As soon as Host
A gathers a packet, it sends it to Host B. As soon as Host B receives an
entire packet, it converts the packets bits to an analog signal. How much
time elapses from the time a bit is created(from the original analog signal
at Host A)until the bit is decoded(as part of the analog signal at Host B)?
Solution. As we can see, if we generate all the bits in the packet, it needs
56 8
sec = 7msec
64 103
And the time it takes to transmit the packet is
56 8
sec = 224msec
2 106
Hence, the delay untile the bit is decoded is
7msec + 224sec + 10msec = 17.224msec
Problem7: 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 statistical multiplexing in Section 1.3.)
1. When circuit switching is used, how many users can be supported?
2. For the remainder of this problem, suppose packet switching is used.
Find the probability that a given user is transmitting.
3. Suppose there are 120 users. Find the probability that at any given
time, exactly n users are transmitting simultaneously. (Hint: Use the
binomial distribution.)
4. Find the probability that there are 21 or more users transmitting simultaneously.
Solution.

1. There are 3Mbps/150kbps = 20 users can be supported.

2. According to the article, each user transmits only 10 percent of the


time.
Hence, suppose the probability that a given user is transmitting is p,
we have
p = 0.1
1

3. As we have known from the question 2, we can compute the probability


as


120 n
p (1 p)120n
The probability =
n
4. Because we want to know the probability that there are 21 or more
users transmitting simultaneously, according to the question 3, we can
say that

20 
X
120 n
The probability = 1
p (1 p)120n
n
n=0

Problem 24: Suppose two hosts, A and B, are separated by 20,000 kilometers
and are connected by a direct link of R = 2Mbps. Suppose the propagation
speed over the link is 2.5 108 meters/sec.
1. Calculate the bandwidth-delay product, R dprop
2. Consider sending a file of 800,000 bits from Host A to Host B. Suppose the file is sent continuously as one large message. What is the
maximum number of bits that will be in the link at any given time?
3. Provide an interpretation of the bandwidth-delay product.
4. What is the width (in meters) of a bit in the link? Is it longer than a
football field?
5. Derive a general expression for the width of a bit in terms of the
propagation speed s, the transmission rate R, and the length of the
link m.
Solution.

1. Suppose the bandwidth delay product is BD, we have


BD = 2 106 (20000 103 /2.5 108 )
= 1.6 105 bits

2. As 160000 < 800000, we can know that the maximum number of bits
is 160000bits
3. The bandwidth-delay product is the maximum number of bits that
can be in the link at any given time while the transimission is full.
4. The width of a bit is
2 104 km
= 125m/bit
160000bit
While the width of a football field is 105, hence the width of a bit is
longer.
2

5. We can see that the width of a bit is


m
s
m =
R s
R
Problem 30: In modern packet-switched networks, the source host segments
long, application-layer messages (for example, an image or a music file)
into 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 of a
message with and without message segmentation. Consider a message that
is 8106 bits long that is to be sent from source to destination in Figure 1.28.
Suppose each link in the figure is 2 Mbps. Ignore propagation, queuing, and
processing delays.
1. 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?
2. Now suppose that the message is segmented into 4,000 packets, with
each packet being 2,000 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?
3. 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(1) and comment.
3+ Consider a message of length L which begins at source and travels over
three links to a destination. These three links are connected by two
packet switches. Suppose that the message is segmented into packets,
with each packet being m bits long. Let di , si and Ri denote the length,
propagation speed, and the transmission rate of link i, for i = 1, 2, 3.
The packet switch delays each packet by d pruc. Assuming no queuing
delays, in terms of di , si , Ri (i = 1, 2, 3), m and L,what is the total
end-to-end delay for the packet?
4. Discuss the drawbacks of message segmentation.
Solution.
1. The time it takes to move the message from the source host
to the first packet switch is
8 106
= 4s
2 106
3

And the total time is


4s 3 = 12S
2. The time it takes to move the message from the source host to the
first packet switch is
2000
= 103 s
2 106
While the second one needs
103 2 = 2 103
3. As the first message will be received by the destination host after
1 103 3 = 3 103 s, hence the total message will be completely
received by the destination host after
3 103 + 3999 1 103 = 4.002s
4. When the message is segmented, the packet will be trasmitted to the
destination host by sequence, but there will be more header bytes with
the numer of packet getting biger.
Additional Problem: Compare the delay in sending an x-bit message over a
k-hop path in a circuit-switched network and in a (lightly loaded) packetswitched network. The circuit setup time is s sec, the propagation delay is
d sec per hop, the packet size is p bits, and the data rate is b bps. Under
what conditions does the packet network have a lower delay?
Solution. In the circuit-switched network, the total delay is s + k d + x/b.
While in the packet-switched network, the total delay is x/b + (k 1)p/b.
Hence, when s > (k 1)p/b, the packet-switched network has a lower total
delay.

You might also like