11-09-2012 01:41 AM - edited 03-04-2019 06:05 PM
Hi All,
I need clarification on route selection and scenario like this but it’s just an example not a real scenario and Just to understand the route selection procedure.
I have a remote subnet and that is reachable in a 4 different paths and it’s been learnt in my Router with 4 different protocols like Static, OSPF, EIGRP, BGP.
As I feel it checks the AD and considers the static and reaches the destination subnet but somehow I heard on interviews as long prefix will be used as prime requirement prior to AD selection.
Please clarify me, what exactly that happens here…
Regards
Suresh
Solved! Go to Solution.
11-09-2012 01:56 AM
Hi,
Yes you have heard correct. When a packet comes on the interface of router - the destination ip is checked against the routing table.
So for an example if the packet is destined to 10.10.10.1 and you have following routes -
In Routing Table -
Static 10.10.10.0/30
EBGP 10.10.10.0/24
In EIGRP topology table - 10.10.10.0/24
In this case 10.10.10.1 is covered in 10.10.10.0/30 as well 10.10.10.0/24. But the longest prefix is with the static route. So the packet will be routed to the next hop of static route.
Also we were learning 10.10.10.0/24 from both EBGP and EIGRP. So as the mask is same for this prefix from both the protocols then EBGP (AD 20) wins the election over EIGRP (Internal Ad 90, External 170). So EBGP route is installed in Routing Table.
So in short the sequence is :
1. Longestest prefix (is the are multiple supernet which covers the destination ip address)
2. then AD (if the subnet mask of route learned is same fron multiple protocols)
3. then metric/cost/distance (if same route is learned from multiple peers)
you may also refer the following URL -
http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094823.shtml
- HTH
Rahul
11-09-2012 01:57 AM
Hi Suresh,
1. The AD is compared only when you learn the same subnet with same subnet mask learned via differrent routing
protocols
Example:
I have static route to 10.0.0.0/24 with default AD. I am learning the same via an OSPF neighbor.
In this case the static route is preferred
2. Longest prefix is selected from routing table if you are routing to any IP destination address
you have a static route for 10.0.0.0/8
You have learnded a route 10.0.0.0/24 via ospf
now both the routes will be present in routing table. Think the router has to route a packet to 10.0.0.1. Then it will use the OSPF route via 10.0.0.0/24 because that is the longest match
Thank you
Raju
11-09-2012 01:56 AM
Hi,
Yes you have heard correct. When a packet comes on the interface of router - the destination ip is checked against the routing table.
So for an example if the packet is destined to 10.10.10.1 and you have following routes -
In Routing Table -
Static 10.10.10.0/30
EBGP 10.10.10.0/24
In EIGRP topology table - 10.10.10.0/24
In this case 10.10.10.1 is covered in 10.10.10.0/30 as well 10.10.10.0/24. But the longest prefix is with the static route. So the packet will be routed to the next hop of static route.
Also we were learning 10.10.10.0/24 from both EBGP and EIGRP. So as the mask is same for this prefix from both the protocols then EBGP (AD 20) wins the election over EIGRP (Internal Ad 90, External 170). So EBGP route is installed in Routing Table.
So in short the sequence is :
1. Longestest prefix (is the are multiple supernet which covers the destination ip address)
2. then AD (if the subnet mask of route learned is same fron multiple protocols)
3. then metric/cost/distance (if same route is learned from multiple peers)
you may also refer the following URL -
http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094823.shtml
- HTH
Rahul
11-09-2012 01:57 AM
Hi Suresh,
1. The AD is compared only when you learn the same subnet with same subnet mask learned via differrent routing
protocols
Example:
I have static route to 10.0.0.0/24 with default AD. I am learning the same via an OSPF neighbor.
In this case the static route is preferred
2. Longest prefix is selected from routing table if you are routing to any IP destination address
you have a static route for 10.0.0.0/8
You have learnded a route 10.0.0.0/24 via ospf
now both the routes will be present in routing table. Think the router has to route a packet to 10.0.0.1. Then it will use the OSPF route via 10.0.0.0/24 because that is the longest match
Thank you
Raju
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide