Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Multicast - Distance-preferred lookups

Hello,

I am trying to understand a concept regarding RPF checks. According to http://cisco.com/en/US/tech/tk828/technologies_tech_note09186a0080094b55.shtml

--------

Cisco IOS? calculates the RPF interface in this way. Possible sources of RPF information are Unicast Routing Table, MBGP routing table, DVMRP routing table and Static Mroute table. When you calculate the RPF interface, primarily administrative distance is used to determine exactly which source of information the RPF calculation is based on. The specific rules are:

*

All preceding sources of RPF data are searched for a match on the source IP address. When using Shared Trees, the RP address is used instead of the source address.

*

If more than one matching route is found, the route with the lowest administrative distance is used.

*

If the admin distances are equal, then this order of preference is used:

1.

Static mroutes

2.

DVMRP routes

3.

MBGP routes

4.

Unicast routes

*

If multiple entries for a route occur within the same route table, the longest match route is used.

---------

I went to my lab and tried some different scenarios to check if what I am reading is true. This is what I get from one of my attempts to prove myself wrong:

R1#sh ip route

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type 1, E2 - OSPF external type 2

i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

ia - IS-IS inter area, * - candidate default, U - per-user static route

o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

O 34.0.0.0/8 [110/30] via 12.0.0.2, 00:11:19, FastEthernet0/0

O 24.0.0.0/8 [110/20] via 12.0.0.2, 00:13:55, FastEthernet0/0

40.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

O 40.0.0.0/16 [110/21] via 12.0.0.2, 00:08:41, FastEthernet0/0

S 40.0.0.0/8 [1/0] via 13.0.0.3

C 12.0.0.0/8 is directly connected, FastEthernet0/0

C 13.0.0.0/8 is directly connected, FastEthernet0/1

R1#sh ip rpf 40.0.0.1

RPF information for ? (40.0.0.1)

RPF interface: FastEthernet0/0

RPF neighbor: ? (12.0.0.2)

RPF route/mask: 40.0.0.0/16

RPF type: unicast (ospf 1)

RPF recursion count: 0

Doing distance-preferred lookups across tables

R1#

From what I understand first all routes that match the source are taken and then their administrative distance is compared , thus I should use the route to 40.0.0.0 with next-hop 13.0.0.3. Unfortunately, as you can see from the sh ip rpf command, this is not happening.

I would really appreciate some help! Thank you in advance!

Regards,

Pavel

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: Multicast - Distance-preferred lookups

Pavel,

This is normal behavior as the longest match is still preferred over the admin distance within the unicast ipv4 RIB.

Hope this helps,

Harold Ritter
Sr. Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México 
Paseo de la Reforma 222 Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
8 REPLIES
New Member

Re: Multicast - Distance-preferred lookups

Hi Pavel,

There is a catch.:-)

"If multiple entries for a route occur within the same route table, the longest match route is used."

This is the reason 12.0.0.2 is used.40.0.0.0/16 is more specific than 40.0.0.0/8

HTH,

Nambi

New Member

Re: Multicast - Distance-preferred lookups

Hi Nambi,

This is most probably why this happens but I still don't get it. Isn't the administrative distance looked up first? Or is the administrative distance of routes compared only when I have routes with the same mask length in different tables (e.g, MBGP and Unicast Routing table)?

I am currently reading Developing IPv6 Multicast Networks from Cisco Press and here's the extract that made me think about this issue at first place.

-----

#This is for IPv6

First, the longest-match is searched across the three databases. If two or more equivalent routes are found across the tables, the tiebreaker used is the administrative distance. If the tie remains, the route found in the first of the tables listed above will be selected.

Note

A less-optimal distance-only criteria is currently used in IPv4 multicast RPF calculation. A route with a shorter prefix length can be preferred because its administrative distance happens to be lower than a route with a longer prefix length.

-----

Regards,

Pavel

New Member

Re: Multicast - Distance-preferred lookups

Hi Pavel,If we think about RPF logically, it does an unicast look up for the RP/Source IP address.In unicast route lookup the longest match is the best and that is what you see as the behaviour.I have not seen this less optimal path selection in my experience.May be, we can wait to hear from others.

Cisco Employee

Re: Multicast - Distance-preferred lookups

Pavel,

This is normal behavior as the longest match is still preferred over the admin distance within the unicast ipv4 RIB.

Hope this helps,

Harold Ritter
Sr. Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México 
Paseo de la Reforma 222 Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
New Member

Re: Multicast - Distance-preferred lookups

Thank you very much Harold! I thought about it for a little while and I think I finally managed to understand what the authors of the document and the book meant when they mentioned the administrative distance. The keyword in "Doing distance-preferred lookups across tables" is probably "across".

New Member

Re: Multicast - Distance-preferred lookups

Hi Pavel,What is the reason behind the note that you found in the book?

"Note

A less-optimal distance-only criteria is currently used in IPv4 multicast RPF calculation. A route with a shorter prefix length can be preferred because its administrative distance happens to be lower than a route with a longer prefix length."

New Member

Re: Multicast - Distance-preferred lookups

What the authors mean by that is that if there are, for example, two routes for the source in different tables (Static Mroute, DVMRP, MBGP or Unicast routing table), then first their administrative distance is compared. Within the same table (for instance, when you compare two unicast routing table routes), then the longest match route is preferred. I will give you an example. You have a route to 40.0.0.0/24 known via OSPF, a route to 40.0.0.0/16 know via EIGRP, and another route to 40.0.0.0/8 know via MP-eBGP. In this case the route know via MP-eBGP is preferred. Why? First, within the unicast routing table the route know via OSPF is preferred because this is the longest match. Then the route in the Unicast and MP-eBGP tables are compared but this time their administrative distance is checked. That is why you will end up choosing the MP-eBGP route for the RPF check.

This is how I understand it. Please correct me if I am wrong.

Regards,

Pavel

New Member

Re: Multicast - Distance-preferred lookups

Yes.It sounds logically correct to me.

440
Views
0
Helpful
8
Replies