Odd route statements

Started by Nerm, June 23, 2016, 10:04:58 AM

Previous topic - Next topic

Nerm

Maybe I am missing something, but I have been seeing others doing default routes and then specific routes to the same destination and I can't figure out why.

Example:

ip route 0.0.0.0 0.0.0.0 192.168.1.1
ip route 192.168.0.0 255.255.0.0 192.168.1.1
ip route 172.16.0.0 255.240.0.0 192.168.1.1
ip route 10.0.0.0 255.0.0.0 192.168.1.1


I know I haven't been in the game as long as you guys so I was hoping someone can elaborate on why anyone would do this. If I already have a default route to a specific router what is the point of routing other specific subnets to the same router? Doesn't this just bloat the config?

icecream-guy

#1
Quote from: Nerm on June 23, 2016, 10:04:58 AM
Maybe I am missing something, but I have been seeing others doing default routes and then specific routes to the same destination and I can't figure out why.

Example:

ip route 0.0.0.0 0.0.0.0 192.168.1.1
ip route 192.168.0.0 255.255.0.0 192.168.1.1
ip route 172.16.0.0 255.240.0.0 192.168.1.1
ip route 10.0.0.0 255.0.0.0 192.168.1.1


I know I haven't been in the game as long as you guys so I was hoping someone can elaborate on why anyone would do this. If I already have a default route to a specific router what is the point of routing other specific subnets to the same router? Doesn't this just bloat the config?

'show ip route' on the router  and have a look see at the routing table, that may clear up the confusion.

looks like the additional routes are for RFC 1918 space

:professorcat:

My Moral Fibers have been cut.

Nerm

#2
I know the additional routes are for rfc1918. That was just an example. My question is what is the point of routing a specific network (say rfc1918's for example) to the same destination that is already defined in your default route. It obviously makes sense when you want to send a specific network to a destination that is not your default route, but if you want all your L3 traffic going to your default route anyway why even have any other routes?

deanwebb

Maybe the guy plans to buy another router in the future for that traffic and just wanted it set apart in the statements?

More likely, if the default route is killed off for security reasons (blocking a botnet), the rest of that traffic still routes properly.
Take a baseball bat and trash all the routers, shout out "IT'S A NETWORK PROBLEM NOW, SUCKERS!" and then peel out of the parking lot in your Ferrari.
"The world could perish if people only worked on things that were easy to handle." -- Vladimir Savchenko
Вопросы есть? Вопросов нет! | BCEB: Belkin Certified Expert Baffler | "Plan B is Plan A with an element of panic." -- John Clarke
Accounting is architecture, remember that!
Air gaps are high-latency Internet connections.

Otanx

There can be a bunch of reasons for doing it. Maybe legacy. The default used to be different, but was changed, and nobody cleaned up anything. This is currently the case in our network because we are in the middle of migrating a gateway. Another two weeks or so, and I can clean up everything. There could be a route in OSPF/BGP/etc for that network that they want to override so they set a static to force it back where they want it. Could have been from troubleshooting. I have seen too many people not trust that they match a default so they put in a /32 or something to make sure it is going where they want.

-Otanx

mlan

As others have mentioned, I usually see this due to lack of clean-up from infrastructure changes.

Nerm

Quote from: mlan on June 23, 2016, 05:54:39 PM
As others have mentioned, I usually see this due to lack of clean-up from infrastructure changes.

This is most likely the case I think for what I am seeing. I just wanted to make sure I wasn't crazy lol.

Otanx

Quote from: Nerm on June 24, 2016, 07:24:53 AM
Quote from: mlan on June 23, 2016, 05:54:39 PM
As others have mentioned, I usually see this due to lack of clean-up from infrastructure changes.

This is most likely the case I think for what I am seeing. I just wanted to make sure I wasn't crazy lol.

This is an invalid test of sanity. You are a network engineer of course you are crazy.

-Otanx

icecream-guy

Quote from: ristau5741 on June 23, 2016, 10:51:21 AM

'show ip route' on the router  and have a look see at the routing table, that may clear up the confusion.


The routing table should have contained the more specific routes, not all traffic would have taken the default route (event though its the same interface) the longest match rule would have put the other static routes, whereby traffic destined for those networks would go,  along with the default route into the routing table.
:professorcat:

My Moral Fibers have been cut.

Nerm

Quote from: ristau5741 on June 24, 2016, 11:00:48 AM
Quote from: ristau5741 on June 23, 2016, 10:51:21 AM

'show ip route' on the router  and have a look see at the routing table, that may clear up the confusion.


The routing table should have contained the more specific routes, not all traffic would have taken the default route (event though its the same interface) the longest match rule would have put the other static routes, whereby traffic destined for those networks would go,  along with the default route into the routing table.


I understand the "more specific" route aspect in the routing decision. I was trying to think of reasons one would "want" to have more specific routes destined for the same router as the default route.

Quote from: Otanx on June 24, 2016, 10:03:23 AM
Quote from: Nerm on June 24, 2016, 07:24:53 AM
Quote from: mlan on June 23, 2016, 05:54:39 PM
As others have mentioned, I usually see this due to lack of clean-up from infrastructure changes.

This is most likely the case I think for what I am seeing. I just wanted to make sure I wasn't crazy lol.

This is an invalid test of sanity. You are a network engineer of course you are crazy.

-Otanx

:haha3:

LynK

The more specific routes have absolutely no use. They are all going to to go the same destination (192.168.1.1) because of the GOTR. You should be able to remove them, and just keep the simple any route. The only reason you would need to specify routes like this is for PBR.
Sys Admin: "You have a stuck route"
            Me: "You have an incorrect Default Gateway"

Dieselboy

Quote from: LynK on June 27, 2016, 09:09:36 AM
The more specific routes have absolutely no use. They are all going to to go the same destination (192.168.1.1) because of the GOTR. You should be able to remove them, and just keep the simple any route. The only reason you would need to specify routes like this is for PBR.

+1

"Redistribute static" is a possibility.

RoDDy

 :think: :think: :think: :think: :think:

maybe 2 default routes and made it more specific so that those networks aren't load balanced over the 2 links????

ip route 0.0.0.0 0.0.0.0 192.168.2.1
ip route 0.0.0.0 0.0.0.0 192.168.1.1
ip route 192.168.0.0 255.255.0.0 192.168.1.1
ip route 172.16.0.0 255.240.0.0 192.168.1.1
ip route 10.0.0.0 255.0.0.0 192.168.1.1

icecream-guy

Quote from: RoDDy on June 30, 2016, 12:27:30 PM
:think: :think: :think: :think: :think:

maybe 2 default routes and made it more specific so that those networks aren't load balanced over the 2 links????

ip route 0.0.0.0 0.0.0.0 192.168.2.1
ip route 0.0.0.0 0.0.0.0 192.168.1.1
....

Now how would that work?
:matrix:
:professorcat:

My Moral Fibers have been cut.

wintermute000

and BGP aggregation / network statements. Its quite common to use statics to null0s for this purpose assuming the more specifics are in the RIB