Computer Communication Networks Lecture 4 Circuit Switching Packet

  • Slides: 38
Download presentation
Computer Communication & Networks Lecture 4 Circuit Switching, Packet Switching, Delays http: //web. uettaxila.

Computer Communication & Networks Lecture 4 Circuit Switching, Packet Switching, Delays http: //web. uettaxila. edu. pk/CMS/coe. CCNbs. Sp 09/index. asp Waleed Ejaz waleed. ejaz@uettaxila. edu. pk 1

Communication Network Communication networks Switched networks Broadcast networks End nodes send to one (or

Communication Network Communication networks Switched networks Broadcast networks End nodes send to one (or more) end nodes End nodes share a common channel (TV, radio…) Circuit switching Packet switching Dedicated circuit per call (telephone, ISDN) (physical) Data sent in discrete portions (the Internet) 2

Communication Network Communication networks Switched networks Broadcast networks End nodes send to one (or

Communication Network Communication networks Switched networks Broadcast networks End nodes send to one (or more) end nodes End nodes share a common channel (TV, radio…) Circuit switching Packet switching Dedicated circuit per call (telephone, ISDN) (physical) Data sent in discrete portions (the Internet) 3

Circuit switching n A dedicated communication path (sequence of linkscircuit) is established between the

Circuit switching n A dedicated communication path (sequence of linkscircuit) is established between the two end nodes through the nodes of the network n 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. n Latency: Data is not delayed at switches 4

Circuit switching (cnt’d) Three phases involved in the communication process: 1. Establish the circuit

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) 5

Time diagram of circuit switching switch host 1 node 2 host 2 Delay host

Time diagram of circuit switching switch host 1 node 2 host 2 Delay host 1 - node 1 Processing delay node 1 circuit establishment Delay host 2 - host 1 data transmission DATA time 6

Circuit Switching n Network resources (e. g. , bandwidth) divided into “pieces” n n

Circuit Switching n Network resources (e. g. , bandwidth) divided into “pieces” n n n pieces allocated to calls resource piece idle if not used by owning call (no sharing) dividing link bandwidth into “pieces” q frequency division q time division 7

Circuit Switching: FDM and TDM Example: FDM 4 users frequency time TDM frequency time

Circuit Switching: FDM and TDM Example: FDM 4 users frequency time TDM frequency time 8

Example Assume that a voice channel occupies a bandwidth of 4 k. Hz. We

Example Assume that a voice channel occupies a bandwidth of 4 k. Hz. We need to combine three voice channels into a link with a bandwidth of 12 k. Hz, from 20 to 32 k. Hz. Show the configuration, using the frequency domain. Assume there are no guard bands. Solution We 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 -k. Hz bandwidth for the first channel, the 24 - to 28 -k. Hz bandwidth for the second channel, and the 28 - to 32 -k. Hz bandwidth for the third one. Then we combine them. 9

Example (contd. ) 10

Example (contd. ) 10

Example Five channels, each with a 100 -k. Hz bandwidth, are to be multiplexed

Example Five channels, each with a 100 -k. Hz 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 k. Hz between the channels to prevent interference? Solution For five channels, we need at least four guard bands. This means that the required bandwidth is at least 5 × 100 + 4 × 10 = 540 k. Hz 11

Applications n AM Radio q q n FM Radio q q n Band 88

Applications n AM Radio q q n FM Radio q q n Band 88 -108 MHz Each FM Station needs 200 KHz TV q n Band 530 -1700 KHz Each AM Station needs 10 KHz Each Channel needs 6 MHz AMPS 12

Synchronous TDM n In synchronous TDM, the data rate of the link is n

Synchronous TDM n In synchronous TDM, the data rate of the link is n times faster, and the unit duration is n times shorter. 13

Example In Figure on Last Slide, the data rate for each input connection is

Example 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? Solution We 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. 14

Example Figure below shows synchronous TDM with a data stream for each input and

Example 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. 15

Disadvantages of Sync. TDM 16

Disadvantages of Sync. TDM 16

Statistical Multiplexing n n On-demand time-division Schedule link on a per-packet basis Packets from

Statistical Multiplexing n n 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 ? 17

Statistical Multiplexing n n n An application needs to break-up its message in packets,

Statistical Multiplexing n n n An application needs to break-up its message in packets, and re-assemble at the receiver Fair allocation of link capacity: FIFO or Qo. S Buffer may overflow – congestion at the switch … 18

TDM slot comparison • Slot Size • No Synchronization Bit • Bandwidth 19

TDM slot comparison • Slot Size • No Synchronization Bit • Bandwidth 19

Communication networks Switched networks Broadcast networks end nodes send to one (or more) end

Communication networks Switched networks Broadcast networks end nodes send to one (or more) end nodes End nodes share a common channel (TV, radio…) Circuit switching Packet switching Dedicated circuit per call (telephone, ISDN) Data sent in discrete portions (the Internet) 20

Packet Switching n n each end-end data stream divided into packets user A, B

Packet Switching n n 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: n aggregate resource demand can exceed amount available n congestion: packets queue, wait for link use n store and forward: packets move one hop at a time q Node receives complete packet before forwarding 21

Packet switching - Why not message switching? host 1 node 2 host 2 propagation

Packet switching - Why not message switching? host 1 node 2 host 2 propagation delay host 1 – node 1 message processing & set-up delay of a message at node 1 message time Store-and-Forward 22

Message switching EXAMPLE host 1 node 2 host 2 for simplicity: ignore processing and

Message switching EXAMPLE host 1 node 2 host 2 for simplicity: ignore processing and propagation delays M=7. 5 Mb R=1. 5 Mbps transmission delay: Store complete message and than forward 23

Message switching versus packet switching Example n host 1 node 1 R=1. 5 Mbps

Message switching versus packet switching Example n host 1 node 1 R=1. 5 Mbps n n n R=1. 5 Mbps For simplicity ignore processing and propagation delays Split the message into packets each with 1500 bits long Store only 1 packet and then forward it n 1 ms to transmit packet on 1 link Pipelining: each link works in parallel n Delay reduced from 15 s to 5. 002 s!!! n host 2 node 2 24

Packet switching 25

Packet switching 25

Packet Switching router Sequence of A & B packets does not have fixed pattern

Packet Switching router Sequence of A & B packets does not have fixed pattern statistical multiplexing. 26

Packet switching versus circuit switching Packet switching allows more users to use network! n

Packet switching versus circuit switching Packet switching allows more users to use network! n n 1 Mb/s link each user: q q n circuit-switching: q n 100 kb/s when “active” active 10% of time N users 10 users packet switching: q 1 Mbps link with 35 users, probability that there are 11 or more simultaneously active users is approximately. 0004 27

Packet switching versus circuit switching Is packet switching a “winner? ” n n n

Packet switching versus circuit switching Is packet switching a “winner? ” n n n Great for bursty data q resource sharing q simpler, no call setup Excessive congestion: packet delay and loss q protocols needed for reliable data transfer, congestion control Q: How to provide circuit-like behavior? q bandwidth guarantees needed for audio/video apps q still an unsolved problem 28

Packet switching versus circuit switching (cnt’d) n Advantages of packet switching over circuit switching

Packet switching versus circuit switching (cnt’d) n Advantages of packet switching over circuit switching q Statistical multiplexing, and therefore efficient bandwidth usage q Simple to implement n Disadvantages of packet switching over circ. switching q Excessive congestion: packet delay and high loss q Protocols needed for reliable data transfer, congestion control q Packet header overhead q Provides no transparency to a user n Analogy: a road versus a railroad 29

How do loss and delay occur? packets queue in router buffers n n packet

How do loss and delay occur? packets queue in router buffers n n packet arrival rate to link exceeds output link capacity packets queue, wait for turn packet being transmitted (delay) A B packets queueing (delay) free (available) buffers: arriving packets dropped (loss) if no free buffers 30

Four sources of packet delay n 1. Nodal processing: q q n check bit

Four sources of packet delay n 1. Nodal processing: q q n check bit errors determine output link 2. Queueing q q time waiting at output link for transmission depends on congestion level of router transmission A propagation B nodal processing queueing 31

Delay in packet-switched networks 4. Propagation delay: 3. Transmission delay: n n n R=link

Delay in packet-switched networks 4. Propagation delay: 3. Transmission delay: n n n R=link bandwidth (bps) L=packet length (bits) time to send bits into link = L/R n n n d = length of physical link s = propagation speed in medium (~2 x 108 m/sec) propagation delay = d/s Note: s and R are very different quantities! transmission A propagation B nodal processing queueing 32

Nodal delay n dproc = processing delay q n dqueue = queuing delay q

Nodal delay n dproc = processing delay q n dqueue = queuing delay q n depends on congestion dtrans = transmission delay q n typically a few microsecs or less = L/R, significant for low-speed links dprop = propagation delay q a few microsecs to hundreds of msecs 33

Queueing delay (revisited) n n n R=link bandwidth (bps) L=packet length (bits) a=average packet

Queueing delay (revisited) n n n R=link bandwidth (bps) L=packet length (bits) a=average packet arrival rate traffic intensity = La/R n n n 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! 34

Packet loss n n n queue preceding link in buffer has finite capacity when

Packet loss n n n 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 35

Assignment 1 n n You can find Assignment 1 from course web. Due Date:

Assignment 1 n n You can find Assignment 1 from course web. Due Date: First class of Next Week Quiz 1 n On the day of submission of Assignment related with topics covered in Assignment 1. 36

Readings n Computer Networking, a top-down approach featuring the Internet (3 rd edition), J.

Readings n Computer Networking, a top-down approach featuring the Internet (3 rd edition), J. K. Kurose, K. W. Ross q Chapter 1: Section 1. 3, 1. 6 37

38

38