10 Replies Latest reply: Sep 25, 2010 8:23 AM by Scott Morris - CCDE/4xCCIE/2xJNCIE RSS

    OSPF hello and dead timers

    Jimmy P

      What is the best practice, when it comes to solving OSPF  hello and dead timers mismatch errors.

        • 1. Re: OSPF hello and dead timers
          John

          Hi

           

          Not exactly sure what you mean, can you expand on that.

           

          The Hello and the Dead Times must match and if they don't they have to be changed to match but that is probably not what you mean.

           

           

           

          Regards

           

          John

          • 2. Re: OSPF hello and dead timers
            Jimmy P

            Hi John,

             

            Thats one way of doing It,  but this may effect the neighbor relation with the other routers attached for example if the

            below routers are connected.

             

            R1 H30 D120

            R2 H10 D40

            SW

            R3 H10 D40

             

            So there is a mismatch of  hello and deadtimer between r1 and r2  if you change r2 to H30 D120 you loose your relationship to r3.

            This may not be the best example, hope it makes sense

            • 3. Re: OSPF hello and dead timers
              Erick

              Hi!

               

              If router 1 is directly connected to router 2, you can change the ospf network type to point to point or broadcast on router one and that should solve that issue. (ip ospf network point-to-point.  Manually changing the hello and dead interval timers would cause your neighbor relationship to form, but your routers will not be "truly" adjacent and you may in fact find inconsistantcies in your opsf database.

               

              Erick

              • 4. Re: OSPF hello and dead timers
                John

                Hi

                 

                I am no expert and i am still learning myself but from everything i have read; those timers have to match so all 3 would have to be changed.

                 

                Perhaps someone with more experience can confirm this is correct.

                 

                 

                Regards

                 

                John

                • 5. Re: OSPF hello and dead timers
                  TX858

                  Do show ip ospf neighbors to see if neighbor is in the list. If not, see if you can ping ping the router that's supposed to be the neighbor. If you cannot ping it and you're sure that the near interface is up, check neighbor interface for shut. If you can ping the neighbor router but it's not listed in output of show ip ospf neighbors command, check the timers on both the near and far routers to be sure they match. You can view the timers using show ip ospf interface.

                   

                  Below is output from this scenario. Neighbor is there and listed in show ip ospf neighbors output. I then changed the hello interval on the PHX router and run show ip ospf neighbors again - neighbor is not gone from the output. I then ping the neighbor and it replies. I then look at the timers using show ip ospf interface command. You can see that PHX is set to Hello 20, Dead 80 on PHX and Hello 10, Dead 40 on KFX. Mismatch. Fix the mismatch and the neighbor shows up again.

                   

                  I may not have used the above order but you should get the idea from the output below.

                   

                  Note: I wouldn't rely on IOS to automatically change the dead-interval when you change the hello. I change both.

                   

                  See Attached PDF

                   

                  =============

                   


                  PHX#show ip ospf int
                  Serial0/0 is up, line protocol is up
                    Internet Address 10.2.1.2/30, Area 1
                    Process ID 25, Router ID 10.5.1.1, Network Type POINT_TO_POINT, Cost: 64
                    Transmit Delay is 1 sec, State POINT_TO_POINT,
                    Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
                      oob-resync timeout 40
                      Hello due in 00:00:09
                    Index 2/2, flood queue length 0
                    Next 0x0(0)/0x0(0)
                    Last flood scan length is 1, maximum is 1
                    Last flood scan time is 0 msec, maximum is 0 msec
                    Neighbor Count is 1, Adjacent neighbor count is 1
                      Adjacent with neighbor 222.222.222.222
                    Suppress hello for 0 neighbor(s)
                  FastEthernet0/0 is up, line protocol is up
                    Internet Address 10.5.1.1/28, Area 1
                    Process ID 25, Router ID 10.5.1.1, Network Type BROADCAST, Cost: 1
                    Transmit Delay is 1 sec, State WAITING, Priority 1
                    No designated router on this network
                    No backup designated router on this network
                    Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
                      oob-resync timeout 40
                      Hello due in 00:00:09
                      Wait time before Designated router selection 00:00:09
                    Index 1/1, flood queue length 0
                    Next 0x0(0)/0x0(0)
                    Last flood scan length is 0, maximum is 0
                    Last flood scan time is 0 msec, maximum is 0 msec
                    Neighbor Count is 0, Adjacent neighbor count is 0
                    Suppress hello for 0 neighbor(s)

                   

                  PHX#show ip ospf nei

                   

                  Neighbor ID     Pri   State           Dead Time   Address         Interface
                  222.222.222.222   0   FULL/  -        00:00:37    10.2.1.1        Serial0/0

                   


                  PHX#config t
                  Enter configuration commands, one per line.  End with CNTL/Z.
                  PHX(config)#int s0/0
                  PHX(config-if)#ip ospf ****
                  PHX(config-if)#ip ospf hello-interval 20
                  PHX(config-if)#ip ospf dead-interval 80
                  PHX(config-if)#end

                   

                  PHX#show ip ospf neighbor
                  [ Note that neighbor is now gone ]
                  PHX#

                   

                  PHX#show ip ospf int
                  PHX#show ip ospf interface s0/0
                  Serial0/0 is up, line protocol is up
                    Internet Address 10.2.1.2/30, Area 1
                    Process ID 25, Router ID 10.5.1.1, Network Type POINT_TO_POINT, Cost: 64
                    Transmit Delay is 1 sec, State POINT_TO_POINT,
                    Timer intervals configured, Hello 20, Dead 80, Wait 80, Retransmit 5
                      oob-resync timeout 80
                      Hello due in 00:00:03
                    Index 2/2, flood queue length 0
                    Next 0x0(0)/0x0(0)
                    Last flood scan length is 0, maximum is 1
                    Last flood scan time is 0 msec, maximum is 0 msec
                    Neighbor Count is 0, Adjacent neighbor count is 0
                    Suppress hello for 0 neighbor(s)
                  PHX#

                   

                  PHX#ping 10.2.1.1

                   

                  Type escape sequence to abort.
                  Sending 5, 100-byte ICMP Echos to 10.2.1.1, timeout is 2 seconds:
                  !!!!!
                  Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/8 ms
                  PHX#

                   

                  PHX#config t
                  Enter configuration commands, one per line.  End with CNTL/Z.
                  PHX(config)#int s0/0
                  PHX(config-if)#no ip ospf hello
                  PHX(config-if)#no ip ospf hello-interval
                  PHX(config-if)#no ip ospf dead
                  PHX(config-if)#end
                  PHX#
                  PHX#show ip ospf neighbor

                   

                  Neighbor ID     Pri   State           Dead Time   Address         Interface
                  222.222.222.222   0   FULL/  -        00:00:38    10.2.1.1        Serial0/0
                  PHX#

                   

                  HTH,

                  TX

                   

                  Message was edited by: TX858 Added attachment for easier reading.

                  • 6. Re: OSPF hello and dead timers
                    Brian McGahan - 4 x CCIE, CCDE

                    Hi Netmax,

                     

                    Per RFC 2328, OSPF Version 2, the hello interval and the dead interval must match in order for neighbors on a link to become adjacent.

                     

                    9.5.  Sending Hello packets
                    
                            Hello packets are sent out each functioning router interface.
                            They are used to discover and maintain neighbor
                            relationships.[6] On broadcast and NBMA networks, Hello Packets
                            are also used to elect the Designated Router and Backup
                            Designated Router.
                    
                            The format of an Hello packet is detailed in Section A.3.2.  The
                            Hello Packet contains the router's Router Priority (used in
                            choosing the Designated Router), and the interval between Hello
                            Packets sent out the interface (HelloInterval).  The Hello
                            Packet also indicates how often a neighbor must be heard from to
                            remain active (RouterDeadInterval).  Both HelloInterval and
                            RouterDeadInterval must be the same for all routers attached to
                            a common network...
                    

                     

                    This means that all routers on a segment, whether it be a point-to-point link such as PPP, or a multipoint link such as Ethernet, must have both the same hello and dead intervals.  Normally this is controlled in Cisco IOS per the OSPF network type, where if the network type matches the hello and dead intervals will automatically match.  You can also manually change the hello and dead intervals with the interface level commands "ip ospf hello-interval" and "ip ospf dead-interval".  Usually this is done in order to provide for faster convergence, through features such as sub-second hellos in OSPF.

                     

                    HTH,

                     

                    Brian McGahan, CCIE #8593 (R&S/SP/Security)
                    bmcgahan@INE.com

                    • 7. Re: OSPF hello and dead timers
                      John

                      Hi

                       

                      With regards to real life and those 3 routers you mentioned, i suppose you would not get 3 live routers not matching in real life unless 2 of them were new and just installed. As you install one you make it work then move onto the other one.

                       

                       

                       

                      Regards

                       

                      John

                      • 8. Re: OSPF hello and dead timers
                        Scott Morris - CCDE/4xCCIE/2xJNCIE

                        Or plan ahead and just have them all work.  

                        • 9. Re: OSPF hello and dead timers
                          Ganesh

                          once adjacnecy is formed after if i change the  hello and dead timer then the neighbourship will break ?

                          • 10. Re: OSPF hello and dead timers
                            Scott Morris - CCDE/4xCCIE/2xJNCIE

                            Yes, because there will then be a mismatch in the hello's.

                             

                            "debug ip ospf adjacency" is the best way to see all that.  You'll get output with "C" for Configured values and "R" for Received ones.

                             

                            Scott