COM-1006: Device and Network (Lecture 3: Circuit and Packet Switching)

Switching networks facilitate long-distance transmission using circuit switching and packet switching.

  • Circuit Switching: Requires a dedicated communication path between two stations with allocated and reserved resources.

    • Requires three steps: connection establishment, data transfer, and connection termination.

    • Channel capacity is dedicated, which is inefficient for bursty traffic, and involves an initial connection delay.

  • Packet Switching: Shares network resources without dedicated links, allocating resources on demand.

    • Data is transmitted in short packets, each containing a header for routing based on the store-and-forward concept.

    • Offers better link utilization and is suitable for bursty traffic; can prioritize packets.

    • Two approaches: virtual circuits and datagrams.

    • Virtual Circuit: Establishes a route before packet transmission, but links aren't dedicated.

    • Uses virtual circuit identifiers (VCI) for packet forwarding. Setting up a VCI involves setup request, acknowledgment, and teardown phases.

    • Datagram: Transmits each packet independently without a pre-established route.

    • Requires dynamic routing decisions at each node, with packets possibly delivered out of order.

    • Faster for fewer packets and more flexible in handling congestion.

  • Essential Maths for Networking

    • bit=binary digit=0,1,1 byte=8 bitsbit = binary\ digit = {0, 1}, 1\ byte = 8\ bits

    • GB:gigabyte=230bytes=233bitsGB: gigabyte = 2^{30} bytes = 2^{33} bits

    • MB:megabyte=220bytes=223bitsMB: megabyte = 2^{20} bytes = 2^{23} bits

    • KB:kilobyte=210bytes=213bitsKB: kilobyte = 2^{10} bytes = 2^{13} bits

    • 1KB=1024bytes(NOT1000bytes)=8×1024bits1 KB = 1024 bytes (NOT 1000 bytes) = 8 \times 1024 bits

    • 1MB=1024×1024bytes=8×1024×1024bits1 MB = 1024 \times 1024 bytes = 8 \times 1024 \times 1024 bits

    • Gbps:gigabit per second=109bits per secondGbps: gigabit\ per\ second = 10^9 bits\ per\ second

    • Mbps:megabit per second=106bits per secondMbps: megabit\ per\ second = 10^6 bits\ per\ second

    • Kbps:kilobit per second=103bits per secondKbps: kilobit\ per\ second = 10^3 bits\ per\ second

    • The bandwidth of a link/channel is the number of bits per unit time that can be transmitted over the link/channel. It is measured in bps (bits per second).

  • Converting Binary to Decimal

    • To find the answer as a decimal, add up the powers of two for all the positions containing a 1

  • Converting Decimal to Binary

    • Is X (strictly) smaller than the power of two above the position?

    • If yes, write 0

    • If no, write 1 and subtract the power of two from X

  • Bitwise AND

    • The AND operation is performed on individual bits and is tabulated below:

    • 0 AND 0 = 0

    • 0 AND 1 = 0

    • 1 AND 0 = 0

    • 1 AND 1 = 1

  • Bitwise OR

    • The OR operation is performed on individual bits and is tabulated below

    • 0 OR 0 = 0

    • 0 OR 1 = 1

    • 1 OR 0 = 1

    • 1 OR 1 = 1

  • Bitwise XOR

    • The XOR (exclusive OR) operation is performed on individual bits and is tabulated below. XOR stands for exclusive or and means 'one or the other, not both'

    • 0 XOR 0 = 0

    • 0 XOR 1 = 1

    • 1 XOR 0 = 1

    • 1 XOR 1 = 0