# Q3(b) · Classful net/host IDs and /26 host

Subject: Computer Networks

Exam: TEE

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-legacy-reexam/q3b

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q3b/

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q3(b). (i) Find the netid and the hostid of the following classfull addresses: a. 114.34.2.8 b. 208.34.54.12 [5]. (ii) what is the last valid host on the subnetwork 165.21.80.128/26? [5] [10 marks]

### Answer

An IPv4 address identifies an IP interface. The network prefix selects the destination network; remaining bits identify an address within it. Classful addressing is historical; modern routing uses explicit CIDR prefixes.

| Class | First octet | Default mask | Network / host split | Purpose |
| --- | --- | --- | --- | --- |
| A | 1–126 (ordinary unicast) | 255.0.0.0 (/8) | 8 / 24 bits | Large historical unicast networks; 0 and 127 reserved |
| B | 128–191 | 255.255.0.0 (/16) | 16 / 16 bits | Medium historical unicast networks |
| C | 192–223 | 255.255.255.0 (/24) | 24 / 8 bits | Small historical unicast networks |
| D | 224–239 | No unicast default mask | Not network/host class split | Multicast |
| E | 240–255 | No unicast default mask | Not normal unicast allocation | Reserved/experimental; special addresses exist |

Example: 114.34.2.8 is class A with network 114.0.0.0 and host portion 34.2.8. Class does not override an explicitly supplied CIDR prefix.

### Classful split

| Address | Class and mask | Network ID | Host ID |
| --- | --- | --- | --- |
| 114.34.2.8 | A /8 | 114.0.0.0 | 34.2.8 (24-bit host portion) |
| 208.34.54.12 | C /24 | 208.34.54.0 | 12 (8-bit host portion) |

### Last valid host of 165.21.80.128/26

### Given

165.21.80.128/26

### To find

First and last addresses and total block size.

### Formula and why



$$
N=2^{32-p}
$$



p is the prefix length. The remaining host bits vary through every combination. The network address is the first address; setting all host bits to one gives the last address.

### Step 1. Find host bits

32 − 26 = 6. N = 64.

### Step 2. Locate the aligned block

Mask = 255.255.255.192. The first varying octet is octet 4; its block width is 64. The supplied value 128 lies in the interval 128–191. Keep earlier octets fixed. Set any later octets to 0 for the first address and 255 for the last address.

### Step 3. Write the result

First = **165.21.80.128**; last = **165.21.80.191**; total = **64** addresses. Usual usable host range: 165.21.80.129–165.21.80.190.

**Asked host answer: 165.21.80.190**; .191 is broadcast, not a usable host.
