Communication and Networking Circuit and Packet Switching Basics D. Richard Brown III (selected figures from Stallings Data and Computer Communications 10th edition) D. Richard Brown III 1 / 20
Unswitched/Unmultiplexed Network Dedicated link between each user Lots of wires Lots of network ports Difficult to add more users D. Richard Brown III 2 / 20
Switched Network No dedicated links between users Extra switching hardware needed Additional overhead to ensure data goes to the right place D. Richard Brown III 3 / 20
Circuit Switching Three phases: 1. Circuit establishment 2. Data transfer 3. Circuit disconnect Once connected, the data transfer is transparent: Dedicated circuit between sender and receiver Very low delay (essentially just propagation delay) Efficient for analog transmission of voice signals Can be inefficient for digital transmissions since channel capacity is dedicated for the duration of connection Like structured multiplexing techniques, e.g., synchronous TDM, channel is reserved even if not used (until disconnect) D. Richard Brown III 4 / 20
Blocking vs. Non-Blocking Circuit Switched Networks Blocking network: More users than actual circuits available in network May be unable to connect users in periods of high use because all circuits are busy Usually acceptable (although inconvenient) for voice traffic Non-blocking network: Enough circuits available to permit all users to connect (in pairs) simultaneously Usually expected for data traffic May require buffering D. Richard Brown III 5 / 20
ECE2305: Circuit and Packet Switching Basics Space Division Switching I Originally developed for analog links I Also applicable to digital links I Signal paths are physically separate from one another I Path is dedicated solely to transfer signals I Basic building block of switch is a metallic crosspoint or semiconductor gate Images from: http://www.forensicgenealogy.info/contest 28 results.html and http://rhetoricaldevice.com/ringringring.html. D. Richard Brown III 6 / 20
Non-Blocking Space Division Switch D. Richard Brown III 7 / 20
Three-Stage Space Division Switch Blocking possible here. D. Richard Brown III 8 / 20
Public Circuit Switched Network Note that trunks might be synchronous TDM lines, e.g., DS-1 or SONET The main idea here is that, from the point of view of the users, there is a dedicated circuit between them. D. Richard Brown III 9 / 20
Modern Circuit Switching: Time-Division Switching Most analog signals are now digitized before transmission through a network Low cost of digital hardware Telephone operators replaced by smart digital switches that automatically establish and release dedicated circuits Synchronous TDM multiplexing usually used: Multiplex low rate data streams into dedicated timeslots in a high rate data stream Guaranteed data rate through circuit Low delay Transparent to end users D. Richard Brown III 10 / 20
Motivation for Packet Switching Fundamental conflict/tradeoff in communication systems: Pre-allocation of dedicated channel capacity (FDM, synchronous TDM, circuit switching) Dynamic allocation of on-demand channel capacity (statistical TDM, packet switching) 1968: Almost all voice/data networks were circuit switched Real-time dynamic allocation of channel capacity was unrealistic given current computer hardware 1969: ARPANET First demonstrations of packet switched computer network If lines are cheap: use circuit switching If computing is cheap: use packet switching D. Richard Brown III 11 / 20
Packet Switching Station breaks long message into packets Packets sent one at a time to the network Network dynamically allocates capacity and delivers packets to receiver without establishing a dedicated link Two common approaches: Virtual circuit packet switching Datagram packet switching D. Richard Brown III 12 / 20
Effect of Packet Size Packets: X a b Y Packets forwarded only after they have been completely received. Assume: 40 byte/octet data 3 byte header Cases: (a) 40 + 3 = 43 byte packets (b) 20 + 3 = 23 byte packets (c) 8 + 3 = 11 byte packets (d) 4 + 3 = 7 byte packets D. Richard Brown III 13 / 20
Virtual Circuit Packet Switching Route is pre-planned (requires a call setup phase) All packets follow the same route Packets will arrive in order No per-packet routing decisions need to be made (low per-packet overhead) Can be affected by network problems Network can provide sequencing and error control Typically more efficient for long messages (low per-packet overhead outweighs fixed call setup overhead) Note this is not a dedicated circuit (no reserved capacity). D. Richard Brown III 14 / 20
Virtual Circuit Packet Switching D. Richard Brown III 15 / 20
Datagram Packet Switching No call setup phase Each packet is treated independently Packets may take different routes Packets may arrive out of order Usually more reliable (robust to network problems) More flexible Typically more efficient for short messages (no fixed call setup overhead but higher per-packet overhead) As seen in lab 5, this is how IP works. D. Richard Brown III 16 / 20
Virtual Circuits vs. Datagram Packet Switching Virtual circuits: Call setup phase results in more fixed overhead Less per-packet overhead during data transmission since no routing decisions have to be made for each packet Network can provide sequencing and error control Susceptible to single point of failure Datagram: No call setup phase results in very small fixed overhead More per-packet overhead during data transmission since routing decisions have to be made for each packet Typically more flexible and resilient to network problems D. Richard Brown III 17 / 20
Typical Timing Diagrams D. Richard Brown III 18 / 20
Comparison Table D. Richard Brown III 19 / 20
Final Remarks Circuit switching (originally developed for analog voice communication) Packet switching (1969 ARPANET) Virtual circuit Datagram Performance depends on several factors Propagation delays Length of message that will be transmitted Application (continuous data or intermittent?) Size of packets Switching/routing delays Bottom line: Tradeoff between fixed overhead and per-packet overhead Datagram packet switching preferred in most modern applications D. Richard Brown III 20 / 20