OSPF Fundamentals Flashcards

1
Q
A

OSPF advertises link-state advertisements (LSAs) that contain the link state and link metric to neighboring routers. Received LSAs are stored in a local database called the link-state database (LSDB) and advertise the link-state information to neighboring routers exactly as the original advertising router advertised it.

This process floods the LSA throughout the OSPF routing domain just as the advertising router advertised it. All OSPF routers maintain a synchronized identical copy of the LSDB within an area.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

LSDB

A

The LSDB provides the topology of the network, in essence providing the router a complete map of the network. All OSPF routers run Dijkstra’s shortest path first (SPF) algorithm to construct a loop-free topology of shortest paths.

OSPF runs the SPF algorithm to calculate the SPT (Shortest Path Tree), finding the shortest path to each destination.

Each router sees itself as the root or top of the SPF tree (SPT), and the SPT contains all network destinations within the OSPF domain. The SPT differs for each OSPF router, but the LSDB used to calculate the SPT is identical for all OSPF routers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

SPT (Shortest Path Tree)

A

The SPTs give the illusion of no redundancy in a network, but remember that the SPT shows the shortest path to reach a network and is built from the LSDB, which contains all the links for an area. During a topology change, the SPT is rebuilt and may change.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

OSPF Process

A

A router can run multiple OSPF processes. Each process maintains its own unique database,
and routes learned in one OSPF process are not available to a different OSPF process without redistribution of routes between processes
. The OSPF process numbers are locally significant and do not have to match among routers. If OSPF process number 1 is running on one router
and OSPF process number 1234 is running on another, the two routers can become neighbors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Areas

A

OSPF provides scalability for the routing table by splitting segments of the topology into multiple OSPF areas within the routing domain.

Area membership is set at the interface level, and the area ID is included in the OSPF hello packet. An interface can belong to only one area. All routers within the same OSPF area
maintain an identical copy of the LSDB.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Single Area trade-offs

A

An OSPF area grows in size as the number of network links and number of routers increase in the area. While usi1ng a single area simplifies the topology, there are trade-offs:

  • A full SPT calculation runs when a link flaps within the area.
  • With a single area, the LSDB increases in size and becomes unmanageable.
  • The LSDB for the single area grows, consumes more memory, and takes longer during the SPF computation process.
  • With a single area, no summarization of route information occurs.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Multiple Areas

A

If a router has interfaces in multiple areas, the router has multiple LSDBs (one for each area).

The internal topology of one area is invisible from outside that area. If a topology change occurs (such as a link flap or an additional network added) within an area, all routers in the same OSPF area calculate the SPT again. Routers outside that area do not calculate the full SPT again but do perform a partial SPF calculation if the metrics have changed or a prefix is removed.

In essence, an OSPF area hides the topology from another area but allows the networks to be visible in other areas within the OSPF domain. Segmenting the OSPF domain into multiple areas reduces the size of the LSDB for each area, making SPT calculations faster and decreasing LSDB flooding between routers when a link flaps.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Backbone Area

A

Area 0 is a special area called the backbone.

By design, OSPF uses a two-tier hierarchy in which all areas must connect to the upper tier, Area 0, because OSPF expects all areas to inject routing information into Area 0. Area 0 advertises the routes into other nonbackbone areas. The backbone design is crucial to preventing routing loops.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Area ID

A

The area identifier (also known as the area ID) is a 32-bit field and can be formatted in simple decimal (0 through 4294967295) or dotted decimal (0.0.0.0 through 255.255.255.255).

When configuring routers in an area, if you use decimal format on one router and
dotted-decimal format on a different router, the routers will be able to form an adjacency.

OSPF advertises the area ID in the OSPF packets.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

ABRs

A

Area border routers (ABRs) are OSPF routers connected to Area 0 and another OSPF area, per Cisco definition and according to RFC 3509.

ABRs are responsible for advertising routes from one area and injecting them into a different OSPF area.

Every ABR needs to participate in Area 0 to allow for the advertisement of routes into another area. ABRs compute an SPT for every area that they participate in.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Routes Advertisement between Areas

A

R1 is connected to Area 0, Area 1, and Area 2.

Routes from Area 1 advertise into Area 0.

Routes from Area 2 advertise into Area 0.

Routes from Area 0 advertise into Areas 1 and 2. This includes the local Area 0 routes, in
addition to the routes that were advertised into Area 0 from Area 1 and Area 2.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Inter-Router Communication

A

OSPF runs directly over IPv4, using its own protocol 89.

OSPF uses multicast where possible to reduce unnecessary traffic.

There are two OSPF multicast addresses:

  • AllSPFRouters: IPv4 address 224.0.0.5 or MAC address 01:00:5E:00:00:05. All routers running OSPF should be able to receive these packets.
  • AllDRouters: IPv4 address 224.0.0.6 or MAC address 01:00:5E:00:00:06. Communication with designated routers (DRs) uses this address.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Packet Types

A
  • Hello: Packets are sent out periodically on all OSPF interfaces to discover new neighbors while ensuring that other neighbors are still online.
  • DBD or DDP: Packets are exchanged when an OSPF adjacency is first being formed. These packets are used to describe the contents of the LSDB.
  • LSR (Link State Request): When a router thinks that part of its LSDB is stale, it may request a portion of a neighbor’s database using this packet type.
  • LSU (Link State Update): This is an explicit LSA for a specific network link, and normally it is sent in direct response to an LSR.
  • LSACK: These packets are sent in response to the flooding of LSAs, thus making the flooding a reliable transport feature.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Router ID

A

In some OSPF output commands, neighbor ID refers to the RID; the terms are synonymous. The RID must be unique for each OSPF process in an OSPF domain and must be unique between OSPF processes on a router.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Neighbors

A

An OSPF neighbor is a router that shares a common OSPF-enabled network link. OSPF routers discover other neighbors through the OSPF hello packets. An adjacent OSPF neighbor is an OSPF neighbor that shares a synchronized OSPF database between the two neighbors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Neighbor States

A
  • Down: It indicates that the router has not received any OSPF hello packets.
  • Init: A state in which a hello packet has been received from another a router, but bidirectional communication has not been established.
  • 2-way: A state in which bidirectional communication has been established. If a DR or BDR is needed, the election occurs during this state.
  • ExStart: Routers identify which router will be the master or slave for the LSDB synchronization.
  • Exchange: A state during which routers are exchanging link states by using DBD packets.
  • Loading: A state in which LSR packets are sent to the neighbor, asking for the more recent LSAs that have been discovered (but not received) in the Exchange state.
  • Full: A state in which neighboring routers are fully adjacent.
17
Q

Requirements for Neighbor Adjacency

A

The following list of requirements must be met for an OSPF neighborship to be formed:

  • RIDs must be unique between routers.
  • The interfaces must share a common subnet.
  • The interface (MTU) must match because the OSPF does not support fragmentation.
  • The area ID must match for that segment.
  • The need for a DR must match for that segment.
  • OSPF hello and dead timers must match for that segment.
  • Authentication type and credentials must match.
  • Area type flags must be identical.
18
Q

Neighbor Adjacencies Flow

A
19
Q

OSPF Network Command

A

The OSPF network statement identifies the interfaces that the OSPF process will use and the area that those interfaces participate in. The network statements match against the primary IPv4 address and netmask associated with an interface.

A common misconception is that the network statement advertises the networks into OSPF; in reality, though, the network statement selects and enables OSPF on the interface. The interface is then advertised in OSPF through the LSA. The network statement uses a wildcard mask, which allows the configuration to be as specific or vague as necessary.

20
Q

Passive Interfaces

A

Enabling an interface with OSPF is the quickest way to advertise the network segment to other OSPF routers. Making the network interface passive still adds the network segment to the LSDB but prohibits the interface from forming OSPF adjacencies. A passive interface does not send out OSPF hellos and does not process any received OSPF packets.

21
Q

show ip ospf interface brief

A
  • Interface: Interfaces with OSPF enabled
  • PID: The OSPF Process ID
  • Area: The area that this interface is associated with.
  • IP Address/Mask: The IP address and subnet mask for the interface.
  • Cost: A factor the SPF algorithm uses to calculate a metric for a path.
  • State: The current interface state (DR, BDR, DROTHER), P2P LOOP or Down
  • Nbrs F: The number of neighbors for a segment that are fully adjacent.
  • Nbrs C: The number of neighbors for a segment that are in 2-WAY state.

The DROTHER is a router on the DR-enabled segment that is not the DR or the BDR; it is simply the other router. DROTHERs do not establish full adjacency with other DROTHERs.

22
Q

show ip ospf neighbor

A
  • Neighbor ID: The router ID
  • Pri: The priority for the neighbor’s interface, which is used for DR/BDR elections.
  • State: The second State field is the DR, BDR, or DROTHER role if the interface requires a DR. For non-DR network links, the second field shows just a hyphen (-).
  • Dead Time: The dead time left until the router is declared unreachable.
  • Address: The primary IP address for the OSPF neighbor.
  • Interface: The local interface to which the OSPF neighbor is attached.
23
Q

External OSPF Routes

A

External routes are routes learned from outside the OSPF domain, but they are injected into an OSPF domain through redistribution.

When a router redistributes routes into an OSPF domain, the router is called an autonomous system boundary router (ASBR). An OSPF domain can have an ASBR without having an ABR. An OSPF router can be an ASBR and an ABR at the same time.

External routes are classified as Type 1 or Type 2.

24
Q

Type 1 and Type 2 OSPF External Routes

A
  • Type 1 routes are preferred over Type 2 routes.
  • The Type 1 metric equals the redistribution metric plus the total path metric to the ASBR. In other words, as the LSA propagates away from the originating ASBR, the metric increases.
  • The Type 2 metric equals only the redistribution metric. This is the default external metric type used by OSPF.
25
Q

Default Route Advertisement

A

OSPF supports advertising the default route into the OSPF domain. The advertising router must have a default route in its routing table for the default route to be advertised.

To advertise the default route, you use the command default-information originate [always] [metric metric-value] [metric-type type-value] underneath the OSPF process.

The always optional keyword causes the default route to be advertised even if a default route does not exist in the RIB.

Notice that OSPF advertises the default route as an external OSPF route.

O*E2 0.0.0.0/0 [110/1] via 10.12.1.1, 00:02:56, GigabitEthernet0/1

26
Q

The DR and BDR

A

Multi-access networks such as Ethernet (LANs) and Frame Relay networks allow more than two routers to exist on a network segment. This could cause scalability problems with OSPF as the number of routers on a segment increases. Additional routers flood more LSAs on the segment, and OSPF traffic becomes excessive as OSPF neighbor adjacencies increase. If four routers share the same multi-access network, six OSPF adjacencies form, along with six occurrences of database flooding on a network.

Having so many adjacencies per segment consumes more bandwidth, more CPU processing, and more memory to maintain each of the neighbor states.

27
Q

OSPF DR Concept

A

OSPF overcomes this inefficiency by creating a pseudonode (that is, a virtual router) to manage the adjacency state with all the other routers on that broadcast network segment. A router on the broadcast segment, known as the designated router (DR), assumes the role of the pseudonode. The DR reduces the number of OSPF adjacencies on a multi-access network segment because routers form full OSPF adjacencies only with the DR and not each other. The DR is then responsible for flooding the update to all OSPF routers on that segment as updates occur.

If the DR were to fail, OSPF would need to form new adjacencies, invoking all new LSAs, and could potentially cause a temporary loss of routes. In the event of DR failure, a backup designated router (BDR) becomes the new DR; then an election occurs to replace the BDR. To minimize transition time, the BDR also forms a full OSPF adjacency with all OSPF routers on that segment.

28
Q

DR/BDR LSA distribution process

A
  1. All DROTHER routers on a segment form a full OSPF adjacency with the DR and BDR. As an OSPF router learns of a new route, it sends the updated LSA to the AllDRouters (224.0.0.6) address, which only the DR and BDR receive and process.
  2. The DR sends a unicast acknowledgment to the router that sent the initial LSA update.
  3. The DR floods the LSA to all the routers on the segment via the AllSPFRouters (224.0.0.5) address.
29
Q

DR Elections

A

The DR/BDR election occurs during OSPF neighborship—specifically, during the last phase of the 2-Way neighbor state and just before the ExStart state. When a router enters the 2-Way state, it has already received a hello from the neighbor.

Any router with the OSPF priority of 1 to 255 on its OSPF interface attempts to become the DR. By default, all OSPF interfaces use a priority of 1. The routers place their RID and OSPF priority in their OSPF hellos for that segment.

If the OSPF priority is the same, the higher RID is more favorable.

The OSPF DR and BDR roles cannot be preempted after the DR/BDR election. Only upon the failure (or process restart of the DR or BDR) does the election start to replace the role that is missing.

30
Q

DR and BDR Placement

A

Modifying a router’s RID for DR placement is a bad design strategy. A better technique involves modifying the interface priority to a higher value than that of the existing DR. Changing the priority to a value higher than that of the other routers (a default value of 1) increases the chance of that router becoming the DR for that segment on that node. Remember that OSPF does not preempt the DR or BDR roles, and it might be necessary to restart the OSPF process on the current DR/BDR for the changes to take effect.