The network core
• mesh of interconnected
routers
• packet-switching: hosts break
application-layer messages
into packets
– forward packets from one
router to the next, across
links on path from source
to destination
– each packet transmitted at
full link capacity
07/22/2021 Networks and Data Communications 1
Packet-switching: store-and-forward
L bits
per packet
3 2 1
source destination
R bps R bps
• takes L/R seconds to transmit
(push out) L-bit packet into link one-hop numerical example:
at R bps L = 7.5 Mbps
• store and forward: entire packet R = 1.5 Mbps
must arrive at router before it one-hop transmission delay
can be transmitted on next link = 5 sec
end-end delay = 2L/R (assuming
zero propagation delay) more on delay shortly …
07/22/2021 Networks and Data Communications 2
Packet Switching: queuing delay, loss
R = 100 Mb/s C
A
D
R = 1.5 Mb/s
B
queue of packets E
waiting for output link
queuing and loss:
if arrival rate (in bits) to link exceeds transmission rate of link for a
period of time:
• packets will queue, wait to be transmitted on link
• packets can be dropped (lost) if memory (buffer) fills up
07/22/2021 Networks and Data Communications 3
Two key network-core functions
routing: determines source-
destination route taken by
packets forwarding: move packets from
routing algorithms router’s input to appropriate
router output
routing algorithm
local forwarding table
header value output link
0100 3
0101 2 1
0111 2
1001 1 3 2
1
011
destination address in arriving
packet’s header
07/22/2021 Networks and Data Communications 4
Circuit Switching
end-end resources allocated to,
reserved for “call” between
source & destination:
• in diagram, each link has four circuits.
– call gets 2nd circuit in top link and
1st circuit in right link.
• dedicated resources: no sharing
– circuit-like (guaranteed)
performance
• circuit segment idle if not used by call
(no sharing)
• commonly used in traditional
telephone networks
07/22/2021 Networks and Data Communications 5
Circuit Switching & Packet Switching
• Circuit Switching
– Works in physical layer
– Contiguous flow of data
– No header
– Less efficiency
– Less delay
• Packet Switching
– Works in data link layer and network layer
– Store and forward
– Pipelining
– High efficiency
– More delay
Networks and Communications
07/22/2021 6
Datagram switching vs Virtual switching
• Packet switching are two types
• Datagram switching
– Connection less
– No reservation (for memory, CPU, processor, etc.)
– Out of order data flow (no contiguous data flow)
– High overhead (more header)
– High packet loss
– Used in internet (for IP network)
– Low cost (due to efficiency and reservation
– High delay
• Virtual switching
– Connection oriented
– Reservation
– Same order
– Low overhead
– Low packet loss
– Used in X.25, ATM
– High cost (due to efficiency and reservation
– Low delay
Networks and Communications
07/22/2021 7
Circuit switching: FDM versus TDM
Example:
FDM
4 users
frequency
time
TDM
frequency
time
07/22/2021 Networks and Data Communications 8
Packet switching versus circuit switching
packet switching allows more users to use network!
example:
• 1 Mb/s link
N
…..
• each user: users
• 100 kb/s when “active” 1 Mbps link
• active 10% of time
• circuit-switching:
– 10 users Q: how did we get value 0.0004?
• packet switching: Q: what happens if > 35 users ?
– with 35 users, probability >
10 active at same time is less
/
than .0004
07/22/2021 Networks and Data Communications 9
Packet switching versus circuit switching
is packet switching a “slam dunk winner?”
• great for bursty data
– resource sharing
– simpler, no call setup
• excessive congestion possible: packet delay and loss
– protocols needed for reliable data transfer, congestion control
• Q: How to provide circuit-like behavior?
– bandwidth guarantees needed for audio/video apps
– still an unsolved problem
Q: human analogies of reserved resources (circuit switching) versus
on-demand allocation (packet-switching)?
07/22/2021 Networks and Data Communications 10
Internet structure: network of networks
• End systems connect to Internet via access ISPs (Internet Service
Providers)
– residential, company and university ISPs
• Access ISPs in turn must be interconnected.
• So that any two hosts can send packets to each other
• Resulting network of networks is very complex
• Evolution was driven by economics and national policies
• Let’s take a stepwise approach to describe current Internet structure
07/22/2021 Networks and Data Communications 11
Internet structure: 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
07/22/2021 Networks and Data Communications 12
Internet structure: network of networks
Option: connect each access ISP to every other access ISP?
access
… access
net
access
net …
net
access
access
net
… … net
access
access net
net
connecting each access ISP to
…
…
each other directly doesn’t scale:
…
access access
…
net
O(N2) connections. net
access
net
access
net
access
net
access
…
… net
access
net
access
net
…
access
net
07/22/2021 Networks and Data Communications 13
Internet structure: 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
07/22/2021 Networks and Data Communications 14
Internet structure: 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
07/22/2021 Networks and Data Communications 15
Internet structure: network of networks
But if one global ISP is viable business, there will be competitors
…. which must be interconnected
Internet exchange point
access
access
…
access
net net …
net
access
access net
net
access
IXP 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
07/22/2021 Networks and Data Communications 16
Internet structure: network of networks
… and regional networks may arise to connect access nets to ISPs
access
… access
net
access
net …
net
access
access net
net
access
IXP access
net
net
ISP A
…
…
access
net
IXP ISP B access
net
access
net
ISP C
access
net
access
net regional net
access
… … net
access access
net access net
net
07/22/2021 Networks and Data Communications 17
Internet structure: 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
access
IXP access
net
net
ISP A
…
…
Content provider network
access
net
IXP ISP B access
net
access
net
ISP C
access
net
access
net regional net
access
… net
access
net
access
net
…
access
net
07/22/2021 Networks and Data Communications 18
Internet structure: network of networks
Tier 1 ISP Tier 1 ISP Google
IXP IXP IXP
Regional ISP Regional ISP
access access access access access access access access
ISP ISP ISP ISP ISP ISP ISP ISP
• at center: small # of well-connected large networks
– “tier-1” commercial ISPs (e.g., Level 3, Sprint, AT&T, NTT), national & international coverage
– content provider network (e.g., Google): private network that connects it data centers to Internet, often
bypassing tier-1, regional ISPs
07/22/2021 Networks and Data Communications 19
Tier-1 ISP: e.g., Sprint
POP: point-of-presence
to/from backbone
peering
… … …
…
to/from customers
07/22/2021 Networks and Data Communications 20
How do loss and delay occur?
packets queue in router buffers
packet arrival rate to link (temporarily) exceeds output link
capacity
packets queue, wait for turn
packet being transmitted (delay)
B
packets queuing (delay)
free (available) buffers: arriving packets
dropped (loss) if no free buffers
07/22/2021 Networks and Data Communications 21
Four sources of packet delay
transmission
A propagation
B
nodal
processing queuing
dtotal = dproc + dqueue + dtrans + dprop
dproc: nodal processing dqueue: queuing delay
check bit errors time waiting at output link
determine output link for transmission
typically < msec depends on congestion
level of router
07/22/2021 Networks and Data Communications 22
Four sources of packet delay
transmission
A propagation
B
nodal
processing queueing
dtotal = dproc + dqueue + dtrans + dprop
dtrans: transmission delay: dprop: propagation delay:
L: packet length (bits) d: length of physical link
R: link bandwidth (bps) s: propagation speed (~2x108
dtrans = L/R d and d m/sec)
trans prop
dprop = d/s
very different
07/22/2021 Networks and Data Communications 23
Caravan analogy
100 km 100 km
ten-car toll toll
caravan booth booth
• cars “propagate” at • time to “push” entire
100 km/hr caravan through toll booth
• toll booth takes 12 sec to onto highway = 12*10 =
service car (bit transmission 120 sec
time) • time for last car to
• car ~ bit; caravan ~ packet propagate from 1st to 2nd
toll both:
• Q: How long until caravan is 100km/(100km/hr)= 1 hr
lined up before 2nd toll booth? • A: 62 minutes
07/22/2021 Networks and Data Communications 24
Caravan analogy
100 km 100 km
ten-car toll toll
caravan booth booth
• suppose cars now “propagate” at 1000 km/hr
• and suppose toll booth now takes one min to service a car
• Q: Will cars arrive to 2nd booth before all cars serviced at first
booth?
• A: Yes! after 7 min, first car arrives at second booth; three
cars still at first booth
07/22/2021 Networks and Data Communications 25
Queuing delay (revisited)
average queueing
• R: link bandwidth (bps)
delay
• L: packet length (bits)
• a: average packet arrival
rate
traffic intensity
= La/R
La/R ~ 0: avg. queueing delay small La/R ~ 0
La/R -> 1: avg. queueing delay large
La/R > 1: more “work” arriving
than can be serviced, average delay infinite!
La/R -> 1
07/22/2021 Networks and Data Communications 26
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
07/22/2021 Networks and Data Communications 27
Throughput
• 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 withbits
sends linkpipe
capacity
that can carry linkpipe
capacity
that can carry
file of into
(fluid) F bits
pipe fluid at rate
Rs bits/sec fluid at rate
R bits/sec
to send to client c
Rs bits/sec) Rc bits/sec)
07/22/2021 Networks and Data Communications Introduction 28 1-28
Throughput
• 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
07/22/2021 Networks and Data Communications 29
Throughput: Internet scenario
• per-connection end-end
throughput: Rs
min(Rc,Rs,R/10) Rs Rs
• in practice: Rc or Rs is
often bottleneck
R
Rc Rc
Rc
10 connections (fairly) share
backbone bottleneck link R
07/22/2021 Networks and Data Communications 30
bits/sec
Protocol “layers”
Networks are complex,
with many “pieces”:
hosts
Question:
routers
is there any hope of organizing
links of various
structure of network?
media
applications
…. or at least our discussion of
protocols
networks?
hardware, software
07/22/2021 Networks and Data Communications 31
Organization of air travel
ticket (purchase) ticket (complain)
baggage (check) baggage (claim)
gates (load) gates (unload)
runway takeoff runway landing
airplane routing airplane routing
airplane routing
• a series of steps
07/22/2021 Networks and Data Communications 32
Layering of airline functionality
ticket (purchase) ticket (complain) ticket
baggage (check) baggage (claim baggage
gates (load) gates (unload) gate
runway (takeoff) runway (land) takeoff/landing
airplane routing airplane routing airplane routing airplane routing airplane routing
departure intermediate air-traffic arrival
airport control centers airport
layers: each layer implements a service
via its own internal-layer actions
relying on services provided by layer below
07/22/2021 Networks and Data Communications 33
Why layering?
dealing with complex systems:
• explicit structure allows identification, relationship of
complex system’s pieces
– layered reference model for discussion
• modularization eases maintenance, updating of system
– change of implementation of layer’s service transparent
to rest of system
– e.g., change in gate procedure doesn’t affect rest of
system
• layering considered harmful?
07/22/2021 Networks and Data Communications 34
Internet protocol stack
• application: supporting network
applications
– FTP, SMTP, HTTP application
• transport: process-process data transfer
– TCP, UDP transport
• network: routing of datagrams from
source to destination network
– IP, routing protocols
• link: data transfer between neighboring
network elements link
– Ethernet, 802.111 (WiFi), PPP
• physical: bits “on the wire” physical
07/22/2021 Networks and Data Communications 35
ISO/OSI reference model
• presentation: allow applications to
interpret meaning of data, e.g., application
encryption, compression, machine-
presentation
specific conventions
• session: synchronization, session
checkpointing, recovery of data transport
exchange
network
• Internet stack “missing” these layers!
– these services, if needed, must be link
implemented in application physical
– needed?
07/22/2021 Networks and Data Communications 36
source Encapsulation
message M application
segment Ht M transport
datagram Hn Ht M network
frame Hl Hn Ht M link
physical
link
physical
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
07/22/2021 Networks and Data Communications 37
Network security
• field of network security:
– how bad guys can attack computer networks
– how we can defend networks against attacks
– how to design architectures that are immune to attacks
• Internet not originally designed with (much) security in
mind
– original vision: “a group of mutually trusting users
attached to a transparent network”
– Internet protocol designers playing “catch-up”
– security considerations in all layers!
07/22/2021 Networks and Data Communications 38
Bad guys: put malware into hosts via Internet
• malware can get in host from:
– virus: self-replicating infection by receiving/executing
object (e.g., e-mail attachment)
– worm: self-replicating infection by passively receiving
object that gets itself executed
• spyware malware can record keystrokes, web sites visited,
upload info to collection site
• infected host can be enrolled in botnet, used for spam. DDoS
attacks
07/22/2021 Networks and Data Communications 39
Bad guys: attack server, network infrastructure
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)
3. send packets to target from
compromised hosts
target
07/22/2021 Networks and Data Communications 40
Bad guys can sniff packets
packet “sniffing”:
broadcast media (shared Ethernet, wireless)
promiscuous network interface reads/records all packets (e.g.,
including passwords!) passing by
A C
src:B dest:A payload
B
07/22/2021 Networks and Data Communications 41
Bad guys can use fake addresses
IP spoofing: send packet with false source address
A C
src:B dest:A payload
07/22/2021 Networks and Data Communications 42