What is the default precedence: local-route, static-route, OSPF-route?

Hi

What is the default precedence: local-route, static-route, OSPF-route? Based on ipForwardProto (2/1/13) Need a reference (RFC?)

Thanks in advance Ilan

Reply to
ilan.berco
Loading thread data ...

snipped-for-privacy@gmail.com schrieb:

The metric of the route

Reply to
Uli Link

Thanks. In that case, the direct-route will allways have priority (since it's cost is 0). Any reference please? Ilan

Reply to
ilan.berco

administrative distance of the routes in question

0 connected routes 1 static routes

110 OSPF routes

Thus connected preferred over static preferred over OSPF

Reply to
Merv

Thanks. So "administrative distance" is prior to metric? Does the command: "Precedence =3D ospf rip static" overrides the default "administrative distance"?

Reply to
ilan.berco

Are you referring to IOS routing or some other Cisco product ?

AFAIK there is no IOS command "Precedence =3D ospf rip static"

In IOS, administrative distance is the FIRST tie breaker for route selection

Reply to
Merv

2nd google search for "cisco.com routing administrative distance" 1st hit...
formatting link
Reply to
Stephen

I assume you are looking for the "route selection process"..........

1 - Follow the route with the longest match. (prefix length)

RIP 10.1.1.0 via s1

OSPF 10.1.0.0 via s2

Static 10.0.0.0 via s3

EIGRP 10.1.0.0 via s4

ping 10.1.1.1

Where does the router send the ping?

I will send the ping via s1.

2 - Assuming there were multiple possibilities, and the match/mask length was the same for all:

RIP 10.1.0.0 via s1

OSPF 10.1.0.0 via s2

Static 10.1.0.0 via s3

EIGRP 10.1.0.0 via s4

Static Route Wins.

a - ip route 10.1.0.0 255.255.0.0 serial 3 (points to a physical interface)

b - ip route 10.1.0.0 255.255.0.0 12.12.12.12 (points to a next-hop-address)

3 - if there are no static routes:

RIP 10.1.0.0 via s1

OSPF 10.1.0.0 via s2

ISIS 10.1.0.0 via s3

EIGRP 10.1.0.0 via s4

The router will take the advice of a dynamic routing protocol.

The order of preference is:

Prot AD

EIGRP 90

OSPF 110

ISIS 115

RIP 120

We prefer routing protocols with a lower "administrative distance"

4 - If there's no dynamic route, then follow a default route:

a - ip route 0.0.0.0 0.0.0.0 serial 3 (points to a physical interface)

b - ip route 0.0.0.0 0.0.0.0 12.12.12.12 (points to a next-hop-address)

Default routes are also known as "last resort" routes. In the above,

12.12.12.12

would be the "gateway of last resort."

5 - None of the above ? Throw the packet away. You can't deal with it.
Reply to
John Agosta

For routes that have the same mask, administrative distance is the first parameter used to select the route which will be inserted into the RIB ( routing table)

Reply to
Merv

This post has the following sections: * Original Question * Clarification * Short Answer * Full Answer * Routing Example #1 * Routing Example #2 * Routing Example #3 * Routing Example #4

QUESTION:

CLARIFICATION:

ipForwardProto is an SNMP MIB. Let's not pay very much attention to the results of SNMP values and stick with the selection of routes from your question. The revisied question that I will answer is, "What is the selection process for routing?"

SHORT ANSWER:

For Cisco routers (not other vendor products), the default administrative distances, when not otherwise altered, are as follows: 0 - Directly connected 1 - Static route 5 - EIGRP summary route 20 - External BGP 90 - Internal EIGRP 100 - IGRP 110 - OSPF 115 - IS-IS 120 - RIP 140 - EGP 160 - ODR 170 - External EIGRP 200 - Internal BGP 255 - Unknown If more than one routing entry exists for the same network, the one with the lower administrative distance is used. Therefore, using the protocols from your original question, this is the selection order: 1) local routes 2) static routes 3) OSPF routes

FULL ANSWER:

The most specific routing entries are selected first, no matter the source of the routing information. If more then one entry for the exact same route is available, the one with the lowest administrative distance value is selected. If more than one entry for the exact same route is available with the same administrative distance, the one with the better metric is selected. 1) Most specific route entry, no matter the method which is is learned 2) Lowest administrative distance of the method which the route is learned (routing protocol) 3) Best metric of the available routes within that method (routing protocol)

The exception to this is when the administrative distance is changed. Static routes normally have an administrative distance of 1. This makes them less preferable than routing information from the interface configuraiton but more preferable than routing information from dynamic routing protocols like EIGRP and OSPF. This administrative distance of a static route can be changed. This is a normal static route which will have an administrative distance of

1: ip route 10.0.0.0 255.255.255.0 192.168.1.1 This is a modified static route which will have an administrative distance of 220: ip route 10.0.0.0 255.255.255.0 192.168.1.1 220 These are sometimes referred to as "floating static routes" because other routing methods are more likely to be used.

EXAMPLE #1:

A router with interfaces Serial0/0, Serial0/1, and FastEthernet0/0 is running EIGRP and OSPF while also having some static routes. The results of "show ip route" contain these entries: D 10.1.0.0/16 [90/180000] via 192.168.1.1, 2w3d, Serial0/0 O 10.1.0.0/16 [110/65] via 192.168.2.1, 2w3d, Serial0/1 S 10.1.0.0/16 [1/0] via 192.168.1.1 S 10.1.0.0/16 [20/0] via 192.168.2.1

If traffic is being routed to 10.1.1.1, it will go to 192.168.1.1.

The IP address 10.1.1.1 matches all four of the routing table entries equally with no one entry being more specific than the other. Therefore administrative distance is used and the static route with an administrative distance of 1 is used. No other routing table entries have the same administrative distance so the routing metric is not a factor.

EXAMPLE #2:

A router with interfaces Serial0/0, Serial0/1, and FastEthernet0/0 is running EIGRP and OSPF while also having some static routes. The results of "show ip route" contain these entries: D 10.1.0.0/16 [90/180000] via 192.168.1.1, 2w3d, Serial0/0 O 10.1.0.0/16 [110/65] via 192.168.2.1, 2w3d, Serial0/1 S 10.1.0.0/16 [1/0] via 192.168.1.1 S 10.1.1.0/24 [20/0] via 192.168.2.1

If traffic is being routed to 10.1.1.1, it will go to 192.168.2.1.

The IP address 10.1.1.1 does match all four of the routing table entries but the routing table entry 10.1.1.0/24 is more exact than the other entries using 10.1.0.0/16. Administrative distance is not considered because this one route matched more accurately. Metric is not considered because this one route matched more accurately.

EXAMPLE #3:

A router with interfaces Serial0/0, Serial0/1, and FastEthernet0/0 is running EIGRP and OSPF while also having some static routes. The results of "show ip route" contain these entries: D 10.1.0.0/16 [90/180000] via 192.168.1.1, 2w3d, Serial0/0 O 10.1.0.0/16 [110/65] via 192.168.2.1, 2w3d, Serial0/1 S 10.1.0.0/16 [100/0] via 192.168.1.1 Where will traffic to 10.1.1.1 normally be routed? If the EIGRP learned route is lost, where will traffic to 10.1.1.1 be routed?

If traffic is being routed to 10.1.1.1, it will go to 192.168.1.1. If the EIGRP learned route is lost, traffic to 10.1.1.1 will go to

192.168.1.1.

The IP address 10.1.1.1 matches all three of the routing table entries equally including the two entries which would remain after the EIGRP routing table entry is lost. The administrative distance of EIGRP, 90, would be the first choice but the modified administrative distance of the static route,

100, makes a second choice before considering routes from OSPF with an administrative distance of 110. No other routing table entries have the same administrative distance so the routing metric is not a factor. The EIGRP route to 192.168.1.1 is used first. The static route to 192.168.1.1 is used second. The OSPF route to 192.168.2.1 is used third.

EXAMPLE #4:

A router with interfaces FastEthernet0/0 and FastEthernet0/1 has some static routes. The results of "show ip route" contain these entries: S* 0.0.0.0/0 [1/0] via 192.168.10.1 S 10.0.0.0/8 [1/0] via 192.168.10.2 S 10.0.0.0/16 [1/0] via 192.168.10.3 S 10.0.0.0/24 [20/0] via 192.168.10.4 If traffic is being routed to 10.0.1.1, it will go to 192.168.10.3.

The IP address 10.0.1.1 matches three of the four routing table entries. The routing table entry for 10.0.0.0/16 is the most exact of the three and is the best match. Therefore administrative distance is used and the static route with an administrative distance of 1 is used. Administrative distance is not considered because one route matched with the most accuracy. Metric is not considered because this one route matched with the most accuracy.

REFERENCE:

There is not an RFC for this route selection process because this is specific to Cisco devices. Other router manufacturers will very likely not have IGRP and EIGRP so the administrative distance table cannot apply to them. The methods by which dynamic routing protocols determine their own internal metrics are available in RFCs for each specific routing protocol.

You may want to reference books and materials regarding the Cisco CCNP exam

642-901, "Building Scalable Cisco Internetworks". They cover routing protocol metrics and Cisco routing administrative distances.

I hope that answered any questions on the subject.

----- Scott Perry Indianapolis, IN

-----

Reply to
Scott Perry

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.