# Q1D · IPv4 address block

Subject: Computer Networks

Exam: TEE

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-a/q1d

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-a--q1d/

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### TEE practice mock · Q1D. One address in a block is 192.168.8.173/27. Find its subnet mask, first/last address, total address count and ordinary usable-host range. [5 mock marks]

#### Answer

## Given

IP/prefix = `192.168.8.173/27`.

## To find

The complete containing address block and its usable host range.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$





$$
\text{step}=256-\text{changing mask octet}
$$



Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.

## Step-by-step solution

#### Step 1. Count host bits and addresses

h=32−27=5; N=25=32.

#### Step 2. Construct the mask

Mask=`255.255.255.224`; binary=`11111111.11111111.11111111.11100000`.

#### Step 3. Find the changing-octet interval

The changing octet is number 4. Its mask value is 224, so step=256−224=32. The IP value 173 lies in 160…191.

#### Step 4. Form the first/network address

Keep earlier octets; place 160 in octet 4; set any later octets to zero. Network=**192.168.8.160**.

#### Step 5. Show the AND operation

| Octet | IP bits | Mask bits | AND result | Decimal |
| --- | --- | --- | --- | --- |
| 1 | 11000000 | 11111111 | 11000000 | 192 |
| 2 | 10101000 | 11111111 | 10101000 | 168 |
| 3 | 00001000 | 11111111 | 00001000 | 8 |
| 4 | 10101101 | 11100000 | 10100000 | 160 |

#### Step 6. Form the last/broadcast address

Use 191 in the changing octet and 255 in any later octets. Broadcast=**192.168.8.191**.

#### Step 7. State usable hosts

First usable=192.168.8.161; last usable=192.168.8.190; count=32−2=30.

**Final answer:** Network 192.168.8.160; broadcast 192.168.8.191; 32 total, 30 ordinary usable; range 192.168.8.161–192.168.8.190.

#### What this result means

The first address in a block means its network address. It is different from the first usable host address.
