18. July 2012 · Comments Off on How To Calculate OSPF Cost · Categories: Cisco · Tags: , , ,

As a CCNA / CCNP candidate you are expected to understand how to set and interpret the OSPF cost function on your Cisco devices

During your career as a Cisco network engineer you will have to deal with setting and manipulating the OSPF costs on an interface.

OSPF uses a metric called “Cost” to calculate the metric of path. The cost is a cumulative value which is an incremental metric.

The cost is as a default based on the bandwidth of the interface. The Higher the interface bandwidth the lower the cost that is associated to that interface, to see the cost that is assigned to any given interface which is participating in OSPF issue the following command:

Router# show ip ospf interface

The output of this command will show the current cost given to this interface. The costs of the interface is calculated by taking the bandwidth of the interface and dividing this number by a value known as the “auto-cost reference-bandwidth”. This auto-cost reference-bandwidth is an integer used to calculate a standard metric across OSPF and is set to 100,000,000. The cost is calculated as follows:

100,000,000/BW More »

18. July 2012 · Comments Off on OSPF Special Area Types · Categories: Cisco · Tags: , , , ,

18. July 2012 · Comments Off on OSPF Stub Areas · Categories: Cisco · Tags: , , , , ,

OSPF Stub Areas

OSPF stub areas limit the parts of the network where specific LSAs are allowed. The idea being that if an OSPF router receives an LSA it must process it, which takes a certain amount of processor and memory resources. By limiting the types of LSAs that can reach specific networks, the devices within these stub areas do not have to be as powerful but still retain reachability to the rest of the OSPF network.

There are three main types of OSPF stub areas:

  • Stub Areas
  • Totally Stubby Areas
  • Not So Stubby Areas

Stub Areas

An area that is configured as a stub is able to receive all types (as discussed above) of LSA except an LSA Type 5. Any routes that are destined for external networks are forwarded using a default route that is injected into the network in place of the LSA Type 5.

Totally Stubby Areas

Like a stub area, a totally stubby area is unable to receive LSA Type 5 packets. Along with this, the area is also unable to receive LSA Type 3 packets that include network advertisements (Not External) from other areas. Again, like a stub area, all traffic that is destined for these networks (both internal and external networks outside the area) is destined for a default router that is injected in place of both the LSA Type 3 and Type 5.

Not So Stubby Areas (NSSA)

A NSSA is almost exactly the same as a normal stub area but allows an ASBR (Autonomous System Boundary Router) to exist within the area. With a typical stub area, it is not possible to locate an ASBR inside the area as LSA type 5 packets are not allowed. A NSSA gets around this by using an LSA Type 7 packet in place of the LSA Type 5 packet within the NSSA; once this traffic from the ASBR exits the NSSA it is converted to an LSA Type 5 for transmission to the rest of the OSPF network.

18. July 2012 · Comments Off on LSA types defined in OSPF · Categories: Cisco · Tags: , ,

The LSA types defined in OSPF are as follows:

  • Type 1 – Router LSA – the router announces its presence and lists the links to other routers or networks in the same area, together with the metrics to them. Type 1 LSAs are flooded across their own area only. The link-state ID of the type 1 LSA is the originating router ID.
  • Type 2 – Network LSA – the designated router (DR) on a broadcast segment (e.g. Ethernet) lists which routers are joined together by the segment. Type 2 LSAs are flooded across their own area only. The link-state ID of the type 2 LSA is the IP interface address of the DR.
  • Type 3 – Summary LSA – an Area Border Router (ABR) takes information it has learned on one of its attached areas and it can summarize it (but not by default) before sending it out on other areas it is connected to. This summarization helps provide scalability by removing detailed topology information for other areas, because their routing information is summarized into just an address prefix and metric. The summarization process can also be configured to remove a lot of detailed address prefixes and replace them with a single summary prefix, also helping scalability. The link-state ID is the destination network number for type 3 LSAs.
  • Type 4 – ASBR-Summary LSA – this is needed because Type 5 External LSAs are flooded to all areas and the detailed next-hop information may not be available in those other areas. This is solved by an Area Border Router flooding the information for the router (i.e. the Autonomous System Boundary Router) where the type 5 originated. The link-state ID is the router ID of the described ASBR for type 4 LSAs.
  • Type 5 – External LSA – these LSAs contain information imported into OSPF from other routing processes. They are flooded to all areas (except stub areas). For “External Type 1” LSAs routing decisions are made by adding the OSPF metric to get to the ASBR and the external metric from there on, while for “External Type 2” LSAs only the external metric is used. The link-state ID of the type 5 LSA is the external network number.
  • Type 6 – Group Membership LSA(Only supported on a few routers) – this was defined for Multicast extensions to OSPF (MOSPF)[1], a multicast OSPF routing protocol which was not in general use. MOSPF has been deprecated since OSPFv3[2] and is not currently used. It may be reassigned in the future.
  • Type 7 – Routers in a Not-so-stubby-area (NSSA) do not receive external LSAs from Area Border Routers, but are allowed to send external routing information for redistribution. They use type 7 LSAs to tell the ABRs about these external routes, which the Area Border Router then translates to type 5 external LSAs and floods as normal to the rest of the OSPF network.
  • Type 8 – A link-local only LSA for OSPFv3. A Type 8 LSA is used to give information about link-local addresses and a list of IPv6 addresses on the link. In OSPFv2, however, the Type 8 was originally intended to be used as a so-called External-Attributes-LSA for transit autonomous systems where OSPFv2 could replace the internal Border Gateway Protocol (iBGP). In these networks, the BGP destinations would be carried in LSA Type 5 while their BGP attributes would be inserted into LSA Type 8. Most OSPFv2 implementations never supported this feature.
  • Type 9 – a link-local “opaque” LSA (defined by RFC2370) in OSPFv2 and the Intra-Area-Prefix LSA in OSPFv3. It is the OSPFv3 LSA that contains prefixes for stub and transit networks in the link-state ID.
  • Type 10 – an area-local “opaque” LSA as defined by RFC2370. Opaque LSAs contain information which should be flooded by other routers even if the router is not able to understand the extended information itself. Typically type 10 LSAs are used for traffic engineering extensions to OSPF, flooding extra information about links beyond just their metric, such as link bandwidth and color.
  • Type 11 – an AS “opaque” LSA defined by RFC 5250, which is flooded everywhere except stub areas. This is the opaque equivalent of the type 5 external LSA.[3]

The opaque LSAs, types 9, 10, and 11, are designated for upgrades to OSPF for application-specific purposes. For example, OSPF-TE has traffic engineering extensions to be used by RSVP-TE in Multiprotocol Label Switching (MPLS). Opaque LSAs are used to flood link color and bandwidth information. Standard LSDB flooding mechanisms are used for distribution of opaque LSAs. Each of the three types has a different flooding scope.

For all types of LSAs, there are 20-byte LSA headers. One of the fields of the LSA header is the link-state ID.