0% found this document useful (0 votes)
38 views30 pages

Chapter 1 EX

Uploaded by

ryuu.ducat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views30 pages

Chapter 1 EX

Uploaded by

ryuu.ducat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 30

Chapter 1

Exercises – part
1
Ion TURCANU: [email protected]

Mahdi FOTOUHI: [email protected]

Note: the slides used in this course are adapted from the original slides
created by Jim Kurose and Keith Rose:
https://gaia.cs.umass.edu/kurose_ross/ppt.htm Computer Networking: A
All material copyright 1996-2020 Top-Down Approach
J.F Kurose and K.W. Ross, All Rights Reserved 7th edition
Jim Kurose, Keith Ross
Pearson/Addison Wesley, 2016
Introduction: 1-1
Exercise 1 – Circuit Switching (1/4)
Consider the circuit-switched network
shown in the figure below, with circuit
switches A, B, C, and D. Suppose there are
12 circuits between A and B, 20 circuits
between B and C, 11 circuits between C
and D, and 13 circuits between D and A.
1. What is the maximum number of connections that can be ongoing in the network at
any one time?
The maximum number of connections that can be ongoing at any one time is the sum of
all circuits, which happens when 12 connections go from A to B, 20 connections go from
B to C, 11 connections go from C to D, and 13 connections go from D to A. This sum is 56.

Introduction: 1-2
Exercise 1 – Circuit Switching (2/4)
Consider the circuit-switched network
shown in the figure, with circuit switches
A, B, C, and D. Suppose there are 12
circuits between A and B, 20 circuits
between B and C, 11 circuits between C
and D, and 13 circuits between D and A.
2. Suppose that these maximum number of connections are all ongoing. IWhat
happens when another call connection request arrives to the network, will it
be accepted? Answer Yes or No
No, it will be blocked because there are no free circuits.

Introduction: 1-3
Exercise 1 – Circuit Switching (2.1/4)
Consider the circuit-switched network
shown in the figure, with circuit switches
A, B, C, and D. Suppose there are 12
circuits between A and B, 20 circuits
between B and C, 11 circuits between C
and D, and 13 circuits between D and A.
2. Suppose that these maximum number of connections are all ongoing. If some circuits are not using
their dedicated bandwidth what happens when another call connection request arrives to the
network, will it be accepted? Answer Yes or No
No, it will be blocked because there are no free circuits.
If the dedicated circuit is not being used continuously, the reserved resources are wasted. This is one
reason why circuit-switched networks can be less efficient than packet-switched networks, particularly for
bursty data traffic.
Introduction: 1-4
Exercise 1 – Circuit Switching (3/4)
Consider the circuit-switched network
shown in the figure below, with circuit
switches A, B, C, and D. Suppose there are
12 circuits between A and B, 20 circuits
between B and C, 11 circuits between C
and D, and 13 circuits between D and A.
3. Suppose that 15 connections are needed from A to C, and 14 connections are
needed from B to D. Can we route these calls through the four links to
accommodate all 29 connections? Answer Yes or No
it is NOT possible.

Introduction: 1-5
Exercise 1 – Circuit Switching (4/4)
Consider the circuit-switched network
shown in the figure below, with circuit
switches A, B, C, and D. Suppose there are
12 circuits between A and B, 20 circuits
between B and C, 11 circuits between C
and D, and 13 circuits between D and A.
4. Suppose that every connection requires 2 consecutive hops, and calls are connected
clockwise. For example, a connection can go from A to C, from B to D, from C to A, and from
D to B. With these constraints, what is the maximum number of connections that can be
ongoing in the network at any one time?
There can be a maximum of 23 connections. Consider routes A->C and C->A, sum the
bottleneck links, and compare that value to the equivalent of B->D and D->B.
Introduction: 1-6
Exercise 2 – Car-Caravan Analogy (1/7)
Consider the figure below. Suppose the caravan has 20 cars, and that the tollbooth services a car
at a rate of one car per 2 seconds. Once served, a car proceeds to the next tollbooth, which is 500
km away at a speed of 10 km/sec. Also assume that whenever the first car of the caravan arrives at
a tollbooth, it must wait at the entrance to the tollbooth until all of the other cars in its caravan
have arrived and lined up behind it before being serviced at the toll booth. (That is, the entire
caravan must be stored at the tollbooth before the first car in the caravan can pay its toll and begin
driving towards the next tollbooth).

1. Once a car enters service at the tollbooth, how long does it take until it leaves
service?
Service time is 2 seconds

Introduction: 1-7
Exercise 2 – Car-Caravan Analogy (2/7)
Consider the figure below. Suppose the caravan has 20 cars, and that the tollbooth services a car
at a rate of one car per 2 seconds. Once served, a car proceeds to the next toll booth, which is 500
km away at a speed of 10 km/sec. Also assume that whenever the first car of the caravan arrives at
a tollbooth, it must wait at the entrance to the tollbooth until all of the other cars in its caravan
have arrived and lined up behind it before being serviced at the toll booth. (That is, the entire
caravan must be stored at the tollbooth before the first car in the caravan can pay its toll and begin
driving towards the next tollbooth).

2. How long does it take for the entire caravan to receive service at the tollbooth
(that is the time from when the first car enters service until the last car leaves
the tollbooth)?
It takes 40 seconds to service every car, (20 cars * 2 seconds per car)
Introduction: 1-8
Exercise 2 – Car-Caravan Analogy (3/7)
Consider the figure below. Suppose the caravan has 20 cars, and that the tollbooth services a car
at a rate of one car per 2 seconds. Once served, a car proceeds to the next toll booth, which is 500
km away at a speed of 10 km/sec. Also assume that whenever the first car of the caravan arrives at
a tollbooth, it must wait at the entrance to the tollbooth until all of the other cars in its caravan
have arrived and lined up behind it before being serviced at the toll booth. (That is, the entire
caravan must be stored at the tollbooth before the first car in the caravan can pay its toll and begin
driving towards the next tollbooth).

3. Once the first car leaves the tollbooth, how long does it take until it arrives at
the next tollbooth?
It takes 50 seconds to travel to the next toll booth (500 km / 10 km/s)

Introduction: 1-9
Exercise 2 – Car-Caravan Analogy (4/7)
Consider the figure below. Suppose the caravan has 20 cars, and that the tollbooth services a car
at a rate of one car per 2 seconds. Once served, a car proceeds to the next toll booth, which is 500
km away at a speed of 10 km/sec. Also assume that whenever the first car of the caravan arrives at
a tollbooth, it must wait at the entrance to the tollbooth until all of the other cars in its caravan
have arrived and lined up behind it before being serviced at the toll booth. (That is, the entire
caravan must be stored at the tollbooth before the first car in the caravan can pay its toll and begin
driving towards the next tollbooth).

4. Once the last car leaves the tollbooth, how long does it take until it arrives at
the next tollbooth?
Just like in the previous question, it takes 50 seconds, regardless of the car

Introduction: 1-10
Exercise 2 – Car-Caravan Analogy (5/7)
Consider the figure below. Suppose the caravan has 20 cars, and that the tollbooth services a car
at a rate of one car per 2 seconds. Once served, a car proceeds to the next toll booth, which is 500
km away at a speed of 10 km/sec. Also assume that whenever the first car of the caravan arrives at
a tollbooth, it must wait at the entrance to the tollbooth until all of the other cars in its caravan
have arrived and lined up behind it before being serviced at the toll booth. (That is, the entire
caravan must be stored at the tollbooth before the first car in the caravan can pay its toll and begin
driving towards the next tollbooth).

5. Once the first car leaves the tollbooth, how long does it take until it enters
service at the next tollbooth?
It takes 88 seconds until the first car gets serviced at the next toll booth (20-1 cars *
2 seconds per car + 500 km / 10 km/s)
Introduction: 1-11
Exercise 2 – Car-Caravan Analogy (6/7)
Consider the figure below. Suppose the caravan has 20 cars, and that the tollbooth services a car
at a rate of one car per 2 seconds. Once served, a car proceeds to the next toll booth, which is 500
km away at a speed of 10 km/sec. Also assume that whenever the first car of the caravan arrives at
a tollbooth, it must wait at the entrance to the tollbooth until all of the other cars in its caravan
have arrived and lined up behind it before being serviced at the toll booth. (That is, the entire
caravan must be stored at the tollbooth before the first car in the caravan can pay its toll and begin
driving towards the next tollbooth).

6. Are there ever two cars in service at the same time, one at the first toll booth
and one at the second toll booth?
No, because cars can't get service at the next tollbooth until all cars have arrived

Introduction: 1-12
Exercise 2 – Car-Caravan Analogy (7/7)
Consider the figure below. Suppose the caravan has 20 cars, and that the tollbooth services a car
at a rate of one car per 2 seconds. Once served, a car proceeds to the next toll booth, which is 500
km away at a speed of 10 km/sec. Also assume that whenever the first car of the caravan arrives at
a tollbooth, it must wait at the entrance to the tollbooth until all of the other cars in its caravan
have arrived and lined up behind it before being serviced at the toll booth. (That is, the entire
caravan must be stored at the tollbooth before the first car in the caravan can pay its toll and begin
driving towards the next tollbooth).

7. Are there ever zero cars in service at the same time, i.e., the caravan of cars has finished
at the first toll booth, but not yet arrived at the second tollbooth?
Yes, one notable example is when the last car in the caravan is serviced but is still travelling to
the next toll booth; all other cars have to wait until it arrives, thus no cars are being serviced

Introduction: 1-13
Exercise 3 – One-Hop Transmission Delay (1/2)

Consider the figure on the right, in which a single


router is transmitting packets, each of length L
bits, over a single link with transmission rate R
Mbps to another router at the other end of the
link. Suppose that the packet length is L= 4000
bits, and that the link transmission rate along the
link to router on the right is R = 1 Mbps.

1. What is the transmission delay?


The transmission delay = L/R = 4000 bits / 1000000 bps = 0.004 seconds

Introduction: 1-14
Exercise 3 – One-Hop Transmission Delay (2/2)

Consider the figure on the right, in which a single


router is transmitting packets, each of length L
bits, over a single link with transmission rate R
Mbps to another router at the other end of the
link. Suppose that the packet length is L= 4000
bits, and that the link transmission rate along the
link to router on the right is R = 1 Mbps.

2. What is the maximum number of packets per second that can be transmitted
by this link?
The number of packets that can be transmitted in a second into the link = R / L =
1000000 bps / 4000 bits = 250 packets

Introduction: 1-15
Exercise 4 – Queuing Delay (1/5)
Consider the queuing delay in a router buffer, where the packet experiences a
delay as it waits to be transmitted onto the link. The length of the queuing delay
of a specific packet will depend on the number of earlier-arriving packets that
are queued and waiting for transmission onto the link. If the queue is empty
and no other packet is currently being transmitted, then our packet’s queuing
delay will be zero. On the other hand, if the traffic is heavy and many other
packets are also waiting to be transmitted, the queuing delay will be long.
Assume a constant transmission rate of R = 500000 bps, a constant packet-
length L = 8300 bits, and a is the average rate of packets/second. Traffic
intensity I = La/R, and the queuing delay is calculated as I(L/R)(1 - I) for I < 1.

1. In practice, does the queuing delay tend to vary a lot? Why?


Yes, in practice, queuing delay can vary significantly.

Introduction: 1-16
Exercise 4 – Queuing Delay (2/5)
Consider the queuing delay in a router buffer, where the packet experiences a
delay as it waits to be transmitted onto the link. The length of the queuing delay
of a specific packet will depend on the number of earlier-arriving packets that
are queued and waiting for transmission onto the link. If the queue is empty
and no other packet is currently being transmitted, then our packet’s queuing
delay will be zero. On the other hand, if the traffic is heavy and many other
packets are also waiting to be transmitted, the queuing delay will be long.
Assume a constant transmission rate of R = 500000 bps, a constant packet-
length L = 8300 bits, and a is the average rate of packets/second. Traffic
intensity I = La/R, and the queuing delay is calculated as I(L/R)(1 - I) for I < 1.

2. Assuming that a = 34, what is the queuing delay in ms?


I = La/R = 8300 * 34 / 500000 = 0.5644
Queuing Delay = I(L/R)(1 - I) = 0.5644*(8300/500000)*(1-0.5644) = 0.0040812 s
0.0040812 s * 1000 = 4.0812 ms
Introduction: 1-17
Exercise 4 – Queuing Delay (3/5)
Consider the queuing delay in a router buffer, where the packet experiences a
delay as it waits to be transmitted onto the link. The length of the queuing delay
of a specific packet will depend on the number of earlier-arriving packets that
are queued and waiting for transmission onto the link. If the queue is empty
and no other packet is currently being transmitted, then our packet’s queuing
delay will be zero. On the other hand, if the traffic is heavy and many other
packets are also waiting to be transmitted, the queuing delay will be long.
Assume a constant transmission rate of R = 500000 bps, a constant packet-
length L = 8300 bits, and a is the average rate of packets/second. Traffic
intensity I = La/R, and the queuing delay is calculated as I(L/R)(1 - I) for I < 1.

3. Assuming that a = 55, what is the queuing delay in ms?


I = La/R = 8300 * 55 / 500000 = 0.913
Queuing Delay = I(L/R)(1 - I) * 1000 = 0.913*(8300/500000)*(1-0.913) * 1000 = 1.3186 ms.

Introduction: 1-18
Exercise 4 – Queuing Delay (4/5)
Consider the queuing delay in a router buffer, where the packet experiences a
delay as it waits to be transmitted onto the link. The length of the queuing delay
of a specific packet will depend on the number of earlier-arriving packets that
are queued and waiting for transmission onto the link. If the queue is empty
and no other packet is currently being transmitted, then our packet’s queuing
delay will be zero. On the other hand, if the traffic is heavy and many other
packets are also waiting to be transmitted, the queuing delay will be long.
Assume a constant transmission rate of R = 500000 bps, a constant packet-
length L = 8300 bits, and a is the average rate of packets/second. Traffic
intensity I = La/R, and the queuing delay is calculated as I(L/R)(1 - I) for I < 1.

4. Assuming the router's buffer is infinite, the queuing delay is 1.3186 ms, and 1457 packets arrive (each second).
How many packets will be in the buffer 1 second later?
a = 1457
D_q = 1.3186 it means for each packets it takes 1.3186ms in the queue
Packets left in buffer = number of packets in the queue – number of packets that leave the queue in one second =
a - floor(1000/delay) = 1457 - floor(1000/1.3186) = 699 packets.

Introduction: 1-19
Exercise 4 – Queuing Delay (5/5)
Consider the queuing delay in a router buffer, where the packet experiences a
delay as it waits to be transmitted onto the link. The length of the queuing delay
of a specific packet will depend on the number of earlier-arriving packets that
are queued and waiting for transmission onto the link. If the queue is empty
and no other packet is currently being transmitted, then our packet’s queuing
delay will be zero. On the other hand, if the traffic is heavy and many other
packets are also waiting to be transmitted, the queuing delay will be long.
Assume a constant transmission rate of R = 500000 bps, a constant packet-
length L = 8300 bits, and a is the average rate of packets/second. Traffic
intensity I = La/R, and the queuing delay is calculated as I(L/R)(1 - I) for I < 1.

5. If the buffer has a maximum size of 580 packets, how many of the 1457
packets would be dropped upon arrival from the previous question?
Packets dropped = packets - buffer size = 1457 - 580 = 877 dropped packets.

Introduction: 1-20
Exercise 5 – End-to-End Delay (1/10)
Consider the figure on the right, with
three links, each with the specified
transmission rate and link length. Assume
the length of a packet is 8000 bits. The
speed of light propagation delay on each
link is 3x10^8 m/sec.

1. What is the transmission delay of link 1?


Link 1 transmission delay = L/R = 8000 bits / 10 Mbps = 0.0008 seconds

Introduction: 1-21
Exercise 5 – End-to-End Delay (2/10)
Consider the figure on the right, with
three links, each with the specified
transmission rate and link length. Assume
the length of a packet is 8000 bits. The
speed of light propagation delay on each
link is 3x10^8 m/sec.

2. What is the propagation delay of link 1?


Link 1 propagation delay = d/s = (1 Km) * 1000 / 3*10^8 m/sec = 3.33E-6 seconds

Introduction: 1-22
Exercise 5 – End-to-End Delay (3/10)
Consider the figure on the right, with
three links, each with the specified
transmission rate and link length. Assume
the length of a packet is 8000 bits. The
speed of light propagation delay on each
link is 3x10^8 m/sec.

3. What is the total delay of link 1?


Link 1 total delay = d_t + d_p = 0.0008 seconds + 3.33E-6 seconds = 0.0008
seconds

Introduction: 1-23
Exercise 5 – End-to-End Delay (4/10)
Consider the figure on the right, with
three links, each with the specified
transmission rate and link length. Assume
the length of a packet is 8000 bits. The
speed of light propagation delay on each
link is 3x10^8 m/sec.

4. What is the transmission delay of link 2?


Link 2 transmission delay = L/R = 8000 bits / 1000 Mbps = 8.00E-6 seconds

Introduction: 1-24
Exercise 5 – End-to-End Delay (5/10)
Consider the figure on the right, with
three links, each with the specified
transmission rate and link length. Assume
the length of a packet is 8000 bits. The
speed of light propagation delay on each
link is 3x10^8 m/sec.

5. What is the propagation delay of link 2?


Link 2 propagation delay = d/s = (5000 Km) * 1000 / 3*10^8 m/sec = 0.017
seconds

Introduction: 1-25
Exercise 5 – End-to-End Delay (6/10)
Consider the figure on the right, with
three links, each with the specified
transmission rate and link length. Assume
the length of a packet is 8000 bits. The
speed of light propagation delay on each
link is 3x10^8 m/sec.

6. What is the total delay of link 2?


Link 2 total delay = d_t + d_p = 8.00E-6 seconds + 0.017 seconds = 0.017 seconds

Introduction: 1-26
Exercise 5 – End-to-End Delay (7/10)
Consider the figure on the right, with
three links, each with the specified
transmission rate and link length. Assume
the length of a packet is 8000 bits. The
speed of light propagation delay on each
link is 3x10^8 m/sec.

7. What is the transmission delay of link 3?


Link 3 transmission delay = L/R = 8000 bits / 1000 Mbps = 8.00E-6 seconds

Introduction: 1-27
Exercise 5 – End-to-End Delay (8/10)
Consider the figure on the right, with
three links, each with the specified
transmission rate and link length. Assume
the length of a packet is 8000 bits. The
speed of light propagation delay on each
link is 3x10^8 m/sec.

8. What is the propagation delay of link 3?


Link 3 propagation delay = d/s = ()1 Km) * 1000 / 3*10^8 m/sec = 3.33E-6 seconds

Introduction: 1-28
Exercise 5 – End-to-End Delay (9/10)
Consider the figure on the right, with
three links, each with the specified
transmission rate and link length. Assume
the length of a packet is 8000 bits. The
speed of light propagation delay on each
link is 3x10^8 m/sec.

9. What is the total delay of link 3?


Link 3 total delay = d_t + d_p = 8.00E-6 seconds + 3.33E-6 seconds = 1.13E-5
seconds

Introduction: 1-29
Exercise 5 – End-to-End Delay (10/10)
Consider the figure on the right, with
three links, each with the specified
transmission rate and link length. Assume
the length of a packet is 8000 bits. The
speed of light propagation delay on each
link is 3x10^8 m/sec.

10. What is the total delay?


The total delay = d_L1 + d_L2 + d_L3 = 0.0008 seconds + 0.017 seconds + 1.13E-5
seconds = 0.017 seconds

Introduction: 1-30

You might also like