computer communication & networks
DESCRIPTION
Computer Communication & Networks. Lecture 4 Circuit Switching, Packet Switching, Delays http://web.uettaxila.edu.pk/CMS/coeCCNbsSp09/index.asp. Waleed Ejaz [email protected]. Communication Network. Communication networks. Broadcast networks - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/1.jpg)
1
Computer Communication & Networks
Lecture 4
Circuit Switching, Packet Switching, Delays
http://web.uettaxila.edu.pk/CMS/coeCCNbsSp09/index.asp
Waleed [email protected]
![Page 2: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/2.jpg)
2
Communication Network
Communication networks
Broadcast networksEnd nodes share a common channel
(TV, radio…)
Switched networks End nodes send to one (or more) end nodes
Packet switchingData sent in discrete portions
(the Internet)
Circuit switchingDedicated circuit per call
(telephone, ISDN)
(physical)
![Page 3: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/3.jpg)
3
Communication Network
Communication networks
Broadcast networksEnd nodes share a common channel
(TV, radio…)
Switched networks End nodes send to one (or more) end nodes
Packet switchingData sent in discrete portions
(the Internet)
Circuit switchingDedicated circuit per call
(telephone, ISDN)
(physical)
![Page 4: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/4.jpg)
4
Circuit switching
A dedicated communication path (sequence of links-circuit) is established between the two end nodes through the nodes of the network
Bandwidth: A circuit occupies a fixed capacity of each link for the entire lifetime of the connection. Capacity unused by the circuit cannot be used by other circuits.
Latency: Data is not delayed at switches
![Page 5: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/5.jpg)
5
Circuit switching (cnt’d)
Three phases involved in the communication process:
1. Establish the circuit
2. Transmit data
3. Terminate the circuit
If circuit not available: busy signal (congestion)
![Page 6: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/6.jpg)
6
Time diagram of circuit switching
circuit establishment
data transmission
host 1 node 1 node 2 host 2
Delay host 1- node 1
time
Processing delay node 1
DATA
Delay host 2- host 1
switch
![Page 7: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/7.jpg)
7
Circuit Switching
Network resources (e.g., bandwidth) divided into “pieces”
pieces allocated to calls resource piece idle if not used by owning call
(no sharing) dividing link bandwidth into “pieces”
frequency division time division
![Page 8: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/8.jpg)
8
Circuit Switching: FDM and TDMFDM
frequency
time
TDM
frequency
time
4 users
Example:
![Page 9: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/9.jpg)
9
Assume that a voice channel occupies a bandwidth of 4 kHz. We need to combine three voice channels into a link with a bandwidth of 12 kHz, from 20 to 32 kHz. Show the configuration, using the frequency domain. Assume there are no guard bands.
SolutionWe shift (modulate) each of the three voice channels to a different bandwidth, as shown in Figure on next Slide. We use the 20- to 24-kHz bandwidth for the first channel, the 24- to 28-kHz bandwidth for the second channel, and the 28- to 32-kHz bandwidth for the third one. Then we combine them.
Example
![Page 10: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/10.jpg)
10
Example (contd.)
![Page 11: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/11.jpg)
11
Five channels, each with a 100-kHz bandwidth, are to be multiplexed together. What is the minimum bandwidth of the link if there is a need for a guard band of 10 kHz between the channels to prevent interference?
SolutionFor five channels, we need at least four guard bands. This means that the required bandwidth is at least
5 × 100 + 4 × 10 = 540 kHz
Example
![Page 12: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/12.jpg)
12
Applications
AM Radio Band 530-1700KHz Each AM Station needs 10KHz
FM Radio Band 88-108MHz Each FM Station needs 200KHz
TV Each Channel needs 6MHz
AMPS
![Page 13: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/13.jpg)
13
Synchronous TDM
In synchronous TDM, the data rate of the link is n times faster, and the unit duration is n times shorter.
![Page 14: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/14.jpg)
14
In Figure on Last Slide, the data rate for each input connection is 1 kbps. If 1 bit at a time is multiplexed (a unit is 1 bit), what is the duration of (a) each input slot, (b) each output slot, and (c) each frame?SolutionWe can answer the questions as follows: a. The data rate of each input connection is 1 kbps. This means
that the bit duration is 1/1000 s or 1 ms. The duration of the input time slot is 1 ms (same as bit duration).
b. The duration of each output time slot is one-third of the input time slot. This means that the duration of the output time slot is 1/3 ms.
c. Each frame carries three output time slots. So the duration of a frame is 3 × 1/3 ms, or 1 ms. The duration of a frame is the same as the duration of an input unit.
Example
![Page 15: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/15.jpg)
15
Figure below shows synchronous TDM with a data stream for each input and one data stream for the output. The unit of data is 1 bit. Find (a) the input bit duration, (b) the output bit duration, (c) the output bit rate, and (d) the output frame rate.
Example
![Page 16: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/16.jpg)
16
Disadvantages of Sync. TDM
![Page 17: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/17.jpg)
17
Statistical Multiplexing
On-demand time-division Schedule link on a per-packet basis Packets from different sources interleaved on link Buffer packets in switches that are contending for the link
…
Do you see any problem ?
![Page 18: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/18.jpg)
18
Statistical Multiplexing An application needs to break-up its message in
packets, and re-assemble at the receiver Fair allocation of link capacity: FIFO or QoS Buffer may overflow – congestion at the switch
…
![Page 19: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/19.jpg)
19
TDM slot comparison
•Slot Size
•No Synchronization Bit
•Bandwidth
![Page 20: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/20.jpg)
20
Communication networksCommunication networks
Broadcast networksEnd nodes share a common channel
(TV, radio…)
Switched networks end nodes send to one (or more) end nodes
Packet switchingData sent in discrete portions
(the Internet)
Circuit switchingDedicated circuit per call
(telephone, ISDN)
![Page 21: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/21.jpg)
21
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
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 Node receives complete
packet before forwarding
Bandwidth division into “pieces”
Dedicated allocation
Resource reservation
![Page 22: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/22.jpg)
22
Packet switching- Why not message switching?-
Store-and-Forward
host 1 node 1 node 2 host 2
propagation delay host 1 – node1
processing & set-up delay of a message at node 1
time
message
message
message
![Page 23: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/23.jpg)
23
Message switching
EXAMPLE
host 1node 1 node 2
host 2
for simplicity: ignore processing and propagation delays
M=7.5 Mb
R=1.5 Mbpstransmission delay:
[s] 153 R
M
Store complete message and than forward
![Page 24: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/24.jpg)
24
Message switching versus packet switching Example
For simplicity ignore processing and propagation delays Split the message into packets each with1500 bits long Store only 1 packet and then forward it
1 ms to transmit packet on 1 link Pipelining: each link works in parallel
Delay reduced from 15 s to 5.002 s!!!
host 1 node 1 node 2 host 2
R=1.5 Mbps R=1.5 Mbps R=1.5 Mbps
![Page 25: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/25.jpg)
25
Packet switching
![Page 26: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/26.jpg)
26
Packet Switching
router
router
router
Sequence of A & B packets does not have fixed pattern statistical multiplexing.
![Page 27: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/27.jpg)
27
Packet switching versus circuit switching
1 Mb/s link each user:
100 kb/s when “active” active 10% of time
circuit-switching: 10 users
packet switching: with 35 users, probability that
there are 11 or more simultaneously active users is approximately .0004
Packet switching allows more users to use network!
N users
1 Mbps link
![Page 28: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/28.jpg)
28
Packet switching versus circuit switching
Great for bursty data resource sharing simpler, 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
Is packet switching a “winner?”
![Page 29: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/29.jpg)
29
Packet switching versus circuit switching (cnt’d) Advantages of packet switching over circuit switching
Statistical multiplexing, and therefore efficient bandwidth usage Simple to implement
Disadvantages of packet switching over circ. switching Excessive congestion: packet delay and high loss Protocols needed for reliable data transfer, congestion control Packet header overhead Provides no transparency to a user
Analogy: a road versus a railroad
![Page 30: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/30.jpg)
30
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
![Page 31: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/31.jpg)
31
Four sources of packet delay 1. Nodal processing:
check bit errors determine output link
A
B
propagation
transmission
nodalprocessing queueing
2. Queueing time waiting at output
link for transmission depends on congestion
level of router
![Page 32: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/32.jpg)
32
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
Note: s and R are very different quantities!
A
B
propagation
transmission
nodalprocessing queueing
![Page 33: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/33.jpg)
33
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
![Page 34: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/34.jpg)
34
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!
![Page 35: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/35.jpg)
35
Packet loss
queue preceding link in buffer has finite capacity
when packet arrives to full queue, packet is dropped
lost packet may be retransmitted by previous node, by source end system, or not retransmitted at all
![Page 36: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/36.jpg)
36
Assignment 1
You can find Assignment 1 from course web. Due Date: First class of Next Week
Quiz 1 On the day of submission of Assignment
related with topics covered in Assignment 1.
![Page 37: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/37.jpg)
37
Readings
Computer Networking, a top-down approach featuring the Internet (3rd edition), J.K.Kurose, K.W.Ross Chapter 1: Section 1.3, 1.6
![Page 38: Computer Communication & Networks](https://reader036.vdocument.in/reader036/viewer/2022062309/568153b7550346895dc1b9ec/html5/thumbnails/38.jpg)
38