Computer Networks · M2 · read

Complete block · 192.168.2.129/25

Subnetting: first address, last address and host range

Unit 4 · masks, subnetting and CIDR

Practice question. For the IPv4 address 192.168.2.129/25, determine the mask, network address, broadcast address, total addresses and usable host range. [3 practice marks]

Answer

Given

IP/prefix = 192.168.2.129/25.

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−25=7; N=27=128.

Step 2. Construct the mask

Mask=255.255.255.128; binary=11111111.11111111.11111111.10000000.

Step 3. Find the changing-octet interval

The changing octet is number 4. Its mask value is 128, so step=256−128=128. The IP value 129 lies in 128…255.

Step 4. Form the first/network address

Keep earlier octets; place 128 in octet 4; set any later octets to zero. Network=192.168.2.128.

Step 5. Show the AND operation

OctetIP bitsMask bitsAND resultDecimal
1110000001111111111000000192
2101010001111111110101000168
30000001011111111000000102
4100000011000000010000000128

Step 6. Form the last/broadcast address

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

Step 7. State usable hosts

First usable=192.168.2.129; last usable=192.168.2.254; count=128−2=126.

Final answer: Network 192.168.2.128; broadcast 192.168.2.255; 128 total, 126 ordinary usable; range 192.168.2.129–192.168.2.254.