OSPF Load Balancing and Tweaking

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
I remember when learning about rip and OSPF and EIGRP that they supported equal cost load balancing and I thought that's great equal cost load balancing what does it mean well it means that if r1 has five equal class paths there's a potential that it could use all of those paths to forward traffic that's great well what are some of the things we want to remember about OSPF well oh s PF has a maximum equal cost paths factor of four by default so let's take these this network right here we have r1 r2 and r3 and what we're going to do is verify that we have OSPF neighbor ships are one ends in dot one are two ends in dot two are three ends in dot three and all of these sub interfaces have been created on each of the routers r1 and r2 so let's verify that those interfaces are up simple to do show IP interface brief and sure enough those interfaces are up and if we want to do a ping over to 1000 - that works as well let's verify OSPF to show IP ospf interface brief that will verify which interfaces have been enabled for OSPF and let's just take one sample here is FA 0 0.50 a sub interface it's a member of OSPF process ID 1 that interface has been assigned to OSPF area 0 there's the IP address assigned to that interface there's the OSPF cost for that interface and currently we are ABD are a backup designated router why it's because r2 is a designated router that could be because our two came up first in fact let's just verify that show IP ospf neighbors it could be because r2 came up first or if they both come up at the same time they were duking it out it could be because our two has a higher router ID which it does r2 has a router idea of - 2 - 2 r1 has a router ID of 1 1 1 1 and as a result that could also have been the tiebreak there so we have OSPF neighbor ships on each of these interfaces now check this out let's do a show IP route and instead of looking at all the routes let's just look at the routes that have been learned from OSPF and here's the single route well I should say the single network that we learned is the 23 network that's right here and r1 says oh I've learned about that four different ways or is it more let's take a look it says I know how to get to that network 23 using 4000 - is the next top with that exit interface using the 3000 to 2000 - and tensors or - it didn't specify 50 now why is that why are we not able to go ahead and use 50 well the default equal cost load balancing is for equal cost paths and anything higher than 4 simply isn't used by default so the router chose which one he was going to ditch because we literally have five equal cost paths to the 23 Network now let me demonstrate how you could verify this this is also really important is r1 really going to load balanced across those links check this out if we do a trace route and let's trace your out to this IP address right here - twenty-three dot 0 dot 0 dot 3 and normally with trace route the way it works is this we send out a UDP segment with a TTL of 1 and the router that gets that says OTT loved one to route this I'm going to cut it to zero oh I killed your packet and it forwards you and ICMP message saying I killed your packet it sends three of those out with T tail of one this way we get three responses back and then the router sends out three more with a TTL of two that's how traceroute operates instead of using the default of three I'm going to say I want the probe count to be five why because we have four equal cost paths and if I just had three it would use three and we wouldn't see it repeat so by using five it's going to use all four paths and it's going to start to repeat again so there's our trace route so the very first UDP segment it sent out was using this interface the dot 40 with 48 up to the next stop and then it used the 30 and then the 20 and then the 10 and check this out right here at the bottom it went ahead and then recyclin 2 3 4 yeah for the fifth one it recycled so it's using these four routes even though there's actually five advertisements five link states it knows about our one of how to reach this 23 network it picked four let's fix that problem right now let's go to configuration mode and we'll simply tell our one that we want him to go ahead and use five equal cost paths if he has them available and not just limit it to the default default of four so you would go into router configuration mode for OSPF one and say maximum path spot that's it and once we specify its five now if we do a show IP route OSPF check this out he'll automatically say oh now I have five routes instead of four that I can go ahead and use same let's scroll up just for a moment see just a moment ago we had dot ten twenty thirty and forty being used and now because we set the max path to five we have 10 20 30 40 and 50 sounds great now we also have another little challenge here that most the time we need to fix in the current network and that is this check this out if we do a show IP ospf interface brief look at the cost now the cost is the bandwidth of the interface we're at 100 megabits per second divide it into the reference bandwidth which is also set to 100 megabits and as a result it's a value of 1 now why is that a problem well if everything is simply Fast Ethernet it's not a problem however gigabit and 10 gigabit is out there and unfortunately from a cost perspective fast ethernet is going to look just as good as Gigabit Ethernet because it doesn't go any lower than a cost of one with metrics lower is better so the next thing we're going to do is we're going to just simply modify the reference bandwidth and change it from the default of a hundred and change it to a thousand let me show you what I mean here let's go into we're in router configuration mode Auto cost reference bandwidth 1000 now it says you should probably do this on all of your routers but check this out if we go back here and they do a question mark we put the auto cost reference bandwidth in megabits per second so 1000 megabits per second is is one gig the default is 100 megabits per second which is fastethernet and that's why this came up to one so if we do the same that command again show IP ospf interface brief you lose now that all our cost went to ten and that's a good thing now gigabit is going to look a lot better than fast ethernet and it's important also to do that on all your routers because right now our one thinks that these links have a cost of 10 well our two thinks that these links have a cost of 1 so I'd want to use that same command across the board so let's go over to our - just for a moment and change his auto cost reference as well so we'll run over to r2 and on r2 we'll say ok your auto cost reference bandwidth is going to be 1,000 as well and if I had 20 or 30 routers running OSPF in the same domain i would configure all of them with the same exact auto cost reference bandwidth okay so now that part is done let's go back over to r1 now in r1 let's just verify that the changes we made are actually going to be meaningful here show IP ospf interface brief ok so our cost is 10 we have all of our neighbor ships let's do this how do we make one or two of these interfaces look better than the others right now they're all equal costs so they're all being used why five because our max paths has been set to five so if we went in and we told interface FA 0 0 10 this guy right here that his cost of his interface was 5 which would be a better cost we would lose all of these routes except for the one that was the best cost if we did it for these two interfaces if we said IP ospf interface cost of 5 for 10 and 20 we would then have just those two paths being load balanced across so let's go ahead and set those two interfaces up just as an example so we'll go to interface configuration mode for fa 0 0 10 specify IP ospf cost is 5 that overrides the bandwidth on the interface from for the calculation perspective once you say it's 5 it's 5 this is the the winner config if you will so it doesn't matter what we have for auto cost reference bandwidth or anything else for these two interfaces they believe that the cost is five and that's it so we do a show IP ospf interface again let's go back up and do that you lose the bottom two interfaces now have a cost of five and if we do a show IP route for OSPF it's going to show us that just those two interfaces are being used why what's wrong with 30 40 and 50 well they don't look as good they're fine you know routes but they're not the best cost to get to the final destination so when OSPF runs its algorithm to find the best path the best path to the final destination it says well it's going to be these two interfaces 10 and 20 and these three interfaces the cost is too high they're not in the running so we're going to load balance down across ten and 20 so that's really cool that's a lot of fun let's do a little experiment what would happen if I shut down these two interfaces let's do that right now let's just do a real quick show of the IP ospf for the routes which we just did and we don't need it again and let's shut down those two interfaces and I want you to think about what we would expect to see so we'll go into interface fa0 0.10 and shut it down and fa0 0.20 and shut it down okay so now those two interfaces are shut down what do we expect well Keith let's see these two interfaces had a cost of five each and they were both being used for load balancing if we take them both down then 30 40 and 50 should now be the interface we'd use to reach the 23 Network and that's absolutely true but I want to share with you something else is happening behind the scenes just because we told our one to shutdown these two interfaces doesn't mean that our two doesn't still know about them and he does so our two is going to advertise the 10 network and the 20 network on links 30 40 and 50 so our one is going to have a whole two new routes that just showed up as a result here is our old IP routes that we learned via OSPF and let's do a show IP route OSPF now and here's our new ones so let's focus on the network at hand the 23 network is the network that we were focused on earlier and indeed we have three equal cost paths to get there interface 30 40 and 50 great fantastic no problem but check this out the 10 Network because r2 is still connected to it he's advertising the link-state advertisements saying hey I've got connectivity 210 he's advertising him over these three interfaces to his good buddy r1 he says oh great I've got reach ability I've got reach ability to those networks 10 and 20 through r2 and that's why we're receiving these additional routes that are coming in and now what are we doing now we're doing equal cost load balancing to get to the 23 network using the three interfaces 30 40 50 where equal cost load balancing to get to the 20 network even though our our local interface is disconnected we can get there indirectly and we can also get to the 1000 8 10 1000 Network through the same 3 interfaces so what are we covered in this short tutorial we've identified about equal cost load balancing the maximum by default is for equal cost paths so before we finish let's do a little what-if game we've disabled FA 0 0 10 and 20 but if we enable just 10 who has a interface cost of 5 we'll do a show IP ospf interface brief so at the moment we have FA 0 0 10 which is down it has a cost of 5 if we brought that one interface up how would our routing table change let's do it we'll go to interface FA 0 slash 0 10 we'll do a no shutdown and what I want you to do is think about just for a moment what route are we going to see and the answer is well are we going to see these these OSPF learn routes for the 10 network the answer is no this local 10 network now that our ones connected at the connected route has a way better administrative distance than anything we're learning through OSPF so all the OSPF learned routes about ten those are all going to disappear now for the twenty three Network what are we going to see well the twenty three network is going to be best reachable through the fa 0 0 10 interface that has the cost of five so we're going to have a single route through fa 0 0 10 because it's the only interface up that has a cost of five and the overall cost is going to be the best using that interface to get there and then we'll still have these routes here for the 20 network so the 20 network route should still show up except they won't be shown as load cost balancing because to get to this 20 Network we're still going to use the interface that has the best cost overall to get there and that's going to be this local interface fa 0 0 10 because after all considerations this interface has a better cost to get to the 20 network then 30 40 and 50 because of the the link state calculation of what the cost is to get there so now we've done that and we've given the network a moment to converge let's do a show IP route for OSPF just to verify there we have it so there's our 23 Network look at the cost is 15 now let's talk about that number just for a moment 15 r2 has the cost of 10 associated with this interface that's because we do the auto cost reference bandwidth so it advertised our to did is link-state advertisements saying oh the cost for me to get to the 23 network is 10 r1 got that information and it knew that it's local cost to reach r2 was 5 right here so effectively the cost of 10 and the cost of 5 is what this metric is all about and if we had more links we'd have to add all those up and r1 when I crunched all the numbers and run the ran the OSPF algorithm decided that that was a much better path to get to this network than using dot 30 40 or 50 so for the 20 network it's the same scoop r2 is advertising about the 20 network he's advertising it on this interface he's also advertising it over here but r1 because this interface has it's locally lower cost and that goes it's part of the formula our ones can use this top interface as the path to get to the 20 Network so it's a good exercise I appreciate you walking through it with me and that answers the question about somebody who said key can you make a video on oh s PF and load-balancing we've identified manually saying the cost we've also identified on the auto cost reference bandwidth example and I do appreciate you watching have a great day
Info
Channel: Keith Barker
Views: 43,561
Rating: 4.9776535 out of 5
Keywords: Cisco, CCNA, Video, Training, cbt, 640-822, 640-802, 640-816, routing, ICND, CCENT, OSPF, equal-cost, load, balancing
Id: 97Ukh4cPur8
Channel Id: undefined
Length: 16min 24sec (984 seconds)
Published: Thu Jun 16 2011
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.