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



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:

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


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
-----

<ilan.berco@xxxxxxxxx> wrote in message
news:cf14cbb0-a000-4fe8-a582-37101311e6b6@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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


.



Relevant Pages

  • Re: Valid Routing Query
    ... The route you describe for a journey from Woking to Slough route ... Exeter, Bristol or Swindon would be much higher than the cost of your ... however based on the online routing ... other maps to allow a complete tracing. ...
    (uk.railway)
  • RE: Fax routing
    ... I understand you could not route your ... Open Server Management ... E-mail incoming routing method" ...
    (microsoft.public.windows.server.sbs)
  • Routing in the network :-)
    ... Itojun and I had played off and on ... routing information. ... So AT&T gives me the default route to IP-A1 ... up to FreeBSD.net and AT&T's network went down.. ...
    (freebsd-arch)
  • Re: Routing in the network :-)
    ... Itojun and I had played off and on ... routing information. ... So AT&T gives me the default route to IP-A1 ... up to FreeBSD.net and AT&T's network went down.. ...
    (freebsd-arch)
  • Re: adding static ip & ip routing
    ... To add a static route use route add command. ... This posting is provided "AS IS" with no warranties and confers no rights. ... > adding static ip & ip routing ...
    (microsoft.public.win2000.networking)