Computer Networks · TEE · mocks

Q1D · IPv4 address block

TEE mock B · full paper

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

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

Answer

Given

IP/prefix = 10.20.45.200/20.

To find

The complete containing address block and its usable host range.

Formula and why

h=32-p,\qquad N=2^hLaTeX: h=32-p,\qquad N=2^h
\text{step}=256-\text{changing mask octet}LaTeX: \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−20=12; N=212=4,096.

Step 2. Construct the mask

Mask=255.255.240.0; binary=11111111.11111111.11110000.00000000.

Step 3. Find the changing-octet interval

The changing octet is number 3. Its mask value is 240, so step=256−240=16. The IP value 45 lies in 32…47.

Step 4. Form the first/network address

Keep earlier octets; place 32 in octet 3; set any later octets to zero. Network=10.20.32.0.

Step 5. Show the AND operation

OctetIP bitsMask bitsAND resultDecimal
100001010111111110000101010
200010100111111110001010020
300101101111100000010000032
41100100000000000000000000

Step 6. Form the last/broadcast address

Use 47 in the changing octet and 255 in any later octets. Broadcast=10.20.47.255.

Step 7. State usable hosts

First usable=10.20.32.1; last usable=10.20.47.254; count=4096−2=4094.

Final answer: Network 10.20.32.0; broadcast 10.20.47.255; 4,096 total, 4,094 ordinary usable; range 10.20.32.1–10.20.47.254.