Cisco CCNA (200-301)IP ConnectivityMedium

A network engineer needs to enable OSPF on a router interface configured with IP address 192.168.20.65/26. Which command correctly includes this interface's subnet in OSPF area 0?

  1. Arouter(config-router)# network 192.168.20.0 0.0.0.255 area 0
  2. Brouter(config-router)# network 192.168.20.64 0.0.0.31 area 0
  3. Crouter(config-router)# network 192.168.20.64 0.0.0.255 area 0
  4. Drouter(config-router)# network 192.168.20.64 0.0.0.63 area 0
Show answer & explanation

Correct answer: D. router(config-router)# network 192.168.20.64 0.0.0.63 area 0

A /26 mask (255.255.255.192) has a block size of 64, making the wildcard mask 0.0.0.63 (64 - 1). The network address for 192.168.20.65/26 is 192.168.20.64, so the correct command is 'network 192.168.20.64 0.0.0.63 area 0'.

Why the other options are wrong

  • A. 192.168.20.0 with a /24 wildcard does not accurately represent the /26 subnet boundary.
  • B. 0.0.0.31 corresponds to a /27 mask, not the /26 in use here.
  • C. 0.0.0.255 corresponds to a /24 mask, far too broad for this /26 subnet.

OSPF Wildcard Mask Calculation

The wildcard mask used in the OSPF network statement is the inverse of the subnet mask, calculated as 255 minus each subnet mask octet (or block size minus 1 for the interesting octet).

  • /26 = 255.255.255.192 -> wildcard 0.0.0.63
  • /24 = 255.255.255.0 -> wildcard 0.0.0.255
  • /27 = 255.255.255.224 -> wildcard 0.0.0.31

Memory trick: Block size minus one equals your wildcard.

More IP Connectivity questions