Core CS · Computer Networks
A wire is not a network until both ends agree
A network is two or more independent machines joined by a medium so they can exchange data. Four of the five things that takes are objects you can point at. The fifth is the one candidates leave out, and without it the other four move bits that mean nothing.
Send two messages on one link, three ways →01 The idea
Two autonomous machines, and a medium between them
A computer network is two or more autonomous devices connected by a transmission medium so that they can exchange data. Every word in that sentence is load-bearing, and the word that does the most work is autonomous. It means neither device is under the other’s control: each has its own processor, its own memory and its own clock, and either one can be switched off without stopping the other.
That word is what keeps the definition from swallowing everything. A processor and the graphics card in the same machine are connected by a bus and exchange data constantly, and they are not a network, because the graphics card does not run on its own. Two laptops joined by a single Ethernet cable are a network, and there is nothing else in the room. Size is not part of the definition and never has been.
The transmission medium is the physical path the signal travels: twisted-pair copper, coaxial cable, optical fibre, or open air. Note that it carries a signal and not data. Voltage changes, pulses of light, radio waves. Nothing on the medium knows it is carrying the letter H, which is the whole reason the last component exists.
Any data communication needs five components, and this is a list you will be asked to recite: sender, receiver, message, transmission medium, protocol. Four of them are objects. You can photograph a laptop, a server, a cable, and print out the message. The fifth is an agreement held identically in two places, with no physical location at all, and that is precisely why it is the one people forget.
02 Worked example
Five characters, one cable, and the rule that makes them readable
Asha’s laptop sends the five characters HELLO to the college server over a Cat 6 twisted-pair cable. One sender, one receiver, one message, one medium. Each character travels as one 8-bit byte (the ASCII code itself needs only 7 bits, and the eighth is a leading zero here), so exactly 40 bits cross that cable. Four of the five components below are boxes you could walk over and photograph. The fifth is highlighted, and it is drawn last only because it has nowhere on the wire to sit — it stretches across the whole row.
The first four nodes are inventory. The fifth is where the exam lives, so here it is broken into its three parts, each one failing on its own while the other four components stay exactly as they are. Same laptop, same server, same cable, same 40 bits, every time.
Notice what stayed constant through all three failures. The cable was fine. The bits were fine. The only thing that moved was the agreement, and it broke the same message three different ways. That is why the protocol is counted as a component and not as a detail: it is the only one of the five you cannot inspect by opening a cabinet, and the only one that has to be held identically in two places at once.
Keep this example in your head for the rest of the lesson. In section 03 those 40 bits get a delay and a throughput number attached to them, and in the console the same laptop and the same server try to talk in both directions on one link.
03 Mechanics
Four criteria, and what each one is measured in
A network is judged on four things, and an interviewer will expect a unit for the first two. This is where vague answers get pushed on, because performance and reliability are numbers and candidates offer adjectives.
| Criterion | The question it answers | What you actually quote | What it trades against |
|---|---|---|---|
| Performance | How much data, and how fast? | throughput in bits per second, and delay in milliseconds |
Cost, and each other. Pushing more traffic through a link raises throughput and raises queueing delay at the same time. |
| Reliability | How often does it fail, how long until it is back, and does it survive a disaster? | frequency of failure, recovery time after a failure, and robustness in a catastrophe |
Cost. Redundancy means paying every month for a second path you hope never carries anything. |
| Security | Who may read it, who may change it, and what happens after a breach? | protection from unauthorised access and from damage in transit, plus a recovery policy |
Performance. Encryption costs processing, and a handshake costs round trips before any data moves. |
| Cost | What does it take to build, and what does it take to keep running? | hardware, cabling or spectrum, and the administration that never stops |
All three of the above. This is the criterion that settles arguments. |
One honest note on the count, because textbooks differ and interviewers notice. Forouzan lists three criteria — performance, reliability, security. Cost is the fourth that every real deployment adds, and it is the one that decides the design. Name all four and say which book you are quoting if you are asked.
Those four criteria are the bill. Here is what the money buys, which is the other half of the answer and the half candidates skip. Each row is a use that justifies building the thing, and each one arrives with its own cost attached, because a use with no cost is a slogan.
| What the network buys | The concrete instance | What it costs you |
|---|---|---|
| Resource sharing | One printer on the corridor serves forty machines. One licence server, one storage array, one GPU box the whole lab queues for. | a shared resource is a queue, and a single point of failure until you buy a second |
| Communication | Mail, chat, voice and video between people who are not in the same building, and between programs that are not on the same machine. | the traffic is now somebody’s to carry, and delay becomes something users can feel |
| Centralised administration and backup | One directory holds every login. One nightly job backs up everyone’s work, because the work lives on the server rather than on forty desks. | whoever holds the centre holds everything, which is where security stops being optional |
| Reliability through redundancy | Two links to the internet on separate routes, two servers holding the same data. One fails and the other carries the load. | you pay twice for capacity you use once |
| Scalability | Adding the forty-first machine is a cable and a switch port, not a redesign of anything. | ports, addresses and broadcast traffic all grow with it, and eventually the design does have to change |
05 Cheat sheet
The three modes, and the lists you will be asked to recite
Give the mode, then the direction rule, then a real example. A definition with no example is the answer that gets a follow-up question.
| Mode | Directions the link carries | Real example | What it costs you |
|---|---|---|---|
| Simplex | one, permanently | A keyboard to its computer. Broadcast television to an aerial. | half the conversation is impossible; every reply needs a second, separate link |
| Half duplex | both, one at a time | A walkie-talkie. Classic Ethernet on a hub, using CSMA/CD. | a turnaround delay on every reversal, carrying no data |
| Full duplex | both, at the same time | A telephone call. A switched Ethernet link with a separate path per direction. | two channels; split one channel to make them and each direction gets half the capacity |
06 Where & why
Where the modes and the criteria show up by name
None of this is a diagram that only exists in a textbook. Each item below is a standard with a number, or a product somebody is running right now, and an interviewer can hear the difference between a candidate who has met them and one who has read a list.
A station cannot transmit and receive on the same channel at the same instant — its own transmitter would drown whatever was arriving. So 802.11 spends most of its complexity deciding whose turn it is, using CSMA/CA. When someone says the Wi-Fi feels slower than the cable, a shared half-duplex channel is a large part of the reason.
A switch works at layer 2 and gives every port its own collision domain, so a full-duplex link has no collisions at all and CSMA/CD is switched off. It does not split the broadcast domain — a broadcast still reaches every port. Separating broadcast domains is a router’s job, at layer 3. A hub, at layer 1, separates neither: every port sits in one collision domain and one broadcast domain.
Telnet carried the login password across the network as readable ASCII on port 23, and every device on the path could read it. SSH does the same job under encryption on port 22. Nothing about the cable changed when sites migrated. The protocol changed, which is the point: the guarantee lives in the agreement, never in the medium.
A network that survives a failed data centre does so by having more than one, and by rerouting to the survivor in seconds rather than hours. That is the reliability criterion in all three of its parts: how often it fails, how long recovery takes, and whether it stays up when a whole site goes down. The second data centre is the cost criterion, paid every month for capacity that mostly sits idle.
07 Interview questions
What they actually ask
This is the opening question of almost every networking interview, and it is usually answered with a definition that could have come off a slide. The candidates who get past it can name the five components, give a unit for two of the criteria, and produce one concrete failure on demand.
What is a computer network, in one line?
Your definition said “autonomous”. Why does that word matter?
Name the five components of a data communication system.
What is a protocol, precisely?
Every bit arrived intact and the message was still useless. How?
What criteria is a network judged on?
Throughput and delay are both performance. What is the difference?
Simplex, half duplex and full duplex, with an example of each.
Why does half duplex need a turnaround delay and full duplex does not?
Is Wi-Fi full duplex?
What does a network buy an organisation that justifies the cost?
Who actually writes these standards?
08 Practice problems
Six to work through
For the ones with numbers in them, write the units down beside every figure before you start. Bits and bytes, and megabits and megabytes, are where these go wrong, and they go wrong quietly.