Enabling global OSPF routing
Syntax:
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 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.
Example
To enter the OSPF router context
switch(config)#router ospf
switch(ospf)#
To enable OSPF routing
switch(config)#router ospf enable
switch(ospf)#
To disable OSPF routing
switch(config)#router ospf disable
switch(ospf)#
The
no router ospf enable
command also disables OSPF routing.
switch(config)#no router ospf
switch(ospf)#