Archive for route poisoning

OSPF V: “You Have Chosen…Wisely” Path Selection Process

Posted in Cisco Certification with tags , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , on August 1, 2012 by jjrinehart

You Have Chosen…Wisely

In my opinion, the best movie in the Indiana Jones film franchise was Indiana Jones and the Last Crusade; aside from the pure enjoyment of the action scenes, the film gave great attention between “Indie” and his father.  One of the most-quoted lines from this movie, in pop culture at least, was the statement by the night (pictured above), “You have chosen…wisely.”  The whole concept of making the best possible choice ties in particularly well with OSPF, which puts it head-and-shoulders above Distance Vector routing protocols, since it truly can choose…wisely!  If you recall our earlier discussion about Link-State routing protocols, instead of depending on “mileage” (how far away something is”, the basis for route selection is cost, related to bandwidth.
OSPF uses cost in a cumulative manner–meaning that all of the costs of the links to a destination network are added up together.  If you have ever used a GPS for travel, this makes perfect sense, since the device would recommend the eight-lane Interstate highway (greater “bandwidth”) over the two-lane country road, regardless of the distance.  Ironically, you can even specify the route to avoid toll roads (a different spin on cost), to choose the best way to go.  If you think about it, this makes perfect sense, since you can go faster and have fewer stops on the bigger road, especially if you are tracking the route of travel from end-to-end.  In networking terms, then, OSPF devices will choose a 1.544 T1 link over the vastly inferior 56K link in choosing the best route.  What could be simpler?
Remember how strict and rule-oriented OSPF is?  Well, this applies to route preferences as well, meaning that there are additional selection criteria that will override the cost directive.  This fits into the hierarchy of OSPF areas, and creates the following list of route selection preferences:
1.  Intra-Area: Always choose the path within the area first.
2. Inter-Area: If no routes to the destination exist within the area, choose a path to another area but within the OSPF domain.
3. External Type 1: If no routes to the destination exist within the OSPF domain, choose an E1 route (remember that E1 routes count the cost to the external router in the metric)
4. External Type 2: If no E1 routes exist to the destination, choose an E2 route (remember that E2 routes do not count the cost to the external router in the metric, and redistributed routes are E2 by default)
As you can see, this can substantially change the route selection process.  Next time we will look at EIGRP, which is vastly simpler.
– Joe

OSPF IV: There is No “I” in Team: More about DR’s

Posted in Cisco Certification with tags , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , on July 30, 2012 by jjrinehart

DR vs. No DR

One of the unique features of OSPF concerns neighbor relationships across multiaccess networks, such as Ethernet LANs and certain types of WAN’s such as Frame-Relay and ATM (no, not the cash machines at banks).  Remember, neighbor relationships form between connected neighbors across links, so consider the diagrams above to get an idea of what this looks like. Here we have listed six routers, and the math required to calculate the number of relationships is N(N-1)/2, where N is the number of devices.  Solving for 6 in this case creates the values of 6 * 5, yielding 30, and dividing that by 2 results in 15, which is a lot between so few devices, and staggering between many.  To simplify this, OSPF has a single peer on multiaccess networks called the Designated Router, or DR.  Note in the diagram how the 15 relationships is reduced to 5 using a DR, and in reality there are 5 more with a secondary DR, called the BDR.  In keeping with the highly regimented structure of the protocol, all messages, updates, and so forth take place between peers and the DR, and NOT with one another.  The purpose of the BDR is to take over if anything happens to the DR.

As is the case with many other network protocols, there is an election process to determine the DR and BDR roles on the multiaccess networks, and seldom is this optimal.  I have personally had to deal with suboptimal DR selection in networks and labs I have worked on, especially when dealing with redistribution (the process of sharing routes between various routing sources).  Each router on the OSPF multiaccess network has a default priority of 1, which usually results in a tie in the election process, and the highest numerical Router-ID wins if that is the case.  To set the priority manually, use the ip ospf priority <0-255>  command on the interface, understanding that the higher the priority, the better (I routinely use 200 for the DR and 190 for the BDR).  To remove a router from the election process, just specify zero (0) as the priority, which is useful in hub-and-spoke topologies such as Frame-Relay (having a spoke router as the DR or BDR is not helpful at all).

Let me share a quick word on WAN topologies in OSPF because they can drive you crazy at times.  Frame-Relay and ATM do not forward broadcasts naturally, and special configuration is required is you want that functionality.  If you have to work with non-broadcast links, use the ospf neighbor command under the OSPF process.

Next time, we will wrap up our OSPF discussion by looking at route selection.

– Joe

OSPF III: DR Seeking BDR fot LTR (Neighbor Relationships, cont’d)

Posted in Cisco Certification with tags , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , on July 27, 2012 by jjrinehart

Is He/She a Keeper?

Few things rattle us more than the pursuit of that “special someone” in our lives, regardless of our respective cultural backgrounds.  In some cultures, marriages are arranged (often numerous years ahead of time), while others leave the process up to the individual, often found in Western cultures through the ritual of dating.  Regardless of how the process develops, how the relationship develops follows a relatively common pattern.  In cultures where dating is the accepted path, the journey begins with the often-awkward first date, when the person across the table is basically a stranger.  If things go well, conversations pass back and forth, common interests and viewpoints are discovered, and a relationship begins to form.  As things progress over time, greater trust is established, deeper conversations ensure, and at some point the two individuals become a couple in a more formal sense.  What does this have to do with OSPF?  Actually, everything!

OSPF relationships follow the same pattern just described in the whole dating/mating ritual in the previous paragraph.  They start out as strangers, with no trust, and not sharing vital, if any, information about what they know.  Using Hello Messages, the routers start the process of conversing, and over time the relationship goes from “perfect strangers” to “fully adjacent” in which Link-State information is exchanged.  Nothing about the process is instant, it takes a period of time, although the procedure is fairly rapid by human standards.  There are seven stages of states of the relationship building process, as follows:
  1. Down: Not aware of one another
  2. Init: Initializing, hello packets sent
  3. Two-Way: Neighbor sees its own Router-Id in the hello packet
  4. Exstart: Adjacency/Relationship formed, Database Description Packets created
  5. Exchange: Database Description Packets sent to neighbor
  6. Loading: Slave device sends Link State Requests and received Link State Advertisements
  7. Full: LSDB identical, and neighbors ready to forward traffic

The next point is important because it can help you figure out when something is wrong.  Occasionally, neighbor relationships stop before reaching the Full state, indicating that some sort of problem is preventing full adjacencies from forming.  You can check the current state of any OSPF neighbor by executing the show ip ospf neighbor command from the Command Line Interface, which will list the Router-ID, state, etc., of the neighboring device.  Most commonly, this will happen at the Init, Two-Way, or Exstart stages, and requires some troubleshooting (remember that OSPF is very picky, so there are several causes that you can investigate further).

Next time we will look into the Designated Router concept.

– Joe

OSPF Part II: Wouldn’t You Like to be My Neighbor?

Posted in Cisco Certification with tags , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , on July 25, 2012 by jjrinehart

In my opinion, one of the most misunderstood words in modern society is the word neighbor, particularly in the United States.  The term is extraordinarily broad, and can refer to a fellow resident of a housing development or apartment, someone in the same city or county, or even country.  When you consider how loosely the word is used today, you can easily get confused when you start talking about neighbor relationships between routers, because the definition is stricter.  Incidentally, when I grew up in the 1970’s in Pennsylvania, the word neighbor meant the people living on either side of you, or across the street.  Since I don’t expect everyone that reads my writing to have that same set of experiences (either in terms of chronology, geography, or culture), let me invoke a more familiar example: the characters of Tim Taylor and Wilson on the television show Home Improvement.  Wilson and Tim lived right next door to one another, and shared both a fence and property line, meaning that their yards were literally connected.  In just about every episode, these two individuals carried on conversations, usualy with Tim asking Wilson for insight and advice, and usually heeding what was said.

Let me point out how their relationship worked as neighbors.  First, they were connected by a common property line, so there was nothing between them other than the fence, which allowed them to interact easily.  Second, they had an actual relationship, which involved a level of trust; in other words, they were not strangers.  Finally, they carried on conversations, in essence, exchanging information, which resulted in at least one of them changing something they had been thinking or doing previously.  Now let’s apply that to how OSPF defines neighbor relationships.  Neighbors have to be directly connected, without another network separating them; a link of some kind connects them (just like the property line).  Second, these relationships are not casual, the OSPF neighbor routers have a very formal relationship and know and trust one another.  Finally, they exchange information, specifically, Link State Advertisements, the pieces of data that allow for the Link State Database to be duplicated on the other device.  This is much more structured than RIP which just accepted whatever it hear as in fact being true and accurate.  In fact, OSPF routers track the state and/or availability of the neighbor device, sending messages at regular intervals called Hello Messages (more on that later), which transmit data as well as act as a keepalive mechanism.

Next time we will step through how OSPF routers build these relationships.

– Joe