Networking: Devices, Topologies & Protocols
🔒 Log in to trackIP addressing: IPv4 classes and IPv6
🔒 Log in to trackIPv4 = 32-bit address, four octets 0-255 in dotted decimal (192.168.1.1). The first octet fixes the class:
| Class | First octet | Default mask | Hosts/network | Use |
|---|---|---|---|---|
| A | 1 - 126 | 255.0.0.0 (/8) | 1,67,77,214 | Huge networks |
| B | 128 - 191 | 255.255.0.0 (/16) | 65,534 | Large organisations |
| C | 192 - 223 | 255.255.255.0 (/24) | 254 | Small networks |
| D | 224 - 239 | - | - | Multicasting |
| E | 240 - 255 | - | - | Experimental/R&D |
Special addresses: 127.0.0.1 = loopback/localhost (test your own stack); 0.0.0.0 = unspecified; 255.255.255.255 = broadcast. Private ranges (not routed on the Internet): 10.0.0.0/8, 172.16.0.0-172.31.255.255, 192.168.0.0/16 (home routers).
IPv6 = 128-bit, written as eight hex groups with colons (2001:0db8::7334), solving IPv4 exhaustion. MAC address = 48-bit hardware address of the NIC (physical, layer 2) versus the IP (logical, layer 3). DHCP auto-assigns IPs; static addressing sets them by hand.
IPv4 — the 32-bit address
An IPv4 address is 32 bits written as four numbers 0-255 separated by dots: 192.168.1.1. Each of the four blocks is an octet (8 bits). The leading numbers decide the class:
| Class | First octet | Default mask | Use |
|---|---|---|---|
| A | 1 - 126 | 255.0.0.0 | giant networks |
| B | 128 - 191 | 255.255.0.0 | medium networks |
| C | 192 - 223 | 255.255.255.0 | small networks (most common) |
| D | 224 - 239 | — | multicasting |
| E | 240 - 255 | — | experimental/research |
Class ruler: 1(A), 128(B), 192(C), 224(D), 240(E). Note 127 is NOT a class-A start — see below.
Special addresses
- 127.0.0.1 = loopback / localhost — a machine talking to itself; the whole 127 block is reserved.
- Private (non-routable) ranges: 10.0.0.0 - 10.255.255.255, 172.16.0.0 - 172.31.255.255, 192.168.0.0 - 192.168.255.255. Home routers hand out 192.168.x.x — that is why 192.168.1.1 is a private address, never a public one.
- Hosts per network: Class C gives 256 addresses minus network & broadcast = 254 usable hosts.
IPv6 — the 128-bit successor
IPv4 offers about 4.3 billion addresses — too few for a connected planet. IPv6 uses 128 bits, written as eight groups of hexadecimal digits separated by colons (e.g. 2001:0db8:85a3:0000:0000:8a2e:0370:7334, which can be shortened with :: ). Benefits: a huge address space, built-in auto-configuration, better security support.
MAC vs IP — the twins that get swapped
| MAC address | IP address | |
|---|---|---|
| Type | physical, burnt into the NIC | logical, assigned by network/DHCP |
| Size | 48 bits | IPv4 32 bits / IPv6 128 bits |
| Changes | never (factory-fixed) | changes with the network |
| Used by | switches (L2) | routers (L3) |
Reading an address question in the exam
For a class question, cover everything after the first dot — the answer lives only in the first octet. Anchor the ruler at 1, 128, 192, 224, 240 and drop the given number between the anchors. For "which is private" questions, check the three ranges like passwords: does it start with 10, or 172 with a second number 16-31, or 192.168? A 172 address with second number 32 or more is public — that is the planted trap. And loopback 127.x is its own reserved world, never listed as "Class A hosts".
Question types you will see
Each type: how to recognise it, the method step by step, and one question to try.
IP class identification
An address is given (10.0.0.5, 130.10.5.2, 196.1.2.3, 225.5.4.1) and its class is asked — or the first-octet range of a class is asked.
Read the FIRST octet only: 1-126 = A, 128-191 = B, 192-223 = C, 224-239 = D (multicast), 240-255 = E.
127 is loopback, not Class A usage.
Anchor the ruler: 1, 128, 192, 224, 240.
The IP address 196.20.5.1 belongs to which class?
Show solutionHide solution
Class C — the first octet 196 lies between 192 and 223.
Private ranges and loopback
'Which is a private IP address', 'what is 127.0.0.1', 'which address is reserved for testing/localhost'.
Private ranges: 10.x.x.x, 172.16-31.x.x, 192.168.x.x — home routers use 192.168.x.x.
127.0.0.1 = loopback/localhost — the machine testing itself.
169.254.x.x = auto-configuration failure (APIPA) — optional extra.
The address 127.0.0.1 is used for —
Show solutionHide solution
Loopback testing (localhost) — the computer communicates with itself without touching the network.
IPv4 vs IPv6 facts
'IPv4 has how many bits', 'IPv6 addresses are written in ___', 'how many groups in an IPv6 address', or why IPv6 was needed.
IPv4 = 32 bits, four dotted decimal octets (0-255), about 4.3 billion addresses.
IPv6 = 128 bits, 8 groups of hexadecimal digits separated by colons.
The need: IPv4 addresses ran out — 4.3 billion is less than the connected world.
An IPv6 address is how many bits long?
Show solutionHide solution
128 bits — eight hexadecimal groups, e.g. 2001:0db8:85a3::8a2e:0370:7334.
MAC vs IP and usable-host counts
'Difference between MAC and IP address', 'how many hosts can a Class C network have', 'which address changes when you shift networks'.
MAC = 48-bit, physical, burnt in, permanent; IP = logical, assigned, changes with network.
Class C hosts: 256 addresses minus network and broadcast = 254 usable.
Class B: 65,534 usable; Class A: 1,67,77,214 usable.
How many usable host addresses does a Class C network provide?
Show solutionHide solution
254 — 256 total minus the network address and the broadcast address.
Shortcuts that save time
Remember three cut-points: 1 - 126 - 128 - 191 - 192 - 223. A starts at 1, B at 128, C at 192, D (multicast) at 224. 127 is the loopback no-man's land between A and B.
Class of 172.16.0.1?
Show solutionHide solution
B (first octet 172 lies in 128-191).
127.0.0.1 = localhost - pinging it tests your own TCP/IP stack, never the cable. Any question with 127.x wants 'loopback'.
Pinging 127.0.0.1 tests?
Show solutionHide solution
The local machine's own TCP/IP configuration.
IPv4 = 32-bit dotted decimal; IPv6 = 128-bit colon-hex. 'Runs out of addresses' questions -> IPv6 as the fix.
How many bits does an IPv6 address have?
Show solutionHide solution
Mistakes to avoid
Where most students lose marks on this subtopic.
Placing 127.0.0.1 in Class A usage - 127 is reserved loopback; Class A networks proper end at 126.
Calling 192.168.1.1 a public address - it is the classic private home-router address.
Confusing MAC (48-bit, physical, burnt into NIC) with IP (logical, assignable).
Quick revision
Read this the night before the exam.
IPv4 = 32 bits, four octets 0-255; IPv6 = 128 bits, hexadecimal, colon-separated.
Classes by first octet: A 1-126, B 128-191, C 192-223, D 224-239, E 240-255.
127.0.0.1 = loopback; private ranges 10.x, 172.16-31.x, 192.168.x.
Class C network = 254 usable hosts; MAC = 48-bit physical, IP = logical.
Practice: 16 questions
Sets of 10, mixed across the question types above. Every answer has a step-by-step explanation.
Topic test · 10 questions
Suggested time 5 min · wrong answers go to your mistake notebook automatically.