Sunday, March 13, 2011

EIGRP Ratio Calculation

This is a short post to discuss EIGRP ratio calculations.  If you are so fortunate to be give a lab task that says.."We want Switch3 to route to 12.0.0.0 via Sw4 and Sw2 in a ratio of 3:1 respectively," this little thread should provide you with enough information to figure this task out on your own.  Here goes:

This is our topology, and yes, 12.0.0.0 and the switches in the statement before are actually what we are going to use to do this.  Currently all routers are in their the same EIGRP AS, and Sw3's routing and topology table for the route in mention looks like so:


I highlighted some of the pertinent portions of the config snippet.  Heres the formula that I learned from Narbik for this type of situation:

3(158720) = 256 ( [10^7/100000] + [5200/10] + x)

Now this deems a bit of explanation...the left side of the equation is the route metric in the examples above, and we are multiplying this by 3 because thats what we want our ratio to be...3:1.  So we want to figure out delay on the right (because that is what we want to manipulate here for EIGRP).  The other stuff is pretty standard, 10^7/100000 defined by EIGRP for bw calculation, and the 100000 is defined as the minbw in the output above.  5200/10 is the delay in the above output divided by 10 to put it into the "tens of microseconds" category for EIGRP calculations.  Finally x is delay, or better yet what we will end up with to add to our delay on the interface.  Lets go!

3(158720) = 256 ( [10^7/100000] + [5200/10] + x)
476160 = 256 (100 + 520 + x)
476160 = 256 (620 + x)
1860 = 620 + x     //--divided 476160 by 256
1240 = x //--subtracted 620 from 1860

So x = 1240...thats awesome.  So do we just plug that in?  One would think right, but we actually have one more step.  If you were to plug that in, it would get you pretty close, but that needs to be added to what is actually on on our interface already.  Lets look:


So our delay on there now is 100 microseconds.  lets add that /10, or 10, to our previous x value.

1240 + 10 = 1250

Nice, lets see if that works!







Nope...hmm.  Well we know that to do unequal cost load-balancing we need what? Variance of-course!





Now lets take a look..


And as I aptly named the picture...victory!  Now I am honestly hoping that I dont get something like this in the real lab as it does take a little time to get it all perfected.  Hopefully if I keep replicating the scenario I can get the whole process down to a minute or two.  Well I hope this helped someone out there, if it did please leave a comment below!  Thanks for the time.

Thursday, February 3, 2011

BGP Conditional Default Route

Pretty much everyone knows that you can inject a default route to a neighbor in BGP by using a command like so:
router bgp 300
neighbor 164.18.46.8 default-originate

This will unconditionally inject a default route to that neighbor.  Note: They will still get all the other BGP routes as the router originating this command will not suppress the other routes just b/c it is injecting a default to them.  To conditionally set a default route you can use the route-map option at the end of this neighbor command.  See below:
router bgp 300
neighbor 164.18.48.8 default-originate route-map SW2-DEFAULT
neighbor 164.19.26.6 default-originate route-map R6-DEFAULT

ip access-list standard BGP-SW2
permit 192.168.2.0

ip access-list extended BGP-R6
permit ip host 192.168.2.0 host 255.255.255.0

route-map SW2-DEFAULT permit 10
match ip address name BGP-SW2

route-map R6-DEFAULT permit 10
match ip address name BGP-R6

So as you can see here the big difference is the access-lists right?  One is a standard ACL, the other is an extended ACL.  So whats the difference?  Well the first one will allow the default to originate if there in an entry in the routing table that will match that route, no matter the mask (192/8 , 192.168/16, 192.168.2/24) ...all would work.  The extended acl actually defines a mask, a /24 to be picky in this case. 

This is just something I ran into and found interesting when I was trying to filter using that route-map option originally.  I looked it up, and found it here BGP REFERENCE ...strange that I never used this enough to remember it in my CCIP studies!