Configuring OSPF on the routing switch

Create the OSPF instance and enter the OSPF router configuration context. From this context, you can proceed with other OSPF configuration.

Prerequisites
  • You must be in the global configuration context, as indicated by the switch(config)# prompt to create the OSPF instance and enter the OSPF router configuration context.

  • To configure a router ID and set RFC 1583 compatibility and other OSPF configuration, you must be in the router configuration context, as indicated by the switch(config-router)# prompt.

Procedure
  1. Create the OSPF instance and enter the OSPF router configuration context using the following command. For command details, see router ospf.

    router ospf <instance-tag> [vrf <vrf-name>]

    For example, the following command creates OSPF instance 1.
    switch(config)# router ospf 1
    switch(config-router)#
  2. Configure a global router ID using the following command. For command details, see router-id.

    router-id <router_address>

    For example, the following command sets the router ID to 1.1.1.1.
    switch(config-router)# router-id 1.1.1.1
  3. Optionally, if the OSPF process was disabled (it is enabled by default), enable the OSPF process using the following command.

    enable

    For command details, see enable. (Refer to disable for disabling the OSPF process).