Exercise Sheet 1: © Prof. A. Bachir, 2023/2024
Exercise Sheet 1: © Prof. A. Bachir, 2023/2024
Exercise Sheet 1: © Prof. A. Bachir, 2023/2024
Exercise Sheet 1
Exercise 1
Consider the diagram below. Link 1 has length L1 m (where m stands for meters) and allows
packets to be propagated at speed S1 (mps) , while Link 2 has length L2 m but it only allows
packets to be propagated at speed S2 (mps) (because two links are made of different materials).
Link 1 has transmission rate T1 (bps) and Link 2 has transmission rate T2 (bps).
Link 1 Link 2
A B C
Assuming nodes can send and receive bits at full rate and ignoring processing delay, consider
the following scenarios:
(a) How long would it take to send a packet of 500 Bytes from Node A to Node B given T1 =
10000, L1 = 100000, and S1 = 2.5 · 108 ?
(b) Compute RTT (round trip time) for a packet of B Bytes sent from Node A to Node C
(packet gets transmitted back from Node C immediately after Node C receives it).
(c) At time 0, Node A sends packet P1 with D1 Bytes and then it sends another packet P2
with D2 Bytes immediately after it pushes all bits of P1 onto Link 1. When will Node C
receive the last bit of P2 ?
Exercise 2
Consider a single link with bandwidth B and propagation delay L. It takes 1 ms for an entire
500 bytes packet to arrive at the other end of the link (that is, it takes 1 ms from the time the
first bit starts being transmitted until the last bit arrives at the other end of the link). It takes
2 ms for an entire 1500 bytes packet to arrive at the other end of the link.
(a) Assume the utilization of the first router (R1) is ρ1 = 0.2, the utilization of the second
router is ρ2 = 0.3, and sender A generates and sends one packet of size 10 [kbit] every 3
seconds. What is the rate at which packets arrive at receiver B?
(b) The assumptions remain the same as in (a); except, sender A generates and sends only 3
packets in total. What is the overall time required to deliver these three packets to receiver
B? (Propagation delay can be ignored on all three links.)
(c) The assumptions are the same as in (a); except, the utilization of the second router (R2)
changes to ρ2 = 1.2. What is the rate at which packets arrive at receiver B in this case?
(d) The assumptions remain the same as in (c). What are the maximum size to which queues
in routers R1 and R2 grow? (Answer for each queue individually.)
Exercise 4
Suppose we would like to transfer a file of K bits from node A to node C using packet
switching (see Figure below). The path from node A to node C passes through two links and
one intermediate node, B, which is a store-and-forward device. The two links are of rate R [bps].
The packets contain P bits of data (P<K) and a 6-byte header. What value of P minimizes the
time it takes to transfer the file from A to C? (You can assume: propagation delay on each link
= 0, and K/P gives an integer number.)
R[bps] R[bps]
A B C
Exercise 5
Assume there is one router and two links between the file server (S) and client (C), as shown
in the figure below. The first link has transmission rate R1 and the second link has transmission
rate R2. Assume the file gets broken into three packets, each of size L. Ignore all propagation
and processing delays. Answer the following three questions:
(a) How long does it take from when the server starts sending the file until the client has
received the whole file if R1 ≤ R2?
(b) How long does it take from when the server starts sending the file until the client has
received the whole file if R1 > R2?
(c) In case (b), how long does the second packet spend in the router’s queue?
Exercise 6
Consider two serially connected packet switches as shown in the figure below. The link
connecting the two switches (Link 1) is full-duplex, with data rate of 1 Mbps and propagation
delay of 3 ms (in each direction). The packets sent through the network are 1000 bits long. The
input buffer/queue of Switch 2 can store at most 100 packets.
To control congestion and avoid packet loss, the switches employ the so-called ‘back pressure’
mechanism. According to this mechanism, whenever Switch 2 detects congestion on its outgoing
link (i.e., no more packets can be sent over Link 2), Switch 2 sends a signal back to Switch 1
instructing Switch 1 to halt further packet transmission over Link 1. In this question, you are
asked to determine how big Switch 2 should let its buffer grow (in case of congestion on Link
2), before sending a back pressure signal to Switch 1. Your answer should be in the units of
‘packets’.
1Mbps, 3ms
S1 S2
Link 1 Link 2
Additional assumptions:
• Once detected, the congestion on Link 2 could be alleviated at any point in time. Hence,
the back pressure signal should not be sent too early (unless there is a real risk of Switch
2 running out of buffer space), nor too late (no packet should ever be lost/dropped).
Exercise 7
Unlike store-and-forward, cut-through switching or forwarding allows a node inside a network
to start forwarding a packet before it has been received in its entirety. Consider a path in a
network that connects a host A to a host B via n links (1..n) through n-1 intermediate routers,
each employing cut-through forwarding.
...
A R1 R2 Rn B
Ignore processing delay and assume that there is no queuing delay. Assume that all links have
the same length d and that the speed of light in the link medium is s. Also, assume that each
link has bandwidth R and that packets of length L bits are sent through the network. Each
switch can start forwarding the packet after Lc bits have been received.
Copyright © Prof. A. Bachir, 2023/2024.
(a) What is the total latency for a single packet (counted from first bit sent at A until last bit
received at B)?
(b) How much did cut-through switching reduce the latency for sending a single packet end-
to-end, compared to store-and-forward?
(c) Now suppose a message of F bits is sent, which is sent as multiple packets. Will the latency
savings increase, decrease, or stay the same as in the case of a single packet? Justify your
answer.