Chapter # 10

Network Layer 10 - Circuit Switching and Packet Switching

Computer Communication & Networking— CE - 402 Department of Computer Engineering, SSUET CE - 402

Instructor: M. Rehan Rasheed

1

Introduction 

Packet Switching refers to protocols in which messages are divided into packets before they are sent. Each packet is then transmitted individually and can even follow different routes to its destination.



Once all the packets forming a message arrive at the destination, they are recompiled into the original message.

CE - 402

CC&N-CE-402

Instructor: M. Rehan Rasheed

2

1

Chapter # 10

Packet Switching Application 

Circuit-switching is ideal when data must be transmitted quickly and must arrive in the same order in which it's sent. This is the case with most real-time data, such as live audio and video.



Packet switching is more efficient and robust for data that can withstand some delays in transmission, such as e-mail messages and Web pages.

CE - 402

Instructor: M. Rehan Rasheed

3

Packet Switching Operation 

Data are transmitted in short packets. Typically an upper bound on packet size is 1000 octets.



If a station has a longer message to send it breaks it up into a series of small packets. Each packet now contains part of the user's data and some control information. The control information should at least contain:  Destination Address  Source Address Store and forward - Packets are received, stored briefly (buffered) and past on to the next node.





CE - 402

CC&N-CE-402

Instructor: M. Rehan Rasheed

4

2

Chapter # 10

Use of Packets

CE - 402

Instructor: M. Rehan Rasheed

5

Advantages 

Line efficiency  Single node to node link can be dynamically shared by many packets over time.  Packets queued and transmitted as fast as possible.



Data rate conversion  Two stations of different data rates can exchange packets because each connects to its node at its proper data rate.

CE - 402

CC&N-CE-402

Instructor: M. Rehan Rasheed

6

3

Chapter # 10

Switching Technique - Virtual Circuits and Datagrams 

Packets handled in two ways  

CE - 402

Datagram approach Virtual circuit approach

Instructor: M. Rehan Rasheed

7

Datagram Packet Switching 

   

 

In datagram approach each packet is treated independently with no reference to packets that have gone before. No connection is set up. Packets can take any practical route Packets may arrive out of order Packets may go missing Up to receiver to re-order packets and recover from missing packets More processing time per packet per node Robust in the face of link or node failures.

CE - 402

CC&N-CE-402

Instructor: M. Rehan Rasheed

8

4

Chapter # 10

Packet Switching Datagram Approach

CE - 402

Instructor: M. Rehan Rasheed

9

Virtual Circuit Packet Switching 

 



 

  

In the Virtual Circuit approach a pre-planned route is established before any packets are sent. There is a call set up before the exchange of data (handshake). All packets follow the same route and therefore arrive in sequence. Each packet contains a virtual circuit identifier instead of destination address More set up time No routing decisions required for each packet - Less routing or processing time Susceptible to data loss in the face of link or node failure Clear request to drop circuit Not a dedicated path

CE - 402

CC&N-CE-402

Instructor: M. Rehan Rasheed

10

5

Chapter # 10

Packet Switching Virtual Circuit Approach

CE - 402

Instructor: M. Rehan Rasheed

11

Virtual Circuits vs. Datagram 

Virtual circuits  





Network can provide sequencing and error control Packets are forwarded more quickly  No routing decisions to make Less reliable  Loss of a node looses all circuits through that node

Datagram 



No call setup phase  Better if few packets More flexible  Routing can be used to avoid congested parts of the network

CE - 402

CC&N-CE-402

Instructor: M. Rehan Rasheed

12

6

Chapter # 10

One Station Can Have Many Virtual Circuit Connections

CE - 402

Instructor: M. Rehan Rasheed

13

Instructor: M. Rehan Rasheed

14

Packet Size

CE - 402

CC&N-CE-402

7

Chapter # 10

Packet Size 

In this example it is assumed that there is a virtual circuit from station X through nodes a and b to station Y.



The message to be sent comprises 40 octets and 3 octets of control information called header.



If the entire message is sent the packet first transmitted from station X to node a, when the entire packet is received, it can be transmitted from a to b and then transmitted to Y. ignoring switching time, total transmission time is 129 octettime(43octets x 3 packet transmission).

CE - 402

Instructor: M. Rehan Rasheed

15

Circuit vs. Packet Switching 

Performance  Propagation delay  The time it takes a signal to propagate from one node to the next. This time generally negligible. Typically on a wire medium 2x108  Transmission time  The time it takes for a transmitter to send out a block of data, e.g it takes 1s to transmit 10,000 bit block of data onto a 10kbps line.  Node delay  The time it takes for a node to perform the necessary processing as it switches data.

CE - 402

CC&N-CE-402

Instructor: M. Rehan Rasheed

16

8

Chapter # 10

Comparison with Circuit Switching - Event Timing

CE - 402

Instructor: M. Rehan Rasheed

Circuit Switching

CC&N-CE-402

17

Packet Switching Datagram Packet switching

Virtual-circuit Packet Switching

Dedicated transmission path

No dedicated path

No dedicated path

Continuous transmission of data

Transmission of packets

Transmission of packets

Fast enough for interactive

Fast enough for interactive

Fast enough for interactive

Messages are not stored

Packets may be stored until delivered

Packets stored until delivered

The path is established for entire conversation

Route established for each packet

Route established for entire conversation

Call setup delay; negligible transmission delay

Packet transmission delay

Call setup delay; packet transmission delay

Busy signal if called party busy

Sender may be notified if packet not delivered

Sender notified of connection denial

Overload may block call setup; no delay for established calls

Overload increases packet delay

Overload may block call setup; increase packet delay

Electromechanical or computerized switching

Small switching nodes

Small switching nodes

User responsible for message loss protection

Network may be responsible for individual packets

Network may be responsible for packet sequences

Usually no speed or code conversion

Speed and code conversion

Speed and code conversion

Fixed bandwidth

Dynamic use of bandwidth

Dynamic use of bandwidth

No overhead bits after call setup

Overhead bits in each packet

Overhead bits in each packet

9

Network Layer and Circuit Switching

Susceptible to data loss in the face of link or node failure. ▫ Clear request to drop circuit. ▫ Not a dedicated path. CE - 402. Instructor: M. Rehan Rasheed ...

461KB Sizes 0 Downloads 158 Views

Recommend Documents

No documents