0% found this document useful (0 votes)
20 views27 pages

Lec 3

The document discusses packets and packet switching versus circuit switching in computer networks. Packet switching breaks communication into packets that are routed independently, while circuit switching establishes a reserved connection for the duration. Packet switching can better handle bursty traffic and route around failures, while circuit switching guarantees bandwidth but wastes resources for bursty flows.

Uploaded by

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

Lec 3

The document discusses packets and packet switching versus circuit switching in computer networks. Packet switching breaks communication into packets that are routed independently, while circuit switching establishes a reserved connection for the duration. Packet switching can better handle bursty traffic and route around failures, while circuit switching guarantees bandwidth but wastes resources for bursty flows.

Uploaded by

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

CS 382: Network-Centric Computing

Packets

Dr. Zafar Ayyub Qazi


Spring 2021

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

l When we get to a specific class activity, you will


have to click on the above link and fill out your
responses

2
Previous Lecture

l Core task of the Internet


l Delivers packets between programs (applications) on
different end-systems

l Important problems Internet is solving:


l Routing
l Reliable transfer
l Congestion Control
l Mapping names to addresses

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

Used By Network Used By App

l Body can be bits in a file, image, whatever


l Header contains destination address, port, etc
4
Agenda for Today’s Class

l Why Packets?
l Packet Switching vs. Circuit Switching

l Packet dynamics
Why Packets?

6
Links/Switches are Shared

shared link and


switch resources

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 On-demand: (also know as “best effort”)


l Send packets when you have them
l Hope for the best

l Restaurant analogy
l Reservation
l On-demand
8
Two Approaches to Sharing

l Reservation

l On-demand

How are these implemented in networks?

9
Two Approaches to Sharing

l Reservation à circuit switching


l Before data can be sent, the network must establish a
connection, “circuit”, between the end systems
l When the circuit is established, the network reserves
a constant transmission rate in the network links

l On demand à packet switching


l Service each packet independently on demand
l No reservation of network resources

10
Circuit Switching

dst
10Mb/s?

src 10Mb/s?

10Mb/s?

(1) src sends a reservation request for 10Mbps to dst


(2) Switches “establish a circuit”
(3) src starts sending data
(4) src sends a “teardown circuit” message
Circuit Switching

switch

src

dst

Reservation also establishes a “circuit” within a switch

12
Many kind of “Circuits”
l Time division multiplexing
l Divide time in time slots
l Separate time slot per circuit time

l Frequency division multiplexing

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

Circuit switching doesn’t “route around trouble”


Packet Switching

switch

dst

Each packet treated independently

15
Packet Switching

switch

dst

Each packet treated independently

With buffers to absorb transient overloads


16
Packet Switching and Failures
Link Fails along path Route recomputed on the fly

Packet switching “routes around trouble”


Which is better: Circuits or Packets?

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

l Demands: Each source needs a constant rate of


10Mbps

l Reservation and on-demand give same result


l Every source gets what they need
l No wasted bandwidth
l ….

20
Example: Three “bursty” sources

12Mbps

Link capacity = 30Mbps

11Mbps

13Mbps
Time
What happens with reservations?
l Option #1: allow two flows to reserve peak rate

12Mbps Must turn away third flow!

Link capacity = 30Mbps

11Mbps

13Mbps
Time
What happens with reservations?
l Option #2: allow flows to reserve equal rates

12Mbps Frequent overloading!

Link capacity = 30Mbps

11Mbps

Each source gets 10Mbps

13Mbps
Time
What happens with on-demand?

No overloading

Link capacity = 30Mbps

Time
Peak vs Average Rates
l For each communication session, define:
l P = peak rate
l A = average rate

l Reservations must reserve P:


l But flows only use A (on average)
l Level of utilization is A/P

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

l Data applications tend to be rather bursty


l Ratios of 100 or greater are common

l That’s why the phone network used reservations


l And the Internet does not….
Next Lecture
l Topics
l Packet Dynamics
l Network design principles
l Layering
l End-End principle
l Fate-sharing

l We won’t have a live class on Wednesday


l Instead, recorded lecture to be uploaded on Friday

l Quiz 1 next week, in Monday’s class


l Will cover lecture 2 and lecture 3. 27

You might also like