Network: Part 2. Introduction to Networks
What computer networks are and why they are needed
A computer network is a system in which several devices exchange data through communication channels according to certain rules called protocols. At the core of any network lie three key elements: nodes (hosts) — computers, servers, smartphones, and other devices; the transmission medium — cable, fiber optics, radio channel (Wi-Fi, cellular communication); and protocols — the rules by which devices "communicate" with each other.
Why networks are needed
Networks permeate all spheres of modern life. Several key applications can be identified:
Access to information. Networks open access to websites, databases, and cloud services. When you open a site in a browser, your computer contacts a remote server, and that server returns the requested page.
Communication. Email, messengers, video calls — all of this is an exchange of data packets between a client and a server (or directly between devices). A message in Telegram or a video call in Zoom is thousands of packets passing through the network in fractions of a second.
Electronic commerce. Online stores, banking systems, payment gateways — all of them use the network to transmit sensitive data. That is exactly why security is critically important in such systems: encryption, authentication, protection against interception.
Entertainment. Streaming services (YouTube, Netflix), online games — all of them place high demands on bandwidth and low latency. Watching video in 4K requires a stable high speed; online games require minimal latency so that the player's actions are displayed on screen without noticeable delay.
Internet of Things (IoT). Smart devices, sensors, household appliances — all of this constantly exchanges data over the network. By estimates, by the mid-2020s the number of connected IoT devices is counted in the tens of billions.
Types of computer networks
Networks differ by scale, purpose, and technology.
Broadband access (access networks) — networks through which a user connects to the internet: home wired internet, mobile internet.
Wireless and mobile networks — Wi-Fi, cellular networks 4G, 5G. Modern wireless technologies such as Wi‑Fi 6/6E and 5G provide bandwidth and latencies that just a few years ago were available only to wired connections. Devices connect without wires, which gives mobility and flexibility.
CDN (content delivery networks) — used to accelerate data delivery. Content (videos from YouTube, static files of websites) is cached on servers located geographically closer to the user. This reduces latency and offloads backbone channels.
Corporate networks — networks inside companies and organizations: office networks, internal services, VPN for remote employees. Modern corporate networks are increasingly built as hybrid ones — a combination of own infrastructure and cloud services.
Transit networks — networks of communication operators that connect other networks to each other. These are the "highways" of the internet, through which the main traffic passes between different regions and continents.
Scales of networks
Networks are classified by size and coverage:
| Type | Full name | Example |
|---|---|---|
| PAN | Personal Area Network | Bluetooth between a smartphone and headphones |
| LAN | Local Area Network | A home or office network |
| MAN | Metropolitan Area Network | A network within the limits of a city |
| WAN | Wide Area Network | A global network, the internet |
The internet is a global network (WAN) consisting of many combined networks of different types and scales.
Examples of networks
The Internet — the largest network, connecting millions of separate networks. It operates on the basis of the IP protocol stack and has no single owner or central management.
Mobile networks — use base stations (cellular towers) and provide communication through a radio channel. Modern 5G networks provide not only high speed, but also ultra-low latency, which opens possibilities for industrial automation, remote surgery, and autonomous transport.
Wi-Fi — a local wireless network operating within the limits of a room or a small territory. Wi‑Fi 6 and Wi‑Fi 7 technologies have significantly increased throughput and efficiency of operation in conditions of dense deployment (many devices in one room).
Network protocols
What a protocol is
A protocol is a set of rules defining the format of messages, the order of exchange, and the actions when sending and receiving data. A protocol is the "language of communication" between devices. A protocol has a message structure, an order of exchange, error handling mechanisms, and (in some cases) states.
It is important to understand: a protocol operates between identically named levels of different devices. TCP on your computer "communicates" with TCP on the server, although physically the data passes through many intermediate nodes.
Why protocols are needed
Without protocols, devices would not be able to understand each other — the data would remain a meaningless set of bits. Protocols define how to interpret these bits, how to detect errors, how to request retransmission of lost data.
Dividing protocols into levels
Complex systems are divided into levels (layering). Each level solves its own task and interacts only with adjacent levels through strictly defined interfaces. An example of a stack: application (HTTP) → transport (TCP) → network (IP) → data link level → physical level.
Connections and reliability
Some protocols establish a connection and guarantee delivery (for example, TCP). Others operate without establishing a connection and do not guarantee delivery (UDP). The choice between them is a compromise between reliability and speed/efficiency.
Network models
OSI — the theoretical model
OSI (Open Systems Interconnection) is a reference model developed by the International Organization for Standardization (ISO). It contains 7 levels:
- Physical — transmission of bits over the physical medium (cable, radio waves, optics).
- Data link — medium access control, addressing within a local network (MAC addresses).
- Network — routing of packets between networks (IP addresses).
- Transport — reliable delivery of data between processes (TCP/UDP, ports).
- Session — managing the dialogue between applications.
- Presentation level — transformation of data (encoding, encryption, compression).
- Application — interaction with user applications (HTTP, FTP, SMTP).
OSI is a detailed "architectural blueprint" of the network. However, in practice it is used predominantly as a theoretical and educational model, since its full implementation is too complex.
TCP/IP — the practical model of the internet
TCP/IP is the model that is actually used in the internet. It contains 4 levels:
- Application (HTTP, DNS, FTP, SMTP) — combines the functions of levels 5–7 of the OSI model.
- Transport (TCP, UDP).
- Internet (IP, ICMP) — corresponds to the network level of OSI.
- Network access (Ethernet, Wi-Fi) — combines the physical and data link levels of OSI.
TCP/IP is the "actually built house," in contrast to OSI, which remained a "detailed blueprint." It is precisely the TCP/IP stack that is used in real systems and devices all over the world.
Services vs Protocols
This is one of the most important concepts that must be clearly distinguished.
- A Protocol is a set of rules defining how two identically named levels on different devices interact with each other. This is the concrete implementation: message format, order of exchange, error handling.
- A Service is an abstraction defining what the given level provides to the level located above it in the same device. This is the interface through which the higher level can use the functionality of the lower level without delving into the implementation details.
A simple formula for remembering:
Protocol = implementation (how the engine works)
Service = interface/abstraction (how you press the gas pedal)
The key consequence: a level can completely change its internal protocol (for example, switch from one routing algorithm to another), but if it preserves the same service (interface) for the higher level, then the higher level will not even notice the changes. This is exactly the basis of modularity and independence of levels.
Standardization
For networks of different manufacturers to work together, open standards are needed. Key standardization organizations:
- IEEE (Institute of Electrical and Electronics Engineers) — develops standards for the physical and data link levels (Ethernet, Wi-Fi).
- IETF (Internet Engineering Task Force) — is responsible for the protocols of the internet. All specifications are published in the form of RFC (Request for Comments) documents, available to everyone.
- ISO (International Organization for Standardization) — developed the OSI model and many other standards.
The openness of standards is the key reason why the internet was able to grow from a small research network into a global infrastructure. Any manufacturer can implement a protocol according to an RFC specification, and their devices will be compatible with devices of other vendors.
Social aspects of networks
I will note that a network is not only a technology, but also a social system. Key questions:
Privacy — who has access to your data, how it is collected and used.
Security — protection against hacking, data theft, cyberattacks. With the growth in the number of connected devices (IoT), the attack surface expands, and security becomes even more critical.
Censorship and network neutrality — the question of whether providers should have the right to restrict or prioritize traffic. Network neutrality means that all packets are processed equally, regardless of their source, destination, or content.
Units of measurement
In networks the following are used:
- Bit — the minimum unit of information.
- Byte — 8 bits.
- Transmission speeds: Kbps (kilobits per second), Mbps (megabits per second), Gbps (gigabits per second).
It is important not to confuse megabits (Mbit/s) with megabytes (MByte/s) — 100 Mbps = 12.5 MByte/s.
The architecture of the internet as a "network of networks"
The internet is not one monolithic network, but a multitude of independent networks connected to each other through routers. These networks can be home LANs, corporate networks, networks of internet service providers (ISP).
Communication between networks is provided through:
- Routers — devices that receive a packet, analyze the destination IP address, and make a decision about where to send the packet next.
- Backbone networks — high-speed channels connecting large nodes.
- Internet exchange points (IXP) — places where different providers connect their networks to exchange traffic.
The structure of the internet is hierarchical (in simplified form):
End systems (hosts)
↓
Access networks
↓
Providers (ISP)
↓
Regional networks
↓
Backbone networks
Packet switching
Packet switching is the main principle of the internet's operation. Data is transmitted not as a single continuous stream, but as separate independent packets.
How it works
- The message is broken into small packets.
- Each packet is transmitted separately.
- Packets can travel by different routes through the network.
- On the receiving side, the packets are assembled into the original message.
Properties of packet switching
- There is no fixed dedicated channel — resources are used efficiently.
- Delays and packet losses are possible.
- Packets may arrive out of order.
- The network can dynamically adapt to load and failures.
Circuit switching vs Packet switching
Circuit switching — a fixed channel is established for the entire duration of the communication session, resources are reserved. Example: traditional telephone networks. The downside — it is inefficient during idle periods, since the channel is occupied even when no data is being transmitted.
Packet switching — the channel is not reserved; packets dynamically use the available resources of the network. It is precisely this approach that is used in the internet. Advantages: high efficiency, flexibility, scalability. It is thanks to efficiency and flexibility that the internet chose packet switching.
Problems of packet switching and their solution
A packet network must solve several fundamental problems:
- Packet losses — packets can be lost in the network due to buffer overflow or transmission errors.
- Duplication — repeated delivery of one and the same packet is possible.
- Reordering — packets may arrive not in the order in which they were sent.
- Latency — the delivery time can vary greatly.
These problems are not solved at the IP level (network level). Instead, they are solved at higher levels — for example, TCP at the transport level provides reliability, retransmission of lost packets, and order restoration.
Delays in the network
When data passes through the network, a delay arises, which is composed of several components:
Processing delay — the time a node (router or host) spends processing the packet: checking the header, looking up the routing table, making the forwarding decision.
Queuing delay — the time the packet waits in a queue before being sent. If the queue is full, packets are dropped — this is one of the main causes of losses.
Transmission delay — the time required to "push" all the bits of the packet into the channel. It depends on the size of the packet and the bandwidth of the channel.
Propagation delay — the time of signal propagation over the physical medium. It depends on the distance and the speed of signal propagation (for fiber optics — about 2/3 of the speed of light in vacuum).
Together these four components determine the total packet delivery time from sender to receiver.
Throughput and losses
Bandwidth — the theoretical maximum speed that the channel can provide. For example, a 100 Mbps channel.
Actual speed (throughput) — the real data transmission rate, which depends on network congestion, packet losses, delays, and the specifics of protocols. Throughput is almost always lower than bandwidth.
Packet loss — packets can be lost due to router buffer overflow, transmission errors, or network congestion. Losses are a normal phenomenon in networks, and reliable protocols (TCP) know how to cope with them.
Queues and buffering
Every router has a buffer (queue) where packets are stored before being sent. Buffers are needed to smooth out traffic fluctuations: if packets arrive faster than the router can send them, they line up in a queue.
If the queue is full, new packets are dropped. This is one of the main causes of packet loss and growing latency (when the queue is long, packets wait longer).
Network topologies
Networks can be organized in different ways:
- Star — all devices are connected to a single central node.
- Ring — devices are connected sequentially into a closed ring.
- Mesh — devices are connected by many links, providing redundancy.
- Tree — a hierarchical structure.
In reality, the internet is a complex combination of a mesh topology at the backbone level and hierarchical structures at the access levels.
Addressing in the network
Addresses are needed to deliver data, and different types of addresses are used at different levels:
- MAC address — the physical address of the network interface (data link level). Used for delivery within a single local network.
- IP address — the logical address of the device (network level). Used for global routing between networks.
These are two different address spaces, and they solve different tasks. An IP address can change when a device moves between networks; a MAC address remains unchanged (tied to the hardware).
Packet fragmentation
Each type of network has a limit on the maximum size of a transmitted data block — MTU (Maximum Transmission Unit). If a packet received from the higher level exceeds the MTU of the current channel, it is broken into several smaller parts (fragments). On the receiving side, the fragments are reassembled into the original packet.
Fragmentation is a compromise: it allows transmitting large packets through networks with a small MTU, but it creates additional load on routers and increases the risk of losses (if one fragment is lost, the entire packet is considered lost).
Multiplexing and demultiplexing
Multiplexing — several data streams use one and the same communication channel. The internet uses statistical multiplexing: the resources of the channel are distributed dynamically among packets of different streams as they arrive.
Demultiplexing — on the receiving side, the system determines which process or application to pass the received data to. For example, TCP uses ports for this purpose: an incoming packet contains a port number, and the operating system directs the data to the corresponding application.
The role of ports and sockets
A port is a numeric identifier of a specific application or service on a device. Standard ports:
- 80 — HTTP
- 443 — HTTPS
- 22 — SSH
- 53 — DNS
The combination IP address + port + protocol uniquely identifies a specific network service on a specific device.
A socket is a software abstraction, the connection point between an application and the network. A socket is defined as IP address + port + protocol. Through a socket, an application sends and receives data.
Encapsulation as a universal mechanism
Encapsulation is the key mechanism of data transmission in a layered architecture. At each level the data is "wrapped": the higher level passes data to the lower level, and that one adds its header (and sometimes — a trailer).
The process looks like this:
[HTTP data]
↓
[TCP header + data]
↓
[IP header + TCP + data]
↓
[Ethernet header + IP + TCP + data] — a frame
↓
a bit stream in the transmission medium
On the receiver's side the process is the reverse — decapsulation: each level removes its header and passes the data to the level above.
Each level works independently, without knowing the details of the other levels. This is the foundation of the scalability and modularity of the network architecture.
The role of routers
A router operates at the network level (IP). It is not interested in the content of the data (it does not matter whether it is HTTP, video, or something else) — it makes its decision based solely on the destination IP address.
How a router processes a packet
- Receives the packet from one interface.
- Reads the destination IP address from the header.
- Looks at the routing table (contains information about available networks and paths to them).
- Chooses the next node (next hop) for this packet.
- Sends the packet out through the corresponding interface.
The "best effort" concept
The internet operates on the principle of best effort. This means:
- The network does everything possible to deliver each packet.
- But it does not guarantee delivery.
- It does not guarantee the order of packet arrival.
- It does not guarantee the delivery time.
Reliability, if it is needed, is provided at higher levels — for example, TCP. This approach allows the network to remain simple, fast, and scalable. The complexity is pushed out to the end nodes (hosts), rather than being built into the core of the network.
The End-to-End principle
The End-to-End principle is one of the fundamental architectural principles of the internet. It states: complex functions must be implemented at the ends of the network (on the hosts), not inside it.
What this means in practice
- The network (IP level) is simple and fast. It only delivers packets.
- All the complex logic (reliability, flow control, encryption, authentication) is on the hosts.
For example: TCP implements reliable delivery on top of unreliable IP. The network does not deal with error correction — the end devices do.
This principle allowed the internet to evolve: new protocols and services can be added on hosts without changing the network infrastructure. However, modern requirements (video conferencing, cloud computing, IoT, industrial automation) create pressure on this model, and in some cases the network must still provide certain quality of service guarantees (QoS).
Key principles of the internet architecture
To put it briefly, the internet is built on a combination of three fundamental ideas:
- Packet switching — data is transmitted as separate packets, not as a continuous stream. This provides efficient use of resources and resilience to failures.
- Layered architecture (layering) — the complex task is broken into independent levels; each solves its own task and interacts with adjacent ones through strictly defined interfaces.
- The End-to-End principle — complexity is pushed out to the end nodes; the network remains simple and fast.
These three ideas together give scalability, resilience, and flexibility — precisely those qualities that allowed the internet to grow from a small research network into a global infrastructure uniting billions of devices.
Open architecture and independence of levels
The internet is built as an open, extensible system. This means:
- New protocols can be added at any level without changing the rest.
- Technologies at the lower levels can be replaced (for example, moving from copper cable to fiber optics or from Ethernet to Wi-Fi), and the upper levels continue to work.
- Changes at one level do not require changes at the others.
It is precisely the openness of standards and the independence of levels that ensured the compatibility of systems from different manufacturers and allowed the internet to develop without "broken compatibility."
The balance between simplicity and functionality
The architecture of the internet is a deliberate compromise:
- The network (IP) — simple, fast, minimalist.
- Complexity — at the ends (TCP, applications, encryption, authentication).
This balance gives maximum flexibility: the network does not need to be rebuilt to support new applications. New services are simply implemented on hosts, using the existing network infrastructure. That is exactly why the internet was able to support the web, and video streaming, and cloud computing, and the internet of things — without fundamental changes in the core of the network.
Summary
The article lays the foundation for all further study of computer networks. The key concepts that form the "thinking of a network engineer":
- The Internet = a network of networks connected by routers.
- Data is transmitted in packets, not as a continuous stream.
- The network operates on the best effort principle — without guarantees.
- Complexity is pushed out to the edge of the network (the end-to-end principle).
- Levels isolate responsibility and simplify the system (layering).
- Protocols operate between identically named levels of different devices.
- Encapsulation is the key mechanism of data transmission.
- Routers make decisions based on IP addresses.
- Delays are composed of processing, queuing, transmission, and propagation.
- Ports allow one device to serve many applications.
These principles are not merely theoretical knowledge. They underlie traffic analysis (Wireshark), diagnosis of network problems, server configuration, and performance optimization. Understanding how a packet travels from client to server through several networks, why losses and delays are possible, why the internet does not guarantee delivery — this is the basis for conscious work with any network technologies.