OSPF network command

In order for an OSPF router to establish neighbor adjacencies, the network command must be issued under the router OSPF configuration mode. The command must be issued for an IP address range that contains the subnet of a particular local interface. Only then will a neighbor adjacency be established via that interface.

For example, R1 has GigabitEthernet0/1 with an IPv4 address and subnet mask combination of The OSPF configuration has the following network command:

network area 0

Because the network to which the interface belongs is found within the network defined by the network command, interface GigabitEthernet0/1 will actively participate in OSPF, and will attempt to establish an OSPF adjacency via that interface.

Similarly, the following command will cause all interfaces on an OSPF router to being to actively participate in OSPF:

network area 0

Because this defines all IP addresses, all active interfaces on the router will begin participating in OSPF in area 0.

OSPFv3 uses interface command rather than the network command to indicate which subnets and interfaces will participate in OSPF.




Links to this page: