Two addresses on one parcel
A parcel of printed survey results goes to a friend in another city. It carries a full street address. At each depot, staff also need to know the next stop on the lorry route.
Two kinds of address do two different jobs. Data sent over a computer link works the same way.
Key words
| Word | What it means | Example |
|---|---|---|
| IP address | a number that names a device across networks | 10.0.12.1 |
| MAC address | a number built into a network card, used on one link | c6:a2:f6:cd:d4:eb |
| Packet | a piece of data with an IP address on it | |
| Frame | a piece of data with a MAC address on it, ready for one link | |
| Bit | one 1 or 0, the smallest piece of data | |
| Protocol | a set of rules computers follow to talk to each other | |
| Router | a device that joins networks by IP address | |
| Switch | a device that joins devices on one link by MAC address | |
| Ethernet | the usual wired way to join devices in a building | |
| Network | devices joined so they can share things | |
| OSPF | a protocol that lets routers share a map to find the best path | |
| RIP | an older protocol where routers share how many hops each route takes |
The cells students fill in are left blank in this preview.
By the end of this lesson
Note
I can say what the network, data link and physical layers do and which devices work at each.
Starter
Have a go
Starter
3 questionsYour answers are marked here and are not kept. A college account keeps every student’s marks.
Layer 3 picks the route
The network layer (layer 3) gives each device an IP address and picks the route across many networks. Data here is a packet.
IP is the main protocol. ICMP carries error messages and the ping test. RIP and OSPF are routing protocols that help routers learn routes. A router works at this layer.
Layer 2 moves data over one link
The data link layer (layer 2) moves data between two devices on the same link. Data here is a frame, with a MAC address for the next device. It also adds a check value to catch damage.
Ethernet and Wi-Fi work here. A switch works at this layer. A packet gets a new frame at every hop.
Try it: wrap a packet in a frame
packet = "[IP 203.0.113.9] sales.csv"
print("Layer 3 packet:", packet)
frame = "[MAC aa:01]" + packet
print("Layer 2 frame, hop 1:", frame)
frame = "[MAC bb:02]" + packet
print("Layer 2 frame, hop 2:", frame)
# The packet never changes. Which part changed each hop?Layer 1 sends the bits
The physical layer (layer 1) turns bits into signals: electricity in a copper cable, light in fibre, radio in Wi-Fi. It also covers the plugs, the cables and the voltages.
If a cable is cut, the fault is at layer 1. Nothing above it can work.
The bottom three layers
| Layer | Name | Data is called | Address used | Device | Examples |
|---|---|---|---|---|---|
| 3 | Network | Packet | IP address | Router | IP, ICMP, RIP, OSPF |
| 2 | Data link | Frame | MAC address | Switch | Ethernet, Wi-Fi |
| 1 | Physical | Bits | None | Cable, radio | Copper, fibre, radio |
The cells students fill in are left blank in this preview.