2.1.10 IP Addressing, Subnetting and Assignment
Internet Protocol addresses identify network interfaces and help packets travel from a source network to a destination network. The address format, network prefix, assignment method and public or private status all affect how the address is used.
This section focuses on the syllabus requirements rather than the history of classful addressing. It explains IPv4 and IPv6 notation, subnetting, device association, public and private addressing, NAT, and static and dynamic allocation.
By the end of this section, you should be able to:
- explain how source and destination IP addresses support packet delivery;
- explain why an IP address is associated with a network interface;
- describe IPv4 and IPv6 formats;
- explain how a network prefix separates network and interface information;
- describe the purpose of subnetting;
- compare public and private IP addresses and discuss security implications;
- explain the role of NAT;
- distinguish static addressing from dynamic addressing.
How IP addresses are used during transmission
An IP packet carries a source IP address and a destination IP address in its header.
| Header field | Purpose |
|---|---|
| Source IP address | Identifies the interface from which the packet originated and provides an address for replies. |
| Destination IP address | Identifies the interface that should ultimately receive the packet. |
From one network to another
- The sender compares the destination with its own network prefix.
- If the destination is local, the packet can be delivered within the LAN.
- If the destination is on another network, the sender passes the packet to its default gateway.
- Routers examine the destination IP address and match its network prefix against routing information.
- Each router forwards the packet towards the next network on the path.
- On the final network, the complete address identifies the destination interface.
Interface identifier: the remaining part used to distinguish an interface within that network.
Common mistake
An IP address does not describe a physical route. Routers interpret the destination address and use their current routing information to choose each next step.
How an IP address becomes associated with a device
More precisely, an IP address is assigned to a network interface. A laptop may have one address on its WiFi interface and a different address on its wired interface. A router has several interfaces, so it normally has several IP addresses.
Two common assignment methods
| Method | How the association is created | Typical use |
|---|---|---|
| Manual configuration | An administrator enters the address, prefix, gateway and other settings. | Servers, routers, printers or other infrastructure that should remain predictable. |
| Automatic configuration | A DHCP server offers an address and related settings for a limited lease period. | Student laptops, phones and ordinary client devices. |
Typical DHCP exchange
- A newly connected client requests configuration.
- The DHCP service selects an available address from its pool.
- The service supplies the address, prefix or mask, default gateway and lease time.
- The client applies the settings to the relevant network interface.
- The address can later be renewed or returned for reuse.
Common mistake
An IP address is not permanently manufactured into the device. It can change when the device joins another network, changes interface or receives a new dynamic lease.
IPv4 format
An IPv4 address contains 32 bits. For human use, the bits are divided into four 8-bit groups called octets. Each octet is written in denary and separated by a dot.
Dotted decimal notation: the four octet values written with dots between them.
Original example
| Binary octet | 10101101 | 00110010 | 00001100 | 11000100 |
|---|---|---|---|---|
| Denary value | 173 | 50 | 12 | 196 |
10101101 00110010 00001100 11000100
becomes
173.50.12.196
Each octet must represent a value from 0 to 255.
Prefix length
A suffix such as /24 states how many leading bits form the network prefix. In 10.44.8.37/24, the first 24 bits identify the network and the final 8 bits identify an interface within it.
Common mistake
The number after the slash gives the number of prefix bits, not the number of remaining interface bits.
Exam tip
Convert each 8-bit octet separately. Do not treat the complete 32-bit address as one large denary value.
IPv6 format
IPv6 uses 128-bit addresses, providing a vastly larger address space than IPv4. The address is divided into eight groups of 16 bits. Each group is written using hexadecimal digits, with colons between groups.
Full and shortened forms
2001:0DB8:4A10:0000:0000:0000:0025:00B7
Leading zeros within a group may be removed, and one consecutive run of all-zero groups may be replaced by :::
2001:db8:4a10::25:b7
| Comparison | IPv4 | IPv6 |
|---|---|---|
| Length | 32 bits | 128 bits |
| Grouping | Four 8-bit octets | Eight 16-bit groups |
| Common notation | Dotted denary | Colon hexadecimal |
| Address-space implication | Limited and heavily conserved | Extremely large |
Common mistake
IPv6 is not simply a 32-bit IPv4 address rewritten in hexadecimal. It uses a different 128-bit format.
Using subnetting inside a network
Subnetting divides one allocated network into smaller logical networks. The organisation borrows some interface bits and uses them as additional subnet-prefix bits.
Subnetting: extending the network prefix so that one address block can identify several internal networks.
Original example: dividing a /24 block
A campus has the private block 10.44.8.0/24 and wants four separate networks for administration, teaching, laboratories and guest devices.
Borrowing two interface bits creates four /26 subnets:
| Department | Subnet | Address block begins at |
|---|---|---|
| Administration | 10.44.8.0/26 | 10.44.8.0 |
| Teaching | 10.44.8.64/26 | 10.44.8.64 |
| Laboratories | 10.44.8.128/26 | 10.44.8.128 |
| Guest devices | 10.44.8.192/26 | 10.44.8.192 |
Why subnet?
- Separate departments or device groups logically.
- Control which traffic may pass between groups.
- Reduce the size of local broadcast domains.
- Apply different security or management policies.
- Use one allocated address block in a structured way.
Common mistake
Subnetting does not create extra bits or increase the total size of the original block. It divides the existing address space into smaller ranges.
Public and private IP addresses
| Comparison | Public IP address | Private IP address |
|---|---|---|
| Where it is used | On Internet-facing interfaces and globally routed networks. | Inside private IPv4 networks. |
| Uniqueness | Must be globally unique while assigned. | May be reused by unrelated private networks. |
| Internet routing | Can be routed across the public Internet. | Is not routed across the public Internet. |
| Typical assignment | Allocated by an ISP or address authority. | Allocated by the local organisation or its DHCP service. |
Common private IPv4 ranges
- 10.0.0.0/8
- 172.16.0.0/12
- 192.168.0.0/16
Security implications
- A private address is not directly reachable through normal public Internet routing.
- A public address may be reachable from outside if firewall rules and services allow it.
- Using private addresses can reduce direct exposure of individual internal interfaces.
- Private addressing does not encrypt traffic or remove malware, weak-password or configuration risks.
- A firewall is still needed to enforce an inbound and outbound security policy.
Common mistake
A private IP address does not automatically make a device secure. It limits direct public routing, but security still depends on firewalls, updates, authentication and configuration.
Exam tip
Avoid writing only βprivate is saferβ. State the mechanism: private addresses are not publicly routed, so outside devices cannot normally initiate direct communication to them without translation or an explicitly configured forwarding rule.
Network Address Translation
Private IPv4 devices normally need translation when communicating with the public Internet. A router or firewall performs Network Address Translation (NAT).
- An internal device sends a packet using its private source address.
- The NAT device records the connection and replaces the private source with its public address.
- The Internet server sends the reply to the public address.
- The NAT device uses its recorded mapping to deliver the reply to the correct private interface.
What NAT contributes
- Many internal devices can share a smaller number of public IPv4 addresses.
- Internal address choices are hidden from normal public routing.
- Unsolicited inbound packets have no existing translation mapping unless forwarding is configured.
Common mistake
NAT is not a complete security system. A firewall decides which communication is allowed; NAT primarily translates addressing information.
Static and dynamic IP addresses
| Comparison | Static address | Dynamic address |
|---|---|---|
| Change over time | Intended to remain fixed. | Can be changed or reassigned. |
| How it is configured | Manually or through a reserved assignment. | Usually allocated automatically by DHCP or an ISP. |
| Typical use | Servers, routers, printers and services that must be found predictably. | Ordinary client devices and consumer Internet connections. |
| Administration | Requires planning to avoid duplicates and incorrect settings. | Reduces manual configuration and allows address reuse. |
| Security implication | A stable public address can make a hosted service consistently reachable and consistently targetable. | Changing an address provides little protection by itself and should not be treated as a security control. |
Dynamic IP address: an address supplied from a pool and available for later reassignment.
Common mistake
Dynamic does not mean that the address changes continuously. It means the assignment is temporary and may change when the lease or connection changes.
Interactive: IP Address Explorer
Use the four tabs below to explore key addressing ideas: how IPv4 bytes become dotted decimal, how CIDR divides an address into a netID and hostID, and how sub-netting reuses hostID bits inside one organisation.
Practice
Core understanding
- Explain the use of source and destination IP addresses in a packet.
- Explain why an address is assigned to a network interface rather than permanently to a whole device.
- Describe the format of an IPv4 address.
- Describe the format of an IPv6 address.
- Explain the purpose of subnetting.
- Compare public and private IP addresses.
- Explain one security implication of using a public address.
- Distinguish a static address from a dynamic address.
Address interpretation
- Convert 11000001 00101100 00001001 01110010 to dotted decimal notation.
- How many interface bits remain in an IPv4 address with a /27 prefix?
- Explain what the /26 means in 10.44.8.128/26.
- Shorten 2001:0DB8:0000:0000:0031:0000:0000:0009 using valid IPv6 abbreviation.
Scenario: a new media studio
A studio has staff laptops, a shared printer, an internal file server and a public website.
- Which devices are suitable for dynamic private addresses?
- Which internal devices may need predictable static or reserved addresses?
- Which service needs a public Internet-facing address?
- Explain why NAT alone is not sufficient protection.
- Suggest one reason to place guest devices on a separate subnet.
Review
| Concept | Key idea |
|---|---|
| IP packet addressing | Source and destination addresses support delivery and replies. |
| IPv4 | 32 bits written as four dotted denary octets. |
| IPv6 | 128 bits written as colon-separated hexadecimal groups. |
| Subnetting | Extends a prefix to divide one address block into smaller networks. |
| Public address | Globally unique and routable through the public Internet. |
| Private address | Reusable internally and not publicly routed. |
| NAT | Translates between private internal addressing and public Internet addressing. |
| Static address | Intended to remain fixed. |
| Dynamic address | Automatically leased and available for reassignment. |
Quick self-check
- Can I trace how a destination IP address is used across networks?
- Can I explain how DHCP associates an address with an interface?
- Can I identify valid IPv4 and IPv6 notation?
- Can I explain why an organisation creates subnets?
- Can I discuss public/private security without claiming that private means fully secure?
- Can I choose static or dynamic addressing for a scenario?