Starting OSPF

You enable OSPFv2 and OSPFv3 differently. When you enable OSPFv2 on your router, you can create either a range of OSPFv2 interfaces or a single OSPFv2 interface. When enabling OSPFv3, you create the OSPFv3 interface and assign the interface to an area.

Enabling OSPFv2

You can create OSPFv2 interfaces in the following ways:

You can delete OSPFv2 interfaces in the following ways:

Enabling OSPFv3

Note: Before you can enable OSPFv3, you must specify an IPv6 license key. For additional information about configuring an IPv6 license key, see Configuring an IPv6 License.

OSPFv3 provides IPv6 support in the OSPF protocol. To enable OSPFv3:

  1. Issue the ipv6 router ospf command, and specify a process ID.
  2. Use the router id command to specify a router ID for OSPFv3.

    See Specifying an OSPF Router ID.

  3. Issue the ipv6 ospf area command (in interface configuration mode) to create an OSPFv3 interface under an area ID.

You can delete OSPFv3 interfaces in the following ways:

Creating a Range of OSPF Interfaces

To create a range of OSPFv2 interfaces:

  1. Create an OSPF routing process.
  2. Create the range of IP addresses associated with the routing process and the corresponding OSPF interfaces.
  3. Assign an area ID associated with each range of IP addresses.

Each router running OSPFv2 has a database describing a map of the routing domain. This map needs to be identical in all participating routers.

network area

ospf enable

router ospf

ipv6 router ospf

Creating a Single OSPFv2 Interface

To create a single OSPFv2 interface:

  1. Create an OSPF routing process.
  2. Create the OSPF interface associated with the IP interface at the specified address.

Each router running OSPF has a database describing a map of the routing domain. This map needs to be identical in all participating routers.

address area

ospf enable

router ospf

Specifying an OSPF Router ID

The router ID is typically derived by each router from its interface IP addresses. However, you can use the router-id command to specify a different router ID for OSPF.

Note: You must specify a router ID to enable OSPFv3.

Although you can specify the router IP address using the ip router-id command in Global Configuration mode for OSPFv2 interfaces, use the router-id command in Router Configuration mode to enable the router to use a different IP address as the OSPF router ID rather than the address used for other IP routing protocols.

router-id