Computer Networks · M2 · mocks

Q2 · Allocate three VLSM blocks

M2 mock B

Q1(a)+Q1(b) compulsory; choose any two of Q2/Q3/Q4 · 10 marks attempted

Question. Allocate non-overlapping VLSM subnets inside 192.168.40.0/24 for A: 60 usable hosts, B: 30 usable hosts, C: 12 usable hosts. Allocate largest requirements first. Give all ranges and unallocated addresses. [3 practice marks]

Answer

Given

DepartmentUsable hosts
A60
B30
C12

To find

An aligned subnet for each department, usable ranges, broadcasts and remaining addresses.

Formula and why

2^h-2\geq H,\quad p=32-hLaTeX: 2^h-2\geq H,\quad p=32-h

Choose the smallest sufficient subnet per requirement. Align each start to its block size and never overlap a previously assigned range.

Step-by-step solution

Step 1. Sort the host requirements

A (60) → B (30) → C (12)

Step 2. A · choose and allocate

60 hosts require 26−2=62 usable; a smaller /27 would give 30. Choose /26. The next aligned block is 192.168.40.0/26; it ends at 192.168.40.63.

Step 3. B · choose and allocate

30 hosts require 25−2=30 usable; a smaller /28 would give 14. Choose /27. The next aligned block is 192.168.40.64/27; it ends at 192.168.40.95.

Step 4. C · choose and allocate

12 hosts require 24−2=14 usable; a smaller /29 would give 6. Choose /28. The next aligned block is 192.168.40.96/28; it ends at 192.168.40.111.

Step 5. Write the complete allocation

GroupHostsNetwork/prefixMaskUsable rangeBroadcastSpare usable
A60192.168.40.0/26255.255.255.192192.168.40.1–192.168.40.62192.168.40.632
B30192.168.40.64/27255.255.255.224192.168.40.65–192.168.40.94192.168.40.950
C12192.168.40.96/28255.255.255.240192.168.40.97–192.168.40.110192.168.40.1112

Step 6. Count addresses reserved and left

Reserved=64+32+16=112. Parent total=256. Unallocated=256−112=144.

Final answer: 112 total addresses reserved; 144 unallocated. The table gives one valid complete allocation.