OSPF DR Election – Why Priority Doesn’t Take Effect Right Away

I get asked quite often why the OSPF designated router will not change immediately when you set a high priority on a router.  This is my stab at explaining why this is, and why you may see some strange behavior.

The router priority and OSPF router ID are the factors for determining who will become the DR and BDR.  If a loopback interface is present the lowest numbered loopback interface will become the OSPF router ID.  But the router ID can be an address of antoher interface if the loopback does not exist.  It is a best practice to always configure a loopback with OSPF.

The problem begins with the re-election process not being pre-emptive.  The first router that runs OSPF on the network will become the DR by default because a DR must exist in a multi-access network.  The problem is that if the 2nd router on the network has a better priority or higher router ID, it will not pre-empt and de-throne the existing DR.  If you clear the OSPF process on the DR (clear ip ospf process) you will force a DR/BDR election.  This new election will take into account all of the priorities and router ID’s of the routers on the network at that time and correct choose the best base on the above rules.  So even if your 2nd router comes online just a second after the first router, it may sit as a BDR even though it has a higher priority.

RFC 2328 (http://www.faqs.org/rfcs/rfc2328.html) in section 9.4 states that the DR election is triggered by the Interface State Machine in OSPF.  I interpret this as the only time a router will trigger an election is when that router interface changes state (or you reset OSPF).

So once a DR is elected, no other routers will start an election because they are happy with the DR that they see in the first hello packet that they receive from a neighbor.  A new election process has to be initiated on the DR with a clear command or that router going down.

Here is where the mystery is.  Based on different versions of Cisco IOS router code, I have observed different behavior.  On many 12.1 versions if you walk away for a while (20-30 minutes) you may comeback to see that they have re-elected themselves.  But I have also observed where it will go 8-12 hours without an election.  This could be where the bug is.  I have no idea why they would have re-elected.  I don’t see an interface go down, etc…

Certification Exam Test Taking Tips

One of the most popular questions I get asked when I teach a class that maps into some type of industry certification is what do I need to know to pass the exam.  That is why you are in the class, to learn the objectives.  But don’t forget to prepare yourself mentally for the exam as well…

The obvious stuff:

  • Get a good night sleep the night before.
  • Go to the exam well nourished.
  • Arrive early to the exam testing location.  Give yourself time to relax before you go in.

If possible find a location near the testing center that you can go to for an hour or so – like a coffee shop.  Bring along notes that you can quickly review.  Try to keep the list of notes to the areas that you have the most difficulty in.  No need to review information that you are solid on.

Be positive going into the exam.  Focus on all of the things you know and not the things that you don’t know.

Test Taking Strategies

Focus on the question.  What are they really looking for.  It is common for a test question to contain irrelevant pieces of information.  Try to eliminate these out before they confuse you.

Evaluate the Answers

  • Don’t just take the first answer that looks right.
  • Justify why the other answers are wrong.
  • You may change your mind after you review the other answers.
  • Evaluate answers for correctness without look at the question if possible – answers that are not factually correct or have bad syntax will never be right no matter that the question is.
  • Try to eliminate as many invalid answers as possible before you really start to answer the questions.
  • Use your scratch paper to keep track of which answers you have eliminated for each question.  Do no waste time re-reading answers that you have eliminated previously.  It is tough to keep try of 6 answers in your head.

If the exam you are taking contains simulations (Like the CCNA exam) – make sure you check the vendor site for a simulation demo so you can get a feel for what the simulation will be like.

It will be natural for you to feel like you are bombing the exam while you are taking the test.  Just relax and keep trying your best.  If you have a bad question, forget about it and move on.  Many people end up passing the exam even though it felt like they were failing.

Remember, you do not have to ace a certification exam to pass it.  All you need is the score that is required to pass.  Most certification certificates do not print your score on them.

Question: What do you call a person who just barley passed their medical exams?
Answer: A Doctor.

What do do if you fail:

Immediately after you leave the testing center, find a quiet place that you can reflect.  Try to jot down the subject areas that you know you had a problem with.  If you do not do it immediately after the exam, you will quickly forget as all of the questions will begin to run together.

 

Cisco IOS Editing Commands

Memorizing the Cisco IOS command line editing keys can seem like a tough task.  With modern keyboards that have up/down/left/right arrows, we do not find ourselves dependant on these keys.  It is difficult to remember them when you are not using them on a daily basis.  Here is my thought process behind learning and remembering the keys.

Forward and Backwards – Characters and Words

Rember that Character=CTRL, Word=ESC, Forward=F, and Backwards=B.  The CTRL character keys have been replaced by the use of left/right arrow keys on modern keyboards.

Forward (F)

Backwards (B)

Character (CTRL)

Ctrl-F
(Same as right arrow)

Ctrl-B
(Same as left arrow)

Word (ESC)

Esc-F

 Esc-B

 

Beginning of Line/End of Line

Think “A” beginning of alphabet, beginning of line and “E” is for end, end of line.

CTRL-A Beginning of Line
CTRL-E End of Line

 

Command History

Think “P” is for previous, previously entered commands.  Think “N” is for next, or the next commands that were entered.  These two keys move you through the command history of previously entered commands.  These keys have been replaced by the use of the up/down arrow keys on modern keyboards.

CTRL-P
(Same as up arrow)

Previous Command

CTRL-N
(Same as down arrow)

Next Command
Refreshing an Interrupted Command

Sometimes while typing a command you will get interrupted by a console message that is displayed.  This can make it difficult to continue typing if you get distracted by the message and can’t remember what you were typing.

CTRL-R Refreshes the current line you were typing

Although CTRL-R is the most common an accepted method of refreshing the current line you are typing, CTRL-L will also work.

On a side note, you can enable permanent line refreshing when a console message is displayed by entering the following command:

Router(config)#line vty 0 4
Router(config-line)#logging synchronous

Other Editing Commands

There are other command line editing keys that can be used.  Although they are not commonly used, you can find more information about them on Cisco’s home pager here.

 

This website and the materials offered herein are neither affiliated with nor endorsed by Cisco Systems, Inc. “Cisco”, “CCNA”, “CCNP”, “CCDA”, and “CCIE” are all trademarks owned by Cisco Systems, Inc.

How an OSPF router selects it’s Router ID

Use the router-id 1.1.1.1 command if it is specified under router ospf

If loopback interfaces exist, choose the highest IP address from all of the loopbacks.

If no loopback interfaces exist, choose the highest IP address from all interfaces.

 

IP Routing Protocol Comparison

I have created a quick reference table for the most popular IGP (Interior Gateway) Routing Protocols.  This table covers RIP v1, RIP v2, IGRP, EIGRP, OSPF, and IS-IS.  I find it much easier to memorize the details when you can see them all in one place.

Thanks to Dan Sheehan for contributing some of the content to this chart.

Enjoy!

Note that IS-IS is a CCNP level objective and is not a part of the CCNA objectives.

RIP V1 RIP V2 IGRP EIGRP OSPF IS-IS
Link State/Distance Vector Distance Vector Distance Vector Distance Vector Hybrid Link State Link State
Classful/Classless Classful Classless Classful Classless Classless Classless
Discontiguous Problem Yes Yes Yes
Administrative Distance 120 120 100 90 110
How does it transfer routing updates? Broadcast

255.255.255.255

Multicast

224.0.0.9

Broadcast

255.255.255.255

Multicast

224.0.0.10

Multicast

224.0.0.6 – Routers to DR/BDR

224.0.0.5 – DR to all Routers

CLNS
How often does it send full updates?  (Distance Vector) 30 Seconds

(180 Holddown)

30 Seconds

(180 Holddown)

90 Seconds

(270 Holddown)

How often does it send hello packets? (Link State) 5 Seconds (LAN)

(15 Holddown)

60 Seconds (WAN)

(180 Holddown)

10 Seconds (LAN)

(40 Seconds Flush)

30 Seconds (WAN)

(40 Seconds Flush?)

 10 Seconds
Metric Hop Count

(Max=15)

Hop Count

(Max=15)

Composite Metric (Bandwidth + Delay)

(Max=255, Default=128))

 Composite Metric (Bandwidth + Delay)

(Max=224, Default=128)

Cost

10^8/Bandwidth

Cost
Authentication No Yes No Yes Yes Yes
Bandwidth Usage High High High Low Low Log
CPU Usage Low Low Low High High High
Speed to Converge Slow Slow Slow Fast Fast Fast
Prone to Loops Yes Yes Yes No No No

Welcome to the new henninger.net!

It has been a long time coming…but I have updated the web site.  I have moved a lot of the content that was originally here to other sites – so I am not quite sure what this will become.