I have many L3 switches in my campus and all are using OSPF. I have 2 separate internet circuits in 2 different locations. About half the LAN uses 1 circuit for its internet (default route) circuit and the other half of the campus LAN uses the other internet circuit for its default route.
I want to improve the way OSPF routes on my network. On many of the L3 switches I create a static default route to point to either the next L3 switch physically closest to it or to the L3 switch connected to the closest internet circuit.
There are no routing problems and everything is working fine, but what I would like to do is make it more efficient. Everything is in AREA 0.
Is it possible that I can create a command, (default-information originate?), or a way where the L3 switch connected to 1 internet circuit tells only certain other L3 switches to use it as the default gateway and have the other L3 switch connected to the internet to tell the other L3 switches nearest it to connect to it for its default gateway?
Part of the problem I have now is that if a link goes down on a L3 switch, the switch wont route traffic the other way since there is a static default route pointing to 1 switch, which the link just went down.
Instead of having static default routes on each L3 switch, I thought it would be better for OSPF to notice that the default route just went down and it would then re-route traffic to the other switch on its other link.
Is this possible and how?
In your topology, you are assigning static default routes. As you correctly stated, in such a configuration, OSPF cannot dynamically change the routing in the event of a failure. In order to achieve what you need, I would suggest that you create a default route only within the routers that connect to your internet circuits. You can then redistribute this default route using the
default-information originate command. More info about this can be found here:
Now if you do this, and leave all other configurations at their default values, each router (or L3 switch in your case) will determine by itself which default route it should use, based on the metric to that destination. If for whatever reason one of the links fails, OSPF will reconverge and routing will resume using the other link.
Now there are a couple of things that you can do to improve upon this. If you are not happy with the way that OSPF is routing your packets, you can always adjust the cost of particular routes, so that you can achieve the routing you want. By changing the bandwidth value of particular interfaces, you can change the metrics to particular destinations, thus modifying which L3 switch will choose which path to reach the internet. You can find out more about this bandwidth adjustment to change the cost at the following lesson:
The other concern here is the fact that if an internet link does indeed fail, OSPF may not be able to learn about it. For example, if one of your ISPs fails, the L3 switch connected to it has no way to know that it has failed, unless the actual interface of the switch goes down. What if the interface doesn’t go down, but the problem is within the ISP itself? Your L3 switch will be receiving traffic for the Internet, will be routing it, and all of it will be dropped. To resolve this, you should employ the use of an IP SLA, that will continually check to see if internet connectivity is available. Based on this IP SLA, you can adjust routing as needed. If the SLA fails, you can remove the static default route, which in turn will inform OSPF (due to the
default-information originate command) that this default route is no longer available…
Take a look at this lesson for more info:
I hope this has been helpful!
Thank you very much for your response, your answers have been very helpful and I will take the time to research the info you provided.
After reading what you wrote, am I correct in thinking that if I remove all the static routes from the L3 switches, (except from the 2 L3 switches that connect to the ISP), and use the command default-information originate - then all the L3 switches will use OSPF to determine which L3 switch to use for its default route (internet)?
Since I have only 2 separate ISP circuits throughout my campus LAN, do I then put that command default-information originate - only on the 2 L3 switches connected to the ISP’s?
That’s exactly right. You can see how the command
default-information originate works in the following lesson:
The example in the lesson is somewhat simple, but you can expand the topology for your purposes. Using this command, the default routes found in your two switches connected to the ISPs will be propagated using OSPF to all OSPF enabled devices, thus informing all routers of the default routes.
I hope this has been helpful!
Thanks so much fro your posts, its helped me greatly. I will be setting up a test for this.