CS FundamentalsVery hardGATE CS (PYQ pattern)

A router ACL entry matches an address if every bit position where the wildcard mask has a 0 equals the corresponding bit of 192.168.4.0. The wildcard mask is 0.0.2.255. How many IPv4 addresses does the entry match, and which third-octet values are included?

  1. A. 256 addresses; third octet 4 only
  2. B. 512 addresses; third octet 4 and 5
  3. C. 1024 addresses; third octet 4, 5, 6 and 7
  4. D. 512 addresses; third octet 4 and 6

Correct answer: D. 512 addresses; third octet 4 and 6

Wildcard bits that are 1 are 'don't care'. In the third octet only bit value 2 is don't care: 4 = 100b and 6 = 110b match, 5 and 7 do not (bit 0 must stay 0). With the whole fourth octet free this is 2 x 256 = 512 addresses.

More Computer Networks questions

Exams that ask this topic