28071480 circuit switching and packet switching
TRANSCRIPT
-
8/3/2019 28071480 Circuit Switching and Packet Switching
1/20
CSE 413: Computer Network
Circuit Switching and Packet SwitchingNetworks
Md. Kamrul Hasan
09-03-2010
-
8/3/2019 28071480 Circuit Switching and Packet Switching
2/20
The network core:
mesh of interconnected
routers
the fundamental
question: how is datatransferred through net?
circuit switching:
dedicated circuit per call:
telephone net packet-switching: data
sent through net in
discrete chunks
(packets) on shared
media
-
8/3/2019 28071480 Circuit Switching and Packet Switching
3/20
The network core:
Circuit SwitchingEnd-to-end
resources reserved
for call link bandwidth, switchcapacity
dedicated resources: no
sharing
circuit-like (guaranteed)
performance
call setup required
-
8/3/2019 28071480 Circuit Switching and Packet Switching
4/20
Circuit Switching
DATA
Caller Callee
Boston
SwitchLA
Switch
propagation
delay
between
caller
and Boston
switch
processing delay at switch
Its the method used bythe telephone network
A call has threephases:
1. Establish circuitfrom end-to-end(dialing),
2. Communicate,
3. Close circuit (teardown).
If circuit not available:busy signal
(1)
(2)
(3)
-
8/3/2019 28071480 Circuit Switching and Packet Switching
5/20
Switch
Circuit Switching:
Multiplexing/Demultiplexing
Time divided into frames and frames divided into slots
Relative slot position inside a frame determines whichconversation the data belongs to
E.g., slot 0 belongs to the red conversation
Need synchronization between sender and receiver
Frames
0 1 2 3 4 5 0 1 2 3 4 5Slots =
One way for sharing a circuit is TDM:
Lecture notes use the word frame for slot
-
8/3/2019 28071480 Circuit Switching and Packet Switching
6/20
The network core:
Circuit Switchingnetwork resources (e.g., bandwidth) divided
into pieces
pieces allocated to calls resource piece idle if not used by owning call
(no sharing)
Consumers are charged on a per-minute basis
2 ways of dividing the link bandwidth intopieces
frequency division multiplexing (FDM)
time division multiplexing (TDM)
-
8/3/2019 28071480 Circuit Switching and Packet Switching
7/20
Circuit Switching: FDM and TDM
Frequency Division Multiplexing (FDM)
frequency
time
Time Division Multiplexing. (TDM)
frequency
time
4 users
Example:
-
8/3/2019 28071480 Circuit Switching and Packet Switching
8/20
Numerical example
How long does it take to send a file of640,000 bits from host A to host B over a
circuit-switched network?
The links transmission rate = 1.536 Mbps Each link uses TDM with 24 slots/sec
500 msec to establish end-to-end circuit
Figure it out
Solution:
Bandwidth of circuit = 1.536/24 = 64 kbps
Time to send: 640 kbits/64 kbps + 0.5s = 10.5s
What would be different if we use FDM instead ofTDM?
-
8/3/2019 28071480 Circuit Switching and Packet Switching
9/20
Common mistake/confusion :Question: A) Express transmission rate of 1Kbits/sec in bits/sec
B) Express the file size of 1KBytes in bits
Answer: A) 1000 bits/sec (in throughput, K = 103=1000)
B) 1024 Bytes = 8192 bits (in data size, K = 2
10
=1024)
Electronic speeds/times: K = 103, M = 106, G = 109
Computer file/memory sizes: K = 210 , M = 220, G = 230
Common computer notation:
b(bits) Kb, Mb, Gb B(Bytes) KB, MB, GB
Better computer notation: b(bits) Kib, Mib, Gib
B(Bytes) KiB, MiB, GiB
-
8/3/2019 28071480 Circuit Switching and Packet Switching
10/20
Packet Switching Used in the Internet
Data is sent in Packets(header contains controlinfo, e.g., source anddestination addresses)
Per-packet routing
At each node the entirepacket is received, stored,and then forwarded (store-and-forwardnetworks)
No capacity is allocated
Header Data
Packet 1
Packet 2
Packet 3
Packet 1
Packet 2
Packet 3
Packet 1
Packet 2
Packet 3
processing
delay of
Packet 1
at Node 2
propagation
delay
between
Host 1 &
Node 2transmission
time of
Packet 1
at Host 1
Host 1 Host 2
Node 1 Node 2
-
8/3/2019 28071480 Circuit Switching and Packet Switching
11/20
Router
Packet Switching:
Multiplexing/Demultiplexing
Multiplex using a queue
Routers need memory/buffer
Demultiplex using information in packet header Header has destination
Router has a routing table that contains informationabout which link to use to reach a destination
Queue
-
8/3/2019 28071480 Circuit Switching and Packet Switching
12/20
Packet switching also show reordering
Host A
Host BHost E
Host D
Host C
Node 1 Node 2
Node 3
Node 4
Node 5
Node 6 Node 7
Packets in a flow may not follow the same path (depends
on routing as we will see later) packets may bereordered
-
8/3/2019 28071480 Circuit Switching and Packet Switching
13/20
The network core:
Packet Switching all streams sharenetwork resources
each packet uses full
link bandwidth resources used as
needed
Resource contention:
aggregate resourcedemand can exceed
amount available
congestion: packets
queue, wait for linkBandwidth division into
pieces
Dedicated allocation
Resource reservation
-
8/3/2019 28071480 Circuit Switching and Packet Switching
14/20
The network core:
Packet switching Data transmitted in small, independent
pieces
Source divides outgoing messages intopackets
Destination recovers original data
Each packet travels independently
Includes enough information for delivery
May follow different paths
Can be retransmitted if lost
-
8/3/2019 28071480 Circuit Switching and Packet Switching
15/20
The network core:
Functions of packet-switching
networks
Packet construction
encode/package data at source
Packet transmission
send packet from source to destination
Packet interpretation unpack/decode data from packet at destination
acknowledge receipt
-
8/3/2019 28071480 Circuit Switching and Packet Switching
16/20
statistical multiplexing Sequence of A & B packets does not havefixed pattern; shared on demand.
Compare: in TDM, each host gets same slot (periodically)
in FDM, each host gets same bandwidth (continuously)
A
B
C100 Mb/sEthernet
1.5 Mb/s
D E
statistical multiplexing
queue of packetswaiting for output
link
The network core:
statistical multiplexing
-
8/3/2019 28071480 Circuit Switching and Packet Switching
17/20
Differences Between Circuit & Packet
SwitchingCircuit-switching Packet-Switching
Guaranteed capacity No guarantees (best
effort)
Capacity is wasted if
data is bursty
More efficient
Before sending data
establishes a path
Send data immediately
All data in a single flow
follow one path
Different packets might
follow different paths
No reordering; constant
delay; no pkt drops
Packets may be
reordered, delayed, ordro ed
-
8/3/2019 28071480 Circuit Switching and Packet Switching
18/20
End-to-end delay (nodal delay) :
Total time from initiating send (from source) to
completed receive (at destination)
Throughput : Rate (bits/sec) at which bits are actually being
transferred between sender/receiver
instantaneous: rate at given point in time
average: rate over longer period of time
Network performance metrics
-
8/3/2019 28071480 Circuit Switching and Packet Switching
19/20
Four sources of packet delay
1. nodal processing:
check bit errors
determine output link
A
B
propagation
transmission
nodalprocessing queueing
2. queueing delay
time waiting at output
link for transmission
depends oncongestion level of
router
-
8/3/2019 28071480 Circuit Switching and Packet Switching
20/20
3. Transmission delay:
R=link bandwidth (speed
in bits per second, i.e.
bps)
L=packet length (in bits)
transmission delay = L/R
4. Propagation delay: d = length of physical link (in
meters)
s = propagation speed in
medium (~2.5 x 108 m/sec)
propagation delay = d/s
Note: R and s are verydifferent quantities!
Four sources of packet delay
A
B
propagation
transmission
nodal
processing queueing