Home > OSPF & EIGRP Questions

OSPF & EIGRP Questions

March 23rd, 2020 Go to comments

Quick OSPF Overview

OSPF router ID selection:

OSPF uses the following criteria to select the router ID:
1. Manual configuration of the router ID (via the “router-id x.x.x.x” command under OSPF router configuration mode).
2. Highest IP address on a loopback interface.
3. Highest IP address on a non-loopback and active (no shutdown) interface.

OSPF forms neighbor relationship with other OSPF routers on the same segment by exchanging hello packets. The hello packets contain various parameters. Some of them should match between neighboring routers. These include:

+ Hello and Dead intervals
+ Area ID
+ Authentication type and password
+ Stub Area flag
+ Subnet ID and Subnet mask

When OSPF neighbor relationship is formed, a router goes through several state changes before it becomes fully adjacent with its neighbor. The states are Down -> Attempt (optional) -> Init -> 2-Way -> Exstart -> Exchange -> Loading -> Full. Short descriptions about these states are listed below:

Down: no information (hellos) has been received from this neighbor

Attempt: only valid for manually configured neighbors in an NBMA environment. In Attempt state, the router sends unicast hello packets every poll interval to the neighbor, from which hellos have not been received within the dead interval

Init: specifies that the router has received a hello packet from its neighbor, but the receiving router’s ID was not included in the hello packet

2-Way: indicates bi-directional communication has been established between two routers

Exstart: Once the DR and BDR are elected, the actual process of exchanging link state information can start between the routers and their DR and BDR

Exchange: OSPF routers exchange and compare database descriptor (DBD) packets

Loading: In this state, the actual exchange of link state information occurs. Outdated or missing entries are also requested to be resent

Full: routers are fully adjacent with each other

When OSPF is run on a network, two important events happen before routing information is exchanged:
+ Neighbors are discovered using multicast hello packets.
+ DR and BDR are elected for every multi-access network to optimize the adjacency building process. All the routers in that segment should be able to communicate directly with the DR and BDR for proper adjacency (in the case of a point-to-point network, DR and BDR are not necessary since there are only two routers in the segment, and hence the election does not take place).
For a successful neighbor discovery on a segment, the network must allow broadcasts or multicast packets to be sent.

In an NBMA network topology, which is inherently nonbroadcast, neighbors are not discovered automatically. OSPF tries to elect a DR and a BDR due to the multi-access nature of the network, but the election fails since neighbors are not discovered. Neighbors must be configured manually to overcome these problems

Each OSPF area only allows some specific LSAs to pass through. Below is a summarization of which LSAs are allowed in each OSPF area:

Area Restriction
Normal (Backbone & Non-Backbone) No Type 7 allowed
Stub No Type 5 AS-external LSA allowed
Totally Stub No Type 3, 4 or 5 LSAs allowed except the default summary route
NSSA No Type 5 AS-external LSAs allowed, but Type 7 LSAs that convert to Type 5 at the NSSA ABR can traverse
NSSA Totally Stub No Type 3, 4 or 5 LSAs except the default summary route, but Type 7 LSAs that convert to Type 5 at the NSSA ABR are allowed

Or this table will help you grasp it:

OSPF_LSAs_Area_types.jpg

OSPF Summarization
OSPF offers two methods of route summarization:
1) Summarization of internal routes performed on the ABRs
2) Summarization of external routes performed on the ASBRs

1) To summarize routes at the area boundary (ABRs), use the command:
area area-id range ip-address mask [advertise | not-advertise] [cost cost]

For example:

ABR1(config)#router ospf 1
ABR1(config-router)#area 1 range 192.168.0.0 255.255.252.0

An internal summary route is generated if at least one subnet within the area falls in the summary address range and the summarized route metric is equal to the lowest cost of all the subnets within the summary address range. Interarea summarization can only be done for the intra-area routes of connected areas, and the ABR creates a route to Null0 to avoid loops in the absence of more specific routes.

2) To summarize external routes on the domain boundary (ASBRs), use the command:
summary-address {{ip-address mask} | {prefix mask}} [not-advertise] [tag tag]
The ASBR will summarize external routes before injecting them into the OSPF domain as type 5 external LSAs.

Note: An exception of using the “summary-address” is at the boundary of a NSSA area.

In both methods of route summarization described above, a summarized route is only generated if at least one subnet in the routing table falls in the summary address range.

Summarization in EIGRP and OSPF

Unlike OSPF where we can summarize only on ABR or ASBR, in EIGRP we can summarize anywhere.

Manual summarization can be applied anywhere in EIGRP domain, on every router, on every interface via the ip summary-address eigrp as-number address mask [administrative-distance ] command (for example: ip summary-address eigrp 1 192.168.16.0 255.255.248.0). Summary route will exist in routing table as long as at least one more specific route exists. If the last specific route disappears, summary route will also fade out. The metric used by EIGRP manual summary route is the minimum metric of the specific routes. The example below shows how to configure EIGRP manual summarization:

Manual_summarization_EIGRP.jpgR1(config)#interface fa1/0
R1(config-if)#ip summary-address 10 172.16.0.0 255.255.254.0

If you are not sure about OSPF LSA Types, please read our OSPF LSA Types Tutorial.

OSPF area filtering

The command “area area-number filter-list prefixin“: Prevent prefixes from entering this area (in keyword here means “into”)
The command “area area-number filter-list prefixout“: Prevent other areas that the ABR is connected to receive the prefix.

OSPF Virtual Link

Virtual links are used to extend Area 0 across another area.

OSPF_Virtual_Link_Config.jpg

In order to configure virtual-link, we have to configure the OSPF router ID of the other ABR, not router-id. The configuration of virtual-link is:

Router(config)#router ospf ospf-process
Router(config-route)#area transit_area_id virtual-link router-id-of-remote

The area_id is the “transit area” that OSPF will tunnel through. The “transit area” cannot be a stub area of any kind.

OSPF Authentication
OSPF authentication can be enabling in two ways:
1) Per interface: Authentication is enabling per interface using the “ip ospf authentication” command. For example:

Router(config)#int fa0/0
Router(config-if)#ip ospf authentication message-digest
Router(config-if)#ip ospf message-digest-key 1 md5 networktut@123

2) Area authentication: Authentication for area can enable using “area {area-number} authentication” command. For example:

Router(config)#interface fa0/0
Router(config-if)#ip ospf message-digest-key 1 md5 networktut@123 // “1” here is the key number
Router(config-if)#exit
Router(config)#router ospf 100
Router(config-router)#area 2 authentication message-digest

-> In either case password must be configured at interface using “ip ospf message-digest-key” or “ip ospf authentication-key” command.

Question 1

Explanation

The newest OSPFv3 configuration approach utilizes a single OSPFv3 process. It is capable of supporting IPv4 and IPv6 within a single OSPFv3 process. OSPFv3 builds a single database with LSAs that carry IPv4 and IPv6 information. The OSPF adjacencies are established separately for each address family. Settings that are specific to an address family (IPv4/IPv6) are configured inside that address family router configuration mode.

Running single OSPFv3 for both IPv4 and IPv6 is supported since Cisco IOS Software Release 15.1(3)S.

The new-style OSPFv3 process is enabled using the router ospfv3 process-number command. Within the OSPF process configuration mode, the OSPF process ID is defined (using the router-id ospf-process-ID command).

OSPFv3 New-Style OSPF Configuration Commands:

R1(config)#ipv6 unicast-routing //although only OSPFv3 for IPv4 is configured but we have to enable IPv6 under global configuration mode
R1(config)#router ospfv3 1
R1(config-router)# router-id 1.1.1.1
R1(config)#interface GigabitEthernet0/1
R1(config-if)#ipv6 enable //although only OSPFv3 for IPv4 is configured but we have to enable IPv6 under interface mode
R1(config-if)#ospfv3 1 ipv4 area 0

Reference: https://www.ciscopress.com/articles/article.asp?p=2294214&seqNum=4

Question 2

Explanation

In the output of R1, we see R1 has a default route to the Internet via G1/0, which is correct but R2 does not have this route. One reasonable answer of this issue is R1 has been configured as a stub router so it only advertised connected and summary routes. In Branch router output, we also see routes that are directly connected to R1 only.

Note: In this topology, only Branch router should be configured as stub, not R1 router.

Question 3

Explanation

The AD of static route is manually configured to 130 which is higher than the AD of OSPF router which is 110.

Question 4

Explanation

The “summary-address” is only used to create aggregate addresses for OSPF at an autonomous system boundary. It means this command should only be used on the ASBR when you are trying to summarize externally redistributed routes from another protocol domain or you have a NSSA area. But a requirement to create a summarized route is:

“The ASBR compares the summary route’s range of addresses with all routes redistributed into OSPF on that ASBR to find any subordinate subnets (subnets that sit inside the summary route range). If at least one subordinate subnet exists, the ASBR advertises the summary route.”

Reference: CCNP Route 642-902 Official Certification Guide

But in this case we found no prefix that belongs to 10.0.0.0/8. Therefore a summarized route for this subnet could not be created.

Note:
+ If a prefix of this subnet exists in the routing table then after the summarization is performed, we will see such an entry:

Router# show ip route
— output omitted —
0 10.0.0.0/8 is a summary via null0

+ An example of using the command “summary-address” is shown below:

summary_address_RIP_OSPF.jpg

Recently the RIPv2 domain has been redistributed into our OSPF domain but the administrator wants to configure a summarized route instead of 32 external type-5 LSAs (for 172.16.32.0/24 to 172.16.63.0/24) flooding into the OSPF network. In this case the administrator has to use the “summary-address” command as follows:

Router(config-router)#summary-address 172.16.32.0 255.255.224.0

Note: In this case R1 is the ASBR for OSPF domain.

Question 5

Explanation

When redistributing into RIP, EIGRP (and IGRP) we need to specify the metrics or the redistributed routes would never be learned. In this case we need to configure like this:

router eigrp 1
 redistribute ospf 100 metric 10000 100 255 1 1500
Comments (4) Comments
Comment pages
1 2 2095
  1. Anonymous
    September 27th, 2023

    Question 4
    <>

    We can have summary routes to ABR routers too.

  2. GabWP
    November 22nd, 2023

    B(config-if)# do sh run int e0/1 | b int
    B(config-if)# interface Ethernet0/1
    B(config-if)# ip address 78.1.1.8 255.255.255.0
    B(config-if)# ipv6 enable
    B(config-if)# ospfv3 1 ipv4 area 1

    C(config)# interface Ethernet0/1.78
    C(config-subif)# encap dot1q 78
    C(config-subif)# ip add 78.1.1.7 255.255.255.0
    C(config-subif)# ospfv3 1 ipv4 area 0

    D(config-if)# do sh run int e0/1 | b int
    D(config-if)# interface Ethernet0/1
    D(config-if)# no ip address
    D(config-if)# ipv6 address 37::3/64
    D(config-if)# ipv6 enable
    D(config-if)# ipv6 ospf 1 area 0

    A network engineer receives a report that Spoke 1 users can perform bank transactions with the server located at the Center site, but Spoke 2 users cannot. Which action resolves the issue?

    A. Configure encapsulation dot1q 78 on the router C interface.
    B. Configure OSPFv2 on the routers B and C interfaces.correct
    C. Configure IPv6 on the routers B and C interfaces.wrong
    D. Configure the Spoke 2 users IP on the router B OSPF domain.

    On the composite questiones the correct answer is B. But as i understand, the OSPFv3 need a link-local adjacency. So in my opinion the best answer would be C

  3. Di
    January 15th, 2024

    Hello admin! I was do payment for enarsi, but my subscription doesn’t work, can you help me

  4. networktut
    January 15th, 2024

    @Di: Please send an email to support@networktut.com with your username or Invoice ID so that we can have closer check for you.

Comment pages
1 2 2095