Lecture 2
Lecture 2
Lecture 2
Chapter 1
Introduction: 1-1
Chapter 1: roadmap
What is the Internet?
What is a protocol?
Network edge: hosts, access network,
physical media
Network core: packet/circuit
switching, internet structure
Performance: loss, delay, throughput
Security
Protocol layers, service models
History
Introduction: 1-2
The network core
mesh of interconnected routers
mobile network
national or global ISP
link capacity
enterprise
network
Introduction: 1-3
Packet-switching: store-and-forward
L bits
per packet
3 2 1
source destination
R bps R bps
D
B R = 1.5 Mb/s
E
queue of packets
waiting for output link
3 2
1
011
frequency
optical, electromagnetic frequencies
divided into (narrow) frequency bands
each call allocated its own band, can
transmit at max rate of that narrow
band time
Time Division Multiplexing (TDM)
frequency
time divided into slots
each call allocated periodic slot(s),
can transmit at maximum rate of
(wider) frequency band, but only time
during its time slot(s)
Introduction: 1-8
Packet switching versus circuit switching
packet switching allows more users to use network!
Example:
1 Gb/s link
each user: N
…..
• 100 Mb/s when “active” users 1 Gbps link
• active 10% of time
circuit-switching: 10 users
Q: how did we get value 0.0004?
packet switching: with 35 users,
probability > 10 active at same time Q: what happens if > 35 users ?
is less than .0004
Introduction: 1-9
Circuit Switching Vs Packet Switching
Circuit Switching Packet Switching
Works in physical layer Works in data link layer and network
Contiguous flow of data layer.
No header Store and forward
Less efficiency Pipelining
Less delay High efficiency
More delay
Introduction: 1-10
Datagram switching vs Virtual switching
Packet switching are two types
Datagram switching Virtual Switching
Connection less Connection oriented
No reservation (for memory, CPU, Reservation
processor, etc.)
Same order
Out of order data flow (no contiguous data
flow) Low overhead
High overhead (more header) Low packet loss
High packet loss Used in X.25, ATM
Used in internet (for IP network) High cost (due to efficiency and
Low cost (due to efficiency and reservation reservation
High delay Low delay
Introduction: 1-11
Packet switching versus circuit switching
Is packet switching a “slam dunk winner”?
great for “bursty” data – sometimes has data to send, but at other times not
• resource sharing
• simpler, no call setup
excessive congestion possible: packet delay and loss due to buffer overflow
• protocols needed for reliable data transfer, congestion control
Q: How to provide circuit-like behavior?
• bandwidth guarantees traditionally used for audio/video applications
Introduction: 1-13
Internet structure: a “network of networks”
Question: given millions of access ISPs, how to connect them together?
access
… access
net
access
net …
net
access
access net
net
access
access net
net
…
…
access access
net net
access
net
access
net
access
net
access
… net
access
net
access
net
…
access
net
Introduction: 1-14
Internet structure: a “network of networks”
Question: given millions of access ISPs, how to connect them together?
access
… access
net
access
net …
net
access
access
net
… … net
access
access net
net
…
each other directly doesn’t scale:
…
O(N2) connections.
access access
…
net net
access
net
access
net
access
net
access
… access
… … net
access
net access net
net
Introduction: 1-15
Internet structure: a “network of networks”
Option: connect each access ISP to one global transit ISP?
Customer and provider ISPs have economic agreement.
access
… access
net
access
net …
net
access
access net
net
access
access net
net
…
…
global
access
net
ISP access
net
access
net
access
net
access
net
access
… net
access
net
access
net
…
access
net
Introduction: 1-16
Internet structure: a “network of networks”
But if one global ISP is viable business, there will be competitors ….
access
… access
net
access
net …
net
access
access net
net
access
access net
net
ISP A
…
…
access
net ISP B access
net
access
net
ISP C
access
net
access
net
access
… net
access
net
access
net
…
access
net
Introduction: 1-17
Internet structure: a “network of networks”
But if one global ISP is viable business, there will be competitors …. who
will want to be connected
Internet exchange point
access
… access
net
access
net …
net
access
access net
net
IXP access
access net
net
ISP A
…
…
access
net
IXP ISP B access
net
access
net
ISP C
access
net
access
net
peering link
access
… net
access
net
access
net
…
access
net
Introduction: 1-18
Internet structure: a “network of networks”
… and regional networks may arise to connect access nets to ISPs
access
… access
net
access
net …
net
access
access net
net
IXP access
access net
net
ISP A
…
…
access
net
IXP ISP B access
net
access
net
ISP C
access
net
access
net
regional ISP access
… net
access
net
access
net
…
access
net
Introduction: 1-19
Internet structure: a “network of networks”
… and content provider networks (e.g., Google, Microsoft, Akamai) may
run their own network, to bring services, content close to end users
… access
… access
net
access
net
net
access
access net
net
IXP access
access net
net
ISP A
…
…
Content provider network
access
net
IXP ISP B access
net
access
net
ISP C
access
net
access
net
regional ISP access
… net
access
net
access
net
…
access
net
Introduction: 1-20
Internet structure: a “network of networks”
…
… … …
links to/from Sprint customer networks
Introduction: 1-22
Chapter 1: roadmap
What is the Internet?
What is a protocol?
Network edge: hosts, access network,
physical media
Network core: packet/circuit
switching, internet structure
Performance: loss, delay, throughput
Security
Protocol layers, service models
History
Introduction: 1-23
How do packet loss and delay occur?
packets queue in router buffers
packets queue, wait for turn
arrival rate to link (temporarily) exceeds output link capacity: packet loss
B
packets in buffers (queueing delay)
free (available) buffers: arriving packets
dropped (loss) if no free buffers
Introduction: 1-24
Packet delay: four sources
transmission
A propagation
B
nodal
processing queueing
B
packet arriving to
full buffer is lost
Introduction: 1-26
Packet delay: four sources
transmission
A propagation
B
nodal
processing queueing
Introduction: 1-28
Caravan analogy
100 km 100 km
Introduction: 1-29
Packet queueing delay (revisited)
3 probes 3 probes
3 probes
Introduction: 1-31
Real Internet delays and routes
traceroute: gaia.cs.umass.edu to www.eurecom.fr
3 delay measurements from
gaia.cs.umass.edu to cs-gw.cs.umass.edu
1 cs-gw (128.119.240.254) 1 ms 1 ms 2 ms 3 delay measurements
2 border1-rt-fa5-1-0.gw.umass.edu (128.119.3.145) 1 ms 1 ms 2 ms
3 cht-vbns.gw.umass.edu (128.119.3.130) 6 ms 5 ms 5 ms to border1-rt-fa5-1-0.gw.umass.edu
4 jn1-at1-0-0-19.wor.vbns.net (204.147.132.129) 16 ms 11 ms 13 ms
5 jn1-so7-0-0-0.wae.vbns.net (204.147.136.136) 21 ms 18 ms 18 ms
6 abilene-vbns.abilene.ucaid.edu (198.32.11.9) 22 ms 18 ms 22 ms
7 nycm-wash.abilene.ucaid.edu (198.32.8.46) 22 ms 22 ms 22 ms trans-oceanic link
8 62.40.103.253 (62.40.103.253) 104 ms 109 ms 106 ms
9 de2-1.de1.de.geant.net (62.40.96.129) 109 ms 102 ms 104 ms
10 de.fr1.fr.geant.net (62.40.96.50) 113 ms 121 ms 114 ms
11 renater-gw.fr1.fr.geant.net (62.40.103.54) 112 ms 114 ms 112 ms looks like delays
12 nio-n2.cssi.renater.fr (193.51.206.13) 111 ms 114 ms 116 ms decrease! Why?
13 nice.cssi.renater.fr (195.220.98.102) 123 ms 125 ms 124 ms
14 r3t2-nice.cssi.renater.fr (195.220.98.110) 126 ms 126 ms 124 ms
15 eurecom-valbonne.r3t2.ft.net (193.48.50.54) 135 ms 128 ms 133 ms
16 194.214.211.25 (194.214.211.25) 126 ms 128 ms 126 ms
17 * * *
18 * * * * means no response (probe lost, router not replying)
19 fantasia.eurecom.fr (193.55.113.142) 132 ms 128 ms 136 ms
link
pipecapacity
that can carry linkthat
pipe capacity
can carry
serverserver,
sends with
bits Rsfluid at rate
bits/sec fluid
R at rate
bits/sec
c
(fluid)
fileinto
of Fpipe
bits (Rs bits/sec) (Rc bits/sec)
to send to client
Introduction: 1-33
Throughput
Rs < Rc What is average end-end throughput?
Rs bits/sec Rc bits/sec
Rs bits/sec Rc bits/sec
bottleneck link
link on end-end path that constrains end-end throughput
Introduction: 1-34
Throughput: network scenario
per-connection end-end
Rs throughput:
Rs Rs min(Rc,Rs,R/10)
in practice: Rc or Rs is
R
often bottleneck
Rc Rc
Rc
Introduction: 1-38
Bad guys: denial of service
Denial of Service (DoS): attackers make resources (server,
bandwidth) unavailable to legitimate traffic by
overwhelming resource with bogus traffic
1. select target
2. break into hosts
around the network
(see botnet)
target
3. send packets to target
from compromised
hosts
Introduction: 1-39
Bad guys: packet interception
packet “sniffing”:
broadcast media (shared Ethernet, wireless)
promiscuous network interface reads/records all packets (e.g.,
including passwords!) passing by
A C
Introduction: 1-40
Bad guys: fake identity
A C
Introduction: 1-43
Example: organization of air travel
switch
destination Hn Ht M network
M application
Hl Hn Ht M link Hn Ht M
Ht M transport physical
Hn Ht M network
Hl Hn Ht M link router
physical
Introduction: 1-48
Chapter 1: roadmap
What is the Internet?
What is a protocol?
Network edge: hosts, access network,
physical media
Network core: packet/circuit
switching, internet structure
Performance: loss, delay, throughput
Security
Protocol layers, service models
History
Introduction: 1-49
ISO/OSI reference model
Two layers not found in Internet
application
protocol stack!
presentation
presentation: allow applications to interpret
meaning of data, e.g., encryption, session
compression, machine-specific conventions transport
session: synchronization, checkpointing, network
recovery of data exchange link
Internet stack “missing” these layers!
physical
• these services, if needed, must be
implemented in application The seven layer OSI/ISO
reference model
• needed?
Introduction: 1-50
Chapter 1: summary
We’ve covered a “ton” of material!
Internet overview
what’s a protocol? You now have:
network edge, access network, core context, overview,
• packet-switching versus circuit-
switching vocabulary, “feel”
• Internet structure of networking
performance: loss, delay, throughput more depth, detail,
layering, service models and fun to follow!
security
history
Introduction: 1-51
Chapter 1: Exercises 1
Consider, the NASA satellite station control room on Earth and a Rover on Moon is connected by a
100 Mbps point-to-point wireless link. The distance between from Earth to Moon (when they are
closest together) is approximately 384 x 10 3 km, and data travels over the link at the speed of light is
3×108 meter/sec.
Question 1: How long does it take for a packet to travel from Rover to NASA satellite station control
room? Determine the answer in milliseconds.
Question 2: Calculate the product of RTT and bandwidth for the link. Find the answer in Megabits.
Question 3: A camera on the rover takes pictures of its surroundings and sends these to Earth. How
quickly after a picture is taken on rover, can it reach NASA satellite station control room on Earth
(ignore the processing delay)? Assume that each image is 25 MB in size. Find the answer in seconds.
Introduction: 1-52
Chapter 1: Exercises 1- Solutions
Question 1: Propagation delay on the link is (384 × 106) / (3 × 108)
Question 2: The product of RTT and Bandwidth for the link is = 2.56 × 100 × 106 = 30.52 MB (approx.).
Question 3: After a picture is taken it must be transmitted on the link and be completely propagated before
Mission Control can interpret it.
Transmission delay for 25 MB of data is = 5 x 41,943,040 bits/100 × 106 = 210 seconds. (approx.)
Introduction: 1-53
Chapter 1: Exercises 2
Consider a router A is transmitting packets, each of length L bits, over a single link with
transmission rate R Mbps to another router B 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 = 1000 Mbps. Round your answer to two decimals after leading
zeros.
Question 2: What is the maximum number of packets per second that can be transmitted
by this link?
Introduction: 1-54
Chapter 1: Exercises 2 1- Solutions
Question 1:
The transmission delay
= L/R
= 4000 bits / 1000000000 bps
= 0.000004 sec = 4 microseconds
Question 2:
The number of packets that can be transmitted in a second into the link
=R/L
= 1000000000 bps / 4000 bits
= 250000 packets
Introduction: 1-55
Chapter 1: Exercises 3
Consider the queuing delay in a router buffer, Assume a constant transmission rate of R =
600000 bps, a constant packet-length L = 8000 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.
Question 1: In practice, does the queuing delay tend to vary a lot? Answer with Yes or No
Question 2. Assuming that a = 34, what is the queuing delay? Give your answer in
milliseconds (ms)
Question 3. Assuming that a = 60, what is the queuing delay? Give your answer in
milliseconds (ms)
Question 4. Assuming the router's buffer is infinite, the queuing delay is 2.1333 ms, and
811 packets arrive. How many packets will be in the buffer 1 second later?
Question 5. If the buffer has a maximum size of 734 packets, how many of the 811
packets would be dropped upon arrival from the previous question?
Introduction: 1-56
Chapter 1: Exercises 3 1- Solutions
Question 1: Yes, in practice, queuing delay can vary significantly. We use the above formulas
as a way to give a rough estimate, but in a real-life scenario it is much more complicated.
Question 5. Packets dropped = packets - buffer size = 811 - 734 = 77 dropped packets.
Introduction: 1-57
Chapter 1: Exercises 4
Consider the figure below, with three links, each with the specified transmission rate and
link length
Assume the length of a packet is 12000 bits. The speed of light propagation delay on each
link is 3x10^8 m/sec.
Question 2: Link 1 propagation delay = d/s = (3 * 1000) m / 3*10^8 m/sec = 0.00001 seconds
Question 3: Link 1 total delay = d_t + d_p = 0.0012 seconds + 0.00001 seconds = 0.00121 seconds
Question 4: Link 2 transmission delay = L/R = 12000 bits / 1 Mbps = 0.012 seconds
Question 5: Link 2 propagation delay = d/s = (500 * 1000) m / 3*10^8 m/sec = 0.0017 seconds
Question 6: Link 2 total delay = d_t + d_p = 0.012 seconds + 0.0017 seconds = 0.014 seconds
Question 7: Link 3 transmission delay = L/R = 12000 bits / 10 Mbps = 0.0012 seconds
Question 8: Link 3 propagation delay = d/s = (2 * 1000) m / 3*10^8 m/sec = 6.67E-6 seconds
Question 9: Link 3 total delay = d_t + d_p = 0.0012 seconds + 6.67E-6 seconds = 0.0012 seconds
Question 10: The total delay = d_L1 + d_L2 + d_L3 = 0.0012 seconds + 0.014 seconds + 0.0012 seconds = 0.016 seconds.
Introduction: 1-60