Network Hardware · Cambridge syllabus 3.4 · Lesson 2 of 2
IP Addresses and Routers
An internet protocol (IP) address identifies a device on a network so data can be sent to it. It is allocated by the network, often by the router. A static IP address stays the same; a dynamic one can change each time the device connects. IPv4 addresses are 32 bits written as four denary numbers; IPv6 addresses are 128 bits written as eight groups of hex digits. A router sends data to its destination, can assign IP addresses and connects a local network to the internet.
By the end, you can
- Understand what an internet protocol (IP) address is and its purpose.
- Understand that an IP address is allocated by the network.
- Distinguish static IP addresses from dynamic IP addresses.
- Compare IPv4 and IPv6 addresses.
- Describe how a router sends data to a specific destination on a network.
- Understand that a router can assign IP addresses.
- Understand that a router can connect a local network to the internet.
- Compare the purposes of MAC addresses and IP addresses.
IP addresses
An internet protocol (IP) address is a number that identifies a device on a network, so that data sent across the network, and across the internet, can be delivered to it. Every device connected to the internet has one, and the address of the destination is what a packet header carries.
Unlike a MAC address, an IP address is not built into the hardware. It is allocated by the network the device joins, usually by the router. So a laptop has one IP address at school and a different one at home, while its MAC address stays the same.
An IP address can be static or dynamic. A static IP address is set once and stays the same every time the device connects, which suits a device that others must always be able to find, such as a web server. A dynamic IP address is allocated each time the device connects and may be different next time, which suits most phones and laptops, and lets a network reuse addresses when devices leave.
There are two versions. An IPv4 address is 32 bits, written as four denary numbers from 0 to 255 separated by full stops, such as 192.168.0.12. That gives about 4.3 billion addresses, which is not enough for all the devices now connected. An IPv6 address is 128 bits, written as eight groups of four hexadecimal digits separated by colons, such as 2001:0db8:0000:0000:0000:ff00:0042:8329, which gives a vast number of addresses.
Worth remembering
- An IP address identifies a device on a network so data can be sent to it.
- It is allocated by the network: static stays the same, dynamic can change.
- IPv4: 32 bits, four denary numbers 0 to 255. IPv6: 128 bits, eight groups of hex.
Routers
A router connects networks together and directs data between them. It reads the destination IP address on each packet and sends the packet towards that destination, choosing the next step on its route. A router sends data to a specific destination on a network.
A router can also assign IP addresses. When a device joins a home or school network, the router gives it an IP address from a range it manages, usually a dynamic one, and takes it back when the device leaves.
A router can connect a local network to the internet. The computers, phones and printers in a home or a school form a local area network, and the router is the device that links that network to the internet, sending data out to the internet and passing data that comes back to the right device inside.
MAC and IP addresses are often confused, so compare them directly. A MAC address is set when the NIC is made, never changes and identifies the hardware on a local network. An IP address is given by the network, can change, and is used to send data across networks and the internet to the right place. Both are needed: the IP address gets data to the right network and device, and the MAC address picks out the device on the local network.
Worth remembering
- A router sends data to a specific destination on a network.
- A router can assign IP addresses and connect a local network to the internet.
- MAC: fixed, set by the maker. IP: given by the network and can change.
Worked example
192.168.1.20 is an IPv4 address: four numbers from 0 to 255. 2001:0db8:85a3:0000:0000:8a2e:0370:7334 is an IPv6 address: eight groups of four hex digits.
Practice
Warm-up · not marked
Check your understanding
Answer in your own words, then compare with the worked answer. Nothing here is saved or scored.
Worked answer
IPv4 has 32 bits, about 4.3 billion addresses, which is not enough for every connected device. IPv6's 128 bits give far more.
Check your method, units and explanation against it.
Marked practice
Set 1 of 5 · easiest first · Checked as you go, with the worked answer. Sign in or create a free account to save your progress.