cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
864
Views
0
Helpful
0
Replies

Demystifying the "compatible" rfc command for OSPFv3

Meddane
VIP
VIP

Background:

RFC 3101, 1587, 1583, RFC 5340 and RFC 2328 can be changed using the compatible command.

To restore the method used to calculate summary route costs per RFC 1583, use the compatible rfc1583 command in router configuration mode. To disable RFC 1583 compatibility, use the no form of this command. This command is backward compatible with Cisco IOS Release 12.0.

In Cisco IOS Release 15.1(2)S and later releases, RFC 3101 replaces RFC 1587, and RFC 3101 behavior is automatically enabled. You can choose the route selection behavior by configuring a router to run as RFC 3101 or RFC 1587 compatible.

To replace RFC 3101 compatibility with RFC 1587 compatibility for route selection in not-so-stubby area (NSSA) Area Border Routers (ABRs), use the compatible rfc1587 command in router configuration mode or address family configuration mode. To restore RFC 3101 compatibility, use the no form of this command.

In this scenario, I would like to show you the RFC Compatibility between RFC 3101, 1587, 1583 and 5340 for OSPFv3 and the impact of the compatible command.

 

Basic configuration:

R1:
interface Ethernet0/0
ipv6 address 12::1/64
ipv6 ospf 1 area 0
!
interface Ethernet0/1
ipv6 address 13::1/64
ipv6 ospf 1 area 13
!
interface Ethernet0/2
ipv6 address 14::1/64
ipv6 ospf 1 area 14
!
interface Ethernet0/3
ipv6 address 15::1/64
ipv6 ospf 1 area 15
!
ipv6 router ospf 1
router-id 0.0.0.1

R2:
interface Loopback0
ipv6 address 100::1/64
!
interface Ethernet0/0
ipv6 address 12::2/64
ipv6 ospf 1 area 0
!
ipv6 router ospf 1
router-id 0.0.0.5
redistribute connected

R3:
interface Loopback0
ipv6 address 100::1/64
!
interface Ethernet0/0
duplex auto
ipv6 address 13::3/64
ipv6 ospf 1 area 13
!
ipv6 router ospf 1
router-id 0.0.0.5
redistribute connected

R4:
interface Loopback0
ipv6 address 100::1/64
!
interface Ethernet0/0
ipv6 address 14::4/64
ipv6 ospf 1 area 14
!
ipv6 router ospf 1
router-id 0.0.0.5
redistribute connected

R5:
interface Loopback0
ipv6 address 100::1/64
!
interface Ethernet0/0
ipv6 address 15::5/64
ipv6 ospf 1 area 15
!
ipv6 router ospf 1
router-id 0.0.0.5
redistribute connected


R2, R3, R4 and R5 redistribute the prefix 100::/64 into OSPF, therefore the LSDB of R1 contains four Type-5 LSAs, the Forward Address is not set.

R1#sh ipv os data ext

OSPFv3 Router with ID (0.0.0.1) (Process ID 1)

Type-5 AS External Link States

LS age: 693
LS Type: AS External Link
Link State ID: 0
Advertising Router: 0.0.0.2
LS Seq Number: 80000001
Checksum: 0xFEBA
Length: 36
Prefix Address: 100::
Prefix Length: 64, Options: None
Metric Type: 2 (Larger than any link state path)
Metric: 20

LS age: 701
LS Type: AS External Link
Link State ID: 0
Advertising Router: 0.0.0.3
LS Seq Number: 80000001
Checksum: 0xF8BF
Length: 36
Prefix Address: 100::
Prefix Length: 64, Options: None
Metric Type: 2 (Larger than any link state path)
Metric: 20

LS age: 711
LS Type: AS External Link
Link State ID: 0
Advertising Router: 0.0.0.4
LS Seq Number: 80000001
Checksum: 0xF2C4
Length: 36
Prefix Address: 100::
Prefix Length: 64, Options: None
Metric Type: 2 (Larger than any link state path)
Metric: 20

LS age: 724
LS Type: AS External Link
Link State ID: 0
Advertising Router: 0.0.0.5
LS Seq Number: 80000001
Checksum: 0xECC9
Length: 36
Prefix Address: 100::
Prefix Length: 64, Options: None
Metric Type: 2 (Larger than any link state path)
Metric: 20

R1#

To select the best external route, R1 looks the best intra-area route to reach the ASBR. To find the best cost to reach the ASBRs R2, R3, R4 and R5, use the show ip os bor command.
As shown below, the metric to reach 0.0.0.2, 0.0.0.3, 0.0.0.4 and 0.0.0.5 is = 10.

R1#sh ipv os border

OSPFv3 Router with ID (0.0.0.1) (Process ID 1)

Codes: i - Intra-area route, I - Inter-area route

i 0.0.0.2 [10] via FE80::A8BB:CCFF:FE00:200, Ethernet0/0, ASBR, Area 0, SPF 9
i 0.0.0.3 [10] via FE80::A8BB:CCFF:FE00:300, Ethernet0/1, ASBR, Area 13, SPF 9
i 0.0.0.4 [10] via FE80::A8BB:CCFF:FE00:400, Ethernet0/2, ASBR, Area 14, SPF 8
i 0.0.0.5 [10] via FE80::A8BB:CCFF:FE00:500, Ethernet0/3, ASBR, Area 15, SPF 8
R1#

The routing table of R1 shows that it load balances between R2, R3, R4 and R5 to reach 100::/64.

R1#sh ipv route os
IPv6 Routing Table - default - 10 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
B - BGP, HA - Home Agent, MR - Mobile Router, R - RIP
H - NHRP, I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea
IS - ISIS summary, D - EIGRP, EX - EIGRP external, NM - NEMO
ND - ND Default, NDp - ND Prefix, DCE - Destination, NDr - Redirect
RL - RPL, O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1
OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
la - LISP alt, lr - LISP site-registrations, ld - LISP dyn-eid
lA - LISP away, a - Application
OE2 100::/64 [110/20]
via FE80::A8BB:CCFF:FE00:200, Ethernet0/0
via FE80::A8BB:CCFF:FE00:300, Ethernet0/1
via FE80::A8BB:CCFF:FE00:400, Ethernet0/2
via FE80::A8BB:CCFF:FE00:500, Ethernet0/3
R1#

With OSPFv3, RFC 5340 for OSPFv3 has been added to provide an update to RFC 1583. RFC 5340 provides another option of OSPFv3 External Path Preference.
RFC 5340 indicates the following rules which paths are preferred when multiple intra-AS paths are available to ASBRs or forwarding addresses:

1-Intra-area paths using nonbackbone areas are always the most preferred.
2-The other paths, intra area backbone paths and interarea paths, are of equal preference.

These rules apply when the same ASBR is reachable through multiple areas, or when trying to decide which of several AS-external-LSAs should be preferred. In the former case the paths all terminate at the same ASBR, and in the latter the paths terminate at separate ASBRs or forwarding addresses.In either case, each path is represented by a separate routing table entry. This feature applies only when RFC 1583 compatibility is set to disabled using the no compatibility rfc1583 command (RFC 5340 provides an update to RFC 1583).

Let's verify the RFC, by default R1 is running RFC 1583.

R1#sh ipv os | s RFC
Supports NSSA (compatible with RFC 3101)
Supports Database Exchange Summary List Optimization (RFC 5243)
RFC1583 compatibility enabled
Area BACKBONE(0)

R1#

Enable RFC 1583.

R1(config)#ipv router os 1
R1(config-rtr)#no compatible rfc1583

Verify that the RFC 1583 is disabled.

R1#sh ipv os | s RFC
Supports NSSA (compatible with RFC 3101)
Supports Database Exchange Summary List Optimization (RFC 5243)
RFC1583 compatibility disabled
Area BACKBONE(0)

R1#

Since RFC 1583 is disabled, this means that R1 is running RFC 5340.

The best path to reach the prefix 100::/64 is through R3, R4 and R5, in other words through the non-backbone areas 13, 14 and 15, since R1 is running RFC 5340, the ASBRs R3, R4 and R5 are reachable through a non-backbone areas (13, 14 and 15) with the same cost (10) are preferred than the ASBR R1 reachable through a backbone area. The RFC 5340 removes the external route through the backbone area (via R2).

R1 installs a load balancing through R3, R4 and R5 as shown by the show ip route command below.

R1#sh ipv route os
IPv6 Routing Table - default - 10 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
B - BGP, HA - Home Agent, MR - Mobile Router, R - RIP
H - NHRP, I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea
IS - ISIS summary, D - EIGRP, EX - EIGRP external, NM - NEMO
ND - ND Default, NDp - ND Prefix, DCE - Destination, NDr - Redirect
RL - RPL, O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1
OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
la - LISP alt, lr - LISP site-registrations, ld - LISP dyn-eid
lA - LISP away, a - Application
OE2 100::/64 [110/20]
via FE80::A8BB:CCFF:FE00:300, Ethernet0/1
via FE80::A8BB:CCFF:FE00:400, Ethernet0/2
via FE80::A8BB:CCFF:FE00:500, Ethernet0/3
R1#

Configure the area 15 as NSSA.

R1(config)#ipv router os 1
R1(config-rtr)#are 15 nssa

R5(config)#ipv router os 1
R5(config-rtr)#are 15 nssa

For area 15 NSSA, R5 creates and advertises a Type-7 LSA to describe the external prefix 100::/64. While R3 and R4 create and advertise a Type-5 LSA for regular areas 13 and 15.

Let's verify the routing table of R1.
We can see that R1 installs the NSSA external route through R5.

R1#sh ipv route os
IPv6 Routing Table - default - 10 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
B - BGP, HA - Home Agent, MR - Mobile Router, R - RIP
H - NHRP, I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea
IS - ISIS summary, D - EIGRP, EX - EIGRP external, NM - NEMO
ND - ND Default, NDp - ND Prefix, DCE - Destination, NDr - Redirect
RL - RPL, O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1
OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
la - LISP alt, lr - LISP site-registrations, ld - LISP dyn-eid
lA - LISP away, a - Application
ON2 100::/64 [110/20]
via 15::5, Ethernet0/3
R1#

The reason is answered by RFC 3101 for NSSA, this RFC is published in January 2003 to replace the old RFC 1587 published in March 1994.

Section: 2.5 Calculating Type-7 AS External Routes:

If the current LSA is functionally the same as an
installed LSA (i.e., same destination, cost and non-zero
forwarding address) then apply the following priorities in
deciding which LSA is preferred:

1. A Type-7 LSA with the P-bit set.

2. A Type-5 LSA.

3. The LSA with the higher router ID.

According to RFC 3101 the Type-7 LSA with the P-bit set is always preferred than a Type-5 LSA, if and only if metric of the external prefix (Default Metric is 20) and the cost toward the ASBRs or the Forward Addresses are equal. Since the Type-7 LSA's R5 and the Type-5's LSA originated by R3 and R4 have the same metric, the Type-7 LSA's R5 is preferred that the Type-5 LSAs's R3 and R4. Keep in mind that the OE2 and ON2 are equivalent.

By default R1 is running RFC 3101 as shown by the ipv osp command.

R1#sh ipv os | s RFC
Supports NSSA (compatible with RFC 3101)
Supports Database Exchange Summary List Optimization (RFC 5243)
RFC1583 compatibility disabled
Area BACKBONE(0)

R1#

The old RFC 1587 for NSSA published in March 1994 tells that the Type-5 LSA is always preferred than a Type-7 LSA as shown by the section 3.5 below.

3.5 Calculating Type-7 AS External Routes

When a type-5 LSA and a type-7 LSA are found to have the
same type and an equal distance, the following priorities
apply (listed from highest to lowest) for breaking the tie.

a. Any type 5 LSA.
b. A type-7 LSA with the P-bit set and the forwarding
address non-zero.
c. Any other type-7 LSA.

To confirm let's implement RFC 1587 on R1.

R1(config)#ipv router os 1
R1(config-rtr)#compatible rfc1587

On R1 verify that RFC 1587 is disabled.

R1#sh ipv os | s RFC
Supports NSSA (compatible with RFC 1587)
Supports Database Exchange Summary List Optimization (RFC 5243)
RFC1583 compatibility disabled
Area BACKBONE(0)

R1#

Per RFC 1587 for NSSA says that if a router receive a Type-7 LSA and Type-5 for the same destination the cost to the forwarding address or ASBR are equal, the Type-5 LSA is always preferred.

Verify the routing table of R1, Since the Type-5 LSAs originated by R3 and R4 and the Type-7 LSA's R5 have the same metric listed in the LSAs, and the same cost to reach the ASBRs R3&R4 and the Forward Address 15::5, the RFC 1587 rule is used as tie breaker. As a result R2 installs a load balancing through R3 and R4.

R1#sh ipv route os
IPv6 Routing Table - default - 10 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
B - BGP, HA - Home Agent, MR - Mobile Router, R - RIP
H - NHRP, I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea
IS - ISIS summary, D - EIGRP, EX - EIGRP external, NM - NEMO
ND - ND Default, NDp - ND Prefix, DCE - Destination, NDr - Redirect
RL - RPL, O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1
OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
la - LISP alt, lr - LISP site-registrations, ld - LISP dyn-eid
lA - LISP away, a - Application
OE2 100::/64 [110/20]
via FE80::A8BB:CCFF:FE00:400, Ethernet0/2
via FE80::A8BB:CCFF:FE00:300, Ethernet0/1
R1#

R1 is only using the external routes through the non-backbone areas 13 and 14. The external route through the backbone area (R2) is no longer used.

Remember R1 is running RFC 5340 after disabling RFC 1583. When multiple intra-AS paths are available to ASBRs or forwarding addresses, OSPFv3 External Path Preference for RFC 5340 is as follow:

1-Intra-area paths using nonbackbone areas are always the most preferred.
2-The other paths, intra area backbone paths and interarea paths, are of equal preference.

Verify that RFC 1583 is disabled.

R1#sh ipv os | s 1583
RFC1583 compatibility disabled
Area BACKBONE(0)

R1#

Let's enable RFC 1583 on R1.

R1(config)#ipv router os 1
R1(config-rtr)#compatible rfc1583

Verify that the RFC 1583 is enabled.

R1#sh ipv os | s 1583
RFC1583 compatibility enabled
Area BACKBONE(0)

R1#

Verify the routing table of R1, now the external route through the backbone area (R2) is added to load balance the traffic to 100::/64. Now we have three external routes in the routing table.

-Through R2
-Through R3
-Through R4

R1#sh ipv route os
IPv6 Routing Table - default - 10 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
B - BGP, HA - Home Agent, MR - Mobile Router, R - RIP
H - NHRP, I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea
IS - ISIS summary, D - EIGRP, EX - EIGRP external, NM - NEMO
ND - ND Default, NDp - ND Prefix, DCE - Destination, NDr - Redirect
RL - RPL, O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1
OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
la - LISP alt, lr - LISP site-registrations, ld - LISP dyn-eid
lA - LISP away, a - Application
OE2 100::/64 [110/20]
via FE80::A8BB:CCFF:FE00:200, Ethernet0/0
via FE80::A8BB:CCFF:FE00:400, Ethernet0/2
via FE80::A8BB:CCFF:FE00:300, Ethernet0/1
R1#

R1 is still preferring the Type-LSAs 5 originated by R2, R3 and R4 than the Type-7 LSA 's R5, this is because the RFC 1587 enabled on R1.

If you read the RFC 3101 The OSPF Not-So-Stubby Area (NSSA) Option, you will find that if RFC 1583 is disabled, when a router has multiple entries in the routing table to the same destination from the same ASBR and this ASBR is reachable through different non-backbone area, it will lookup the largest area id as the tie breaker, the route learned through the highest area id will be chosen.

From RFC 3101 section 2.5 Calculating Type-7 AS External Routes

If the forwarding address is set to 0.0.0.0 then packets
should be sent to the ASBR itself. If the LSA is Type-5, from
among the multiple non-NSSA routing table entries for the ASBR
(both NSSA and non-NSSA ASBR entries might exists on an NSSA
border router), select the preferred entry as follows:

If RFC1583Compatibility is set to "disabled", prune the set
of routing table entries for the ASBR as described in OSPF
Section 16.4.1. In any case, among the remaining routing
table entries, select the routing table entry with the least
cost; when there are multiple least cost routing table
entries the entry whose associated area has the largest OSPF
Area ID (when considered as an unsigned 32-bit integer) is
chosen.

When we say RFC 1583 compatibility is set to "disabled”, this means that RFC 5340 is enabled

RFC 5340 OSPF for IPv6 was published in July 2008, it describes the modifications to OSPF to support version 6 of the Internet Protocol (IPv6). The fundamental mechanisms of OSPF (flooding, Designated Router (DR) election, area support, Short Path First (SPF) calculations, etc.) remain unchanged compared to RFC 2328 for OSPF Version 2 published in April 1998.

Some unchanged mechanisms between RFC 2328 and RFC 5340 is the behavior described in "section 16.4. Calculating AS external routes".

From RFC 2328 section 16.4. Calculating AS external routes

If the forwarding address is set to 0.0.0.0, packets should
be sent to the ASBR itself. Among the multiple routing table
entries for the ASBR, select the preferred entry as follows.
If RFC1583Compatibility is set to "disabled", prune the set
of routing table entries for the ASBR as described in
Section 16.4.1. In any case, among the remaining routing
table entries, select the routing table entry with the least
cost; when there are multiple least cost routing table
entries the entry whose associated area has the largest OSPF
Area ID (when considered as an unsigned 32-bit integer) is
chosen.

RFC 5340 follows the same rule defined in RFC 2328 "section 16.4. Calculating AS external routes" about the largest area id as tie breaker.

The difference between RFC 1583 and RFC 5340, in regard to how to choose the best route among multiple external routes, is discussed in this section.

From RFC 1583 Section 16.4.6

Otherwise, compare the cost of this new AS external path to
the ones present in the table. Type 1 external paths are
always shorter than type 2 external paths. Type 1 external
paths are compared by looking at the sum of the distance to
the forwarding address and the advertised type 1 metric
(X+Y). Type 2 external paths are compared by looking at the
advertised type 2 metrics, and then if necessary, the
distance to the forwarding addresses.

If the new path is shorter, it replaces the present paths in
the routing table entry. If the new path is the same cost,
it is added to the routing table entry's list of paths.

As per RFC 1583, the path selection is based solely on cost.

Remember R1 is running RFC 1583.

To meet the requirement "multiple entries in the routing table to the same destination from the same ASBR".

Configure the ASBRs R2, R3 and R4 with the same Router-ID as the ASBR R5 0.0.0.5.

On R2, R3 and R4.

Rx(config)#ipv router os 1
Rx(config-rtr)#router-id 0.0.0.5

Remove the NSSA between R1 and R5.

R1(config-rtr)#no area 1 nssa
R5(config-rtr)#no area 15 nssa

Now R1 is receiving four Type-LSAs from R2, R3, R4 and R5. as mentioned previously at the beginning. To select the best external route, R1 looks the best intra-area route to reach the ASBR. To find the best cost to reach the ASBRs R2, R3, R4 and R5, use the show ip os bor command.

As shown below, the metric to reach 0.0.0.2, 0.0.0.3, 0.0.0.4 and 0.0.0.5 is = 10.

R1#sh ipv os bord

OSPFv3 Router with ID (0.0.0.1) (Process ID 1)

Codes: i - Intra-area route, I - Inter-area route

i 0.0.0.5 [10] via FE80::A8BB:CCFF:FE00:400, Ethernet0/2, ASBR, Area 14, SPF 21
i 0.0.0.5 [10] via FE80::A8BB:CCFF:FE00:300, Ethernet0/1, ASBR, Area 13, SPF 22
i 0.0.0.5 [10] via FE80::A8BB:CCFF:FE00:200, Ethernet0/0, ASBR, Area 0, SPF 24
i 0.0.0.5 [10] via FE80::A8BB:CCFF:FE00:500, Ethernet0/3, ASBR, Area 15, SPF 15
R1#

The routing table of R1 shows that it load balances between R2, R3, R4 and R5 to reach 100::/64.

R1#sh ipv route os
IPv6 Routing Table - default - 10 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
B - BGP, HA - Home Agent, MR - Mobile Router, R - RIP
H - NHRP, I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea
IS - ISIS summary, D - EIGRP, EX - EIGRP external, NM - NEMO
ND - ND Default, NDp - ND Prefix, DCE - Destination, NDr - Redirect
RL - RPL, O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1
OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
la - LISP alt, lr - LISP site-registrations, ld - LISP dyn-eid
lA - LISP away, a - Application
OE2 100::/64 [110/20]
via FE80::A8BB:CCFF:FE00:200, Ethernet0/0
via FE80::A8BB:CCFF:FE00:300, Ethernet0/1
via FE80::A8BB:CCFF:FE00:400, Ethernet0/2
via FE80::A8BB:CCFF:FE00:500, Ethernet0/3
R1#

Verify that R1 is still running RFC 1583.

R1#sh ipv os | s RFC
Supports NSSA (compatible with RFC 1587)
Supports Database Exchange Summary List Optimization (RFC 5243)
RFC1583 compatibility enabled
Area BACKBONE(0)

R1#

Let's disable RFC 1583 on R1.

R1(config)#ipv router os 1
R1(config-rtr)#no compatible rfc1583

Verify that RFC 1583 is disabled. This means that RFC 5340 is enabled and follows the same rule of RFC 2328 described in section 16.4. Calculating AS external routes.

R1#sh ipv os | s RFC
Supports NSSA (compatible with RFC 1587)
Supports Database Exchange Summary List Optimization (RFC 5243)
RFC1583 compatibility disabled
Area BACKBONE(0)

R1#

On R1 Verify the entry for 100::/64, we can see that the external route 100::/64 through R5 is chosen because area id 15 connected to R5 is highest than the areas id 12, 13 and 14 connected to R2, R3 and R4 respectively.

R1#sh ipv route os
IPv6 Routing Table - default - 10 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
B - BGP, HA - Home Agent, MR - Mobile Router, R - RIP
H - NHRP, I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea
IS - ISIS summary, D - EIGRP, EX - EIGRP external, NM - NEMO
ND - ND Default, NDp - ND Prefix, DCE - Destination, NDr - Redirect
RL - RPL, O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1
OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
la - LISP alt, lr - LISP site-registrations, ld - LISP dyn-eid
lA - LISP away, a - Application
OE2 100::/64 [110/20]
via FE80::A8BB:CCFF:FE00:500, Ethernet0/3
R1#

0 Replies 0
Review Cisco Networking products for a $25 gift card