CCNP ROUTE (Version 7) – Chapter 3: Open Short Path First

CCNP Enterprise Routing & Switching Original source

Objectives

Establishing OSPF Neighbor Relationships

OSPF Features

Independent transport

Efficient use of updates

Metric

Update destination address

VLSM support

Manual route summarization

Authentication

OSPF Operation Overview

Establish neighbor adjacencies

Exchange link-state advertisements

Build the topology table

Execute the SPF algorithm

Build the routing table

Hierarchical Structure of OSPF

OSPF uses a two-layer area hierarchy:

Backbone area, transit area or area 0

Nonbackbone area

In the multi-area topology there are special commonly OSPF terms:

ABR

ASBR

Internal router

Backbone router

OSPF Message Types

Type 1: Hello packet: Hello packets are used to discover, build, and maintain OSPF neighbor adjacencies.

Type 2: Database Description (DBD) packet: When the OSPF neighbor adjacency is already established, a DBD packet is used to describe LSDB so that routers can compare whether databases are in sync.

Type 3: Link-State Request (LSR) packet : The router will send an LSR packet to inform OSPF neighbors to send the most recent version of the missing LSAs.

Type 4: Link-State Update (LSU) packet : LSU packets are used for the flooding of LSAs and sending LSA responses to LSR packets.

Type 5: Link-State Acknowledgment (LSAck) packet : LSAcks are used to make flooding of LSAs reliable.

Basic OSPF Configuration

To enable the OSPF process on the router, use the router ospf process-id command. Process ID numbers between neighbors do not need to match for the routers to establish an OSPF adjacency. The OSPF process number ID is an internally used identification parameter for an OSPF routing process and only has local significance. However, it is good practice to make the process ID number the same on all routers. If necessary, you can specify multiple OSPF routing processes on a router, but you need to know the implications of doing so. Multiple OSPF processes on the same router is not common and beyond the scope of this book.

If the address ranges specified for different areas overlap, IOS will adopt the first area in the network command list and ignore subsequent overlapping portions. To avoid conflicts, you must pay special attention to ensure that address ranges do not overlap.

Configuration of OSPF Router IDs

To choose the OSPF router ID at the time of OSPF process initialization, the router uses the following criteria:

  1. Use the router ID specified in the router-id ip*-address* command.
  2. Use the highest IPv4 address of all active loopback interfaces on the router.
  3. Use the highest IPv4 address among all active nonloopback interfaces.

At least one primary IPv4 address on an interface in the up/up state must be configured for a router to be able to choose router ID; otherwise, an error message is logged, and the OSPF process does not start.

You can configure an arbitrary value in the IPv4 address format, but this value must be unique. If the IPv4 address specified with the router-id command overlaps with the router ID of another already-active OSPF process, the router-id command fails.

The OSPF router ID is a fundamental parameter for the OSPF process. For the OSPF process to start, Cisco IOS must be able to identify a unique OSPF router ID. Similar to EIGRP, the OSPF router ID is a 32-bit value expressed as an IPv4 address. At least one primary IPv4 address on an interface in the up/up state must be configured for a router to be able to choose router ID; otherwise, an error message is logged, and the OSPF process does not start.

Clearing the OSPF Processes

Once an OSPF router ID is selected, it is not changed even if the interface that is used to select it changed its operational state or its IP address. To change the OSPF router ID, you must reset the OSPF process with the clear ip ospf process command or reload the router. In production networks, the OSPF router ID cannot be changed easily. Changing the OSPF router ID requires reset of all OSPF adjacencies, resulting in a temporary routing outage. The router also has to originate new copies of all originating LSAs with the new router ID. You can either clear the specific OSPF process by specifying the process ID, or you can reset all OSPF processes by using the clear ip ospf process command.

OSPF Router ID Criteria

1.Use the router ID specified in the router-id ip*-address* command.

2.Use the highest IPv4 address of all active loopback interfaces on the router.

3.Use the highest IPv4 address among all active nonloopback interfaces.

Verifying the Router IDs

Verifying OSPF Neighborships

State : OSPF neighbor establishment process and denotes that the local router has established full neighbor adjacency with the remote OSPF neighbor. DR means that DR/BDR election process has been completed and that the remote router with the router ID 1.1.1.1 has been elected as the designated router (DR).

Dead Time : Represents value of the dead timer. When this timer expires, the router terminates the neighbor relationship. Each time a router receives an OSPF Hello packet from a specific neighbor, it resets the dead timer back to its full value.

Verifying the OSPF-Enabled Interfaces

Output of the show ip ospf interface command shows you all interfaces enabled in the OSPF process. For each enabled interface, you can see detailed information such as OSPF area ID, OSPF process ID, and how the interface was included into the OSPF process. In the output, you can see that both interfaces on both routers were included via the network statement, configured with the network command.

Verifying the OSPF Routes

Among the routes originated within the OSPF autonomous system, OSPF clearly distinguishes two types of routes: intra-area routes and interarea routes.

To change this default behavior, you can optionally change OSPF network type on the loopback interface from the default loopback to point-topoint using the ip ospf network point-to-point interface command.

OSPF Routes

The show ip ospf route command clearly separates the lists of intra-area and inter-area routes. In addition, output of the command displays essential information about ABRs, including the router ID, IPv4 address in the current area, interface that advertises routes into the area, and the area ID.

OSPF Adjacency Establishment Steps

  1. Down state - the initial state of a neighbor conversation that indicates that no Hello’s have been heard from the neighbor.
  2. Init state - a router receives a Hello from the neighbor but has not yet seen its own router ID in the neighbor Hello packet
  3. 2-Way state - When the router sees its own router ID in the Hello packet received from the neighbor
  4. ExStart state - In the DBD exchange process, the router with the higher router ID will become master, and it will be the only router that can increment sequence numbers. With master/slave selection complete, database exchange can start
  5. Exchange state - To describe the content of the database, one or multiple DBD packets may be exchanged. A router compares the content of its own Database Summary list with the list received from the neighbor, and if there are differences, it adds missing LSAs to the Link State Request list.
  6. Loading state - LSR packet is sent to the neighbor requesting full content of the missing LSAs from the LS Request list
  7. Full state - Finally, when neighbors have a complete version of the LSDB, which means that databases on the routers are synchronized and that neighbors are fully adjacent.

On broadcast links, OSPF neighbors first determine the designated router (DR) and backup designated router (BDR) roles, which optimize the exchange of information in broadcast segments. In the next step, routers start to exchange content of OSPF databases. The first phase of this process is to determine master/slave relationship and choose the initial sequence number for adjacency formation. To accomplish this, routers exchange DBD packets. When the router receives the initial DBD packet it transitions the state of the neighbor from which this packet is received to ExStart state, populates its Database Summary list with the LSAs that describe content of the neighbor’s database, and sends its own empty DBD packet. In the DBD exchange process, the router with the higher router ID will become master, and it will be the only router that can increment sequence numbers. With master/slave selection complete, database exchange can start

Optimizing OSPF Adjacency Behavior

As the number of routers on the segment grows, the number of OSPF adjacencies increases exponentially. Every router must synchronize its OSPF database with every other router, and in the case of a large number of routers, this leads to inefficiency.

OSPF Adjacencies on Multiaccess Networks

The routers on the multiaccess segment elect a designated router (DR) and backup designated router (BDR), which centralizes communications for all routers connected to the segment.

The DR and BDR improve network functioning in the following ways:

Only LSAs are sent to the DR/BDR. The normal routing of packets on the segment will go to the best next-hop router.

Neighbor Status

DR/BDR Election Process

The Designated Router and Backup Designate Router fields are populated with a list of routers claiming to be DR and BDR.

Using OSPF Priority in the DR/BDR Election

Every broadcast and NBMA OSPF-enabled interface is assigned a priority value between 0 and 255. By default, the OSPF interface priority is 1 and can be manually changed by using the ip ospf priority interface command.

Configuring the OSPF Priority on an Interface

Verifying OSPF Neighbor Status

OSPF Behavior in NBMA Hub-and-Spoke Topology

OSPF treats NBMA environments like any other broadcast media environment, such as Ethernet; however, NBMA clouds are usually built as hub-and-spoke topologies using private virtual circuits (PVCs) or switched virtual circuits (SVCs)

In these cases, the physical topology does not provide multiaccess capability, on which OSPF relies. In a hub-and-spoke NBMA environment, you will need to have the hub router acting as the DR and spoke routers acting as the DROTHER routers. On the spoke router interfaces, you want to configure an OSPF priority value of 0 so that the spoke routers never participate in the DR election.

The Importance of MTU

Manipulating OSPF Timers

Examining the Hello/Dead Timers

Modifying the Hello and Dead Intervals

OSPF Relationship over Point-to-Point Links

OSPF Neighbor Relationship over MPLS

OSPF Neighbor States

OSPF Network Types

Configuring Passive Interfaces

Building the Link-State Database

OSPF LSA Types

Other LSA Types

Examining the OSPF Link-State Database

Routing Table

OSPF LSDB

Type 1 LSA Details

Locally Generated Type 1 LSAs

Type 1 LSA

OSPF Type 2 Network LSA

Type 2 LSA

OSPF Type 3 Summary LSA

Type 3 LSA

OSPF Type 4 ASBR Summary LSA

Type 4 LSA

In the figure, the ASBR sends a type 1 router LSA with a bit (known as the external bit ) that is set to identify itself as an ASBR. When the ABR (identified with the border bit in the router LSA) receives this type 1 LSA, it builds a type 4 LSA and floods it to the backbone, area 0. Subsequent ABRs regenerate a type 4 LSA to flood it into their areas.

OSPF Type 5 External LSA

An external LSA on R4 describes the external network 10.0.0.0 with the subnet mask /16. The LSA is advertised by the R3 with a router ID 3.3.3.3. The zero forwarding address tells the rest of the routers in the OSPF domain that ASBR itself is the gateway to get to the external routes.

Type 5 LSA

Because of the flooding scope and depending on the number of external networks, the default lack of route summarization can also be a major issue with external LSAs. Therefore, you should consider summarization of external network numbers at the ASBR to reduce flooding problems.

Periodic OSPF Database Changes

Each LSA includes the link-state age variable, which counts the age of the LSA packet. When a network change occurs, the LSA’s advertising router generates an updated LSA to reflect the change in the network topology.

Exchanging and Synchronizing LSDBs

Synchronizing the LSDB on Multiaccess Networks

Running the SPF Algorithm

Verifying OSPF Frequency of the SPF Algorithm

OSPF Best Path Calculation

Cost = Reference bandwidth / Interface bandwidth

Examining the Interface Bandwidth and OSPF Cost

Default OSPF Costs

Modifying the Reference Bandwidth

Changing the Interface Bandwidth and OSPF Cost

Calculating the Cost of Intra-Area Routes

Calculating the Cost of Interarea Routes

Selecting Between Intra-Area and Interarea Routes

In the example topology in Figure 3-23 , ABR1 learns about network B directly from a router R4 and also from the ABR2. Even though the interarea path has a cost of 16, the intra-area path with a total cost of 21 is selected as the best path

Optimizing OSPF Behavior

OSPF Route Summarization

Route summarization is a key to scalability in OSPF.

Route summarization helps solve two major problems:

Every time that a route disappears in one area, routers in other areas also get involved in shortest-path calculation.

To reduce the size of the area database, you can configure summarization on an area boundary or autonomous system boundary.

OSPF Route Summarization Process

If the OSPF design includes many ABRs or ASBRs, suboptimal routing is possible. This is one of the drawbacks of summarization.

Benefits of Route Summarization

OSPF Route Summarization

OSPF offers two methods of route summarization:

ABR’s Summarization

area area-id range ip*-address mask* [ advertise | not-advertise ] [ cost cost ]

Configuring OSPF Route Summarization

Configuring Summarization on the ABR

Configuring OSPF Route Summarization

Summarization on ASBR’s

OSPF Virtual Links

The OSPF virtual link feature should be used only in very specific cases, for temporary connections or for backup after a failure. Virtual links should not be used as a primary backbone design feature.

Virtual Links Issues

Virtual Links Configuration Issues

Configuring OSPF Virtual Links

area area-id virtual-link router-id [ authentication [ message-digest | null ]][ hello-interval seconds ] [ retransmit-interval seconds ] [ transmitdelay seconds ] [ dead-interval seconds ] [[ authentication-key

key ] | [ message-digest-key key-id md5 key ]]

OSPF Stub Areas

The stub and totally stubby areas are deployed to reduce the size of the OSPF database and routing table:

Stub area: This area type does not accept information about routes external to the autonomous system, such as routes from non-OSPF sources. If routers need to route to networks outside the autonomous system, they use a default route, indicated as 0.0.0.0. Stub areas cannot contain ASBRs (except that the ABRs may also be ASBRs). The stub area does not accept external routes.

Totally stubby area: This Cisco proprietary area type does not accept external autonomous system routes or summary routes from other areas internal to the autonomous system. If a router needs to send a packet to a network external to the area, it sends the packet using a default route. Totally stubby areas cannot contain ASBRs (except that the ABRs may also be ASBRs). A totally stubby area does not accept external or interarea routes.

Configuring OSPF Stub Areas

Propagating a Default Route Using OSPF

OSPF Totally Stubby Areas

The leaf router (R3) in the totally stubby area has the smallest possible routing table. Only the intra-area routes are maintained. Interarea and external routes are not visible in the routing tables for each stub area, but are accessible via the intra-area default routes for that stub area.

Cost of the Default Route in a Stub Area

The default-information originate Command

default-information originate [ always ] [ metric metric-value ] [ metric-type typevalue ] [ route-map map-name ]

Other Stubby Area Types

OSPFv3

Configuring OSPFv3

Enabling OSPFv3

OSPFv3 Adjacencies and Routing Table

Specifying the Neighbor on an NBMA Interface

OSPF adjacencies over NBMA links require that IPv6 connectivity for both the link-local and the global addresses is established. Depending on the transport network, this may require mapping of IPv6 addresses to Layer 2 circuit identifiers

OSPFv3 LSDB

Renamed LSA

New LSA

OSPFv3 for IPv4 and IPv6

Configuring OSPFv3 Using the router ospfv3

OSPFv3 Old-Style OSPF Configuration Commands

OSPFv3 New-Style OSPF Configuration Commands

Enabling OSPFv3 for IPv4

On the NBMA links, such as the interface Serial 2/0 in this scenario, you need to define the OSPF neighbor. In the new-style OSPFv3 you must configure the IPv6 link-local address of the peer as the OSPF neighbor. Both address families use IPv6 as the underlying transport.

OSPFv3 Adjacencies for Both IPv4 and IPv6 Address Families

OSPFv3 LSDB

A router maintains a single OSPFv3 database, which contains various LSAs. Some LSAs carry IPv4-related information, others carry IPv6-related information, and others carry mixed information.

IPv4 Routing Table with OSPFv3 Routes

The OSPFv3 database for R1 is examined in Example 3-83

OSPFv3 ipv6 Routing Table

Configuring OSPFv3

Area 2 Routers Configured as a Totally Stubby Area

OSPFv3 Summarization

Configuring Advanced OSPFv3

Configuring the summary-prefix Command on an ASBR

summary-prefix prefix [ not-advertise | tag tag-value ] [ nssa**-only** ]

OSPFv3 Caveats

Chapter 3 Summary

← All CCNP articles Home