ExamShortcut

Networking: Devices, Topologies & Protocols

🔒 Log in to track
high importance⚡ 12 shortcuts5 subtopics
All subtopics·Subtopic 4 of 5

IP addressing: IPv4 classes and IPv6

🔒 Log in to track
⏱ 5 min read🧩 4 question types🎯 16 practice Q
The idea in one minute

IPv4 = 32-bit address, four octets 0-255 in dotted decimal (192.168.1.1). The first octet fixes the class:

ClassFirst octetDefault maskHosts/networkUse
A1 - 126255.0.0.0 (/8)1,67,77,214Huge networks
B128 - 191255.255.0.0 (/16)65,534Large organisations
C192 - 223255.255.255.0 (/24)254Small networks
D224 - 239--Multicasting
E240 - 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.

01

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:

ClassFirst octetDefault maskUse
A1 - 126255.0.0.0giant networks
B128 - 191255.255.0.0medium networks
C192 - 223255.255.255.0small networks (most common)
D224 - 239—multicasting
E240 - 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.

02

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.
03

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.

04

MAC vs IP — the twins that get swapped

MAC addressIP address
Typephysical, burnt into the NIClogical, assigned by network/DHCP
Size48 bitsIPv4 32 bits / IPv6 128 bits
Changesnever (factory-fixed)changes with the network
Used byswitches (L2)routers (L3)
05

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".

06

Question types you will see

Each type: how to recognise it, the method step by step, and one question to try.

Type 1very common4 practice Q

IP class identification

How to spot it:

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.

Method
  1. Read the FIRST octet only: 1-126 = A, 128-191 = B, 192-223 = C, 224-239 = D (multicast), 240-255 = E.

  2. 127 is loopback, not Class A usage.

  3. Anchor the ruler: 1, 128, 192, 224, 240.

Try this

The IP address 196.20.5.1 belongs to which class?

Show solution

Class C — the first octet 196 lies between 192 and 223.

Type 2very common3 practice Q

Private ranges and loopback

How to spot it:

'Which is a private IP address', 'what is 127.0.0.1', 'which address is reserved for testing/localhost'.

Method
  1. Private ranges: 10.x.x.x, 172.16-31.x.x, 192.168.x.x — home routers use 192.168.x.x.

  2. 127.0.0.1 = loopback/localhost — the machine testing itself.

  3. 169.254.x.x = auto-configuration failure (APIPA) — optional extra.

Try this

The address 127.0.0.1 is used for —

Show solution

Loopback testing (localhost) — the computer communicates with itself without touching the network.

Type 3common3 practice Q

IPv4 vs IPv6 facts

How to spot it:

'IPv4 has how many bits', 'IPv6 addresses are written in ___', 'how many groups in an IPv6 address', or why IPv6 was needed.

Method
  1. IPv4 = 32 bits, four dotted decimal octets (0-255), about 4.3 billion addresses.

  2. IPv6 = 128 bits, 8 groups of hexadecimal digits separated by colons.

  3. The need: IPv4 addresses ran out — 4.3 billion is less than the connected world.

Try this

An IPv6 address is how many bits long?

Show solution

128 bits — eight hexadecimal groups, e.g. 2001:0db8:85a3::8a2e:0370:7334.

Type 4common3 practice Q

MAC vs IP and usable-host counts

How to spot it:

'Difference between MAC and IP address', 'how many hosts can a Class C network have', 'which address changes when you shift networks'.

Method
  1. MAC = 48-bit, physical, burnt in, permanent; IP = logical, assigned, changes with network.

  2. Class C hosts: 256 addresses minus network and broadcast = 254 usable.

  3. Class B: 65,534 usable; Class A: 1,67,77,214 usable.

Try this

How many usable host addresses does a Class C network provide?

Show solution

254 — 256 total minus the network address and the broadcast address.

07

Shortcuts that save time

⚡ Class ruler

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.

Example

Class of 172.16.0.1?

Show solution

B (first octet 172 lies in 128-191).

⚡ Loopback = 127

127.0.0.1 = localhost - pinging it tests your own TCP/IP stack, never the cable. Any question with 127.x wants 'loopback'.

Example

Pinging 127.0.0.1 tests?

Show solution

The local machine's own TCP/IP configuration.

⚡ IPv4 vs IPv6 size

IPv4 = 32-bit dotted decimal; IPv6 = 128-bit colon-hex. 'Runs out of addresses' questions -> IPv6 as the fix.

Example

How many bits does an IPv6 address have?

Show solution
08

Mistakes to avoid

Where most students lose marks on this subtopic.

Mistake 01

Placing 127.0.0.1 in Class A usage - 127 is reserved loopback; Class A networks proper end at 126.

Mistake 02

Calling 192.168.1.1 a public address - it is the classic private home-router address.

Mistake 03

Confusing MAC (48-bit, physical, burnt into NIC) with IP (logical, assignable).

09

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.

10

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.