specific routes with static default route

I need clarification on the specific routes and default route. The below output is from a sample static routes from a router (this is pointed to the internal network). I see that it has specific routes as well as a default route. Should it be sufficient just to have the static default route pointed to 192.168.200.1? Thx

S*    0.0.0.0/0 [1/0] via 192.168.200.1
S     192.168.0.0/24 [1/0] via 192.168.200.1
S     192.168.1.0/24 [1/0] via 192.168.200.1
S     192.168.2.0/24 [1/0] via 192.168.200.1
S     192.168.8.0/24 [1/0] via 192.168.200.1
LVL 1
leblancAccountingAsked:
Who is Participating?
 
Ken BooneConnect With a Mentor Network ConsultantCommented:
A specific route will always be chosen first.  In your case all routes go to the same place so in essence all you need is the default route.  The specific routes are unnecessary.
0
 
Fred MarshallConnect With a Mentor PrincipalCommented:
While it appears to be sufficient in this case to have the default route only, there are a few caveats:

- depending on the device and its use in context, it may not route private addresses/ranges.

The static default route is necessary for everything else.  Probably hard to get rid of anyway.
0
 
jburgaardCommented:
I agree with kenboonejr, if there are no 'holes' , fx 192.168.3/24 routed elsewhere, no need for the specific, all included in default.
0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
leblancAccountingAuthor Commented:
The S*    0.0.0.0/0 [1/0] via 192.168.200.1 will send the traffic for any network to the 192.168.200.1. So the rest of the routes are useless. Correct?
The reason I ask is because I see this type of static routing configuration in a lot of routers and I am not sure why you need all that: the default static route, the 192.168.0.0/24, and the specific routes (192.168.x.0/24)
0
 
Ken BooneConnect With a Mentor Network ConsultantCommented:
Yes the rest of the routes are useless.  

You see this because a lot of guys just don't have the experience to know what is going on and so they put them in there for good measure ;)
0
 
Fred MarshallPrincipalCommented:
I can imagine how such a table would be created automatically:

The default address is not compared with the others (VLANs perhaps?)

So, it just gets repeated.

I don't see any appreciable harm in it.... it's not like routing tables aren't traversed in normal operation all the time.
0
 
Ken BooneConnect With a Mentor Network ConsultantCommented:
No the routes shown were S - static routes - that means they were manually created.  Any interfaces on a router would have a C - connected routes - those are automatic.

Then if you are running a routing protocol you would have dynamic routes as well.

There is no harm in it, other than taking up space in the table, and longer processing - that you won't notice in the given example, and possibly typos that cause problems, and then routes that people leave in place  when they are aren't needed that causes problems down the road.  My advice is to only put in the routes you need.  It keeps it simple.
0
 
SouljaConnect With a Mentor Commented:
Are those the only routes in your table? I can see those specific routes being used if you have a more summarized route pointing elsewhere.

For example if you have a 192.168.0.0/16 pointing to a different next hop, yet those specific subnets exist else where.  If that is the case then those statics would be used.
0
 
Ken BooneNetwork ConsultantCommented:
Yes that would be the true.
0
 
leblancAccountingAuthor Commented:
Yes there are other 192.168.x.0 on the other remote locations.  I can understand why you need default static route as you may have other subnets (other than 192.168.x.0) in the internal network. But then you don't need the 192.168.0.0/24 route if you already have specific routes.
0
 
SouljaConnect With a Mentor Commented:
I am confused by your previous post. Is it a statement or question?

The 192.168.0.0/24 is a specific route.

If you are stating that you don't need a 192.168.0.0/16 if you have specific routes, it all depends. Are those specific routes going the same direction as the summarized route?

What if there are 50 networks behind that summarized route going to say next hop A, but you have 4 odd networks that exist behind hop B. Then you would poing those specific routes to the their respective hop.
0
 
leblancAccountingAuthor Commented:
This is what I was referring to:
S     192.168.0.0/24 [1/0] via 192.168.200.1
S     192.168.1.0/24 [1/0] via 192.168.200.1

So if you already have the specific route (192.168.1.0/24), you do not need 192.168.0.0/24. Correct?
0
 
Ken BooneConnect With a Mentor Network ConsultantCommented:
Well those are actually 2 different networks.  They go to the same place but 192.168.0.0/24 and 192.168.1.0/24 are 2 different networks.

Because you have a default route 0.0.0.0 going to the same location, you do not need either of these routes.

What Soulja was referring to is that if you had a route like 192.168.0.0 /16 going somewhere else, then that would take precedence over the default route, therefore you WOULD need the specific routes to ensure they go where you want them.
0
 
leblancAccountingAuthor Commented:
yes. I overlooked that. I was thinking of 192.168.0.0/16. Yes you're correct.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.