Transcript ppt
CSE401N
Computer Networks
Lecture-2
Network Structure[KR-1.2+1.3+1.4]
S. M. Hasibul Haque
Dept. of CSE
BUET
CSE401N
1
A closer look at network structure:
network edge:
applications and
hosts
network core:
routers
network of
networks
access networks,
physical media:
communication links
CSE401N
2
The network edge:
end systems (hosts):
run application programs
e.g., WWW, email
at “edge of network”
client/server model
client host requests, receives
service from server
e.g., WWW client (browser)/
server; email client/server
peer-peer model:
host interaction symmetric
e.g.: Gnutella, KaZaA
CSE401N
3
Network edge: connection-oriented service
Goal: data transfer
between end sys.
handshaking: setup
(prepare for) data
transfer ahead of time
Hello, hello back human
protocol
set up “state” in two
communicating hosts
TCP - Transmission
Control Protocol
Internet’s connectionoriented service
Why not connected?
TCP service [RFC 793]
reliable, in-order bytestream data transfer
flow control:
loss: acknowledgements
and retransmissions
sender won’t overwhelm
receiver
congestion control:
senders “slow down sending
rate” when network
congested
CSE401N
4
Network edge: connectionless service
Goal: data transfer
between end systems
same as before!
UDP - User Datagram
Protocol [RFC 768]:
Internet’s
connectionless service
unreliable data
transfer
no flow control
no congestion control
App’s using TCP:
HTTP (WWW), FTP
(file transfer), Telnet
(remote login), SMTP
(email)
App’s using UDP:
streaming media,
teleconferencing,
Internet telephony
CSE401N
5
The Network Core
mesh of interconnected
routers
the fundamental
question: how is data
transferred through net?
circuit switching:
dedicated circuit per
call: telephone net
packet-switching: data
sent thru net in
discrete “chunks”
CSE401N
6
Network Core: Circuit Switching
End-end resources
reserved for “call”
link bandwidth, switch
capacity
dedicated resources:
no sharing
circuit-like
(guaranteed)
performance
call setup required
CSE401N
7
Network Core: Circuit Switching
network resources
(e.g., bandwidth)
divided into “pieces”
pieces allocated to calls
resource piece
idle if
dividing link bandwidth
into “pieces”
frequency division
time division
not used by owning call
(no sharing)
dividing link bandwidth
into “pieces”
frequency division
time division
CSE401N
8
Network Core: Circuit Switching
CSE401N
9
Circuit Switching: TDMA and TDMA
Example:
FDMA
4 users
frequency
time
TDMA
frequency
time
CSE401N
10
Circuit Switching: Resources
(Frequency and Time)
Divide link bandwidth—
the resource--into
“pieces”
frequency division
multiplexing (FDM)
time division
multiplexing (TDM)
CSE401N
11
Circuit Switching: The Process
Three phases
1.
2.
3.
circuit establishment
data transfer
circuit termination
If circuit not available: “busy signal”
CSE401N
12
Timing Diagram of Circuit Switching
Host 1
Node 1
Node 2
processing delay at Node 1
circuit
establishment
Host 2
propagation delay
from Host 1
to Node 1
propagation delay
from Host 2
To Host 1
data
transmission
DATA
circuit
termination
CSE401N
13
Delay Calculation in Circuit-Switched Networks
Propagation delay: delay for the first bit to go
from source to destination
Transmission delay: time to pump data onto link at
reserved rate
Propagation delay:
d = length of physical link
s = propagation speed in
medium (~2x105 km/sec)
propagation delay = d/s
Transmission delay:
R = bandwidth (bps)
L = packet length
(bits)
time to send a packet
into link = L/R CSE401N
14
An Example
Propagation delay
suppose the distance between host 1 and host 2 is 4000 km, then
one-way propagation delay is:
4000 km
200, 000 km/ s
20ms
Transmission delay
suppose we reserve one slot of a T1 line, which
• has a bandwidth of 1.536 Mbps
• is divided into 24 slots, and thus
• each reserved slot has a bandwidth of 64 Kbps
then the transmission delay of a file with 6.4 Kbits is
6.4 kbits
64 kbps
100ms
Suppose the setup message is very small, and the total setup
processing delay is 200 ms
CSE401N
15
An Example (cont.)
Then the delay to transfer a 6.4 Kbits file from host
1 to host 2 (from the beginning until host receives
last bit of the file) is:
20 200 20 20 100 360 ms
20 + 200
20
20
DATA
100
CSE401N
16
Network Core: Packet Switching
each end-end data stream
divided into packets
user A, B packets share
network resources
each packet uses full link
bandwidth
resources used as needed,
Bandwidth division into “pieces”
Dedicated allocation
Resource reservation
resource contention:
aggregate resource
demand can exceed
amount available
congestion: packets
queue, wait for link use
store and forward:
packets move one hop
at a time
transmit over link
wait turn at next
link
CSE401N
17
Packet Switching
Each end-to-end data flow divided into packets
Packets have the following structure:
Header
Data
Trailer
• Header and Trailer carry control information (e.g., destination
address, check sum)
• (where is the control information for circuit switching?)
At each node the entire packet is received, stored
briefly, and then forwarded to the next node
(Store-and-Forward Networks)
Each packet is passed through the network from
node to node along some path (Routing)
CSE401N
18
Packet Switching
CSE401N
19
Inside a Packet Switching Router
A node in a packet switching network
incoming links
node
outgoing links
Memory
CSE401N
20
Packet Switching: Resources
Each packet waits for its turn at the output link
On its turn, a packet uses full link bandwidth
Resources used
as needed
Aggregate resource demand can exceed amount
available
Congestion: packets queue, wait for link use
Bandwidth division into “pieces”
Resource reservation
Dedicated allocation
CSE401N
21
A Taxonomy of Packet-Switched
Networks According to Routing
Goal: move packets among routers from source to
destination
we’ll study several routing algorithms later in the course
Two types of packet switching
datagram network
• each packet of a flow is switched independently
virtual circuit network:
• all packets from one flow are sent along a pre-established path
(= virtual circuit)
CSE401N
22
Datagram Packet Switching
Example: IP networks
Each packet is independently switched
each packet header contains complete
destination address
receiving
a packet, a router looks at the
packet’s destination address and searches its
current routing table to determines the next
hop
routes may change during session
routers do not keep any state about a flow
An example of datagram-style routing in daily life?
CSE401N
23
Datagram Packet Switching
Host C
Host D
Host A
Node 1
Node 2
Node 3
Node 5
Host B
Node 6
Node 7
Host E
Node 4
CSE401N
24
Timing Diagram of Datagram Switching
Host 1
transmission
time of Packet 1
at Host 1
Node 1
Packet 1
Host 2
Node 2
propagation
delay from
Host 1 to
Node 1
Packet 2
Packet 1
Packet 3
processing
and
queueing
delay of
Packet 1
at Node 2
Packet 2
Packet 3
Packet 1
Packet 2
Packet 3
CSE401N
25
Virtual-Circuit Packet Switching
Example: Asynchornous Transfer Mode (ATM) networks
Hybrid of circuit switching and datagram switching
each packet carries a short
tag (virtual-circuit (VC) #),
tag determines next hop
fixed path determined at
Virtual Circuit setup time,
remains fixed thru flow
routers maintain per-flow
state
Incoming
Interface
Incoming
VC#
Outgoing
Interface
Outgoing
VC#
1
12
2
22
1
16
3
1
2
12
3
22
…
What advantages do virtual circuit have over datagram?
Guarantees in-sequence delivery of packets
However: Packets from different virtual circuits may be
interleaved
CSE401N
26
Virtual-Circuit Switching
Host C
Host D
Host A
Node 1
Node 2
Node 3
Node 5
Host B
Node 6
Node 7
Host E
Node 4
CSE401N
27
Virtual-Circuit Packet Switching
Three phases
1.
2.
3.
VC establishment
Data transfer
VC disconnect
CSE401N
28
Timing Diagram of Virtual-Circuit Switching
Host 1
Node 1
Host 2
Node 2
propagation delay
between Host 1
and Node 1
VC
establishment
Packet 1
Packet 2
Packet 1
data
transfer
Packet 3
Packet 2
Packet 3
Packet 1
Packet 2
Packet 3
VC
termination
CSE401N
29
Discussion: Datagram Switching vs. Virtual
Circuit Switching
What are the benefits of datagram
switching?
What are the benefits of virtual circuit
switching?
CSE401N
30
Delay at a Router in Packet Switching
A packet experiences delay at each hop
Four types of delay at each hop
nodal processing delay: check errors & routing
queueing: time waiting for its turn at output link
transmission delay: time to pump packet onto a link at link speed
propagation delay: router to router propagation
CSE401N
31
Delay in Datagram Networks
Host 1
transmission
time of Packet 1
at Host 1
Node 1
Packet 1
Packet 2
Packet 3
Node 2
propagation
delay between
Host 1 and
Node 2
Packet 1
Host 2
nodal
processing
and
queueing
delay of
Packet 1 at
Node 2
Packet 2
Packet 3
Packet 1
Packet 2
Packet 3
CSE401N
32
Network Core: Packet Switching
10 Mbs
Ethernet
A
B
statistical multiplexing
C
1.5 Mbs
queue of packets
waiting for output
link
D
45 Mbs
E
Packet-switching versus circuit switching: human
restaurant analogy
other human analogies?
CSE401N
33
Packet switching versus circuit switching
Packet switching allows more users to use network!
1 Mbit link
each user:
100Kbps when “active”
active 10% of time
circuit-switching:
10 users
N users
1 Mbps link
packet switching:
with 35 users,
probability > 10 active
less than .0004
CSE401N
34
Packet switching versus circuit switching
Is packet switching a “slam dunk winner?”
Great for bursty data
resource sharing
no call setup
Excessive congestion: 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 (chapter 6)
CSE401N
35
Access networks and physical media
Q: How to connection end
systems to edge router?
residential access nets
institutional access
networks (school,
company)
mobile access networks
Keep in mind:
bandwidth (bits per
second) of access
network?
shared or dedicated?
CSE401N
36
Residential access: point to point access
Dialup via modem
up
to 56Kbps direct access to
router (conceptually)
ISDN: integrated services
digital network: 128Kbps alldigital connect to router
ADSL: asymmetric digital
subscriber line
up to 1 Mbps home-to-router
up to 8 Mbps router-to-home
ADSL deployment: happening
CSE401N
37
Residential access: cable modems
HFC: hybrid fiber coax
asymmetric: up to 10Mbps upstream, 1 Mbps
downstream
network of cable and fiber attaches homes to
ISP router
shared access to router among home
issues: congestion, dimensioning
deployment: available via cable companies, e.g.,
MediaOne
CSE401N
38
Residential access: cable modems
Diagram: http://www.cabledatacomnews.com/cmic/diagram.html
CSE401N
39
Institutional access: local area networks
company/univ local area
network (LAN) connects
end system to edge router
Ethernet:
shared or dedicated
cable connects end
system and router
10 Mbs, 100Mbps,
Gigabit Ethernet
deployment: institutions,
home LANs happening now
LANs: chapter 5
CSE401N
40
Wireless access networks
shared
wireless access
network connects end
system to router
wireless LANs:
radio spectrum replaces
wire
e.g., Lucent Wavelan 11
Mbps
router
base
station
wider-area wireless
access
CDPD: wireless access to
ISP router via cellular
network
mobile
hosts
CSE401N
41
Home networks
Typical home network components:
ADSL or cable modem
router/firewall
Ethernet
wireless access
point
to/from
cable
headend
cable
modem
router/
firewall
Ethernet
(switched)
wireless
laptops
wireless
access
point
CSE401N
42
Physical Media
physical link:
transmitted data bit
propagates across link
guided media:
signals propagate in
solid media: copper,
fiber
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 TP:
100Mbps Ethernet
CSE401N
43
Physical Media: coax, fiber
Coaxial cable:
wire (signal carrier)
within a wire (shield)
baseband: single channel
on cable
broadband: multiple
channel on cable
bidirectional
common use in 10Mbs
Fiber optic cable:
glass fiber carrying
light pulses
high-speed operation:
100Mbps Ethernet
high-speed point-to-point
transmission (e.g., 5 Gps)
low error rate
Ethernet
CSE401N
44
Physical media: radio
signal carried in
electromagnetic
spectrum
no physical “wire”
bidirectional
propagation
environment effects:
reflection
obstruction by objects
interference
Radio link types:
microwave
e.g. up to 45 Mbps channels
LAN (e.g., WaveLAN)
2Mbps, 11Mbps
wide-area (e.g., cellular)
e.g. CDPD, 10’s Kbps
satellite
up to 50Mbps channel (or
multiple smaller channels)
270 Msec end-end delay
geosynchronous versus
LEOS
CSE401N
45
Thank YOU
CSE401N
46