| Author |
IP Route table question
|
|
| BSims_1 2002-03-05, 9:29 am |
| Currently studing for my CCIE written exam, but I have been puzzled over a simple question. Can anyone help me clear up my problem?
In an IP route table which route would take precedence over the other?
A static route or a learned route with the longest mask match? | |
|
|
|
| A static route is always chosen over a learned one. If both routes are learned then the longest match rule is used. | |
|
| Kbani is right longest match is used when the administrative distance(AD) is the same | |
|
| OK, so I still get confused!!
I'll reread my BSCN later. | |
| MadChef 2002-03-06, 5:15 am |
| quote: Kbani is right longest match is used when the administrative distance(AD) is the same
And AD is the tie breaker when equal prefixes are found.
quote: Originally posted by Mat P
I believe its always the longest match.
You're right the longest match is always used, regardless of how it is learned (or if it's static). An iBGP route to 10.1.1.0/24 with an AD of 200 will be used before a static route to 10.0.0.0/8. The AD only comes into play when two equal length prefixes are compared.
MadChef | |
|
| Madchef,
So if I understand this right, the static route will only be used if the prefix is longer than any of the other routes known.
Otherwise a static route to 0.0.0.0 would always be used, even though we have a routing table full of routes.
Sorry - just reread your post and it pretty much confirms what I thought!
Thanks for clarifying it, maybe I'll have confidence in my own answers one day, lol. | |
| dmaftei 2002-03-06, 10:33 am |
| quote: Originally posted by MadChef
And AD is the tie breaker when equal prefixes are found.
...
I was under the impression that the AD is used when routes are to be installed in the routing table. For instance, the router is presented with 200.0.0.0/24 by RIP (AD 120), and with 200.0.0.0/24 by OSPF (AD 110); the router will install in the routing table OSPF's route. Am I missing something? Is it possible to have the same route (with different ADs) more than once in the routing table?  | |
| strikeattack 2002-03-06, 6:14 pm |
| Direct from my notes...
Administrative Distance is considered the “trustworthiness” of a route. IT IS ONLY IMPORTANT WHEN EQUAL ROUTING METRICS EXIST, A ROUTE IS LEARNED FROM MORE THAN ONE SOURCE, AND THERE ARE MULTIPLE ROUTER PROTOCOLS ACTIVE. It is an integer value used to determine route preference. Lower values are preferred over higher values. Static routes are preferred over dynamically learned entries, and routing protocols with more sophisticated metrics over simpler metrics. When using AD, the AD of a static route with the next-hop-address gets a 1. The AD of a static route with the interface specified is set to 0. You MUST use the next-hop address when using multi-access media for that interface (Ethernet, Frame Relay, X.25, ISDN). You MAY ONLY specify the interface if the adjacent router interface is part of a serial unnumbered link and therefore has no IP address.
Administrative distance CAN BE MODIFIED via the DISTANCE <WEIGHT> command. For EIGRP and BGP, use the commands DISTANCE EIGRP <INTERNAL-DISTANCE> <EXTERNAL-DISTANCE> for EIGRP, or DISTANCE BGP <EXTERNAL-DISTANCE> <INTERNAL-DISTANCE> <LOCAL-DISTANCE> for BGP.
The following are the default administrative distances of sources of routes:
Connected Interface 0
Static route out interface 0
Static route to a next hop 1
EIGRP summary route 5
External BGP 20
Internal EIGRP Route 90
IGRP 100
OSPF 110
IS-IS 115
RIP (v1 and v2) 120
EGP 140
External EIGRP Route 170
Internal BGP 200
Unknown 255 | |
| MadChef 2002-03-07, 5:26 am |
| quote: Originally posted by dmaftei
I was under the impression that the AD is used when routes are to be installed in the routing table. For instance, the router is presented with 200.0.0.0/24 by RIP (AD 120), and with 200.0.0.0/24 by OSPF (AD 110); the router will install in the routing table OSPF's route. Am I missing something? Is it possible to have the same route (with different ADs) more than once in the routing table?
That's what I tried to say, but I guess I wasn't clear. It seemed that people thought a lower AD route to 10.0.0.0/8 would be chosen over a higher AD route to 10.0.0.0/24 when a router was trying to get to 10.0.0.0/25 or something. I was trying to get across that this is not the case and that the router will always use the longest match first. AD comes into play in situations like you mention.
MadChef | |
| blancoj17 2002-03-07, 7:27 am |
| Team,
This subject is explained in every book....
longest match is always used
That (LONGEST MATCH) is the key.....very important for the written test to fully understand this..
JB |
|
|
|