One address, many doors
A building has one street address. But it has many doors: a front door, a loading door and a fire door. Each door is for a different job.
A server is the same. It has one address, but many numbered doors. Web visitors use one door. Email uses another.
Key words
| Word | What it means |
|---|---|
| Network | computers and devices joined together so they can share data |
| Packet | a small piece of data sent over a network |
| Protocol | a set of rules that devices follow to talk to each other |
| Port | a numbered door on a device that one service listens at |
| Port number | a number from 0 to 65535 that names the door |
| IP address | the number that names a device on a network |
| Service | a program that gives a job to other devices, such as a web server |
| Listening | a service waiting at its port for a request |
| TCP | a protocol that checks that every packet arrives |
| UDP | a faster protocol that does not check that packets arrive |
| Well-known port | a port number agreed for one service, from 0 to 1023 |
| Encryption | scrambling data so only the right person can read it |
| DNS | the service that turns a name into an IP address |
The cells students fill in are left blank in this preview.
By the end of this lesson
Note
I can say what a protocol and a port are, name the common ones with their numbers, and pick a safe one.
Starter
Have a go
Starter
3 questionsYour answers are marked here and are not kept. A college account keeps every student’s marks.
IP address plus port
The IP address finds the device. The port number finds the service on it. Together they are written like this: 203.0.113.10:443.
A protocol is the set of rules the two sides follow at that port. A web server listens on port 443 and speaks HTTPS.
Most protocols use TCP, which checks that every packet arrives. Some use UDP, which is quicker but does not check.
Common protocols and their ports
| Protocol | Port | What it does |
|---|---|---|
| HTTP | 80 | Web pages, not encrypted |
| HTTPS | 443 | Web pages, encrypted |
| FTP | 21 | Moves files, not encrypted |
| SSH and SFTP | 22 | Remote login and file moves, encrypted |
| SMTP | 25 | Sends email between servers |
| POP3 | 110 | Downloads email to one device |
| IMAP | 143 | Reads email kept on the server |
| DNS | 53 | Turns names into IP addresses |
| DHCP | 67 and 68 (UDP) | Hands out IP addresses |
| NTP | 123 (UDP) | Keeps clocks correct |
| LDAP | 389 | Looks up users in a directory |
| RDP | 3389 | Remote desktop on a Windows machine |
The cells students fill in are left blank in this preview.
Look the ports up on a real machine
A Linux machine keeps a list of well-known ports in a file. The command getent services reads it. Open the lab terminal and press Run.
Which port does HTTPS use?
getent services httpsA command for the lesson’s lab terminal. It is shown here and not run.
Which port does DNS use?
getent services domainA command for the lesson’s lab terminal. It is shown here and not run.