How OSPF selects best routes

It is known for all of us that when two routes are received from the same routing protocol, the route with the lowest metric will be selected and installed in the routing table.

In OSPF this is only true when the two routes are of the same type.

OSPF has the following route types:

  1. Intra-area routes: Intra-area routes are those which are originated and received from routers in the same area.
  2. Inter-area routers: Routes that are originated in different areas are considered inter-area routes.
  3. External routes: Routes that do not belong to the OSPF domain and were inserted from another routing protocol using redistribution for example. External routes can be type1 or type2 routes.

The following criteria is used by OSPF to select best routes:

  1. Intra-area routes.
  2. Inter-area routes.
  3. External type 1 routes.
  4. External type 2 routes.
  5. Route with the lowest cost if the same type.
  6. If cost is the same both routes will be installed in the routing table and load balance occurs.

The above criteria is very important to remember because sometimes you expect a certain behavior in the OSPF domain based on the metric of the routes while the network is not working as you except because route type has came into play and routes are installed based on route types.

Check Also

Best AI tools list