lecture 3

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 25

Lecture “3”

Computer Networks

1
Circuit Switching - Example

1.
2. Circuit Establishment
3. Information
Disconnect
Transfer

Switch C

Switch A Switch D

Switch B

Physical copper
connection set up
when call is made
Switching offices
2
The Network Core: “Packet Switching

Router E Router C

Router A
Router D

Router
Congested Router B Router F
Virtual Circuit Packet Switching

3. Circuit Disconnect
1.2.Connection
Information Establishment
Transfer
Router E Router C

Router A
Router D

Router B Router F

4
Packet Transmission Time

• It is the time required to put all packet bits over the physical
channel
• It is dependent on the modem transmission rate

Physical Channel

Machine A Machine B

Tt=8 ms

Time Time
Packet Propagation Time

• It is the time it takes the electrical signals to travel from one machine
to the other
• It is dependent on the speed of light and the distance between the
two machines
Physical Channel

Machine A Machine B

Tp=4.345 ms
Tt=8 ms

Time Time
Circuit Switching - Example

Switch A Switch B Switch C Switch D

2 × 𝑁𝑜 . 𝑜𝑓 𝐻𝑜𝑝𝑠 ×𝑇 𝑃𝑟𝑜𝑝
Tp
Circuit 5Tp
Establishment

Tt
Data Transfer

Circuit
Disconnect 𝑁𝑜 .𝑜𝑓 𝐻𝑜𝑝𝑠×𝑇 𝑃𝑟𝑜𝑝
Time Time Time Time Time Time
Packet Switching - Example

Router A Router B Router C Router D

Tp
Tt 1 1
TPr
2 2
1 1 +
TPr
2 2
Data 1 1 (𝑁𝑜 . 𝑜𝑓 𝑃𝑎𝑐𝑘𝑒𝑡𝑠 −1)×𝑇 𝑇𝑟𝑎𝑛𝑠
Transfer TPr
2 2
1 1
2 TPr
2
1 1
2 2

Time Time Time Time Time Time


Virtual Circuit Packet Switching - Example

Router A Router B Router C Router D

2 × 𝑁𝑜 . 𝑜𝑓 𝐻𝑜𝑝𝑠 ×𝑇 𝑃𝑟𝑜𝑝
Connection
Establishment
1 1
2 TPr
21 +
1
2 TPr
2
1 1 (𝑁𝑜 . 𝑜𝑓 𝑃𝑎𝑐𝑘𝑒𝑡𝑠 −1)×𝑇 𝑇𝑟𝑎𝑛𝑠
Data
TPr
Transfer 2 2
1 1
2 TPr
2
1 1
2 2
Connection 𝑁𝑜 .𝑜𝑓 𝐻𝑜𝑝𝑠×𝑇 𝑃𝑟𝑜𝑝
Release

Time Time Time Time Time Time

9
Lecture Contents

1.1 What is the Internet?

1.2 Network edge


 end systems, access networks, links

1.3 Network core


 circuit switching, packet switching, network structure

1.4 Delay, loss and throughput in packet-switched networks

1.5 Protocol layers, service models

10
Slides credit goes to Prof.Tallal ElShabrawy, Prof.Amr ElMougy, Dr. Yasmin Zaghloul & Kurose Slides”
Four sources of packet delay
1. nodal processing: 3. Transmission delay:
• check bit errors • R=link bandwidth (bps)
• determine output link • L=packet length (bits)
• time to send bits into link = L/R
2. queuing:
• time waiting at output link for 4. Propagation delay:
transmission • d = length of physical link
• depends on congestion level of router • s = propagation speed in medium
(~2x108 m/sec)
• propagation delay = d/s
transmission
A
propagation

B
nodal Note: s and R are very
11
processing queuing different quantities!
Nodal delay
𝑑 nodal =𝑑 proc + 𝑑queue + 𝑇 trans +𝑇 prop
processing delay
• typically a few microsecs or less

queuing delay
• depends on congestion. Characterized using statistical measures

transmission delay
• = L/R, significant for low-speed link

propagation delay
• a few microsecs to hundreds of msecs
Caravan analogy

100 km 100 km
ten-car toll toll
caravan booth booth

• cars “propagate” at • Transmission Time to “push” entire


100 km/hr (speed) caravan through toll booth onto
• toll booth takes 12 sec to highway = 12*10 = 120 sec =2 minutes
service one car (transmission • Time for last car to propagate from 1st
time) to 2nd toll both: 100km/(100km/hr) =
• car ~ bit; caravan ~ packet 1 hr = 60 minutes
• Q: How long until caravan is • A: 62 minutes
lined up before 2nd toll
booth?
13
Caravan analogy

100 km 100 km
ten-car toll toll
caravan booth booth
• Cars now “propagate” at • Yes! After 7 min, 1st car at 2nd
1000 km/hr (speed) booth and 3 cars still at 1st
• Toll booth now takes 1 min to booth.
service a car (transmission • 1st bit of packet can arrive at
time) 2nd router before packet is fully
• Q: Will cars arrive to 2nd transmitted at 1st router!
booth before all cars serviced
at 1st booth?

14
Packet loss
• queue (aka buffer) preceding link in buffer has finite capacity
• packet arriving to full queue dropped (aka lost)
• lost packet may be retransmitted by previous node, by source end
system, or not at all

buffer
(waiting area) packet being transmitted
A

B
packet arriving to
full buffer is lost
15
Throughput Rate
Throughput Rate (bits/time unit) at which bits transferred between sender/receiver
• Instantaneous: rate at given point in time

• Average: rate over longer period of time

server,
server sendswith
bits link capacity link capacity
file of
(fluid) F bits
into pipe Rs bits/sec Rc bits/sec
to send to client
Throughput Rate

Rs < Rc What is average end-end throughput?


)

Rs bits/sec Rc bits/sec

Rs > Rc What is average end-end throughput?

Rs bits/sec Rc bits/sec

bottleneck link
link on end-end path that constrains end-end throughput
Example (1)
Host A wants to send a large file to Host B. The Path from Host A to Host B has
three sequential link rates, ,

a) What is the Throughput rate for the file transfer assuming there is no other traffic in
the network?

𝑇 h𝑟𝑜𝑢𝑔 h 𝑝𝑢𝑡 𝑅𝑎𝑡𝑒 ( 𝑏𝑜𝑡𝑡𝑙𝑒𝑛𝑒𝑐𝑘𝑙𝑖𝑛𝑘 )=𝑅 1=500 𝑘𝑏𝑝𝑠

18
Example (2):
In the figure below, the router receives a burst of 3 packets simultenously , each of size 1 Mbits.
Thus, the router processes the first packet and then transmits it immediately. The second packet
will have to wait until the first packet has been fully transmitted before it gets processed and
transmitted as well. Similarly, the third packet has to wait for the first two packets to be
transmitted. The processing time and transmission speed of the router are shown in the figure.
• Calculate the queuing delay for each of the 3 packets.

19
Example (3)
The figure below shows a network of four clients: A, B, C, and D, connected through a router, X.
The transmission rate of each device and length of each link are shown on the figure. In addition,
the processing delay of the router is 200ms. At t = 0, clients A, B, and C each send a packet of size
1 Mbits to Client D (through the router X).
a) Calculate the total delay for each packet until they are received at D.
 Assume that the propagation speed over all links is
 Assume that initially the router’s queue (buffer) is empty and that there is no traffic
other than the three packets mentioned above.

20
𝑇 𝑡𝑜𝑡𝑎𝑙 =𝑇 𝑡 +𝑇 𝑃 + 𝑑 𝑃 + 𝑑 𝑄
𝑇 𝑡𝑜𝑡𝑎𝑙− 𝑋 =𝑇 𝑡 +𝑇 𝑃
𝐷 4000 ×1000
𝑇 𝑃 ( 𝐴 − 𝑋 )=𝑇 𝑃 ( 𝐵 − 𝑋 ) =𝑇 𝑃 (𝐶− 𝑋 ) = = =0 . 02 𝑆
𝑉 2 ×10
8

𝐿 1 ×106
𝑇 𝑡 ( 𝐴 − 𝑋 )= = =1 𝑠𝑒𝑐
𝑅 𝐴 1 ×106
6
𝐿 1 ×10
𝑇 𝑡 (𝐵 − 𝑋 )= = =0 . 5 𝑠𝑒𝑐
𝑅 𝐵 2 ×10 6

6
𝐿 1 ×10
𝑇 𝑡 (𝐶− 𝑋 )= = =0 .33 𝑠𝑒𝑐
𝑅 𝐶 3 ×10 6

21
𝑇 𝑡𝑜𝑡𝑎𝑙( 𝐴 − 𝑋 ) =1+0 . 02=1 .02 𝑠𝑒𝑐

𝑇 𝑡𝑜𝑡𝑎𝑙(𝐵− 𝑋 )=0 .5 +0 . 02=0 . 52 𝑠𝑒𝑐

𝑇 𝑡𝑜𝑡𝑎𝑙(𝐶 − 𝑋 )=0 .33 +0 . 02=0 . 35 𝑠𝑒𝑐

1st one arrives and 1st one to leave the


router with no Queuing () after the
Processing delay ()

22
𝑇 𝑡𝑜𝑡𝑎𝑙(𝐶 − 𝑋 − 𝐷 )=0 .33 (𝑡 𝑡 )+0 . 02(𝑡 𝑝𝑟𝑜𝑝)+0 .2 (𝑡 𝑝𝑟𝑜𝑐 )+0 .1(𝑡 𝑡 ( 𝑋 − 𝐷 ) )+0 . 03(𝑡 𝑝𝑟𝑜𝑝 (𝑋 − 𝐷) )=0 . 68 𝑠𝑒𝑐
Packet from B arrives second to the router and takes the Processing delay (). We have
to check if there will be Queuing or not.
𝑇𝑖𝑚𝑒 𝐵𝑤𝑎𝑛𝑡𝑠 𝑡𝑜 𝑏𝑒 𝑡𝑟𝑎𝑛𝑠𝑚𝑖𝑡𝑡𝑒𝑑 𝑓𝑟𝑜𝑚𝑡 h 𝑒𝑟𝑜𝑢𝑡𝑒𝑟 =𝑇 𝑡𝑜𝑡𝑎𝑙(𝐵− 𝑋 ) +𝑑 𝑃 =0 . 52+0 . 2=0 .72 𝑠𝑒𝑐
𝑇𝑖𝑚𝑒 𝐶 𝑙𝑒𝑎𝑣𝑒𝑠 𝑡 h 𝑒𝑟𝑜𝑢𝑡𝑒𝑟 =𝑇 𝑡𝑜𝑡𝑎𝑙(𝐶 − 𝑋 ) +𝑑 𝑃 +𝑇 𝑡 =0 . 35+0 . 2+0 .1=0 . 65 𝑠𝑒𝑐
𝑇 𝑡𝑜𝑡𝑎𝑙 ( 𝐵 − 𝑋 − 𝐷 )=0 .72+ 0 .1+ 0 . 03=0 . 85 𝑠𝑒𝑐

23
𝑇 𝑡𝑜𝑡𝑎𝑙(𝐵− 𝑋 − 𝐷 )=0 .5+0 . 02+0 . 2+0 .1(𝑡 𝑡 ( 𝑋 −𝐷 ) )+0 . 03(𝑡 𝑝𝑟𝑜𝑝 (𝑋 − 𝐷) )=0 . 85 𝑠𝑒𝑐
Packet from A arrives last to the router and takes the Processing delay (). We have to
check if there will be Queuing or not.

𝑇𝑖𝑚𝑒 𝐴 𝑤𝑎𝑛𝑡𝑠 𝑡𝑜 𝑏𝑒𝑡𝑟𝑎𝑛𝑠𝑚𝑖𝑡𝑡𝑒𝑑 𝑓𝑟𝑜𝑚𝑡 h 𝑒𝑟𝑜𝑢𝑡𝑒𝑟 =𝑇 𝑡𝑜𝑡𝑎𝑙( 𝐴 − 𝑋 ) +𝑑 𝑃 =1. 02+0 . 2=1 . 22 𝑠𝑒𝑐
𝑇𝑖𝑚𝑒 𝐵𝑙𝑒𝑎𝑣𝑒𝑠 𝑡 h 𝑒𝑟𝑜𝑢𝑡𝑒𝑟 =𝑇 𝑡𝑜𝑡𝑎𝑙( 𝐵− 𝑋 ) +𝑑 𝑃 +𝑇 𝑡 =0 .52+0 . 2+0 . 1=0 . 82 𝑠𝑒𝑐
𝑇 𝑡𝑜𝑡𝑎𝑙( 𝐴 − 𝑋 − 𝐷) =1. 22+ 0 .1( 𝑡 𝑡 ( 𝑋 − 𝐷 ) )+ 0 . 03( 𝑡 𝑝𝑟𝑜𝑝 (𝑋 − 𝐷) )=1. 35 𝑠𝑒𝑐

24
Thank You 

25

You might also like