PowerPoint Presentation path from source to destination Packet Switching 20 Packet Switch 21 Packet...
Transcript of PowerPoint Presentation path from source to destination Packet Switching 20 Packet Switch 21 Packet...
CSC 401Data and Computer Communications Networks
Computer Networks and The Internet
Prof. Lina Battestilli
Fall 2017
Sec 1.3
Outline
Computer Networks and the Internet (Ch 1)1.1 What is the Internet?1.2 network edge
end systems, access networks, links
1.3 network core circuit switching,
packet switching,
network structure
1.4 delay, loss, throughput in networks1.5 protocol layers, service models1.6 networks under attack: security1.7 history
NCSU CSC401 © Lina Battestilli 2
Previous Lecture
A closer look at network structure:
NCSU CSC401 © Lina Battestilli 3
mobile network
National or
global ISP
Local or
regional ISP
home network
institutionalnetwork
• network edge:applications and hostsservers in data centers
• access networks, physical media: wired, wireless communication links
• network core: interconnected routersnetwork of networks
Outline
Computer Networks and the Internet (Ch 1)1.1 What is the Internet?1.2 network edge
end systems, access networks, links
1.3 network core circuit switching,
packet switching,
network structure
1.4 delay, loss, throughput in networks1.5 protocol layers, service models1.6 networks under attack: security1.7 history
NCSU CSC401 © Lina Battestilli 6
The network core
NCSU CSC401 © Lina Battestilli 7
• mesh of interconnected routers
• Two possibilities
– Circuit switched
– Packet switched
Circuit Switching: Telephone Network
NCSU CSC401 © Lina Battestilli 8
DedicatedWire
DedicatedWire
• telephones are connected by a dedicated wire to a local exchange
• Early days, switchboard operators used a big patch-panel to manually connect
• the wire is dedicated to the phone conversation from the start to the end of the phone call.
Circuit Switching: Telephone Network
NCSU CSC401 © Lina Battestilli 9
DedicatedWire
DedicatedWire
Circuit Switch
1. Dial a number, which creates a dedicated circuit between the two phones. Each switch
maintains state to map the incoming circuit to the correct outgoing circuit.
2. Talk: digital phone system, our voice is sampled and digitized, and sent over the dedicated
circuit, typically 64kb/s for voice. Our phone conversation has a dedicated circuit
3. Hang up: the circuit is removed, and any state is removed at the switches along the path.
10
Circuit Switching: Telephone Network
Source“Caller”
Central Office(C.O.)
Destination“Callee”
Central Office(C.O.)
TrunkExchange
Each phone call allocated 64kb/s. A 10Gb/s trunk line can carry over
150,000 calls.
“big fat pipes”2.4Gb/s-100Gb/s
Circuit switching for the Internet’s core?
• dedicated resources: no sharing
– circuit-like (guaranteed) performance
• resource piece idle if not used by owning call (no sharing)
• dividing link bandwidth into “pieces”
– frequency division
– time division
end-end resources reserved for, “call” between source, destination:
Restaurant Analogy
Circuit switching: FDM versus TDM
FDM
frequency
timeTDM
frequency
time
4 users
Example:
frame
e.g 8000 frames/sec, each slot 8bits -> 64Kbps circuit
FM radio stations use FDM
time is divided into frames of certain duration
Circuit Switching Example
NCSU CSC401 © Lina Battestilli 13
• Host A to Host B• Each link is 1.536Mbps and uses TDM, 24 slots• End-to-end circuit establishment 500msec• How long will it take to transmit a 640 Kbits file?
A
B
dedicated resources: no sharing, circuit-like (guaranteed) performance, idle if not used
Circuit Switching Summary
• Each call has its own private, guaranteed,
isolated data rate from end-to-end.
• A call has three phases:1. Establish circuit from end-to-end (“dialing”)2. Communicate3. Close circuit (“tear down”)
• Originally, a circuit was an end-to-end physical
wire.
• Nowadays, a circuit is like a virtual private wire.
15
Circuit Switching Issues for the Internet
1. Inefficient. Computer communication tends to be very bursty. e.g. typing over an ssh connection, or viewing a sequence of web pages. If each communication has a dedicated circuit, it will be used very inefficiently.
2. Diverse Rates. Computers communicate at many different rates. e.g. a web server streaming video at 6Mb/s, or typing at 1 character per second over ssh. A fixed rate circuit will not be much use!
3. State Management. Circuit switches maintain per-communication state, which must be managed.
16
Outline
Computer Networks and the Internet (Ch 1)1.1 What is the Internet?1.2 network edge
end systems, access networks, links
1.3 network core circuit switching,
packet switching,
network structure
1.4 delay, loss, throughput in networks1.5 protocol layers, service models1.6 networks under attack: security1.7 history
NCSU CSC401 © Lina Battestilli 18
Packet Switching
19
Address Next-hop
B S2
C S3
D S3
AB
Packet Switch
S1
S2
S4
S3
C D
Data HeaderData B
• hosts break application-layer messages into packets
• mesh of interconnected routers• forward packets from one
router to the next, across links on path from source to destination
21
Packet Switching Advantages
A
R1
R2
R4
R3
B
Source Destination
- Packets are routed individually, by looking up
address in router’s local table.
- All packets share the full capacity of a link.
- The routers maintain no per-communication state.
Internet uses Packet Switching
22
• Efficient use of expensive links– Links were assumed to be expensive and scarce.
– Packet switching allows many, bursty flows to share the same link efficiently.
– “Circuit switching is rarely used for data networks, ... because of very inefficient use of the links”, Bertsekas/Gallager
• Resilience to failure of links & routers– “For high reliability, ... [the Internet] was to be a datagram
subnet, so if some lines and [routers] were destroyed, messages could be ... rerouted”, Tanenbaum
Host: sends packets of data
1-23
host sending function:
• takes application message
• breaks into smaller chunks, known as packets, of length Lbits
• transmits packet into access network at transmission rate R– link transmission rate, aka link
capacity, aka link bandwidth
R: link transmission ratehost
12
two packets,
L bits each
packettransmission
delay
time needed totransmit L-bit
packet into link
L (bits)
R (bits/sec)= =
Packet-switching: store-and-forward
NCSU CSC401 © Lina Battestilli 24
• takes L/R seconds to transmit (push out) L-bit packet into link at R bps
• store and forward: entire packet must arrive at router before it can be transmitted on next link
sourceR bps
destination123
L bitsper packet
R bps
(assuming zero propagation delay)
𝑑𝑒𝑙𝑎𝑦 =2𝐿𝑅
Packet-switching: store-and-forward
NCSU CSC401 © Lina Battestilli 27
sourceR bps
destination123
L bitsper packet
R bps
Q: Time between when the source begins to send the first packet until the destination has received all three packets?
(assuming zeropropagation delay)
Packet Switching: queueing delay, loss
NCSU CSC401 © Lina Battestilli 28
A
B
CR = 100 Mb/s
R = 1.5 Mb/sD
Equeue of packetswaiting for output link, output buffer
resource contention: • aggregate resource demand (use of transmission link) can exceed amount
available
• congestion:
packets will queue, wait for link use
packets can be dropped (lost) if no memory to store them
Forwarding Tables and Routing Protocols
forwarding: move packets from router’s input to appropriate router output
routing: determines source-destination route taken by packets
routing algorithms
routing algorithm
local forwarding table
header value output link
0100
0101
0111
1001
3
2
2
1
1
23
dest address in arriving
packet’s header
Analogues to a driver that wants to ask for directions instead of using a map.
Packet Switching versus Circuit Switching
example:
1 Mb/s link
each user:
• 100 kb/s when “active”
• active 10% of time
packet switching allows more users to use network!
circuit-switching:10 users
packet switching:with 35 users, probability > 10 active
at same time is less than .0004
Nusers
1 Mbps link
Packet switching versus circuit switching
• 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 (ch 7, Multimedia Networking)
is packet switching a “slam dunk winner?”
Q: human analogies of reserved resources
(circuit switching) versus on-demand allocation
(packet-switching)?
Outline
Computer Networks and the Internet (Ch 1)1.1 What is the Internet?1.2 network edge
end systems, access networks, links
1.3 network core circuit switching,
packet switching,
network structure
1.4 delay, loss, throughput in networks1.5 protocol layers, service models1.6 networks under attack: security1.7 history
NCSU CSC401 © Lina Battestilli 34
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
Internet structure: network of networks
Question: given millions of access ISPs, how to connect them together?
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnetaccess
net
accessnet
Internet structure: network of networks
Option: connect each access ISP to every other access ISP?
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnetaccess
net
accessnet
connecting each access ISP
to each other directly doesn’t
scale: O(N2) connections.
Internet structure: network of networks
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnetaccess
net
accessnet
Option: connect each access ISP to a global transit ISP? Customerand provider ISPs have economic agreement.
global
ISP
Internet structure: network of networks
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnetaccess
net
accessnet
But if one global ISP is viable business, there will be competitors ….
ISP B
ISP A
ISP C
Internet structure: network of networks
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnetaccess
net
accessnet
But if one global ISP is viable business, there will be competitors …. which must be interconnected
ISP B
ISP A
ISP C
IXP
IXP
peering link
Internet exchange point
Internet structure: network of networks
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnetaccess
net
accessnet
… and regional networks may arise to connect access nets to ISPS
ISP B
ISP A
ISP C
IXP
IXP
regional net
Internet structure: network of networks
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnet
accessnetaccess
net
accessnet
… and content provider networks (e.g., Google, Microsoft, Akamai ) may run their own network, to bring services, content close to end users
ISP B
ISP A
ISP B
IXP
IXP
regional net
Content provider network
Internet structure: network of networks
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
access
ISP
access
ISP
access
ISP
access
ISP
access
ISP
access
ISP
access
ISP
access
ISP
Regional ISP Regional ISP
IXP IXP
Tier 1 ISP Tier 1 ISP Google
IXP
References
Some of the slides are identical or derived from
1. Slides for the 7th edition of the book Kurose & Ross, “Computer Networking: A Top-Down Approach,”
2. Slides by Jim Kurose for his CSC453 course at Umass
3. Slides from Nick McKeown, CS144 at Stanford University
NCSU CSC401 © Lina Battestilli