Setting OSPF network for the area

After you define an OSPF area, you can assign one or more networks to it. The OSPF protocol will run on the interface with the configured IPv4 address. The interfaces which have an IP address configured in this network or in a subset of this network, will participate in the OSPF protocol.

Prerequisites

You must be in the interface configuration context, as indicated by the switch(config-if)# prompt.

Procedure
  1. Set an OSPF network for the area using the following command. For command details, see ip ospf <instance-tag> area.

    ip ospf <instance-tag> area <area-id>

    For example, use the following command to assign interface 1/1/1 to OSPF area 1. The area can alternately be entered as an IPv4 address.
    switch(config)# interface 1/1/1
    switch(config-if)# ip ospf 1 area 1
  2. Optionally, you can disable OSPF on the interface using the following command. For command details, see ip ospf shutdown.

    ip ospf shutdown

    switch(config)# interface 1/1/1
    switch(config-if)# ip ospf shutdown