ip ospf areaid
27-6 IPv4 Advanced Routing Protocol Configuration
ip ospf areaid
Use this command to configure area IDs for OSPF interfaces. If OSPF is enabled on an interface as
described in “ip ospf enable” on page 27-5, the OSPF area will default to 0.0.0.0. The no form of
this command removes OSPF routing for the interfaces.
Syntax
ip ospf areaid area-id
no ip ospf areaid
Parameters
Defaults
None.
Mode
Interface configuration: C3(su)->router(Config-if(Vlan 1))#
Example
This example shows how to configure the VLAN 1 interface as area 0.0.0.31:
C3(su)->router(Config)#interface vlan 1
C3(su)->router(Config-if(Vlan 1))#ip ospf areaid 0.0.0.31
ip ospf cost
Use this command to set the cost of sending an OSPF packet on an interface. The no form of this
command resets the OSPF cost to the default of 10.
Syntax
ip ospf cost cost
no ip ospf cost
Parameters
Defaults
None.
Mode
Interface configuration: C3(su)->router(Config-if(Vlan 1))#
Usage
Each router interface that participates in OSPF routing is assigned a default cost. This command
overwrites the default of 10.
area-id Specifies the area-id to be associated with the OSPF interface. Valid values
are decimal values or IP addresses.
cost Specifies the cost of sending a packet. Valid values range from 1 to 65535.