Topic 3 · Hardware
Network hardware and addresses
Network interface cards, MAC addresses, IPv4 and IPv6 addresses, and what a router does.
Network interface card (NIC)
To connect to a network, a device needs a network interface card (NIC), which may be wired or wireless. Every NIC is given a unique MAC address when it is made.
MAC addresses
A MAC (media access control) address is 48 bits long, normally written as 12 hex digits. The first half identifies the manufacturer and the second half is the device's serial number.
- 00-1A-2B
- Manufacturer ID (first 24 bits).
- 3C-4D-5E
- Serial number of the device (last 24 bits).
Key idea. A MAC address identifies the device itself and normally never changes.
IP addresses
An IP address identifies a device on a network such as the internet, so data can be sent to it. Unlike a MAC address, it depends on the network the device is connected to.
| IPv4 | IPv6 | |
|---|---|---|
| Length | 32 bits | 128 bits |
| Written as | 4 denary numbers 0–255, separated by dots | 8 groups of 4 hex digits, separated by colons |
| Example | 192.168.0.12 | 2001:0db8:85a3:0000:0000:8a2e:0370:7334 |
| Why | The original format | IPv4 is running out of addresses; IPv6 has vastly more |
Static and dynamic
A static IP address is assigned permanently and does not change. It suits servers, which must always be found at the same address.
A dynamic IP address is assigned each time a device connects and can change. It suits most home devices, and addresses can be reused when devices disconnect.
Routers
A router connects networks together and forwards packets between them. It reads the destination IP address in each packet header and sends the packet towards that address. A home router connects your local network to the internet and usually assigns dynamic IP addresses to the devices on it.
Key terms
- NIC
- Network interface card: hardware that connects a device to a network.
- MAC address
- A unique 48-bit identifier given to a NIC by the manufacturer.
- IP address
- An address that identifies a device on a network.
- Router
- A device that forwards packets between networks using IP addresses.
Check yourself
What do the two halves of a MAC address identify?Show answer
The first half is the manufacturer; the second half is the device's serial number.
Why was IPv6 introduced?Show answer
IPv4's 32 bits give about 4.3 billion addresses, which are running out. IPv6's 128 bits give vastly more.
Why should a web server have a static IP address?Show answer
Its address must not change, so users and DNS can always find it at the same address.