cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1090
Views
31
Helpful
6
Replies

Lookup first

Ibrahim Jamil
Level 6
Level 6

Hi Netpro

wich one of the below gets first in CORE Router routing table(R1) .when a packet destined to 10.10.10.0 in term of routing eventhough both has the same AD [1]

ip route 0.0.0.0 0.0.0.0 192.168.168.1

ip route 10.10.10.0 255.255.255.0 192.168.168.1

thanks

jamil

6 Replies 6

Raju Sekharan
Cisco Employee
Cisco Employee

Hi jamil,

Both entris will be thee in the routing table.

When it does lookup, it prefres the longest prefix match.

So when you send a packet to 10.10.10.0/24 subnet, it uses the entry

ip route 10.10.10.0 255.255.255.0 192.168.168.1

Thanks

Raju

Hi Raj , Hi Sudeep

but the router still has a defaut static route point every thing to 192.168.168.1 ,,,,,mmmmmm so the router prefer the more specific entry in the static router over default a route

thanks

jamil

That is right.  The "more specific route" criterion takes priority over any considerations of AD or of any particular routing protocol's preferences.  In fact, the AD rules only apply when the prefixes are exactly the same, including their length/mask.

Kevin Dorrell

Luxembourg

Hi Jamil,

a router installing a route to a routing table is one process. Routing by a router is a different process

AD comes into pictue only when the router installs the route in routing table

AD is compared only when the router compares  same prefix with same subnet mask.

When the router routes a packet, it always route based on the longest matching prefix

Thank you

Raju

Sudeep Valengattil
Cisco Employee
Cisco Employee

Hi Jamil,

If a packet destined to 10.10.10.0 network, it would use the 2nd entry (ie;  ip route 10.10.10.0 ) because of the longer prefix match.  Default route may be showing first in the routing table entries, because its listed in ascendng order.

Regards,

Sudeep

Rick Morris
Level 6
Level 6

Ibrahim - in routing no matter EIGRP, BGP, Static, or whatever the most specific route will be used.

If you have a specific route such as the 10.10 route it will be used.  The all 0.0.0.0 route is gateway of last resort, meaning if nothing else matches this is the route that is used.

In EIGRP and BGP the best route will be used from their respective tables and added to the routing table.  It is possible to have multiple routes in the EIGRP Top table and BGP Table, but remember the best and most specific will be added and used.