CN Unit 1
CN Unit 1
and Internet
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.)
Solution:
t0 - the sending host begins to transmit
t1 = L/R1
R1 R2
t2 = t1 + L/R2
End-to-end delay = L/R1 + L/R2
Consider sending P packets from source to destination over a path
consisting of N links each of rate R. Determine what would be the delay?
(Assume store-and-forward packet switching)
The probability that a person can achieve a target is 3/4. The count of tries is 5. What is
the probability that he will attain the target at least thrice?
Given that, p = ¾, q = ¼, n = 5.
Thus, the required probability is: P(X = 3) + P(X=4) + P(X=5)
= 5C3 · (¾)3 (¼ )2 + 5C4 · (¾)4 (¼ )1 +5C5 · (¾)5
= 459/512
= 0.9
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.
a. When circuit switching is used, how many users can be supported?
b. If 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.
Solution:
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.2
d) Probability that all three users are transmitting simultaneously
=
= (0.2)3 = 0.008. (Binomial distribution)
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.008.
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
a) When circuit switching is used, how many users can be supported?
b) For the remainder of this problem, suppose that packet switching is used. Find the
probability 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.
b. Probability = 0.1
1. When circuit switching is used, what is the maximum number of users that can be supported?
Maximum number of users that can be supported = 200Mbps/ 20Mbps = 10 Users
2. Suppose packet switching is used. If there are 19 packet-switching users, can this many users be supported under
circuit-switching? Yes or No.
No. Under circuit switching, the 19 users would each need to be allocated 20 Mbps, for an aggregate of 380
Mbps - more than the 200 Mbps of link capacity available.
3. Suppose packet switching is used. What is the probability that a given (specific) user is transmitting, and the
remaining users are not transmitting?
Probability of one user transmitting × Probability of others not transmitting =0.1 ×(1-0.1) 18=0.015
4. Suppose packet switching is used. What is the probability that one user (any one among the 19 users) is transmitting,
and the remaining users are not transmitting?
The probability that exactly one (any one) of the N users is transmitting is nCs times the probability that a given
specific user is transmitting and the remaining users are not transmitting
= nCs ps (1 −p) n−s= 19C1 (0.1)1 (1 −0.1) 19−1 =19×0.1 ×(0.9)18= 0.285
5.When one user is transmitting, what fraction of the link capacity will be used by this user? Write your answer as a
decimal.
This user will be transmitting at a rate of 20 Mbps over the 200 Mbps link, using a fraction 0.1 of the link's capacity
when busy.
6. What is the probability that any 11 users (of the total 19 users) are transmitting and the remaining users are not
transmitting?
nCs ps (1 −p) n−s= 19C11 (0.1)11 (1 −0.1) 19−11 = 75582 ×(0.1 )11×(0.9)8= 3.25355727e-7 =0.000000325355727
Solution:
a. Propagation time = distance/speed of signal in media or channel
= 2500KM/(2.5 × 108 m/s )= 2500 × 1000 m/(2.5 · 108 m/s) = 0.01second (or) 10msecond
b. d/s
c. No
d. No
5. Suppose Host A wants to send a large file to Host B. The path from Host A to Host B
has three links, of rates R1 = 500 kbps, R2 = 2 Mbps, and R3 = 1 Mbps.
a. Assuming no other traffic in the network, what is the throughput for the file transfer?
b. Suppose the file size is 4 million bytes. How long will it take to transfer the file to Host
B?
c. Repeat (a) and (b), but now with R2 reduced to 100 kbps.
Solution:
a. 500kbps (Bottleneck link)
b. Filesize = 4×106 bytes, throughput = 500kbps
=>Filesize/Throughput = [4×(106) ×8]/[500×103] = 64 seconds
c. Throughput = 100kbps ; Time to transfer the file = 320 seconds
A —-R1(500kbps)—–X——–R2(2Mbps)—–X——-R3(1Mbps)—— B
6. Consider the circuit-switched network as shown below with 4 circuits on each link.
Label the four switches A, B, C and D, going in the clockwise direction.
a. What is the maximum number of simultaneous connections that can be in progress at
any one time in this network?
b. Suppose that all connections are between switches A and C. What is the maximum
number of simultaneous connections that can be in progress?
c. Suppose we want to make four connections between switches A and C, and another
four connections between switches B and D. Can we route these calls through the four
links to accommodate all eight connections?
Solution:
a) Between the switch in the upper left and the switch in the upper right we can have
4 connections. Similarly we can have four connections between each of the 3 other
pairs of adjacent switches. Thus, this network can support up to 16 connections.
c) Yes. For the connections between A and C, we route two connections through B and
two connections through D. For the connections between B and D, we route two
connections through A and two connections through C. In this manner, there are at
most 4 connections passing through any link.
7. 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. Express the propagation delay, dprop , in terms of m and s.
b. Determine the transmission time of the packet, dtrans , in terms of L and R.
c. Ignoring processing and queuing delays, obtain an expression for the end-to-end
delay.
d. Suppose Host A begins to transmit the packet at time t=0 . At time t= dtrans , where is
the last bit of the packet?
e. Suppose dprop is greater than dtrans . At time t=dtrans, where is the first bit of the
packet?
f. Suppose dprop is less than dtrans . At time t=dtrans , where is the first bit of the packet?
g. Suppose s=2.5×108 ,L=120 bits and R=56kbps. Find the distance m so that dprop equals
dtrans
Solution:
a) dprop=m/s seconds
b) dtrans=L/R seconds
c) Dend-to-end = (m/s + L/R) seconds
d) The bit 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) d_prop = d_trans => m/s = L/R => m =L×s /R
= 120×(2.5×108)/ (56×103)=535714.285714m
=535.714km(Approx. 536)
8. Consider a packet of length L which begins at end system A and travels over three links
to a destination end system. These three links are connected by two packet switches. 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 dproc. Assuming no queuing delays, in
terms of di, si, Ri, (i = 1,2,3), and L, what is the total end-to-end delay for the packet?
Suppose now the packet is 1,500 bytes, the propagation speed on all three links is 2.5 ·
108 m/s, the transmission rates of all three links are 2 Mbps, the packet switch processing
delay is 3 msec, the length of the first link is 5,000 km, the length of the second link is
4,000 km, and the length of the last link is 1,000 km. For these values, what is the end-to-
end delay?
Solution:
dend_end = L/R1 + L/R2 + L/R3 + d1/s1 + d2/s2 + d3/s3 + dproc + dproc
2 times dproc will be added i.e 3msec × 2 = 0.006 sec
dtrans = L/R = 1500 bytes/ 2Mbps = 0.006 sec
for three links => 0.006 × 3 = 0.018 sec
dprop= d/s
dprop1 = 5000km/(2.5X108 m/sec) = 0.020 sec
dprop2 = 4000km/(2.5X108 m/sec) = 0.016 sec
dprop3 = 1000km/(2.5X108 m/sec) = 0.004 sec
dproc = 3 ms(or) 0.003 seconds , Since there are two routers, total dproc =2(0.003)
dend-to-end = 3(dtrans) + d1/s1 + d2/s2+ d3/s3+2(dproc)
(0.018 + 0.020 + 0.016 + 0.004 + 0.006) sec = 0.064 sec (or 64msec)
9. In the previous problem, suppose R1=R2=R3=R and dproc= 0. Further
suppose the packet switch does not store-and-forward packets but instead
immediately transmits each bit it receives before waiting for the entire
packet to arrive. What is the end-to-end delay?
Solution:
As bits are immediately transmitted, the intermediate nodes (switch or router)
does not introduce any transmission delay; Thus,
dend-to-end = L/R + d1/s1 + d2/s2+ d3/s3
b. Since the message size is 2Mbits and the maximum packet size is 100Kbits, there will be a total
of 20 packets that need to be transmitted.[(2×1000)/100 = 20]
For the first packet, the end to end delay will be transmission plus propagation delay.(Without
considering queuing delay)
Total time(first packet) = (5×transmission delay + 5×propagation delay)
= (5×(100kbits/100Mbps) + 5×(250km/(2.5×108 m/s)) = 0.01s
Transmission Delay(for the 19 packets) = 19×(L/R) = 19×(100kbits/100Mbps) = 0.019s
Propagation delay(for the 19 packets) = 19× (d/s) = 19× 250Km/(2.5 × 108 m/s)=0.019s
dend-to-end = 0.01s + 0.019s+0.019s = 0.048s
c. If the source and destination are reversed there is no difference as the path and delays are
symmetric.
11. 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 voice to a digital 64 Kbps bit
stream on the fly. Host A then groups the bits into 56-byte packets. There is one link
between Hosts A and B; its transmission 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 packet’s 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:
Consider the first bit in a packet. Before this bit can be transmitted, all of the bits in the
packet must be generated.
64Kbps means in 1 second 64Kbits converted. Hence, time required for 1 bit =1/64K
Total Time required for Analog to digital conversion
= Total number of packets × Conversion time of analog signal to digital for one bit
= (56×8)/(64×103)sec=0.007sec
The time required to transmit the packet is (56×8)/(2×106)sec=0.000224sec.
Propagation delay = 0.01sec.
The delay until decoding is 0.007+0.000224+ 0.01 sec = 0.017224sec
12. 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.
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.)
d. Find the probability that there are 21 or more users transmitting
simultaneously.
Solution:
a) (3 Mbps)/(150Kbps) = 20 users can be supported.
b) Probability that a given user is transmitting(p) = 10% =10/100 = 0.1.
c)
d) 1-
13. 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?
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.
14. In modern packet-switched networks, including the Internet, the source host segments long, application-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 illustrates the end-to-end transport of a message with and without message segmentation.
Consider a message that is 8×106 bits long that is to be sent from source to destination in Figure. Suppose each link
transmission rate in the figure is 2 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. Now suppose that the message is segmented into 800 packets, with each packet being 10,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?
c. 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.
d. In addition to reducing delay, what are reasons to use message segmentation?
e. Discuss the drawbacks of message segmentation.
Solution.
a. Time to send message from source to first switch =8×106 / 2×106=4 sec
Total time to move message from source to destination = transmission time at source + at 1st switch + at 2nd
switch = 3[8×106 / 2×106]=12 sec
b. Time to send 1st packet from source host to first packet switch =10000/2×106=5 msec.
Time at which 2nd packet is received at the first switch = 2×5msec =10 msec
c. Time at which 1st packet is received at the destination host = 5 msec × 3 hops = 15 msec.
After this, every 5 msec (transmission time of a packet) one packet will be received at destination, thus time at
which last (800th) packet is received = 15 msec + 799×5 msec = 4.01 sec.
It can be seen that delay due to message segmentation is significantly less.(Approx. 1/3)
d. Without message segmentation, if bit errors are not tolerated, if there is a single bit error, the whole message
has to be re-transmitted (rather than a single packet).
Without message segmentation, huge packets (containing HD videos, for example) are sent into the network.
Routers have to accommodate these huge packets. Smaller packets have to queue behind enormous packets
and suffer unfair delays.