Routelearn.net
Course menu

Unit 1: Networking BasicsLesson 1.1 (1 of 4 in this unit)1 of 84 in the Network Fundamentals course

What Is a Computer Network?

The problem networks solve, what a network is made of, and how data gets from one device to another.

Beginner · 10 min read

A computer network is a group of two or more devices connected by wired or wireless links that follow shared rules (protocols) to exchange data and share resources.

In simple terms: Devices joined together so they can send each other data, and share things like printers and an internet connection.

The problem networks solve

Asha works in a small office. She needs to print a report, open a file a colleague saved, and look something up on a website. Without a network, she would copy the report to a USB stick, walk it to the printer's computer, and have no internet at all.

A network fixes this by connecting the devices, so they can send data to each other directly. Every office, home and data centre uses one for the same reasons: to share things (files, printers, an internet connection) and to communicate (email, chat, video calls).

What a network is

A network can be very small: two laptops joined by one cable are a network. Your home Wi-Fi is a network. The internet is the largest one, made by connecting millions of smaller networks together.

Whatever the size, every network is built from the same four parts:

PartWhat it doesIn Asha's office
End devicesCreate and use the dataLaptop, printer, web server
Network devicesMove data between end devicesSwitch, router
MediaCarry the signalCopper cables (Ethernet)
ProtocolsShared rules for talkingEthernet, IP, HTTPS

A switch connects devices inside one network. A router connects one network to another, for example the office to the internet.

How it works: Asha prints and opens a website

Data travels in small pieces called packets. Each packet carries the IP address of where it is going, like the address on an envelope. Watch two packets: one to the printer and one to a website.

Gi1/0/2Gi1/0/3Gi1/0/24Gi0/0Gi0/1Asha's laptop192.168.1.20Printer192.168.1.30SwitchRouter192.168.1.1Internetexample.com198.51.100.10

Tip: click or tap a device or the moving packet to see its details.

  1. 1. Print: the printer is in the same network, so the switch delivers the packet directly. The router is not involved.
  2. 2. Website: example.com is on another network, so the packet goes to the router, which sends it out to the internet.
  3. 3. Reply: the web server answers, and the router passes the reply back to Asha's laptop.

What to notice:

  • The print job never reaches the router. Traffic inside one network only needs the switch.
  • Anything going outside the office passes through the router. It is the network's way out.
  • Each device has its own address, so every packet knows where to go.

💡 In simple terms: the switch is like the post room inside one building; the router is the door to the outside world.

Learn more: SwitchesRoutersWhat Is an IP Address?

Client-server and peer-to-peer

There are two ways for devices to share. In client-server, a server provides a service and clients ask for it. Asha's browser is a client; example.com is a server.

LaptopclientPCclientPhoneclientSwitchFile server192.168.1.5

Tip: click or tap a device to see its details.

  1. 1. Request: a client asks the server for a file.
  2. 2. Response: the server sends it back.
  3. 3. Many clients: one server answers them all.

In peer-to-peer (P2P) there is no server: each device shares directly with the others, as when you AirDrop a photo.

Client-serverPeer-to-peer
Who provides it?A serverEvery device
Best forMany users, shared dataA few devices
ExamplesWebsites, email, file serversAirDrop, home folder sharing

A server is a role, not a special computer: any device that provides a service is acting as a server.

Home, office and enterprise networks

The ideas are the same at every size. What changes is how many devices there are and how many separate boxes share the work. At home, one box does almost everything:

LaptopPhoneHome router192.168.1.1Internet (ISP)

Tip: click or tap a device to see its details.

  1. 1. Join: devices connect to the home router over Wi-Fi.
  2. 2. Out: the router sends their traffic to the internet.
HomeSmall officeEnterprise
Devices5 to 5010 to 200Thousands
Network devicesOne home routerA router or firewall, switches, access pointsMany of each, in layers, with spare paths
Run byThe householdOne IT personA network team

Learn more: Types of Networks

Check your own network

On Windows, open Command Prompt and run ipconfig. It shows your device's address and its router:

Example output from a Windows PC, written for this lesson
C:\>ipconfig
Wireless LAN adapter Wi-Fi:

   IPv4 Address. . . . . . . . . . . : 192.168.1.20
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.1.1
IPv4 Address is your device's address. Default Gateway is your router. On macOS or Linux, use ifconfig or ip addr.

Then run ping 192.168.1.1 (use your own gateway address). Replies mean your device can reach the router, so your local network works.

Advanced: two kinds of address

Every device on an Ethernet or Wi-Fi network has two addresses. The MAC address (for example 02:00:00:00:00:20) is used by switches to deliver data within one network. The IP address (for example 192.168.1.20) is used by routers to deliver data between networks.

When a packet crosses a router, the router puts it in a new frame with new MAC addresses. The IP addresses inside normally stay the same from end to end; the exception is NAT, which you saw when the router changed Asha's source address to 203.0.113.2.

Learn more: MAC AddressesHow NAT and PAT Work

Common mistakes

  • Thinking Wi-Fi is the internet. Full Wi-Fi bars only mean you reach the local network.
  • Confusing a switch with a router. A switch connects devices in one network; a router connects networks.
  • Thinking a server is a special computer. Any device that provides a service is a server.

Practice

Exercise: sketch your own home network on paper. Mark the end devices, the network device(s), the media (cable or Wi-Fi) and one protocol you use every day. Then run ipconfig and write your IP address and default gateway next to your device.

Predict · scenario 1

Asha can print, but no websites load. Which device should she suspect first?

Predict · scenario 2

Your browser loads a page from example.com. Which roles are they playing?

Predict · scenario 3

Two laptops are joined by one cable and can share files. Is this a network?

FAQ

Is the internet a network?
Yes. It is a network of networks: millions of home, company and provider networks connected by routers. They can work together because they all use the same protocols.
Is Wi-Fi the same as the internet?
No. Wi-Fi is only the wireless link between your device and your local network. Your router then connects that network to the internet through your internet service provider (ISP).
Do I need a router to build a network?
Not for a single local network: a switch, or even one cable between two computers, is enough. You need a router when your network has to reach another network, such as the internet.