Circuit-Switch/Packet-Switch


The purpose of a computer network is to provide services to users. Those services may need...

  • Guaranteed bandwidth --> Circuit-Switch
  • Expected bandwidth --> Packet-switch

Circuit-swtich

  • Dedicated point-to-point link between 2 devices.
  • Used in telephone systems.
  • You have to setup a path before you can start talking.

Packet-swtich

  • Allows many devices to use the same link.
  • Before the message is sent, the message is broken down into chunks (aka. packets).
  • Used in the Internet.
  • There are 2 services in Packet Switching:
    1. Virtual circuit - setup a circuit. Sender and receiver communicate directly (connection orientated).
    2. Datagram - don't setup a circuit. Messages are sent immediately (connectionless).

Connection-Orientated vs Connectionless Services


Connection-Orientated:
  • Route chosen when virtual circuit is set up; all packets follow it.
  • Packets arrive in order.
  • Each packet contains a short vc_id instead of its destination address.
  • Service Example
    Reliable message stream Sequence of pages
    Reliable byte stream Movie download
    Unreliable connection Video/voice call
    Reliable connection File transfer

    You may be wondering why video/voice calling is an unreliable connection...

    • Realtime data needs an unreliable service... apparently?
    • It means you may have to wait a long time for ACK
    • The main thing is just to have a consistent flow of realtime data.
Connectionless:
  • Each packet is routed independently of its predecessors. Successive packets may follow different routes.
  • Packets may arrive in a different order from that in which they were sent
  • Each datagram must contain the full destination address.
  • Service Example
    Unreliable datagram Electronic junk email
    Reliable datagram Email
    Acknowledged datagram Text messaging
    Request-reply Database query

You may be wondering why electronic junk email is an unreliable datagram...

  • Because the junk email was probably sent to thousands of users, and naturally a few might get lost along the way which is no big deal... apparently?