Upload
ailish
View
27
Download
1
Embed Size (px)
DESCRIPTION
Networking Primer - The Internet and the Link Layer ECE 256. Romit Roy Choudhury Dept. of ECE and CS. Slides are from ECE 156 Designed to help you recall undergrad material Please be patient if you remember most of this …. On the Shoulders of Giants. - PowerPoint PPT Presentation
Citation preview
1
Networking Primer - The Internetand the Link Layer
ECE 256
Romit Roy ChoudhuryDept. of ECE and CS
2
Slides are from ECE 156Designed to help you recall undergrad
material
Please be patient if you remember most of this …
3
On the Shoulders of Giants 1961: Leonard Kleinrock published a work on
packet switching
1962: J. Licklider described a worldwide network of computers called Galactic Network
1965: Larry Roberts designed the ARPANET that communicated over long distance links
1971: Ray Tomilson invents email at BBN
1972: Bob Kahn and Vint Cerf invented TCP for reliable packet transport
4
On the Shoulders of Giants … 1973: David Clark, Bob Metcalfe
implemented TCP and designed ethernet at Xerox PARC
1975: Paul Mockapetris developed DNS system for host lookup
1980: Radia Perlman invented spanning tree algorithm for bridging separate networks
Things snowballed from there on …
5
What we have today is beyond any of the inventors’ imagination …
6
And YOU are here
7
And by “YOU” I mean …
8
“Cool” internet appliances
World’s smallest web serverhttp://www-ccs.cs.umass.edu/~shri/iPic.html
IP picture framehttp://www.ceiva.com/
Web-enabled toaster +weather forecaster
Internet phones
9
And Of Course real people …
10
InterNetwork Millions of end points (you, me, and
toasters) connected across a mesh of links Many end points can be addressed by numbers Many others lie behind a virtual end point
Many networks form a bigger network
The overall strcture called the Internet With a capital I Defined as a network of networks
11
Internet structure: network of networks
roughly hierarchical at center: “tier-1” ISPs (e.g., MCI, Sprint, AT&T,
Cable and Wireless), national/international coverage treat each other as equals
Tier 1 ISP
Tier 1 ISP
Tier 1 ISP
Tier-1 providers interconnect (peer) privately
NAP
Tier-1 providers also interconnect at public network access points (NAPs)
12
Tier-1 ISP: e.g., Sprint
Sprint US backbone network
Seattle
Atlanta
Chicago
Roachdale
Stockton
San Jose
Anaheim
Fort Worth
Orlando
Kansas City
CheyenneNew York
PennsaukenRelayWash. DC
Tacoma
DS3 (45 Mbps)OC3 (155 Mbps)OC12 (622 Mbps)OC48 (2.4 Gbps)
…
to/from customers
peering
to/from backbone
….
………POP: point-of-presence
13
Internet structure: network of networks
“Tier-2” ISPs: smaller (often regional) ISPs Connect to one or more tier-1 ISPs, possibly other tier-2 ISPs
France telecome, Tiscali, etc. buys from Sprint
Tier 1 ISP
Tier 1 ISP
Tier 1 ISP
NAP
Tier-2 ISPTier-2 ISP
Tier-2 ISP Tier-2 ISPTier-2 ISP
Tier-2 ISP pays tier-1 ISP for connectivity to rest of Internet
Tier-2 ISPs also peer privately with each other, interconnect at NAP
14
Internet structure: network of networks
“Tier-3” ISPs and local ISPs (Time Warner, Earthlink, etc.) last hop (“access”) network (closest to end systems)
Tier 1 ISP
Tier 1 ISP
Tier 1 ISP
NAP
Tier-2 ISPTier-2 ISP
Tier-2 ISP Tier-2 ISPTier-2 ISP
localISPlocal
ISPlocalISP
localISP
localISP Tier 3
ISP
localISP
localISP
localISP
Local and tier- 3 ISPs are customers ofhigher tier ISPsconnecting them to rest of Internet
15
Internet structure: network of networks
a packet passes through many networks! Local ISP (taxi) -> T1 (bus) -> T2 (domestic) -> T3 (international)
Tier 1 ISP
Tier 1 ISP
Tier 1 ISP
NAP
Tier-2 ISPTier-2 ISP
Tier-2 ISP Tier-2 ISPTier-2 ISP
localISPlocal
ISPlocalISP
localISP
localISP Tier 3
ISP
localISP
localISP
localISP
16
Organizing the giant structureNetworks are
complex! many “pieces”:
hosts routers links of various
media applications protocols hardware,
software
Question: Is there any hope of organizing structure
of network?
17
Turn to analogies in air travel
a series of steps
ticket (purchase)
baggage (check)
gates (load)
runway takeoff
airplane routing
ticket (complain)
baggage (claim)
gates (unload)
runway landing
airplane routingairplane routing
18
ticket (purchase)
baggage (check)
gates (load)
runway (takeoff)
airplane routing
departureairport
arrivalairport
intermediate air-trafficcontrol centers
airplane routing airplane routing
ticket (complain)
baggage (claim
gates (unload)
runway (land)
airplane routing
ticket
baggage
gate
takeoff/landing
airplane routing
Layering of airline functionality
Layers: each layer implements a service layers communicate with peer layers rely on services provided by layer below
19
Why layering? explicit structure allows identification,
relationship of complex system’s pieces
modularization eases maintenance, updating of system change of implementation of layer’s service
transparent to rest of system e.g., change in aircraft runway does not
affect boarding gate
layering considered harmful?
20
Protocol “Layers” Service of each layer encapsulated
Universally agreed services called PROTOCOLS
A large part of this course will focus on designing protocols for
networking systems
21
Internet protocol stack application: supporting network
applications FTP, SMTP, HTTP
transport: host-host data transfer TCP, UDP
network: routing of datagrams from source to destination IP, routing protocols
link: data transfer between neighboring network elements PPP, Ethernet, WiFi, Bluetooth
physical: bits “on the wire”
application
transport
network
link
physical
22
messagesegment
datagramframe
sourceapplicatio
ntransportnetwork
linkphysical
HtHnHl MHtHn MHt M
M
destinationapplicatio
ntransportnetwork
linkphysical
HtHnHl MHtHn MHt M
Mnetwork
linkphysical
linkphysical
HtHnHl MHtHn M
HtHnHl MHtHn M
HtHnHl M HtHnHl M
router
switch
Encapsulation
23
PHY and Link Layer
24
PHY and Link Layer The Layers that make the connections
Sends signals on physical media Schedules who gets to transmit Detects transmission errors and collisions Etc.
25
Physical Link / Media Guided media
Twisted pair
Coaxial cable
Fiber optics
Unguided media terrestrial microwave up to 45 Mbps WiFi LAN 11Mbps, 54 Mbps Cellular Wide-area 3G: hundreds of kbps Satellite Kbps to 45Mbps
26
Laying out Access networksQ: How to connect end
systems to edge router?
Mobile users
Residential access nets
Institutions, schools
Backbones
27
Residential access: point to point access
Dialup via modem up to 56Kbps direct access
to router (often less) Can’t surf and phone at
same time: can’t be “always on”
ADSL: asymmetric digital subscriber line up to 1 Mbps upstream (today typically < 256
kbps) up to 8 Mbps downstream (today typically < 1
Mbps) FDM: 50 kHz - 1 MHz for downstream 4 kHz - 50 kHz for upstream 0 kHz - 4 kHz for ordinary telephone
28
Residential access: Networked
Cable modems HFC: hybrid fiber coax asymmetric: up to 30Mbps downstream, 2
Mbps upstream
Network of cable/fiber attach homes to ISP router•Homes share access to router
Deployment: available via cable TV companies
29
Residential access: cable modems
Diagram: http://www.cabledatacomnews.com/cmic/diagram.html
30
Cable Network Architecture: Overview
home
cable headend
cable distributionnetwork (simplified)
Typically 500 to 5,000 homes
31
Cable Network Architecture: Overview
home
cable headend
cable distributionnetwork
server(s)
32
Cable Network Architecture: Overview
home
cable headend
cable distributionnetwork (simplified)
33
Cable Network Architecture: Overview
home
cable headend
cable distributionnetwork
Channels
VIDEO
VIDEO
VIDEO
VIDEO
VIDEO
VIDEO
DATA
DATA
CONTROL
1 2 3 4 5 6 7 8 9
FDM:
34
ADSL Vs Cable DSL is point to point
Thus data rate does not reduce when neighbor uses DSL
But, DSL uses twisted pair Transmission
technology cannot support more than ~10Mbps
Cable modems share pipe to the cable headend Data rate reduces when
neighbor surfing
However, fiber optic lines offer significantly higher data rate (fat pipe) Even with neighbors,
your data rate can be higher
35
Wireless Access Networks
shared wireless access network connects end system to router via base station aka “access
point”
wireless LANs: 802.11b/g (WiFi): 11 or 54 Mbps
wider-area wireless access provided by telco operator 4G, WiMax, LTE
•Will it happen??
basestation
mobilehosts
router
36
Communication on Links(Delay, Queuing, and Packet Loss)
37
How do loss and delay occur?packets queue in router buffers packet arrival rate to link exceeds output link
capacity packets queue, wait for turn
A
B
packet being transmitted (delay)
packets queueing (delay)free (available) buffers: arriving packets dropped (loss) if no free buffers
38
Four sources of packet delay
1. nodal processing: check bit errors determine output link
A
B
propagationtransmission
nodalprocessing queueing
2. queueing time waiting at output
link for transmission depends on
congestion level of router
39
Delay in packet-switched networks3. Transmission delay: R=link bandwidth
(bps) L=packet length (bits) time to send bits into
link = L/R
4. Propagation delay: d = length of physical
link s = propagation speed in
medium (~2x108 m/sec) propagation delay = d/s
A
B
propagationtransmission
nodalprocessing queueing
Note: s and R are very different quantities!
40
Nodal delay
dproc = processing delay typically a few microsecs or less
dqueue = queuing delay depends on congestion
dtrans = transmission delay = L/R, significant for low-speed links
dprop = propagation delay a few microsecs to hundreds of msecs
proptransqueueprocnodal ddddd +++=
41
Queueing delay (revisited) R=link bandwidth (bps) L=packet length (bits) a=average packet
arrival rate
traffic intensity = La/R
La/R ~ 0: average queueing delay small La/R -> 1: delays become large La/R > 1: more “work” arriving than can
be serviced, average delay infinite!
42
“Real” Internet delays and routes What do “real” Internet delay & loss look like? Traceroute program: provides delay measurement from
source to router along end-end Internet path towards destination. For all i: sends three packets that will reach router i on path towards
destination router i will return packets to sender sender times interval between transmission and reply.
3 probes
3 probes
3 probes
43
“Real” Internet delays and routes
1 cs-gw (128.119.240.254) 1 ms 1 ms 2 ms2 border1-rt-fa5-1-0.gw.umass.edu (128.119.3.145) 1 ms 1 ms 2 ms3 cht-vbns.gw.umass.edu (128.119.3.130) 6 ms 5 ms 5 ms4 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 ms7 nycm-wash.abilene.ucaid.edu (198.32.8.46) 22 ms 22 ms 22 ms8 62.40.103.253 (62.40.103.253) 104 ms 109 ms 106 ms9 de2-1.de1.de.geant.net (62.40.96.129) 109 ms 102 ms 104 ms10 de.fr1.fr.geant.net (62.40.96.50) 113 ms 121 ms 114 ms11 renater-gw.fr1.fr.geant.net (62.40.103.54) 112 ms 114 ms 112 ms12 nio-n2.cssi.renater.fr (193.51.206.13) 111 ms 114 ms 116 ms13 nice.cssi.renater.fr (195.220.98.102) 123 ms 125 ms 124 ms14 r3t2-nice.cssi.renater.fr (195.220.98.110) 126 ms 126 ms 124 ms15 eurecom-valbonne.r3t2.ft.net (193.48.50.54) 135 ms 128 ms 133 ms16 194.214.211.25 (194.214.211.25) 126 ms 128 ms 126 ms17 * * *18 * * *19 fantasia.eurecom.fr (193.55.113.142) 132 ms 128 ms 136 ms
traceroute: gaia.cs.umass.edu to www.eurecom.frThree delay measurements from gaia.cs.umass.edu to cs-gw.cs.umass.edu
* means no response (probe lost, router not replying)
trans-oceaniclink
44
Medium Access ControlIn
Computer Networks
45
Random Access Protocols Trivial Solution: When node has packet to send
transmit at full channel data rate R. no a priori coordination
Two or more transmitting nodes ➜ “collision” Collision detected by comparing signal with channel content
Random access MAC protocol specifies: how to schedule communications how to recover from collisions
Examples of random access MAC protocols: slotted ALOHA ALOHA CSMA, CSMA/CD, CSMA/CA
46
Pure (unslotted) ALOHA unslotted Aloha: simple, no synchronization when frame first arrives
transmit immediately collision probability increases:
frame sent at t0 collides with other frames sent in [t0-1,t0+1]
47
Pure Aloha efficiency
P(success by given node) = P(node transmits) . P(no other node transmits in [p0-1,p0] . P(no other node transmits in [p0-1,p0] = p . (1-p)N-1 . (1-p)N-1
= p . (1-p)2(N-1)
… choosing optimum p and then letting n -> infty ...
= 1/(2e) = .18
Very Poor !
48
Slotted ALOHAAssumptions all frames same size
time is divided into equal size slots
nodes start to transmit frames only at beginning of slots
nodes are synchronized
Operation when node obtains fresh
frame, it transmits in next slot
no collision, node can send new frame in next slot
if collision, node retransmits frame in each subsequent slot with prob. p until success
49
Slotted ALOHA
Pros single active node can
continuously transmit at full rate of channel
highly decentralized: only slots in nodes need to be in sync
simple
Cons collisions, wasting
slots idle slots nodes must be able to
detect collision in less than time to transmit packet
clock synchronizationWhy?
50
Slotted Aloha efficiency
Suppose N nodes with many frames to send, each transmits in slot with probability p
prob that node 1 has success in a slot = p(1-p)N-1
prob that any node has a success = Np(1-p)N-1
For max efficiency with N nodes, find p* that maximizes Np(1-p)N-1
For many nodes, take limit of Np*(1-p*)N-1
as N goes to infinity, gives 1/e = .37
At best: channelused for useful transmissions 37%of time!
51
CSMA (Carrier Sense Multiple Access)
CSMA: listen before transmit:If channel sensed idle: transmit entire frame
If channel sensed busy, defer transmission
Human analogy: don’t interrupt others!
52
Carrier Sensing
Listen before you talk Carrier sense multiple access (CSMA) Defer transmission when signal on channel
A CB
Don’ttransmit
Can collisions still occur?
53
Deterministic MAC protocolsPolling: master node
“invites” slave nodes to transmit in turn
concerns: polling overhead latency single point of
failure (master)
Token passing: control token passed
from one node to next sequentially.
token message concerns:
token overhead latency single point of failure
(token)
54
Summary of MAC protocols What do you do with a shared media?
Channel Partitioning, by time, frequency or code•Time Division, Frequency Division
Random partitioning (dynamic), •ALOHA, S-ALOHA, CSMA, CSMA/CD•carrier sensing: easy in some technologies (wire),
hard in others (wireless)•CSMA/CD used in Ethernet•CSMA/CA used in 802.11
Taking Turns•polling from a central site, token passing
55
Questions ?
56
Backup Slides
57
Wired Vs Wireless Media AccessBoth are on shared media.Then, what’s really the problem ?
58
Wired
Collision Detection Tx can transmit and listen at the same time
• If (Transmitted_Signal != Sensed_Signal) Collision
Channel Condition ~ identical at Tx and Rx
CBA
59
Wireless
Collision Avoidance H/W can either transmit or receive While transmitting, cannot detect a collision Detection is based on SINR
•Thus must take educated decision when to transmit
Channel Condition Tx unaware of signal quality at receiver Channel dispersion large – high uncertainty
60
Thoughts Please attend seminars
Equivalent to reading 3 papers in 1 hour Priceless Check out the Comp. Eng Seminar series
•Lot of great speakers are scheduled over the semester
People have begun selecting slots Please start looking
61
CSMA collisions
collisions can still occur:propagation delay means two nodes may not heareach other’s transmissioncollision:entire packet transmission time wasted
spatial layout of nodes
note:role of distance & propagation delay in determining collision probability
62
CSMA/CD (Collision Detection)
CSMA/CD: carrier sensing, deferral as in CSMA collisions detected within short time colliding transmissions aborted, reducing channel
wastage collision detection:
easy in wired LANs: measure signal strengths, compare transmitted, received signals
difficult in wireless LANs: receiver shut off while transmitting
human analogy: the polite conversationalist
63
CSMA/CD collision detection
64
Physical Media Bit: propagates between
transmitter/rcvr pairs physical link: what lies
between transmitter & receiver
guided media: signals propagate in solid
media: copper, fiber, coax unguided media:
signals propagate freely, e.g., radio
Twisted Pair (TP) two insulated copper
wires Category 3: traditional
phone wires, 10 Mbps Ethernet
Category 5: 100Mbps Ethernet
65
Physical Media: coax, fiber
Coaxial cable: two concentric copper
conductors bidirectional baseband:
single channel on cable legacy Ethernet
broadband: multiple channels on
cable HFC
Fiber optic cable: glass fiber carrying
light pulses, each pulse a bit
high-speed operation: high-speed point-to-point
transmission (e.g., 10’s-100’s Gps)
low error rate: repeaters spaced far apart ; immune to electromagnetic noise
66
Physical media: radio
signal carried in electromagnetic spectrum
no physical “wire” bidirectional propagation
environment effects: reflection obstruction by objects interference
Radio link types: terrestrial microwave
e.g. up to 45 Mbps channels
LAN (e.g., Wifi) 11Mbps, 54 Mbps
wide-area (e.g., cellular) e.g. 3G: hundreds of kbps
satellite Kbps to 45Mbps channel
(or multiple smaller channels)
270 msec end-end delay geosynchronous versus low
altitude
67
Applying the concepts later Several protocol designs will require solid
understanding of delay Bandwidth estimation TCP congestion control TCP flow control TCP loss discrimination MAC protocols for wireless networks
68
Link Layer 5.1 Introduction and
services 5.2 Error detection
and correction 5.3Multiple access
protocols 5.4 Link-Layer
Addressing 5.5 Ethernet
5.6 Hubs and switches 5.7 PPP 5.8 Link Virtualization:
ATM and MPLS