Table Of Contents
Area Command in Interface Mode for OSPFv2
Prerequisites for Area Command in Interface Mode for OSPFv2
Restrictions for Area Command in Interface Mode for OSPFv2
Information About Area Command in Interface Mode for OSPFv2
Benefits of Area Command in Interface Mode for OSPFv2 Feature
Configuration Guidelines for the Area Command in Interface Mode for OSPFv2 Feature
How to Enable Area Command in Interface Mode for OSPFv2
Enabling OSPFv2 on an Interface
Configuration Examples for Area Command in Interface Mode for OSPFv2 Feature
Enabling OSPFv2 on an Interface: Example
Feature Information for Area Command in Interface Mode for OSPFv2
Area Command in Interface Mode for OSPFv2
First Published: August 09, 2004Last Updated: February 19, 2007This document describes how to enable Open Shortest Path First version 2 (OSPFv2) on a per-interface basis to simplify the configuration of unnumbered interfaces. The ip ospf area command allows you to enable OSPFv2 explicitly on an interface. The ip ospf area command is an alternative to enabling OSPFv2 through the address of the interface that matches the address range specified by the network area command.
Finding Feature Information in This Module
Your Cisco IOS software release may not support all of the features documented in this module. To reach links to specific feature documentation in this module and to see a list of the releases in which each feature is supported, use the "Feature Information for Area Command in Interface Mode for OSPFv2" section.
Finding Support Information for Platforms and Cisco IOS and Catalyst OS Software Images
Use Cisco Feature Navigator to find information about platform support and Cisco IOS and Catalyst OS software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required.
Contents
•Prerequisites for Area Command in Interface Mode for OSPFv2
•Restrictions for Area Command in Interface Mode for OSPFv2
•Information About Area Command in Interface Mode for OSPFv2
•How to Enable Area Command in Interface Mode for OSPFv2
•Configuration Examples for Area Command in Interface Mode for OSPFv2 Feature
•Feature Information for Area Command in Interface Mode for OSPFv2
Prerequisites for Area Command in Interface Mode for OSPFv2
OSPFv2 must be running on your network.
Restrictions for Area Command in Interface Mode for OSPFv2
The ip ospf area command is supported only for OSPFv2.
Information About Area Command in Interface Mode for OSPFv2
This section contains the following information:
•Benefits of Area Command in Interface Mode for OSPFv2 Feature
•Configuration Guidelines for the Area Command in Interface Mode for OSPFv2 Feature
Benefits of Area Command in Interface Mode for OSPFv2 Feature
OSPF is enabled on an interface when the network address for the interface matches the range of addresses that is specified by the network area command that is entered in router configuration mode. You can enable OSPFv2 explicitly on an interface with the ip ospf area command that is entered in interface configuration mode. This capability simplifies the configuration of unnumbered interfaces with different areas.
Because the ip ospf area command is configured explicitly for an interface, it will supersede the effects of the network area command that is entered at the network level to affect the interfaces whose addresses fall within the address range specified for the network area command.
If you later disable the ip ospf area command, the interface still will run OSPFv2 as long as its network address matches the range of addresses that is specified by the network area command.
Configuration Guidelines for the Area Command in Interface Mode for OSPFv2 Feature
When you use the ip ospf area command in interface configuration mode to enable OSPFv2 on an interface, we recommend that you be familiar with the following guidelines.
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 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 interface enable Command
When the interface enable 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 interface enable 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.
How to Enable Area Command in Interface Mode for OSPFv2
This section contains the following procedure:
•Enabling OSPFv2 on an Interface (required)
Enabling OSPFv2 on an Interface
Perform this task to enable OSPFv2 on an interface.
SUMMARY STEPS
1. enable
2. configure terminal
3. interface type number
4. ip ospf process-id area area-id [secondaries none]
5. end
6. show ip ospf interface [interface-type interface-number]
DETAILED STEPS
Configuration Examples for Area Command in Interface Mode for OSPFv2 Feature
This section provides the following configuration example:
•Enabling OSPFv2 on an Interface: Example
Enabling OSPFv2 on an Interface: Example
In the following example, OSPFv2 is configured explicitly on Ethernet interface 0/0/0:
Router(config)# interface Ethernet 0/0/0Router(config-if)# bandwidth 10000Router(config-if)# ip address 172.16.1.1 255.255.255.0Router(config-if)# ip ospf hello-interval 1Router(config-if)# ip ospf 1 area 0When the show ip ospf interface command is entered, the following output shows that Ethernet interface 0/0/0 was configured in interface configuration mode to run OSPFv2. The secondary IP addresses on the interface will also be advertised:
Router# show ip ospf interface Ethernet 0/0/0Ethernet0/0/0 is up, line protocol is upInternet Address 172.16.1.1/24, Area 0Process ID 1, Router ID 172.16.11.11, Network Type BROADCAST, Cost: 10Enabled by interface config, including secondary ip addressesTransmit Delay is 1 sec, State DR, Priority 1Designated Router (ID) 172.16.11.11, Interface address 172.16.1.1Backup Designated router (ID) 172.16.22.11, Interface address 172.16.1.2Timer intervals configured, Hello 1, Dead 4, Wait 4, Retransmit 5oob-resync timeout 40Hello due in 00:00:00Supports Link-local Signaling (LLS)Index 2/2, flood queue length 0Next 0x0(0)/0x0(0)Last flood scan length is 1, maximum is 1Last flood scan time is 0 msec, maximum is 0 msecNeighbor Count is 1, Adjacent neighbor count is 1Adjacent with neighbor 172.26.22.11 (Backup Designated Router)Suppress hello for 0 neighbor(s)Additional References
The following sections provide references related to the Area Command in Interface Mode for OSPFv2 feature.
Related Documents
Related Topic Document TitleCisco IOS commands
OSPF commands
Cisco IOS IP Routing: Protocol-Independent Command Reference
OSPF configuration tasks
"Configuring OSPF" in the Cisco IOS IP Routing Protocols Configuration Guide
Standards
Standard TitleNo new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.
—
MIBs
RFCs
Technical Assistance
Command Reference
This section documents only commands that are modified.
ip ospf area
To enable Open Shortest Path First version 2 (OSPFv2) on an interface, use the ip ospf area command in interface configuration mode. To disable OSPFv2 on the interface, use the no form of this command.
ip ospf process-id area area-id [secondaries none]
no ip ospf process-id area [secondaries none]
Syntax Description
Command Default
If the secondaries none keywords are entered in the no form of this command, the secondary IP addresses will be advertised. If the secondaries none keywords are not present, OSPFv2 will be disabled.
Command Modes
Interface configuration
Command History
Usage Guidelines
OSPF is enabled on an interface when the network address for the interface matches the range of addresses that is specified by the network area command that is entered in router configuration mode. You can enable OSPFv2 explicitly on an interface with the ip ospf area command that is entered in interface configuration mode. This capability simplifies the configuration of unnumbered interfaces with different areas.
The ip ospf area command that is entered in interface configuration mode will supersede the effects of the network area command. Therefore, an interface that is configured with the ip ospf area command in interface configuration mode will not be affected by the network area command.
Note If you later disable the ip ospf area command, the interface will still run OSPFv2 as long as its network address matches the range of addresses that is specified by the network area command.
Examples
The following example enables OSPFv2 on Ethernet interface 0/0/2 and prevents secondary IP addresses from being advertised:
Router(config)# interface Ethernet0/0/2
Router(config-if)# ip ospf 10 area 0 secondaries noneRelated Commands
Feature Information for Area Command in Interface Mode for OSPFv2
Table 1 lists the release history for this feature.
Not all commands may be available in your Cisco IOS software release. For release information about a specific command, see the command reference documentation.
Use Cisco Feature Navigator to find information about platform support and software image support. Cisco Feature Navigator enables you to determine which Cisco IOS and Catalyst OS software images support a specific software release, feature set, or platform. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required.
Note Table 1 lists only the Cisco IOS software release that introduced support for a given feature in a given Cisco IOS software release train. Unless noted otherwise, subsequent releases of that Cisco IOS software release train also support that feature.
CCVP, the Cisco Logo, and the Cisco Square Bridge logo are trademarks of Cisco Systems, Inc.; Changing the Way We Work, Live, Play, and Learn is a service mark of Cisco Systems, Inc.; and Access Registrar, Aironet, BPX, Catalyst, CCDA, CCDP, CCIE, CCIP, CCNA, CCNP, CCSP, Cisco, the Cisco Certified Internetwork Expert logo, Cisco IOS, Cisco Press, Cisco Systems, Cisco Systems Capital, the Cisco Systems logo, Cisco Unity, Enterprise/Solver, EtherChannel, EtherFast, EtherSwitch, Fast Step, Follow Me Browsing, FormShare, GigaDrive, GigaStack, HomeLink, Internet Quotient, IOS, iPhone, IP/TV, iQ Expertise, the iQ logo, iQ Net Readiness Scorecard, iQuick Study, LightStream, Linksys, MeetingPlace, MGX, Networking Academy, Network Registrar, Packet, PIX, ProConnect, RateMUX, ScriptShare, SlideCast, SMARTnet, StackWise, The Fastest Way to Increase Your Internet Quotient, and TransPath are registered trademarks of Cisco Systems, Inc. and/or its affiliates in the United States and certain other countries.
All other trademarks mentioned in this document or Website are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (0612R)
Any Internet Protocol (IP) addresses used in this document are not intended to be actual addresses. Any examples, command display output, and figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses in illustrative content is unintentional and coincidental.
© 2004-2005, 2007 Cisco Systems, Inc. All rights reserved