Before you use the ip ospf area command to enable OSPFv2 on an interface, we recommend that you understand the following scenarios and command behavior.
There are implications to using the network area command (configuring OSPFv2 in router configuration mode) versus using the ip ospf area command (configuring OSPFv2 in interface configuration mode).
Interface Is Already OSPFv2-Enabled by network area Command with Same Area and Process
If you enter the ip ospf area command on an interface that is enabled in OSPFv2 by the network area command, the process ID or area ID of the interface does not change, and the interface status will not be changed. However,
the interface will be flagged as being configured from interface configuration mode, and the configuration data will be saved
in the interface description block (IDB).
Interface Is Already Configured by network area Command with Different Area or Process
If you enter the ip ospf area command on an interface that is enabled in OSPFv2 by the network area command, but you change the configuration by changing the process ID and area ID of the interface, after the new configuration
information is stored in the IDB, the interface will be removed and reattached. Therefore, the interface will be removed from
the original area and process and be added to the new ones. The state of the interface will also be reset.
Interface Is Not Configured by network area Command
If the interface is not enabled in OSPFv2 by the network area command, the area and OSPF router instance will be created if needed. When the router is reloaded, the OSPF process will
not begin running until system initialization is complete. To remove an OSPF router instance, enter the no router ospf command. Removing the ip ospf area command in interface mode will not result in removing an OSPF router instance.
Removing an ip ospf area Command
When the ip ospf area command is removed, the interface will be detached from the area. The area will be removed if it has no other attached interfaces.
If the interface address is covered by the network area command, the interface will be enabled once again in the area for the network that it is in.
New Processes
If an OSPF process does not already exist, and a router ID cannot be chosen when either the router ospf command or the interface command is configured, a Proximity Database (PDB) and a process will be created, but the process will be inactive. The process
will become active when a router ID is chosen, either when it is explicitly configured using the router-id command or when an IP address becomes available. Note that the router ospf command will now be accepted even if a router ID cannot be chosen, putting the command-line interface (CLI) into the OSPF
configuration context. Therefore, the router-id command is to be entered before an IP address is available. If the process is not active and the show ip ospf command is entered, the message "%OSPF: Router process X is not running, please provide a router-id" will be displayed.
Link-State Advertisements and Shortest Path First
If a state change occurs as a result of the ip ospf area command, new router link-state advertisements (LSAs) will be generated (also for the old area, if the interface is changing
areas) and shortest path first (SPF) will be scheduled to run in both the old and new areas.