liveBook · Manning

Network command

As explained in Acing the CCNA Exam: Volume 1 Fundamentals and Protocols

The network command is a Cisco IOS routing-protocol configuration command that selects interfaces for protocol activation based on IP-address matching and a wildcard mask.

The network command activates a routing protocol on router interfaces whose IP addresses match a specified range. Matching interfaces advertise their network prefixes to neighbors. For OSPF, enter router configuration mode with router ospf process-id, then use network ip-address wildcard-mask area area-id. section 17.4 section 17.5

Read the wildcard mask as a bit-by-bit matching rule:

  • A 0 bit requires the corresponding bits in the command address and interface address to match. section 17.5
  • A 1 bit allows the corresponding bits to differ, so the command can select an address range rather than one subnet. section 17.4 section 17.5
  • The wildcard mask resembles an inverted netmask: 255.255.255.0 corresponds to 0.0.0.255, while /30 corresponds to 0.0.0.3. section 17.5
  • Use area 0 in these OSPF examples; the process ID identifies the OSPF process entered before router configuration. section 17.4

Selecting several interfaces

R1(config)# router ospf 1 R1(config-router)# network 192.168.1.0 0.0.0.7 area 0 R1(config-router)# network 192.168.2.1 0.0.0.0 area 0 The first command matches interfaces at 192.168.1.1 and 192.168.1.5 because the final three bits may vary. The second matches only the interface at 192.168.2.1 because every bit must match.

How Acing the CCNA Exam: Volume 1 Fundamentals and Protocols covers it

How deep it goes
Explains OSPF syntax, wildcard-mask bit matching, and binary examples, while deferring multiple OSPF processes and detailed OSPF areas.
Examples
Demonstrates exact-interface, multi-interface, /30, /24, and binary wildcard-mask configurations on Cisco routers.
What it assumes
Assumes Cisco IOS configuration modes and interface IP addresses, while teaching wildcard-mask matching from bit-level fundamentals.
What you can do after
Configure OSPF activation with network commands and verify the configured networks using show ip protocols.
How it connects
Connects routing protocols, OSPF areas, interfaces, IP addresses, netmasks, wildcard masks, and route advertisement.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Acing the CCNA Exam: Volume 1 Fundamentals and Protocols. The section links point to the parts of the book it draws on.