Computer Networks / Lecture / Lecture 5
Lecture · Computer Networks

Principles of Network Operation: Packet and Stream Transmission

When you send a 2 GB video on Telegram, it does not fly as a single “piece” — it is split into thousands of small packets that travel by different routes and are put back together at the destination. An ordinary phone call, by contrast, historically worked quite differently: for the whole conversation a separate channel was set aside for you, and the voice flowed as a continuous stream. In this lesson you will compare the two principles in a simulator and see step by step how a packet is born, addressed, sent on its way and received.

:ik-kitob: Lecture 5 ⏱ 2 academic hours (80 minutes) 🚇 Packet simulators ⚡ Split it up, put it back together
05

Lesson goals and plan

By the end of the lesson you will…

  • explain the principles of packet transmission (packet switching) and stream transmission (circuit switching)
  • compare the two methods by resource use, delay, reliability and cost
  • describe the structure of a packet (header, payload, check part) and the idea of encapsulation
  • tell apart the roles of MAC, IP and port addresses in a packet
  • calculate transmission, propagation, queuing and processing delays
  • justify a suitable transmission method and protocol for traffic types (voice, video, file, web)

Plan (according to the syllabus)

  1. The principles of splitting data into packets and sending it across a network, and of stream transmission
  2. How packets are formed, addressed, transmitted and received, and the features of transmission methods suited to different traffic types

The “metro” picture of this lesson: packet transmission is a metro where every passenger chooses their own route; stream transmission is booking a whole carriage in advance. Run both modes in the simulator and compare the time and the “empty seats”.

Why does a 2 GB video arrive in 3 minutes, yet a single lost packet does not spoil the whole file?

You sent a big video to a friend on Telegram. On the way the servers in Tashkent were busy, some cable dropped out for a second, and some pieces went around by another route. Even so, the video opens without errors. Meanwhile you are talking to another friend on a video call — and there a delayed piece is not sent again, because “the past second” is no longer needed. One network, two different requirements. Today we will uncover this secret.

Key terms

First try to recall the meaning of the term yourself, then click the card to check.

The principles of splitting data into packets and sending it across a network, and of stream transmission

If there is no direct wire between two computers (and there almost never is), data passes through intermediate nodes. The question: how should the resources of these nodes and lines be shared? Historically, two answers took shape.

Principle 1: stream transmission (circuit switching)

Definition

Stream transmission (circuit switching, circuit switching) — at the start of a communication session a dedicated physical or time channel is set up between two subscribers; it stays reserved only for them until the end of the session, and the data is sent along this channel as a continuous stream of bits.

  1. Setup

    When a number is dialed, the exchanges reserve channels one after another along the route. If no free channel is found — a “busy” signal.

  2. Streaming the data

    The path is ready — voice or data flows at a constant rate, with the same delay, with the order preserved. The channel is reserved even while you are silent.

  3. Teardown

    When the receiver is hung up, the channels are released and given to others.

To share one trunk line among many subscribers, time-division multiplexing (TDM) is used: each conversation is given a repeating time slot. A classic digital telephone channel is 64 kbit/s. The slot is yours — even if you do not speak, it does not go to someone else.

Principle 2: packet transmission (packet switching)

Definition

Packet transmission (packet switching, packet switching) — the message is split into packets of limited size, a header with the address and service information is added to each packet, the packets are routed independently over shared lines, and the original message is reassembled at the receiver. No resource is reserved in advance — whoever has a packet uses the line.

1

Splitting

The message is split into pieces that do not exceed the MTU, and each is given a sequence number.

2

Independent path

Each router forwards the packet to the next line by its header; packets may travel by different routes.

3

Reassembly

The receiver puts the packets in order by sequence number and asks again for any that are missing.

Did you know?

The idea of packet switching was proposed in the 1960s independently by Paul Baran in the USA (looking for a reliable communication network that could work even in a nuclear war) and Donald Davies in the United Kingdom. It was Davies who used the word “packet”. ARPANET, launched in 1969 — the ancestor of the Internet — was built on this principle.

Simulator: one message — two principles

Type a message, choose the packet size and switch modes. In the Packet mode the pieces go along random routes and arrive in mixed order — the receiver assembles them by sequence number. If “Loss” is switched on, one packet is lost on the way and sent again. In the Stream mode the channel is reserved first, then the characters flow in order along one path. In both modes, use the “Second subscriber” button to see what happens when someone else wants to use the same network.

Receiver\nOrder of arrival:
Choose a mode and click “Send”.

Comparing the two principles

Table 5.1. Stream (circuit) and packet transmission
CriterionStream (circuit switching)Packet (packet switching)
Connection setupMandatory, at the start of the sessionNot required (or only logical, for example TCP)
ResourceReserved in advance, even while silentAs needed, shared with others
DelaySmall and constant (almost no jitter)Variable: depends on the queues
OrderAlways preservedMay be broken — restored using sequence numbers
EfficiencyLow (the channel is busy even when idle)High (the line is never idle)
Fault toleranceIf the path breaks — the session breaksPackets find another path
OverheadSetup timeA header on every packet
ExamplesThe classic telephone network (PSTN), old GSM voice channelsInternet, Ethernet, 4G/5G data, Telegram, YouTube
Modern practice

Today even phone calls mostly run over packets (VoIP, VoLTE on 4G). But the “stream” idea did not disappear: a YouTube video or an online radio looks to the user like a continuous stream, but is actually built on packets — the receiver’s buffer collects the packets and forms a smooth stream. That is, the term “stream transmission” is used today in two senses: (1) circuit switching, (2) a continuous media stream over a packet network (streaming).

How packets are formed, addressed, transmitted and received, and the features of transmission methods suited to different traffic types

Now we follow the path of one packet from its “birth” to its arrival at the destination. Four stages: forming → addressing → transmission → reception.

1. Forming: header + payload + check

Each packet is like a letter in an envelope: the letter itself (the payload), the writing on the envelope (the header) and the seal (the checksum). In a network these envelopes are nested one inside another: first a transport header is added to the application data, then an IP header, and finally an Ethernet header and the closing check part. This process is called encapsulation (in detail with the OSI model in Lecture 8).

Data (for example, 1460 B) TCP 20 B data segment IP 20 B TCP + data (1480 B) packet Ethernet 14 B IP packet = 1500 B (MTU) FCS frame
Fig. 5.1. Encapsulation: 1460 bytes of data + TCP (20) + IP (20) = 1500 bytes (Ethernet MTU); the frame header is 14 bytes and at the end there is a 4-byte FCS checksum.

2. Addressing: three levels of address

Table 5.2. Addresses in a packet
AddressWhereWhom it findsDoes it change on the way?Metro analogy
MAC (48 bits)Ethernet frameThe next device on the local segmentYes, at every hopThe next station
IP (32 or 128 bits)IP headerThe final device (computer, server)No (except NAT)The final address
Port (16 bits)TCP/UDP headerThe application inside the device (443 — HTTPS)NoThe apartment number in the building

3. Transmission: store-and-forward and four kinds of delay

A router receives the packet completely, checks the checksum, looks at the routing table and places it in the queue of the output port. On the way the packet suffers four kinds of delay:

Table 5.3. Components of delay
DelayFormula / causeExample
ProcessingReading the header, checking, looking up the routemicroseconds
QueuingIf other packets are waiting at the output portFrom 0 to hundreds of ms — the most variable part
TransmissionL / R — packet size / line speed1500 B = 12,000 bits, 100 Mbit/s → 0.12 ms
Propagationd / s — distance / signal speed (~2·10⁸ m/s)Andijan–Tashkent ~ 300 km → ~1.5 ms

Compare the tests: on a fast line (100 Mbit/s, 1 Gbit/s) the main delay is distance, on a slow line — transmission. Light cannot be sped up, which is why large services place their servers close to the user (CDN).

4. Reception: checking, ordering, assembling

  1. Check

    The network card calculates the FCS: if it does not match, the frame is quietly dropped.

  2. Decapsulation

    The headers are “peeled off” from the outside in: MAC → IP → port, and the data is handed to the right application.

  3. Ordering and assembly

    TCP puts the bytes in place by sequence numbers and waits for any that are missing.

  4. Acknowledgment and retransmission

    An acknowledgment (ACK) is sent for the received data; a packet with no acknowledgment is sent again after the timeout expires (in detail with TCP in Lecture 12).

Traffic types and the transmission methods that suit them

Very differently demanding traffic passes through one packet network. We distinguish it with four questions: is it sensitive to delay? to jitter? to loss? how much speed is needed?

Table 5.4. Traffic types and requirements
TrafficExampleDelayLossTypical method
Real-time voice/videoTelegram call, Zoom, online gameVery sensitive (for voice up to ~150 ms one way is acceptable)Tolerates a littleUDP (+RTP), QoS priority, small buffer
Streaming mediaYouTube, online radio, NetflixModerate (the buffer hides it)Does not tolerate it (TCP recovers)TCP or QUIC over HTTP, adaptive bitrate
Bulk transferFile download, OS update, backupNot sensitiveDoes not tolerate it at allTCP, large packets, maximum throughput
Interactive transactionWeb page, Payme payment, my.gov.uzSensitive (the user waits)Does not tolerate itTCP + TLS (HTTPS)
Telemetry (IoT)Temperature sensor, smart meterSlightly sensitiveSometimes tolerates itSmall packets, UDP or MQTT (TCP)

Common mistakes

MisconceptionIn fact
“A file flies across the network in one piece”It is split into hundreds or thousands of packets smaller than the MTU.
“Packets always arrive in the order they were sent”Different routes and queues can break the order; a sequence number is needed.
“If the speed (Mbit/s) is high, the delay is zero”Propagation delay depends on distance, not on speed.
“YouTube is stream transmission, so a channel is reserved”Today’s streaming runs over a packet network; the “stream” is the view the user sees.
“TCP is the best for voice too — it is reliable”In voice, delayed data is useless; resending increases the delay. Usually UDP.
“A router changes the IP address as it forwards”A router updates the MAC header and decreases the TTL; IP addresses do not change (without NAT).

Reinforcement

// REMEMBER IN 1 MINUTE

  1. Stream (circuit) transmission: setup → continuous stream over a reserved channel → teardown. Constant delay, but inefficient.
  2. Packet transmission: split → route independently → reassemble. Efficient, resilient, but with variable delay.
  3. Packet = header + payload (+ FCS in the frame). Ethernet MTU = 1500 bytes.
  4. Addresses: MAC — the next hop, IP — the final device, port — the application.
  5. Delay = processing + queuing + transmission (L/R) + propagation (d/s).
  6. Real time — UDP and QoS; files and payments — TCP; streaming — buffer.
:ik-telefon:CallThe old phone line is a stream; a Telegram call is UDP packets.
:ik-video:YouTubePackets + buffer = a continuous “stream” for the user.
:ik-pul:PaymeSmall, but not a single byte may be lost — TCP + TLS.

Final test

Review questions

What stages does stream transmission (circuit switching) consist of?

Setting up the connection (reserving channels), sending a continuous stream and tearing down the connection (releasing channels).

Explain the principle of packet transmission.

The message is split into packets with headers, they are routed independently over shared lines and reassembled at the receiver by sequence numbers; no resource is reserved in advance.

Compare the two methods by efficiency and delay.

Circuit: a constant small delay, but the resource is reserved even when idle — inefficient. Packet: the line is fully used, but the delay is variable because of queues.

What parts does a packet consist of? What is the MTU?

A header (addresses, service information), a payload and (in the frame) the FCS check part. The MTU is the largest packet size carried in one frame (1500 bytes in Ethernet).

What are encapsulation and decapsulation?

At the sender, transport, IP and frame headers are added to the data in turn; at the receiver they are removed in reverse order.

What roles do MAC, IP and port addresses play?

MAC — the next device on the local segment; IP — the final device; port — the application inside the device.

Name the four components of packet delay and write their formulas.

Processing, queuing, transmission (L/R) and propagation (d/s).

Why is UDP chosen for video calls and TCP for file transfer?

In real time, delayed data is useless and resending does harm; for a file every byte matters and delay is unimportant.

What is jitter and how is it reduced?

The variability of delay. It is reduced by a jitter buffer at the receiver and QoS priority in the network.

Independent work

Independent-work topic from the course syllabus: “Packet transmission, network topologies and network efficiency” (6 hours). For your variant: (1) calculate the delay for the given scenario with the calculator program and explain the result; (2) on your own computer measure the real delay and jitter to the site in your variant with ping (at least 20 packets) and tracert (jitter ≈ the difference between the largest and smallest time); (3) justify the packet or stream approach, the protocol and the QoS for the traffic type in your variant.

Assessment criteria (individual assignment)
CriterionPoints
The delay is calculated correctly, and which component dominates is explained2
The ping/tracert measurements (screenshots), average delay and jitter are calculated1
The choice of method, protocol and QoS for the traffic type is justified1
The report is clear, with a table and a conclusion1

Summary

Stream transmissionThe channel is reserved in advance: order and delay are stable, the resource is wasted.
Packet transmissionSplit, route independently, reassemble: efficient and resilient — the basis of the Internet.
Packet structureHeader + payload (+ FCS); Ethernet MTU 1500 bytes.
EncapsulationData → segment → packet → frame → bits; the reverse order on reception.
AddressesMAC — the next hop, IP — the final device, port — the application.
DelayProcessing + queuing + L/R + d/s; distance cannot be sped up.
ReceptionFCS check, ordering, ACK and resending only the lost piece.
Method for the trafficReal time — UDP + QoS; files and payments — TCP (+TLS); streaming — buffer.

Your lesson results

Your results are saved in this browser. Read all the sections and complete the exercises and assignments.

My personal notes