cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
707
Views
0
Helpful
2
Replies

Routing selection in competency of different protocols

Suresh Babu
Level 1
Level 1

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

2 Accepted Solutions

Accepted Solutions

Rahul Kukreja
Level 1
Level 1

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

View solution in original post

Raju Sekharan
Cisco Employee
Cisco Employee

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

View solution in original post

2 Replies 2

Rahul Kukreja
Level 1
Level 1

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

Raju Sekharan
Cisco Employee
Cisco Employee

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

Review Cisco Networking for a $25 gift card