Cisco CCNA (200-301)IP ConnectivityEasy
A network engineer is configuring OSPFv2 on a router. The router has a GigabitEthernet0/0 interface with IP address 192.168.1.1/28. Which 'network' command and wildcard mask combination will correctly enable OSPF on this interface?
- Anetwork 192.168.1.0 0.0.0.15 area 0
- Bnetwork 192.168.1.1 0.0.0.0 area 0
- Cnetwork 192.168.1.1 255.255.255.240 area 0
- Dnetwork 192.168.1.0 0.0.0.255 area 0
Show answer & explanationAnswer & explanation
Correct answer: A. network 192.168.1.0 0.0.0.15 area 0
The IP address 192.168.1.1/28 belongs to the subnet 192.168.1.0/28. A /28 subnet mask is 255.255.255.240. To calculate the wildcard mask, subtract the subnet mask from 255.255.255.255, resulting in 0.0.0.15 (255.255.255.255 - 255.255.255.240 = 0.0.0.15). The network command uses the network address and the wildcard mask.
Why the other options are wrong
- B. This command enables OSPF only on the specific IP address 192.168.1.1 if it's a host route, but typically OSPF is enabled on a network range.
- C. The second part of the 'network' command requires a wildcard mask, not a subnet mask.
- D. A wildcard mask of 0.0.0.255 corresponds to a /24 subnet, not a /28.
OSPF Wildcard Mask Calculation
To calculate the OSPF wildcard mask, subtract the subnet mask from 255.255.255.255. The 'network' command uses the network address and this wildcard mask.
- Wildcard mask is inverse of subnet mask.
- Used in OSPF 'network' command to define interface participation.
- 255.255.255.255 - subnet_mask = wildcard_mask.
Memory trick: Network needs two: Address for the start, Wildcard for the reach, Area to belong.