Lecture 3 - Packets
Lecture 3 - Packets
Packets
ACK: Slides use some material from Scott Shenker (UC Berkeley) and Jim Kurose (UMass)
Name your favourite restaurant in Lahore
2
3
Recap: Previous Lecture
l Network(ed) applications:
l End-systems exchange messages with other end-systems
4
Recap: 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
6
Agenda for Today’s Class
l Why packets?
l Q: How to share network resources among multiple communication sessions?
l Packet dynamics
l Delay, loss, and throughput
7
Why Packets?
8
Links/Switches are Shared
shared link and
switch resources
9
Approaches to Sharing
l Reservations:
l Communication resources reserved for the duration of the communication
session between the end-systems
l Must reserve for their peak bandwidth to full satisfy demand
10
Two Approaches to Sharing
l Reservation
l On-demand
11
Implementation of these Approaches
l Reservation à circuit switching
l Before data can be sent, the network must establish a dedicated end-end
connection, also called “circuit”, between the end systems
l When the circuit is established, the network reserves a constant
transmission rate in the network links
12
Circuit Switching
10Mb/s?
✔
src 10Mb/s?
✔
dst
10Mb/s?
✔
14
Figure from the book, “Computer Networking: A Top Down Networking (8th Edition) ” by Jim Kurose et al.
Two kinds of ”Circuits”
l Time Divison Multiplexing (TDM)
l Divide time in frames of fixed duration
l Frames have a fixed number of time slots
l Separate time slot per circuit
15
Figures from the book, “Computer Networking: A Top Down Networking (8th Edition) ” by Jim Kurose et al.
Circuit Switching and Failures
Circuit is established Must establish new circuit
Link Fails along path
dst
17
Store-and-forward Transmission
The packet switch must receive the entire packet before it begins
to transmit the first bit of the packet onto the outbound link
18
Figure from the book, “Computer Networking: A Top Down Networking (8th Edition) ” by Jim Kurose et al.
Buffers in Packet Switches
l Switches have multiple links attached to them
l Each attached link has an output buffer (also called output queue)
l Which stores the packets that the switch is about to send in to that link
19
Buffers in Packet Switches
20
Figure from the book, “Computer Networking: A Top Down Networking (8th Edition) ” by Jim Kurose et al.
Packet Switching and Failures
Link Fails along path Route recomputed on the fly
22
Which is better: Circuits or Packets?
l What are the pros and cons of each scheme?
23
Example: Three constant sources
l Total bandwidth 30Mbps
l Mbps = megabits per second
24
Bottleneck Bottleneck
link of link of
Rs
36AND CHAPTER
COMPUTER NETWORKS THE
R
INTERNET
1 • COMPUTER NETWORKS AND THE INTERNET
Bottleneck Rc Bottleneck
c
link of link of
Rs capacity R capacity R
Rs
A B
Client 10 Clients Client 10 Clients
A Rc A
Bottleneck
Switch 2 a. Rc b.
Switch 1
a. b. Bottleneck
link of
B (a) Client
Figure 1.20 ! End-to-end throughput: capacity a
downloads
from 4 Mbps
R file B Figure 1.20 ! End-to-end throughput: (a) Client f
link of
downloads
capacity Ra
36AND CHAPTER
COMPUTER NETWORKS THE
R
INTERNET
1 • COMPUTER NETWORKS AND THE INTERNET
Bottleneck Rc Bottleneck
c
link of link of
Rs capacity R capacity R
Rs
A B
Client 10 Clients Client 10 Clients
A Rc A
Bottleneck
Switch 2
a. Rc b.
Switch 1
a. b. Bottleneck
link of
Figure 1.20 ! B (a) Client
End-to-end throughput: capacity a
downloads
from 4 Mbps
R file B Figure 1.20 ! End-to-end throughput: (a) Client f
link of
downloads
capacity Ra
C
server; (b) 10 clients downloading with 10 servers D
server; (b) 10 clients downloading with 10 serv
l On-demand:
l Can achieve higher utilizations
l Depends on degree of sharing, burstiness of flows
27
Smooth vs Bursty Applications
l Some apps have relatively small P/A ratios
l Voice might have a ratio of 3:1 or so
29
How to decide which approach to pick?
l Some important considerations
32
Packet Dynamics
l Delay
l Loss
l Throughput
Delay
l How long does it take to send a packet from its source to destination?
Loss
l What fraction of the packets sent to a destination are dropped?
Throughput
l At what rate is the destination receiving data from the source?
A network link
l Link bandwidth (Transmission capacity)
l Number of bits sent per unit time (bits/sec or bps)
l Propagation delay
l Time for one bit to move through the link (seconds)
l Bandwidth-Delay Product (BDP)
l Number of bits “in flight” at any time (sent, not received)
l BDP = bandwidth × propagation delay
Propagation delay
Examples of BDP
l Same city over a slow link:
l Bandwidth: ~100Mbps
l Propagation delay: ~0.1msec
l BDP: 10,000bits
Figure from the book, “Computer Networking: A Top Down Networking (8th Edition) ” by Jim Kurose et al.
Transmission Delay
l Q: How long does it take to push all the bits of a packet into a link?
40
Propagation Delay
l Q: How long does it take to move one bit from one end of a link
to the other?
41
Questions?
42
End of Class Questions
43
44
45
Next Lecture
l We will ask a more practical question
l Q: How long does it take for a packet to travel from A to B?
46