Configuring OSPF on the routing switch

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

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

  • To configure a router ID, create OSPF network areas, or adjust other global OSPF configuration items, you must be in the router configuration context, as indicated by theswitch(config-router)#prompt.

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

    router ospf[vrf]

    For example, the following command creates OSPF instance 1.
    switch(config)#router ospf 1switch(config-ospf-1)#
  2. 配置一个全局路由器ID使用下面的command. For command details, seerouter-id.

    router-id

    For example, the following command sets the router ID to 1.1.1.1.
    switch(config-ospf-1)#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, seeenable. (Refer todisablefor disabling the OSPF process).