ip ospf <instance-tag> area

Syntax

ip ospf <INSTANCE-TAG> area <AREA-ID>

no ip ospf <INSTANCE-TAG> area <AREA-ID>

Description

Runs the OSPF protocol on the interface with the configured IPv4 address for the area specified. The interfaces which have an IP address configured in this network or in a subset of this network, will participate in the OSPF protocol.

For moving an interface to a new area, unmap the existing area and then associate a new area to the interface.

The no form of this command disables OSPF on the interface. The interfaces which have an IP address configured in this network or in a subset of this network, will stop participating in the OSPF protocol.

Command context

config-if

Parameters

<INSTANCE-TAG>

Specifies the OSPF Process Id. Range: 1-63.

<AREA-ID>
Specifies the OSPF area ID in one of the following formats.
  • Area identifier in IPv4 address format. Format: A.B.C.D

  • Area identifier in decimal format. Range: 0-4294967295.

Authority

Administrators

Examples

Setting OSPF network for the area:

switch# configure terminal
switch(config)# interface 1/1/1
switch(config-if)# ip ospf 1 area 1
switch(config-if)# ip ospf 1 area 0.0.0.1

Disabling OSPF network for the area:

switch# configure terminal
switch(config)# interface 1/1/1
switch(config-if)# no ip ospf 1 area 1
switch(config-if)# no ip ospf 1 area 0.0.0.1