Networks
Protocols are a set of rules for how computers communicate.
They stipulate:
Without protocols computers could receive data but wouldn't know what to do with it. If all computers follow the protocols communication should work with few issues.
There are thousands of protocols which manage different types of digital communication between devices, however the commonly used ones are:
Network communication is very complicated. To simplify things we break down different parts of the communication into four layers.
A single protocol must only work at a single layer and each one manages a different part of communication and thus groups similar protocols together.
We call the layered system the TCP/IP Stack.

Many of the files we send over a network are far too big to be sent in one go. Instead, we break them down into smaller manageable units called packets.
When receiving, for example a website, the website will be able up of thousands of individual packets
Each packet contains additional information to support the data being received and reassembled in the correct order.
This data is stored in the header
When sending packets over a network, or the internet, a series of steps take place. The below example using a webpage outlines the steps.
Routing is how routers guide packets across the Internet. Every router keeps a routing table, a list of the networks it knows about and the best next router to send a packet to for each one.
When a packet reaches a router, the router reads the destination IP address in the packet header. It looks that address up in its routing table. The table gives the next router along a path to that destination. The router forwards the packet to that next router. The next router does the same, and so on, until the packet reaches the network where the destination device sits. A routing table might look like this:
| Destination network | Next router | Metric |
|---|---|---|
| Network A | Router 2 | 2 hops |
| Network A | Router 5 | 5 hops |
| Network B | Router 1 | 1 hop |
A routing table can hold more than one possible route to the same destination. Each route has a metric, a score such as the number of hops (routers crossed). A lower metric usually means a faster route. For example, a packet might be able to go through Router M (3 hops) or Router N (1 hop). The router picks Router N because it uses the fewest hops. But if Router N's link is busy with lots of video streaming, the router can choose Router M instead, even though it has more hops, because it is less congested. So the "best" route is often the fastest or least congested one, not just the shortest.
Routers do not work alone. They share information with other routers about which networks they can reach and how busy or reliable those links are. If a cable fails, this sharing lets routers update their tables and find a new path around the problem. This happens automatically and continuously, so the Internet keeps working even when parts of it go down.