Lec 3
Lec 3
Packets
1
ACK: Slides use some material from Scott Shenker, UC Berkeley
About Class Activities
l We will be using this link for in-class polls/exercises
l https://pollev.com/zafarqazi045
l Link also shared in the chat section
2
Previous Lecture
3
Packets
l Packets are bags of bits with:
l Header: meaningful to network (and network stack)
l Can be more than one header!
l Body: meaningful only to application
Header Body
l Why Packets?
l Packet Switching vs. Circuit Switching
l Packet dynamics
Why Packets?
6
Links/Switches are Shared
end-system
k
lin
switch
7
Approaches to Sharing
l Reservations:
l Communication resources reserved for the duration of the
communication session between the end systems
l Restaurant analogy
l Reservation
l On-demand
8
Two Approaches to Sharing
l Reservation
l On-demand
9
Two Approaches to Sharing
10
Circuit Switching
dst
10Mb/s?
✔
src 10Mb/s?
✔
10Mb/s?
✔
switch
src
dst
12
Many kind of “Circuits”
l Time division multiplexing
l Divide time in time slots
l Separate time slot per circuit time
frequency
l Divide frequency spectrum in
frequency bands
time
l Separate frequency band per circuit
13
Circuit Switching and Failures
Circuit is established Must establish new circuit
Link Fails along path
switch
dst
15
Packet Switching
switch
dst
18
Which is better: Circuits or Packets?
l What are the tradeoffs?
19
Example: Three constant sources
l Total bandwidth 30Mbps
l Mbps = megabits per second
20
Example: Three “bursty” sources
12Mbps
11Mbps
13Mbps
Time
What happens with reservations?
l Option #1: allow two flows to reserve peak rate
11Mbps
13Mbps
Time
What happens with reservations?
l Option #2: allow flows to reserve equal rates
11Mbps
13Mbps
Time
What happens with on-demand?
No overloading
Time
Peak vs Average Rates
l For each communication session, define:
l P = peak rate
l A = average rate
l On-demand:
l Can achieve higher utilizations
l Depends on degree of sharing, burstiness of flows
25
Smooth vs Bursty Applications
l Some apps have relatively small P/A ratios
l Voice might have a ratio of 3:1 or so