Enabling global OSPF routing


[no] router ospf [enable | disable]

Executed at the global configuration level to enable OSPF on the routing switch and to enter the OSPF router context. This enables you to proceed with assigning OSPF areas, including area border router (ABR) and autonomous system boundary router (ASBR) configuration, and to modify OSPF global parameter settings as needed.

The enable form of the command enables OSPF routing, and the disable form of the command disables OSPF routing.

Global IP routing must be enabled before executing this command.

Default: Disabled

The no form of the command deletes all protocol specific information from the global context and interface context. All protocol parameters are set to default values.


If you disable OSPF, the switch retains all the configuration information for the disabled protocol in flash memory. If you subsequently restart OSPF, the existing configuration will be applied. After restarting OSPF, the exiting configuration will be applied and the protocol will be in the disabled state.


To enter the OSPF router context

switch(config)#router ospf 

To enable OSPF routing

switch(config)#router ospf enable

To disable OSPF routing

switch(config)#router ospf disable

The no router ospf enable command also disables OSPF routing.

To delete all protocol-specific information from the global context and interface context and set all protocol parameters to default values.:
switch(config)#no router ospf