Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IP route list order

Status
Not open for further replies.

ktarantino

Technical User
Apr 5, 2006
2
US
Is the any meaning to the order of the IP route list?

When do a show run I see the following:

ip route 0.0.0.0 0.0.0.0 10.20.10.3
ip route 10.10.10.10 255.255.255.255 Serial0.1

Above you can see that the default route is on the top of the list. However, the output from a show ip route shows the default route on the bottom instead.

Why are the routes shown in different order in different places. Does the router process the routes in any particular order?

Thanks in advance.
 
The order of the routes in the running config or the routing table is not relevant in the router's route selection process.

A router will always take the closest match for a route over any other route. By that I mean, if it is trying to pass traffic to a host address, say 10.10.20.10, and it has, say, 4 routes to choose from:

ip route 0.0.0.0 0.0.0.0 10.20.10.3
ip route 10.0.0.0 255.0.0.0 Serial0.3
ip route 10.10.0.0 255.255.0.0 Serial0.2
ip route 10.10.20.0 255.255.255.0 Serial0.1

It will always choose the route for 10.10.20.0 as it's a closer match for its desired destination.

Similarly given the routing table output above, traffic destined for a host 10.20.20.1 will use the route for 10.0.0.0/8 via serial0.3 as it's the closer match in this instance.

 
Hi, the order of the routes make no difference at all. Route selection ( if using classless routing )then the route in the routing table ( no matter of order ) will be selected with the highest Net mask match/network match.

Lee

LEEroy
MCNE6,CCNA2,CWNA, Project+, CCSA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top