Introduction to networks — theory with a dataset that crosses the ocean, five devices that do different jobs and packets that pick their own path (and why fibre will not take away those 9 ms)
Faculty library, deadline week. I was downloading a 40 MB CSV for an assignment and it was taking a while. My classmate, very sure of himself: “It’s the Wi-Fi. With 100 Gbit/s fibre the ping to the server in Madrid would drop to zero.” Half right. The download would indeed be faster, but the ping would not go below about 9 milliseconds even with the best fibre in the world. Why? Because there are 1,800 km between Gran Canaria and Madrid, and the signal needs time to cover them.
Half of networks Topic 1 fits inside that misunderstanding: how many bits leave per second is not the same as how long the first one takes to arrive. Today we are going to follow that CSV from the cloud server to your laptop and, on the way, we will see the communications model, the transmission media, what each device does (and what it does not do), switching, the types of networks and how the Internet is put together.
If you come from Linux network configuration, there you played with ip, the gateway and the lab router: this is the theory behind it. And when you finish, test yourself with the exam-style exercises on introduction to networks, which are interactive and mark themselves.
Table of Contents
Why does a data person need to know about networks?
Because almost no data lives on your laptop. You get it from APIs, sensors, remote databases and cloud services, and all of it arrives through a network. How well your algorithms perform depends on three things that are not yours:
- latency (how long each answer takes to arrive),
- bandwidth (how many bits per second fit),
- communication losses and errors.
Without networks there are no distributed systems, no real-time processing and no large-scale data science. In other words, this is not a filler topic.
And before anything else, the definition that shows up in the exam:
Network: a set of devices connected to a common transmission medium through network adapters. Each network adapter has a unique identifier (its physical or MAC address). The connected devices are called network nodes.
The communications model: five pieces
Any communication, from a WhatsApp message to our download, can be drawn with the same five-piece diagram. Look at it first and then we go through it piece by piece:
- Source: generates the data to be transmitted. In our case, the cloud server that holds the CSV.
- Transmitter: transforms the information, generating signals that can be transmitted. It is the server’s network card, which turns bits into light or electrical pulses.
- Transmission system: carries the information. Here it is the whole path: fibre, copper and, at the end, Wi-Fi.
- Receiver: transforms the received signal into information. Your laptop’s Wi-Fi card, which turns waves into bits.
- Destination: takes the data from the receiver. Your pandas script running
read_csv.
And the grouping they always ask about: source system = source + transmitter; destination system = receiver + destination. The transmission system sits in the middle and belongs to neither.
Look at the bottom row of the drawing: what goes into the transmitter is data (g(t)), but what crosses the medium is a signal (s(t) when it leaves, r(t) when it arrives, possibly a little damaged along the way). The receiver turns it back into data (g'(t)). The full chain in the course notes is: text → bit stream → analogue signal → analogue signal → bit stream → text.
Thinking the destination turns the signal into information. That is the receiver’s job; the destination gets the data already prepared. The same at the start: the data is generated by the source, not by the transmitter.
The 11 tasks of a communication system
For those five pieces to work, someone has to take care of a lot of things. The course notes list 11 tasks, and in the exam they usually appear mixed with others that have nothing to do with networks:
| Task | What it means, in one line |
|---|---|
| Use of the transmission system | Making good use of the medium, which is shared |
| Interface implementation | How each device hooks up to the medium |
| Signal generation | Creating the signal that will travel |
| Synchronisation | Sender and receiver agree on when each bit starts and ends |
| Exchange management | Who talks, when and how much |
| Error detection and correction | Noticing damaged bits (and fixing them) |
| Addressing and routing | Who it is for and how it gets there |
| Recovery | Resuming the communication if it breaks |
| Message formatting | Agreeing on how the data is laid out |
| Security | Only the right person reads it and nobody alters it |
| Network management | Configuring and monitoring the network |
If a multiple-choice question offers “CPU scheduling”, “compilation” or “memory management”, that is not a communication task: it belongs to operating systems (topics 3 to 6). If it is not about moving data from one place to another, it does not belong.
Transmission media: where the bits travel
Transmission media are the channels the information travels through. They come in two families: cables (guided media) and wireless links.
- Cables: twisted pair (the classic network cable, from 1 to 1000 Mbit/s), coaxial (10 to 20 Mbit/s) and optical fibre (100 Gbit/s).
- Wireless: infrared, radio (Wi-Fi at 300 Mbit/s, Bluetooth at 24 Mbit/s) and microwaves (terrestrial and satellite).
On a logarithmic scale it is easier to see how far apart they are:
Each axis mark multiplies by 10. Fibre (100 Gbit/s) is a hundred times faster than the best twisted pair (1 Gbit/s): 100 / 1 = 100. And a curious fact that often appears in ordering questions: coaxial, although it is a cable, tops out at 20 Mbit/s, below Bluetooth (24 Mbit/s).
For “which ones are wireless?”, ask yourself whether there is a physical cable. Fibre = a glass cable, so it is guided, even though light travels inside it.
Bit/s and latency: two different questions
This is where my classmate went wrong. They are two definitions you should know almost word for word:
- Bit/s: the number of elementary pulses (1 or 0) transmitted every second. It answers “how many bits fit per second?”.
- Latency: the amount of time that passes between sending an electrical signal and the corresponding action happening. It answers “how long does it take?”.
And latency is calculated by adding three pieces:
Latency = propagation time + transmission time + time in the switches
- Propagation: how long the signal takes to cover the distance (metres / signal speed). In copper and fibre the signal travels at about 2·10⁸ m/s, two thirds of the speed of light.
- Transmission: how long it takes to “push out” all the bits of the packet onto the medium (bits / bit/s). Here a faster medium does help.
- Time in the switches (and routers): how long each intermediate device takes to receive and forward.
For our CSV, with a 1500-byte packet and the path from the cloud to your laptop, the split looks like this (the numbers come from the simulator at the end of the article):
See the bar? It is almost all coral. The 1,800 km of fibre to Madrid mean 1,800,000 / 200,000,000 = 0.009 s = 9 ms of propagation, and no faster medium fixes that: we are already at two thirds of the speed of light. Transmission along the whole path adds up to only 0.088 ms. That is why my classmate was half right: with more bit/s the CSV would arrive sooner, but the first packet would still take its 9 ms.
Confusing latency with speed. “This connection has high latency” does not mean it downloads slowly: it means it takes long to respond. A satellite connection can have plenty of Mbit/s and still a huge latency, because the satellite is extremely far away.
The limits of technology
The course notes name three limits to keep in mind with any technology:
- The speed of light: no signal goes faster, so propagation always exists.
- Many users sharing the same connections: the medium is shared and everyone gets less.
- Heterogeneity: different technologies, protocols and operating systems live together in the same LAN, and they have to understand each other.
Devices: what each one does and does NOT do
In the exam it is not enough to know what each device does: they ask just as much about what it does not do. This is the path our download follows inside the faculty, from top to bottom:
Let’s go through it with the same logic, starting where the data comes in:
- Modem: connects to the carrier and translates the signal of the provider’s network into something your network understands.
- Router: connects your local network to the Internet. It does routing, NAT and DHCP (it hands out addresses to the devices).
- Switch: connects all the devices of the LAN. It does not connect to the Internet and does not give Wi-Fi.
- Access point (AP): plugs into the switch and gives Wi-Fi to the LAN. It does not route and does not reach the Internet.
For the exam, remember the keywords that give each one away:
| If the question says… | It is the… |
|---|---|
| “plugs into the switch”, “gives Wi-Fi to the LAN” | Access point |
| “connects all the devices of the LAN” | Switch |
| “connects the local network to the Internet”, “routing”, “NAT”, “DHCP” | Router |
| “connects to the carrier”, “translates the provider’s network signal” | Modem |
At home you usually have one single box acting as modem, router, switch and access point at the same time. That is why they are hard to tell apart. In the exam, think of them as four different devices, each with its own job.
Saying the switch takes the network to the Internet or that the AP routes. If a statement gives a switch or an AP the job of “reaching the Internet”, it is false.
Transmission networks: why we don’t run a cable from every device to every device
The simplest way to connect two devices is a point-to-point link: one cable between them. But it is usually not practical, for two reasons from the course notes:
- The devices may be very far apart (your laptop and a server in Madrid).
- With many devices you would need a huge number of connections.
How many? If each of the 20 PCs in a lab were joined to all the others, you would need 20 × 19 / 2 = 190 cables. With 100 devices, 100 × 99 / 2 = 4,950. The solution is a communication network: each device connects only once and the network takes care of carrying the data.
Switching: reserved path or each packet on its own?
Inside that network, how does data get from A to B? There are two ways to do it, and it is one of the star comparisons of the topic:
- Circuit switching: a dedicated, continuous communication route is set up before starting, and it stays reserved for the whole communication, whether you talk or not. Example: the traditional telephone network.
- Packet switching: the data is split into packets and there is no dedicated route. Each packet carries its header and the devices of the network decide where it goes, so packet 2 of your CSV may take a different path from packet 1. Example: the Internet (IP).
| Circuits | Packets | |
|---|---|---|
| Route | Dedicated and continuous | No dedicated route |
| What is reserved | The path, for the whole communication | Nothing: the network is shared |
| If you send nothing | The path stays busy | Others use the network |
| Example | Traditional telephone network | The Internet (IP) |
| Transfer mode | Synchronous (TDM) | Asynchronous (IP; ATM as a historical example) |
The last row is about transfer modes. In synchronous mode (TDM, time-division multiplexing) the medium is split into fixed time slots, in frames. In asynchronous mode data is sent when there is data, without fixed slots: that is IP’s mode, and ATM was a historical example.
“circuit” sounds like a reserved cable; “packet” sounds like an envelope travelling alone. If the question mentions “dedicated route” or “telephone”, it is circuits; if it mentions “Internet” or “IP”, packets.
Types of networks
By size and by how the devices share the work, the course notes distinguish five types:
| Type | Definition | In our example |
|---|---|---|
| LAN (Local Area Network) | Small network in a limited area (home, office) | The faculty network |
| WAN (Wide Area Network) | Network covering large geographical distances (countries, continents) | The carrier’s network up to Madrid |
| Internet | Global network of networks | Everything together |
| P2P (Peer-to-Peer) | Everyone shares resources directly | Classmates passing notes around with no server |
| Client-server | Central servers with many clients | A hundred laptops asking for the same dataset |
LAN and WAN also have their own characteristics, which in the exam appear as multiple-choice questions with the other one’s mixed in:
| LAN | WAN |
|---|---|
| Small coverage: a building or nearby buildings | Wide geographical area |
| Usually belongs to the owner of the devices | Needs to cross public access routes |
| Larger amount of data transmitted | Partly uses circuits from telecom providers |
| Uses broadcast systems | Built with circuit switching, packet switching, TDM and ATM |
| Recent introduction of switching and ATM |
Learn them in pairs: small ↔ wide; it’s mine ↔ crosses public routes and uses other people’s circuits. When a WAN question offers “belongs to the owner of the devices”, you know which column it came from.
The Internet: ISP, PoP and NAP
The Internet is the evolution of ARPANET, developed to solve the problem of communicating between many arbitrary packet-switching networks, and it is based on the TCP/IP protocols. But how are the networks actually joined? With three acronyms that come up as short answers:
- ISP (Internet Service Provider): the provider that connects users’ and companies’ LANs to the Internet. Your carrier.
- PoP (Point of Presence): the physical point where the ISP has its network and connects to other networks. That is where your home LAN comes in.
- NAP (Network Access Point): the point where different ISPs interconnect and share traffic.
Following the drawing: the CSV leaves the data centre, enters ISP B’s network through its PoP, changes carrier at the NAP, crosses your ISP’s network and reaches the faculty LAN through ISP A’s PoP.
Mixing up PoP and NAP. A PoP belongs to one ISP (where it connects its customers); a NAP is where several ISPs meet.
Addresses and interconnection: who do I hand it to?
Last step of the journey. The data sent between two devices gets some control fields (a header) added to it. Among them, who the data is for (destination address) and who sends it (source address).
There are two rules, and both show up in true/false questions:
- The transmission is received by the device whose destination address matches its adapter’s address (the physical or MAC address, like
08002B00EE1B). - Network interconnection: if the destination station is on my network, I deliver the message directly. If it is not on my network, I hand it to a router: devices connected to more than one network take care of sending it on until it reaches the destination network.
The trap sentence in the exam is “if the destination is not on my network, I hand it to a switch“. False: the switch does not connect to other networks. It goes to the router.
This is exactly what you configured in Linux with the default gateway: the address of the router your machine hands everything that is not on its network to.
Check it with Python
Does propagation really eat almost all the latency? This simulator reproduces the CSV’s journey with the article’s data: six links with their medium, speed and distance, a 1500-byte packet and 0.02 ms for each intermediate device (a reasonable value chosen for the example). It calculates the transmission and propagation of each link, adds up the latency and finds the bottleneck:
# Check it with Python: a dataset's journey from the cloud to your laptop.
# Latency of a packet = transmission time + propagation time + time inside the devices.
PACKET = 1500 * 8 # bits in one packet: 1500 bytes, the typical size on Ethernet
DATASET = 40 * 10**6 * 8 # bits in the dataset: 40 MB (the grades CSV of the whole faculty)
DEVICE = 0.00002 # seconds each intermediate device takes to forward (0.02 ms)
V_CABLE, V_AIR = 2e8, 3e8 # m/s: in copper and fibre the signal travels at about 2/3 of light
# Links in the order the download travels: (link, medium, bit/s, metres)
ROUTE = [
("server → NAP → PoP", "optical fibre", 100e9, 1_800_000), # the cloud is in Madrid
("PoP → modem", "optical fibre", 1e9, 9_000), # your plan: 1 Gbit/s
("modem → router", "twisted pair", 1000e6, 2),
("router → switch", "twisted pair", 1000e6, 30),
("switch → AP", "twisted pair", 1000e6, 25),
("AP → laptop", "Wi-Fi", 300e6, 8), # the only link without a cable
]
total = 0
print(f"{'link':<22}{'medium':<14}{'transmission':>12}{'propagation':>13}")
for link, medium, bps, metres in ROUTE:
t_tx = PACKET / bps # how long it takes to "push out" all the bits of the packet
v = V_AIR if medium == "Wi-Fi" else V_CABLE # air slows the wave down less than copper or glass
t_prop = metres / v # distance / speed: it does not depend on the packet size
total += t_tx + t_prop
print(f"{link:<22}{medium:<14}{t_tx * 1000:>9.4f} ms{t_prop * 1000:>10.4f} ms")
devices = len(ROUTE) - 1 # devices sit BETWEEN links: 6 links, 5 devices
total += devices * DEVICE
print(f"\nIntermediate devices: {devices} × {DEVICE * 1000:.2f} ms")
print(f"Latency of one packet: {total * 1000:.3f} ms")
bottleneck = min(ROUTE, key=lambda t: t[2]) # the slowest link sets the speed of the download
t_down = DATASET / bottleneck[2] + total # packets travel in a row: the narrowest link rules
print(f"Bottleneck: {bottleneck[0]} ({bottleneck[2] / 1e6:.0f} Mbit/s)")
print(f"Downloading the 40 MB: about {t_down:.2f} s")
And this is its real output:
link medium transmission propagation server → NAP → PoP optical fibre 0.0001 ms 9.0000 ms PoP → modem optical fibre 0.0120 ms 0.0450 ms modem → router twisted pair 0.0120 ms 0.0000 ms router → switch twisted pair 0.0120 ms 0.0001 ms switch → AP twisted pair 0.0120 ms 0.0001 ms AP → laptop Wi-Fi 0.0400 ms 0.0000 ms Intermediate devices: 5 × 0.02 ms Latency of one packet: 9.233 ms Bottleneck: AP → laptop (300 Mbit/s) Downloading the 40 MB: about 1.08 s
What to look at:
- The propagation of the first link (9 ms) is nearly everything. 1,800,000 m / 2·10⁸ m/s = 0.009 s. The other links are so short that their propagation comes out as 0.0000 or 0.0001 ms.
- Transmission depends on bit/s, not on distance. The three twisted-pair links at 1000 Mbit/s all give the same, 12,000 / 1,000,000,000 = 0.012 ms, whether they are 2 or 30 metres long. On the 100 Gbit/s link, a hundred times less.
- Devices sit between links: six links, five devices, 5 × 0.02 = 0.1 ms. Check: 9.0453 + 0.0881 + 0.1 = 9.233 ms, which is what it prints.
- The bottleneck is the Wi-Fi. For a big download, the slowest link rules: 40 MB = 320,000,000 bits; 320,000,000 / 300,000,000 = 1.07 s, plus the latency, about 1.08 s.
- The two questions have different answers: replacing the Wi-Fi with a cable would shorten the download (with a 1000 Mbit/s cable the slowest link would become the 1 Gbit/s one: 320,000,000 / 1,000,000,000 = 0.32 s, about 0.33 s with the latency), but the latency would barely drop. Exactly what my classmate was missing.
Change the numbers and run it again on your computer: put the server in Gran Canaria (50_000 metres) and you will see the latency fall below 1 ms; put 100e9 on the Wi-Fi and you will see the bottleneck move.
Summary
| Concept | What you need to know |
|---|---|
| Network | Devices connected to a common medium through adapters with a unique identifier; the devices are nodes |
| Communications model | Source → transmitter → transmission system → receiver → destination; source system = source + transmitter, destination system = receiver + destination |
| Tasks | 11, all about moving data (synchronisation, errors, addressing, security…) |
| Media | Cables (twisted pair, coaxial, fibre) and wireless (infrared, radio, microwaves) |
| Bit/s and latency | Bits per second versus time until the action; latency = propagation + transmission + switches |
| Devices | AP gives Wi-Fi; switch joins the LAN; router reaches the Internet (routing, NAT, DHCP); modem talks to the carrier |
| Switching | Circuits: dedicated route (telephone). Packets: no dedicated route (Internet, IP) |
| Types of networks | LAN, WAN, Internet, P2P and client-server |
| Internet | Evolution of ARPANET, on TCP/IP; ISP, PoP and NAP |
| Delivery | The matching MAC receives it; if the destination is not on my network, to the router |
Three ideas to take away
- How many bits per second and how long it takes are different questions. Fibre improves the first; distance rules the second.
- Each device has one job and only one: the switch joins, the AP gives Wi-Fi, the router goes outside and the modem talks to the carrier.
- The Internet is packet switching: each packet travels on its own, carriers meet at NAPs and, if the destination is not on your network, the packet goes to the router.
Now it is your turn: in the introduction to networks exercises you will find an interactive quiz with every exam format (single choice, multiple choice that subtracts for wrong ticks, true/false, fill in the gaps, matching, ordering, short answer, a calculation and open answers) plus the topic’s cheat sheet. After that, the next topic shows how all of this is organised in layers: the OSI and TCP/IP models.
Next step: exercisesIntroduction to networks — exam-style exercises with a quiz that marks itself, the switch trap and a latency worked out by hand (and why you should never tick “just in case”)Did this article help you? Here is how you can support SergioLearns →




What is an operating system — theory with your laptop on a study afternoon, a write() call and a CPU that never rests (and the three programs that weren’t running at the same time)