9 Replies Latest reply: Mar 7, 2012 2:44 AM by Wireless Mouse RSS

    clear ip ospf process

    Wireless Mouse



      My name is goodboy and he is favio.


      I am using clear ip ospf process in case I forgot to create the Route-ID and for the change to take effect. and also to stop a router to be DR or BDR.


      For what other purposes would you use clear ip ospf proccess for?





        • 1. Re: clear ip ospf process

          clear ip ospf

          To clear redistribution based on the OSPF routing process ID, use the clear ip ospf command in privileged EXEC mode.

          clear ip ospf [pid] {process | redistribution | counters [neighbor [neighbor-interface] [neighbor-id]]}

          Syntax Description


          (Optional) Process ID.


          Reset OSPF process.


          Clear OSPF route redistribution.


          OSPF counters.


          (Optional) Neighbor statistics per interface.


          (Optional) Neighbor interface.


          (Optional) Neighbor ID.


          Command Modes

          Privileged EXEC

          Usage Guidelines

          Use the pid option to clear only one OSPF process. If the pid option is not specified, all OSPF processes are cleared.


          The following example clears all OSPF processes:

          clear ip ospf process

          i have to test this... it is my understanding that to clear a rid and/or dr/bdr actually requires a reboot of the router...
          • 2. Re: clear ip ospf process
            Wireless Mouse

            Thanks arteq, good information,

            clear ip ospf proc restarts the process andall OSPF neighbors are restarted. What implications could it have using this command in a big network infractructure and what is the reason for a big company to use it? what kind of fault would an engineer encounter in the network for him to use this command to resolve the problem.





            • 3. Re: clear ip ospf process

              generally this command would not be used in a large network unless really required but would be highly unlikely in a production network.


              You have already stated the why you would use the command. there may be a few other reasons, like IOS bugs or something but generally a last resort for a weird problem.



              • 4. Re: clear ip ospf process
                Wireless Mouse

                Thanks Jon, the restart process happens in miliseconds. so clear ip ospf process would not create any outstage..dont you think?


                also i do know what this command does  clear ip route *  but what is the purpose of using it? I mean what is the purpose to clear the table routes on the router if secs later will populate with the same routes





                • 5. Re: clear ip ospf process

                  clear ip route is a good troubleshooting and lab tool so you don't wait on updates for changes... speeds things up...

                  • 6. Re: clear ip ospf process

                    this from chris bryant's site...


                    Clear ip route *

                    This command clears your routing table of all non-static and non-connected routes. In a lab environment, it’s very handy because it forces your routers running routing protocols to send and request updates, rather than waiting for the regularly scheduled updates. An example of this command is shown with the debug ip igrp transactions command later in this review.

                    • 7. Re: clear ip ospf process
                      Wireless Mouse

                      Thanks arteq, I can see clearly the reason to use that command now


                      • 8. Re: clear ip ospf process

                        After configuring the router-id command, use the clear ip ospf process EXEC command to restart the OSPF

                        routing process, so the router reselects the new IP address as its router ID. For example, the commands

                        shown in Example 3-3 ensure that OSPF selects the preconfigured router ID


                        The clear ip ospf process command temporarily disrupts an operational network.


                        Changing a router ID of a router whose router ID was set with the router-id command requires only that the

                        OSPF process be cleared. However, changing the OSPF router ID of a router whose router ID was set by

                        configuring a loopback interface address may require you to either reboot the router or to disable and then

                        enable OSPF. (The IOS documentation is unclear on this point; we have seen both of these ways, and

                        clearing the OSPF process, work in testing.)

                        Source: Dean, T. Implementing Routing. Cisco Press, 2012.

                        • 9. Re: clear ip ospf process
                          Wireless Mouse

                          Thanks Martin.


                          I think if there was a new routed addeed or a route was changed , you had to clear out the routing table to get it

                          to see the new route