Addresses, names and shared rules
Every device on a network needs an address so that data can find it. An IPv4 address has four numbers separated by dots, and each number is a byte, from 0 to 255; together they have 32 bits. For example 192.0.2.15 is written in binary as 11000000.00000000.00000010.00001111. An address such as 192.0.2.256 is not valid, because 256 is above 255. IPv6 addresses are longer and give many more addresses. People remember names better than numbers, so a domain name such as school.example is used, and the DNS works like a phone book: it translates the name into the IP address. A protocol is a set of agreed rules, like the rules of a game that both players know. The internet uses layers, each with one job: the application layer holds the rules of services (HTTP for web pages, SMTP for sending mail, POP and IMAP for receiving mail); the transport layer splits data into packets and checks that they arrive; the internet layer adds addresses and finds the route; the link layer sends the bits over cable or radio. Because every layer does only one job, each can be improved without changing the others.
| Layer | Job | Examples |
|---|---|---|
| application | rules of a service | HTTP, SMTP, POP, IMAP |
| transport | split into packets, check arrival | TCP |
| internet | addresses and routes | IP |
| link | bits over cable or radio | cable, radio |
| Address | Valid? | Reason |
|---|---|---|
| 10.0.0.5 | yes | four numbers, all 0–255 |
| 192.168.1.20 | yes | four numbers, all 0–255 |
| 192.168.1.256 | no | 256 is above 255 |
| 192.168.1 | no | only three numbers |
Invent a small network of five devices at home or school. Give each a valid IPv4 address (four numbers from 0 to 255) and write one domain name for the server using the ending .example. Then show which line of your list a DNS would look up.