ELEC3506

Network LayerLecture 518 min

Classful Addressing

The five address classes, which first-octet ranges Lecture 5 actually states, and the two it leaves for the RFCs to fill in.

By the end of this page you should be able to

  • Identify an address's class from its first octet or its leading bits
  • State which class ranges Lecture 5 gives directly and which come from the RFCs
  • Explain why 0.0.0.0/8 and 127.0.0.0/8 are not usable Class A host addresses
  • Derive a missing class boundary the same way the lecture derives the ones it does state

The idea

Before CIDR, a router had no separate mask to consult — the class had to be readable from the address itself. Put the network/host boundary in the leading bits of the first octet, and any router can tell where it falls just by looking. That is the entire idea behind classful addressing: five classes, each announcing itself by how many leading bits are set to 1 before the first 0.

Lecture 5 gives that self-announcing pattern for three of the five classes directly, each with a worked example. It never states the other two as a number — which matters, because an exam question can sit exactly on the gap.

The three the lecture states

How it works

B, D and E — read straight off the slides

Each class occupies a fixed slice of the first octet, identified by a leading-bit pattern that gets one bit longer per class:

ClassFirst octetLeading bitsExample (lecture)
B128–19110134.11.78.56
D224–2391110227.12.14.87
E240–2551111252.5.15.111
Every one of these numbers and examples is stated in Lecture 5. D is multicast (one-to-many); E is reserved. Neither is assigned to individual hosts.

Worked example

Find the class — the lecture's own three

  1. 227.12.14.87. First byte 227, which sits between 224 and 239 — Class D. Binary: 227 = 11100011, leading bits 1110.

  2. 252.5.15.111. First byte 252, between 240 and 255 — Class E. Binary: 252 = 11111100, leading bits 1111.

  3. 134.11.78.56. First byte 134, between 128 and 191 — Class B. Binary: 134 = 10000110, leading bits 10.

Answer227.12.14.87 = D, 252.5.15.111 = E, 134.11.78.56 = B

The two it doesn’t

How it works

A and C — derived the same way, not stated the same way

The lecture never gives a first-octet range for Class A or Class C. Neither range is a mystery, though — the same leading-bit logic the three worked examples above already use fills both gaps, and Lecture 5’s own “Reserved Addresses” table hands over one extra piece for Class A directly.

Class A. With no leading 1-bit at all, the pattern is just 0 — which mathematically spans the whole 0127 first-octet range (0 is 00000000, 127 is 01111111, and 128, where Class B starts, is 10000000). But two blocks inside that range are carved out and never handed to a host. Lecture 5’s Reserved Addresses table lists both directly: 0.0.0.0 to 0.255.255.255 as “This” Network — a way of referring to the local network itself, not a destination — and 127.0.0.0 to 127.255.255.255 as Loopback, reserved for a host talking to itself (most commonly 127.0.0.1). RFC 1122 §3.2.1.3 is what actually fixes the loopback carve-out; the lecture’s table just confirms the same two blocks by name. That leaves 1126 as the range you can actually assign.

Class C. No worked example, no stated range — but it has to be whatever sits between where B ends and D begins. B’s range tops out at 191 (10111111); D’s starts at 224 (11100000). Everything in between, 192223, is Class C, with the three-bit leading pattern 110 (192 = 11000000).

ClassFirst octetSourceLeading bitsNet : host splitDefault mask
A0–127 (math)
1–126 (usable)
RFC 1122 — not stated by Lecture 501 : 3 bytes255.0.0.0
B128–191Lecture 5102 : 2 bytes255.255.0.0
C192–223Not stated by Lecture 51103 : 1 byte255.255.255.0
D224–239Lecture 51110multicast — no host split
E240–255Lecture 51111reserved — no host split
The default mask and network:host split follow directly from the number of leading fixed bits in each range above — they are not a separate fact to memorise. Once you know a class's leading-bit count, the mask falls out automatically.

Aside

The lecture’s own Reserved Addresses table goes well beyond just Class A — it also lists blocks like 169.254.0.0/16 (link-local) and several ranges marked “reserved but subject to allocation”. The three RFC 1918 private blocks are in there too (10/8, 172.16/12, 192.168/16), but those belong with NAT, covered on the next page. This page only pulls out the two entries that matter for the classful boundary question.

Where marks get lost

0 and 127 are the trap

“Class A is 1 to 126” is true for the usable range, but a question can ask about 0.x.x.x or 127.x.x.x specifically to catch a student who memorised only the short version. Both addresses are Class A by the leading-bit test — neither is assignable. 0.0.0.0/8 means “this network,” not a host; 127/8 is loopback. State both the mathematical range and the usable range, and say which of the two a question is actually asking about.

Check yourself

Quick check: a router receives a datagram with source address 191.9.9.9. What class, and how do you know without looking anything up?

Answer: 191 sits in the stated Class B range (128 to 191) — it is the very top of it. Binary check: 191 = 10111111, leading bits 10, confirming Class B. One more than 191, i.e. 192, is where Class C begins.

In the exam

  • B, D, E are Lecture 5’s own numbers — cite them as such. A, C are derived, not stated; say so if asked where a range comes from.
  • State both forms of the Class A range. 0127 mathematically, 1126 usable, and name the two carve-outs by what they mean, not just their numbers.
  • 0.x.x.x and 127.x.x.x are the specific trap. Both are Class A by the bit pattern; neither is assignable.
  • Class C by elimination. 192223 is whatever is left between B and D — you can derive it in one line rather than needing to have memorised it.
  • Finding the network address itself — the AND of address and mask — is not a separate class-specific skill. It is the same mechanism the CIDR and Subnetting page covers in full, just with a fixed default mask instead of a variable-length one.

Check yourself

  1. Which of these is a valid, assignable Class A host address?
  2. An address begins with 134. What class is it, and how does the lecture show this?
  3. Why is the Class C range, 192 to 223, not simply "in the lecture"?
  4. A first octet of 227 is class D. What is 227 in binary, and what leading-bit pattern confirms it?
  5. A question gives you the address 0.12.4.9. Which class is it?