Track progress, take quizzes and save notes on this lesson.

Free forever · no card needed

Start free
Intermediate

IP Addressing and Network Management

4.9.4.3–4.9.4.9 IP address structure·Subnet masking·IPv4 and IPv6·Public and private IP addresses·DHCP·NAT·Port forwarding

Aligned to the AQA 7517 specification

Level
Intermediate
Reading time
5 min
Published
13 June 2026
Updated
1 July 2026
On this page
  1. 1.IP Address Structure
  2. 2.Subnet Masking
  3. 3.IPv4 vs IPv6
  4. 4.Public and Private IP Addresses
  5. 5.DHCP, NAT, and Port Forwarding
  6. 6.Common Exam Mistakes

Key takeaways

  • An IP address is divided into a network identifier and a host identifier; routers use the network part to route packets to the correct network, and the host part identifies the specific device.
  • A subnet mask is a 32-bit value that identifies which bits are the network part; ANDing the IP address with the subnet mask extracts the network address.
  • IPv4 uses 32-bit addresses giving 2³² ≈ 4.3 billion addresses, whereas IPv6 uses 128-bit addresses giving 2¹²⁸; IPv6 was introduced because of IPv4 address space exhaustion.
  • Private IP addresses are not globally unique and are not routable on the Internet; multiple private networks worldwide reuse the same ranges, and NAT translates them to a globally unique public IP.
  • DHCP automatically assigns four things to a joining device: an IP address, subnet mask, default gateway, and DNS server address, for the duration of the lease.

IP Address Structure

Every device on a network has an IP address divided into two parts:

Routers use the network identifier to route packets to the correct network. Once in the correct network, the host identifier identifies the specific device.

IPv4 example: 192.168.1.42

  • Written as 4 octets (0–255) separated by dots
  • Network part might be 192.168.1 (first 3 octets), host part 42 (last octet)
  • Exact split determined by the subnet mask

Subnet Masking

A subnet mask is a 32-bit value that identifies which bits of an IP address are the network part and which are the host part.

How to apply: AND the IP address with the subnet mask to extract the network address.

Example:

IP address:   192.168.1.42   =  11000000.10101000.00000001.00101010
Subnet mask:  255.255.255.0  =  11111111.11111111.11111111.00000000
AND result:   192.168.1.0    =  11000000.10101000.00000001.00000000

The result (192.168.1.0) is the network address. The host is device .42 on the 192.168.1.0 network.

CIDR notation: /24 means the first 24 bits are the network part (equivalent to mask 255.255.255.0). 192.168.1.0/24 defines a subnet with 256 addresses (hosts .1–.254, .0 is network address, .255 is broadcast).

Subnetting divides a network into smaller sub-networks, improving security and reducing broadcast traffic within each subnet.

IPv4 vs IPv6

IPv4:

  • 32-bit address (4 octets): 93.184.216.34
  • billion addresses
  • Address exhaustion: all public IPv4 blocks allocated

IPv6:

  • 128-bit address (8 groups of 4 hex digits): 2001:0db8:85a3:0000:0000:8a2e:0370:7334
  • addresses — effectively inexhaustible
  • Additional features: built-in auto-configuration (devices can generate their own addresses), improved security support, no need for NAT at scale

Why IPv6 was introduced: IPv4 address space exhaustion. The Internet grew far beyond what 4.3 billion addresses could support. IPv6 provides effectively unlimited addresses for every device, including IoT.

Public and Private IP Addresses

Public IP address:

  • Globally unique and routable on the Internet
  • Assigned by ISPs and internet registries
  • Visible to servers on the Internet

Private IP address:

  • Used within a LAN (home, office network); not routable on the Internet
  • Defined ranges:
    • 10.0.0.010.255.255.255
    • 172.16.0.0172.31.255.255
    • 192.168.0.0192.168.255.255
  • Multiple devices on different private networks can share the same private IP (e.g. many homes have 192.168.1.1 as their router)

Devices with private IPs access the Internet through NAT on their router, which maps their private address to the router's single public IP.

Want more lessons like this one?

Generate lessons on anything you study. Free account, no card needed.

Start generating

DHCP, NAT, and Port Forwarding

DHCP (Dynamic Host Configuration Protocol)

DHCP automatically assigns configuration to devices joining a network. When a device connects:

  1. Device broadcasts a DHCP request
  2. DHCP server responds with: IP address, subnet mask, default gateway, DNS server address
  3. Device configures itself using these values for the duration of the lease

Without DHCP, every device would need a manually configured static IP address.

NAT (Network Address Translation)

NAT allows multiple devices on a private network to share a single public IP address.

  • The router maintains a translation table: maps (private IP + ephemeral port) ↔ (public IP + translated port)
  • Outbound: router replaces the source private IP with its public IP in each packet
  • Inbound: router uses the translation table to forward the reply to the correct private device

Example:

Port forwarding

Port forwarding allows external devices to initiate connections to a specific internal device through the NAT router.

Configuration: incoming traffic on public IP port 8080 → forward to 192.168.1.10:80 (internal web server).

Without port forwarding, NAT only handles outbound-initiated connections — the router does not know which internal device should receive an unsolicited inbound connection.

Common Exam Mistakes

1. Stating that private IP addresses are unique on the Internet

Private IP addresses are not globally unique. Multiple private networks worldwide use the same private address ranges (192.168.x.x, etc.). They are unique only within their own LAN. NAT handles the translation to a globally unique public IP.

2. Confusing subnet mask with subnet address

The subnet mask (e.g. 255.255.255.0) is a tool for extracting the network part of an address. The network address (e.g. 192.168.1.0) is the result of ANDing an IP with the mask. They are different things.

3. Stating NAT provides security

NAT provides implicit inbound filtering (unsolicited inbound connections are dropped) as a side effect, not as a designed security feature. It is not a replacement for a firewall.

4. Forgetting what DHCP assigns

DHCP assigns four things: IP address, subnet mask, default gateway, and DNS server address. Answers that only say "IP address" are incomplete.

Key terms

IP address
A label given to every device on a network, divided into a network identifier and a host identifier.
Subnet mask
A 32-bit value that identifies which bits of an IP address are the network part and which are the host part.
CIDR notation
A way of writing the network size, where /24 means the first 24 bits are the network part, equivalent to mask 255.255.255.0.
Subnetting
Dividing a network into smaller sub-networks, improving security and reducing broadcast traffic within each subnet.
IPv4
A 32-bit IP addressing scheme written as 4 octets, providing about 4.3 billion addresses, all of whose public blocks are now allocated.
IPv6
A 128-bit IP addressing scheme written as 8 groups of 4 hex digits, providing 2¹²⁸ effectively inexhaustible addresses with built-in auto-configuration.
Public IP address
A globally unique, Internet-routable address assigned by ISPs and internet registries and visible to servers on the Internet.
Private IP address
An address used within a LAN that is not routable on the Internet and can be reused across different private networks.
DHCP
Dynamic Host Configuration Protocol: automatically assigns an IP address, subnet mask, default gateway, and DNS server address to devices joining a network.
NAT
Network Address Translation: lets multiple devices on a private network share a single public IP address using a translation table maintained by the router.
Port forwarding
A configuration that lets external devices initiate connections to a specific internal device through the NAT router.

Frequently asked questions

AND the IP address with the subnet mask to extract the network address. For example, 192.168.1.42 AND 255.255.255.0 gives the network address 192.168.1.0, with the host being device .42 on that network.

IPv6 was introduced because of IPv4 address space exhaustion: IPv4's 32-bit addresses provide only about 4.3 billion addresses and all public IPv4 blocks have been allocated. IPv6's 128-bit addresses provide effectively unlimited addresses for every device, including IoT.

No. Private IP addresses are not globally unique and are not routable on the Internet; multiple private networks worldwide use the same ranges (such as 192.168.x.x). They are unique only within their own LAN, and NAT handles translation to a globally unique public IP.

Generate revision on any topic you study

Type any topic you're studying and Aicademy generates a complete lesson, quiz, and flashcard set, personalised to your level.

Lessons on anything

Structured, level-matched lessons on any topic you study

Practice quizzes

Find out what you actually know before the exam does

Flashcard sets

Lock in key concepts with instant revision cards

Ask Aica

Stuck on something? Get a clear explanation, any time

Prev

TCP/IP and Application Layer Protocols

Next

Web Technologies and Client Models

Related lessons

Top students don’t revise more. They revise what counts.

Start revising free

Free to start. No card needed.