Network Hardware – IP Addresses (IGCSE 0478)
1. What is an IP address?
An Internet Protocol (IP) address is a numerical label that uniquely identifies a device on a network that uses the Internet Protocol. It performs two essential functions:
- Identification – identifies the host or network interface.
- Location addressing – enables routers to forward data packets to the correct destination.
2. MAC address – the hardware identifier
- Stands for Media Access Control address.
- Stored permanently in the Network Interface Card (NIC).
- Written as six pairs of hexadecimal digits, e.g.
00:1A:2B:3C:4D:5E (or 00-1A-2B-3C-4D-5E).
- Operates at the data‑link layer (Layer 2) to deliver frames on a local network segment.
- IP addresses operate at the network layer (Layer 3) and are mapped to a MAC address by the ARP protocol (IPv4) or NDP (IPv6).
3. Types of IP addresses
3.1 By version
| Version |
Length |
Notation |
Typical use |
| IPv4 |
32 bits (4 octets) |
Four decimal octets, e.g. 192.168.0.1 |
Current dominant protocol on the Internet. |
| IPv6 |
128 bits (8 groups) |
Eight groups of four hexadecimal digits, e.g. 2001:0db8:85a3:0000:0000:8a2e:0370:7334 |
Designed to replace IPv4 and provide a vastly larger address space. |
3.2 By scope (public vs. private)
| Scope |
Definition |
Exact CIDR blocks (IPv4) |
| Public |
Globally routable on the Internet. |
All IPv4 addresses except the private blocks listed below. |
| Private |
Used only within a local network; not routable on the public Internet. |
10.0.0.0/8 (10.0.0.0 – 10.255.255.255)
172.16.0.0/12 (172.16.0.0 – 172.31.255.255)
192.168.0.0/16 (192.168.0.0 – 192.168.255.255)
|
3.3 By assignment method
| Method |
How it works |
Typical environment |
| Static |
Manually entered; the address never changes unless re‑configured. |
Servers, network printers, routers, firewalls. |
| Dynamic |
Automatically supplied by a DHCP (Dynamic Host Configuration Protocol) server. The address may change when the lease expires. |
Desktops, laptops, tablets, smartphones. |
4. IPv4 address structure
An IPv4 address consists of four 8‑bit octets (0 – 255). The division between network and host portions is defined by a subnet mask (or CIDR notation).
4.1 Subnet mask and CIDR notation
- Notation
/n means the first n bits are the network part.
- Corresponding decimal mask for
/24 is 255.255.255.0.
- Subnet mask determines how many hosts can exist in that subnet (see the quick reference table below).
4.2 Binary‑decimal conversion example (required by the syllabus)
IPv4 address: 192.168.1.10
Decimal : 192 168 1 10
Binary : 11000000 10101000 00000001 00001010
To convert back, group the binary octets into sets of eight and translate each set to decimal.
4.3 Subnet mask illustration
Address : 192.168.10.25
Subnet mask : 255.255.255.0 (/24)
Network part : 192.168.10 (first 24 bits)
Host part : 25 (last 8 bits)
4.4 Quick reference table
| CIDR |
Subnet mask (decimal) |
Network bits |
Host bits |
Maximum hosts per subnet |
| /24 |
255.255.255.0 |
24 |
8 |
2⁸ – 2 = 254 |
| /16 |
255.255.0.0 |
16 |
16 |
2¹⁶ – 2 = 65 534 |
| /30 |
255.255.255.252 |
30 |
2 |
2² – 2 = 2 (useful for point‑to‑point links) |
5. IPv6 address structure
- 128 bits written as eight groups of four hexadecimal digits (a “hextet”).
- Leading zeros in a group may be omitted.
- One consecutive run of zero groups can be replaced by
:: (only once per address).
5.1 Example of shortening
Full form : 2001:0db8:0000:0000:0000:0000:0002:0001
Shortened : 2001:db8::2:1
5.2 IPv6 address types (syllabus‑relevant)
| Type |
Prefix |
Purpose |
| Global Unicast |
2000::/3 |
Publicly routable on the Internet. |
| Link‑Local |
FE80::/10 |
Used on a single LAN segment; automatically configured. |
| Unique Local |
FC00::/7 |
Private‑address equivalent for IPv6. |
6. DHCP – dynamic IP‑address allocation
DHCP automates the assignment of IPv4 (and IPv6 via DHCPv6) addresses, subnet mask, default gateway and DNS servers.
6.1 DHCP handshake (four steps)
- DHCPDISCOVER – client broadcasts a request for configuration.
- DHCPOFFER – DHCP server replies with an available IP address and lease time.
- DHCPREQUEST – client selects an offer and asks the server to confirm it.
- DHCPACK – server acknowledges; the client can now use the supplied address.
When the lease expires the client may renew it (DHCPREQUEST/DHCPACK) or obtain a new address.
7. Router functions (relevant to the syllabus)
- Routing – examines the destination IP address, looks up the best‑matching entry in its routing table, and forwards the packet to the next hop.
- Routing tables can be:
- Static – manually entered entries.
- Dynamic – learned automatically using protocols such as RIP, OSPF or EIGRP (beyond IGCSE depth, but worth naming).
- Network Address Translation (NAT) – translates private IP addresses to a single public address (or a pool). This lets many devices share one Internet‑facing address while keeping the internal network private.
- DHCP relay (IP helper) – forwards DHCP broadcast messages from a LAN segment to a DHCP server on another network.
- IP‑address configuration – routers have at least one static IP on each interface; they may also act as a DHCP server for small networks.
8. Data transmission – packet switching and packet structure
- Packet switching – each data packet is routed independently; routers may receive packets out of order and re‑assemble them at the destination.
- Packet structure (network layer):
+-------------------+----------------------+-------------------+
| Header | Payload (data) | Trailer |
+-------------------+----------------------+-------------------+
| Source IP address| User data (e.g., | Error‑checking |
| Destination IP | HTTP request) | (CRC / checksum) |
| Protocol field | | |
+-------------------+----------------------+-------------------+
- Header – contains source/destination IP addresses, protocol identifier (TCP, UDP, ICMP), and other control information.
- Payload – the actual user data carried by the packet.
- Trailer – optional; often holds a checksum or CRC used for error detection.
- USB (Universal Serial Bus) – mentioned in the syllabus as a data‑transmission interface; it provides serial data transfer for peripheral devices such as keyboards, mice and storage.
9. Quick revision checklist
- Convert an IPv4 address between binary and decimal forms.
- State the three private IPv4 CIDR blocks and their address ranges.
- Explain the difference between static and dynamic IP allocation, including the four DHCP handshake steps.
- Identify a valid IPv6 address, shorten it correctly, and name at least one IPv6 address type.
- Describe the main functions of a router: routing tables, NAT, and DHCP relay.
- Label the three parts of a network‑layer packet (header, payload, trailer) and recall that packet switching may reorder packets.
- Recall the format and purpose of a MAC address.
- State the role of USB as a serial data‑transmission interface.
10. Suggested diagram (for classroom use)
A simple LAN layout showing:
- Router – one static public IP (e.g.,
203.0.113.2/30) and two LAN interfaces with private IPs 192.168.1.1/24 and 192.168.2.1/24.
- DHCP server (could be the router) assigning dynamic IPv4 addresses in the range
192.168.1.100 – 192.168.1.200.
- Layer‑3 switch (optional) illustrating routing between VLANs.
- Three end devices:
- Desktop – static IP
192.168.1.10.
- Laptop – dynamic IP obtained via DHCP.
- Smartphone – IPv6 address (e.g.,
2001:db8::c0a8:1).
- Arrows indicating packet flow, with an inset showing:
- Network‑layer header (source/destination IP).
- Data‑link‑layer frame containing source/destination MAC addresses.