Let's start with the basics of networking using an example.
A University Full of Data, with Limited USB Flash Drives
Imagine two computers want to transfer a file. What's the solution?
The first way is to plug a storage flash drive into one computer and transfer the file using it.
What's the second way? We can connect those devices to each other using a cable and transfer data between them.
Now imagine a university with 10 computers that people work on. Assume someone wants to transfer a file from computer 1 to computer 2. What's the solution? Use a flash drive? Use a cable? It's not that hard.
But how about transferring a file from computer 1 to the other 9 computers? Can we use a flash drive? That would be very difficult!
The only way is to connect those computers using cables. We would need dozens of cables. That's even harder.
So, what's the solution? We can connect all 10 computers to a device using cables. Roughly 10 cables are enough. That central device will handle all requests and transfer data. Now we can send that file to all 9 computers easily.
So now we've made a network! (Which is called a LAN: Local Area Network.)
The central device that connects computers to each other is called a switch.
Switch: A networking device that connects multiple devices within a Local Area Network (LAN).
Now imagine we want to send a 1 GB file from computer 1 to computer 10. Technically, we can't send 1 GB of data using a cable in one go. We have to split this file into small pieces of data. Those pieces are called packets.
Packet: Data sent over the Internet is split into small pieces called packets. Each packet has part of the data and information about where it's going.
Okay, so we said we can send a file from computer X to computer Y using a cable and a switch. But how is the data sent? How does it arrive? What are the rules?
Protocol: The rules that define how data should be sent, transported, and received.
We will talk about protocols in future chapters.
We said that if we want to transfer a file from computer 1 to computer 2, we use a switch. But how does the switch know which one is computer 2? There are 9 other computers that could be the destination.
Let's go deeper into the concepts.
IP Address: An address that identifies a device on a network and helps data find its way to that device. Example: 192.168.1.2
So now let's make our example more focused.
Imagine computer 1 (with IP: 192.168.1.1) wants to send a file to computer 2 (with IP: 192.168.1.2). It will tell the switch: "Please send this file to computer 2 with IP 192.168.1.2." Now it's clear.
Okay, so our whole example was about a university. But what if we want to send data from computer 1 to computer 2 at another university with 10 computers?
We can connect all 20 computers together using one switch. But what if we have 10 universities? Should we connect 100 computers to one switch? That's kind of difficult.
Instead, we can connect the switches of each university together. Now we have to connect 10 devices together. But how? We would need lots of cables.
What can we do? We can connect all those switches to a central device, which is called a router.
Router: A networking device that connects different networks and forwards data packets between them, helping devices communicate with other networks.
Maybe you're thinking: Why don't we simply use one switch to connect those switches together? Why do we use another device called a router? You will learn more about the difference between a router and a switch in future chapters.
Let's end our chapter with a comprehensive example.
Imagine we want to send a 1 GB file from computer 1 (with IP: 192.168.1.1) in LAN 1 to computer 2 (with IP: 192.168.1.2) in LAN 2.
How do we do it?
- Computer 1 first splits the file into several packets.
- It sends those packets to the switch and tells it: "Please send these packets to IP
192.168.1.2in LAN 2." - The switch knows that the destination is not in its LAN, so it sends the packets to the router.
- The router sends those packets to the switch of LAN 2.
- The switch sends the packets to the destination device.




Top comments (0)