[AUDIO LOGO]
So now that we've talked about how route dampening actually
works and what it's for, now it's
time to jump into the command line
and actually see it in action.
So let's, of course, bring up our topology first
so we know what we're going to be implementing and where,
and then we'll jump into that command line
and see all of this in action.
So, for this demonstration, we will be using BGP Topology 1,
and we're going to configure our route dampening
on router 1, that way, we can see it on IOS XR
and we'll also configure it on router 7.
And then we're going to have router 6 create
our problems by withdrawing and advertising routes
numerous times.
So that's our game plan.
Let's start by jumping in and starting to configure router 1.
So we'll begin here on router 1.
And let's start by making a prefix-set.
We don't necessarily need this, but if we
want to control the route dampening separately for, say,
prefixes or for different neighbors,
then we're going to want to write a route
policy to do this.
Although keep in mind, we can apply this as just a blanket
policy.
And we'll see how to do that as we go.
But we'll still start off here with a prefix-set.
We'll just call it eBGP_PEERS.
And for now, that's just going to be 50.0.167.6.
We'll just put router 6 in there and we'll end the set.
Then we'll write our route policy.
We'll call this RP_RFD.
And we'll say, if the source--
this way, we're going to be matching on the route source--
is in our PS_eBGP_PEERS, then what we're going to want to do
is set the dampening.
Now just to start taking a look at how this gets built out,
here we can either put in the halflife, the max-suppress,
the reuse, or the suppress.
So we have to start putting in the numbers.
So let's start off with halflife.
And just to not use the defaults here,
let's set this to, say, 10.
And by the way, notice the others here.
We could just tell it to use the other default values.
So realistically, we really only have
to specify one of these numbers, but the rest of them,
we could set to the default.
Now, we're not going to do that, so let's back up over that.
And let's instead say--
let's do a reuse limit of, let's say 500.
Let's do a suppress of 2,500.
And again, this is really just not to use the defaults.
And we'll set the max-suppress time to 30 minutes.
Then we'll just pass the rest of the prefixes
if they're coming from a different neighbor.
And we'll exit out of our policy.
Next up, of course, we have to go into router BGP.
So router BGP 100 for the address family iPv4 unicast,
and we say BGP dampening.
Now, note here if we get contact-sensitive help,
we can, of course, call to our route policy,
which is why we just wrote it.
But notice we could also just start
configuring the halflife time and everything right here.
If we do it right here, that would be for everything--
all prefixes learned from all neighbors--
but if we want to be specific, again,
either per neighbor or per prefix--
because of course, we could have really matched
on anything in our route policy.
We matched on a route source being a neighbor,
but it could have been on prefixes or whatever
we wanted to match on.
If you want to do it for everything,
you can just set it right here on this command line.
We didn't need the prefix set, we
didn't need the route policy.
But this is, of course, a little bit more interesting to do it
with the route policy, so let's just go ahead and continue.
So here, all we have to do is actually apply that policy,
then we'll commit our changes and exit configuration.
So now let's go do the exact same thing on router 7.
Of course, the configuration is a little bit
different on IOS XE.
First, we use a prefix-list.
We'll pretty much call it the same thing.
We'll use PL instead of PS since it's a prefix-list instead
of a prefix-set.
But beyond that, it'll be pretty much the same.
Once again, is going to be matching on the 50.0.167.6.
And we'll match on that as a host route
since it's the actual address of our neighbor.
So we'll just match on it as a slash 32.
Of course, it's not a route policy on IOS XE,
it's a route map.
We'll call this RM_RFD.
And we'll start with stanza 10.
What we're going to do is we're going
to match on the IP address based on the prefix-list,
PL_eBGP_PEERS, and we're going to set the dampening.
This is done a little bit differently.
We don't actually put the words in here, which means
they go in a specific order.
So the first thing is the halflife time.
We'll use the same numbers, so we'll set this to 10.
The next thing is going to be the penalty to start reusing
a route-- so, in other words, the reuse limit--
we had set this to 500.
Then it wants to know when it should
start suppressing the route.
So that we set to 2,500, and then we have the max duration,
and this is going to be 30.
That's all at once, so we'll hit Enter.
Then we'll go into our router BGP 65001.
And under BGP dampening, notice once again, we
could just put the entries here or we
can call to our route map.
So just like on IOS XR, this would be global
if we just start putting numbers here
or we call to our route map to do specifics.
So now that we're all configured, now
we need a route to actually flap.
So let's go over to router 6.
And the first thing we're going to do is create a new loopback
and advertise it into BGP.
And again, this is something we've done numerous times,
so we don't really need to see it.
I'll just paste the configuration in.
So we've created a Loopback100.
We can see the loopback interface is coming up.
And if we give it just a second here,
it should show up in BGP as well if we do a show ip bgp.
Here, we have the 100.6.6.6/32.
The next Hop is all zeros, indicating
we're locally injecting it.
And the default wait there of 32768
also indicates it's locally injected.
So now that it's been advertised,
let's actually make this flat.
So let's go back into configuration,
back into interface, loopback100, and let's
shut it down.
We'll just start with that.
And now let's go look at what's happening on router 7.
So on 7, let's do a show bgp ipv4, unicast, dampening,
flap-statistics for the 100.6.6.6.
Let's look at router 1 as well.
Let's start with a show BGP.
What this will actually show us is that dampening is enabled.
We can see it right here.
So now let's see if it's actually counted that.
So now let's do a show bgp ipv4 unicast flap-statistics
100.6.6.6.
Notice it's showing it as a historical entry.
So now let's flap router 6 a few times.
So now let's do a no shut.
We'll let it come back up, we'll shut it again.
And let's go look at the routers again.
Here on router 7, we might notice
that we're having a problem.
Notice that I've actually repeated this a few times.
And we're not getting any flap-statistics,
which really looks like router 7 is not working.
Because if we go over to router 1, if we look at this again,
notice that this has it as a historical entry,
it's showing a couple of Flaps here.
So obviously, the route is flapping,
but router 7 is not showing it.
So if we go back over here to router 7,
we can see right here the line where we applied our dampening.
So we did bgp dampening route-map RM_RFD--
that seems correct.
So let's do a show route-map RM_RFD.
And actually, what we can see here
is that we made a mistake when putting the route map in.
We actually matched on the IP address
based on the prefix-lists, but it should
have been on the route source.
So we're going to have to correct this.
So actually, let's just say no route-map RM_RFD.
It's not a very complicated route map.
We'll just put it in again.
So we'll recreate our route map.
It's, of course, yelling at us here because I deleted
the route map that it's using for dampening,
but it'll correct it in a minute.
This should not have been match ip address.
This should have been match ip route-source
and then set the dampening.
We'll look at the route-map again,
and we can see that now it's matching on the route-source
based on the prefix-list.
So now let's see if it's showing our dampening statistics.
Let's cause one more flap or maybe a couple.
And we'll see if 7 is counting it now.
I'm just going to take this off and put it back on.
It probably really confused it when
we took the route map out that it was using for its dampening,
so we'll reapply it because it's still not counting it properly.
OK, so there's nothing shown right now.
And I know that got messed up with the console message there.
Let me do it again.
There's nothing being shown on this output,
but see that we're at least getting output, which means
that now it's properly enabled.
So now we can properly do our testing.
So now let's go back and flap it a few more times
and see where we're at.
So we'll bring it back up, shut it back down,
and let's go see where we are.
We can see here on router 7 that it is now properly tracking
the dampening, and we can see that it's flapped twice.
So now we'll go ahead and flap this enough times that it
actually goes to suppressed.
All fast forward until it does that because we
do have to wait 30 seconds between each flap for this
to work properly, so this is going
to take just a couple of minutes.
So now that we've flapped this just a few times,
we can see here it's listing it as four flaps.
We can see that this is now being dampened.
And we can see that it's going to be reused
in 4 minutes and 49 seconds.
If we say show ip bgp for the prefix,
we can also see the dampening information here.
We see that its current penalty is 3,024,
it's flapped 4 times in the last 7 minutes and 39 seconds,
and again, it's going to be reused now
in 4 minutes and 9 seconds.
So we can see that not only does it keep track of the fact
that it's dampened-- we also see, by the way,
it says suppressed due to dampening-- but it also
lets us know automatically it's calculated
the halflife timer, the current penalty,
and it knows when it's going to get back to the reuse limit,
and it's already calculated that time for us.
We can verify this over on router 1 as well.
So first, we can just look at the statistics.
This, of course, shows us that it's dampened,
and it also gives us that reuse.
Now, remember that router 1 was working, to begin with.
And router 7 had a little bit of an issue
because we put in our route map incorrectly.
So notice that router 1 has seen quite a few more flaps.
Its reuse is 27 minutes.
So it sees the penalty as being a lot higher.
We can also say detail on this output,
and we can see all those statistics that we
entered for the configuration.
We see the halflife timer of 10 that we
put in, our suppressed limit, our reuse limit,
and we see that max suppress time.
If we do a show bgp for that prefix,
we see that once again, it says suppressed due to dampening,
and we see the dampening information.
It currently has a penalty of 3,118.
It's flapped 7 times in 18 minutes,
with a reuse in 26 minutes and 20 seconds now.
So this is how BGP route dampening works.
If you know that this has become stable, maybe the customer
called us up and told us, hey, we had an issue,
but it's all been fixed now, can we
get this to not be dampened anymore?
We can do that as well.
Now, these are some long commands,
so I'm just going to copy and paste them in,
but we can clear both the statistics and the fact
that it's currently being dampened,
and get this route to come back earlier if we choose to do so.
So here on router 1, we'll simply
clear these two pieces of information.
So the first one is to clear bgp ipv4 unicast dampening and then
for the prefix.
And again, the second command got buried there a little bit,
so let me just hit the up arrow so you can see it.
It's the clear bgp ipv4 unicast flap-statistics
for that prefix.
So now if we do a show bgp for the 100.6.6.6,
we can see that now it's being advertised
and it doesn't have any of the flap statistics counted for it.
So basically, we manually just wiped the slate clean
and got this to be re-advertised.
We can do the same thing on IOS XE.
And believe it or not, I can just paste these commands in.
They're the exact same commands on both platforms.
We'll do our show ip bgp for the prefix again.
And as we see here, just like on IOS XR,
all of the flap statistics are gone,
and the prefix is being advertised.
So again, we just manually wiped the slate clean.
Clearly, we would only do this if we
had reason to suspect that yes, there had been a problem,
but yes, now we know it's cleared up.
s So like in the example of router 1,
let's not make the customer wait 30 minutes.
We can go ahead and clear those statistics
and dampening right now.
So in this video, we saw how to configure BGP route dampening
on both IOS XR and IOS XE.
Remember you can set these numbers directly
under the routing process itself,
and that's just going to be global then.
That's going to be for all neighbors, all prefixes,
or you can go the way we went, which is using
a route map or a route policy.
Just make sure you write your route maps correctly,
unlike what we did.
The problem, of course, what we did here
is we did our prefix list based on the route source,
but then told it to match on the address rather than the route
source.
We could have matched on either one.
We just would have had to write our prefix list a little
differently so that it was matching on the 100.6.6.6/32
rather than the actual address of the neighbor,
but either way is fine.
We can match on either prefixes or neighbors in our route
policies and prefix sets and route maps and prefix lists.
We can match on whatever we want to.
We just have to be consistent with what we're doing.
I hope this has been informative for you,
and I'd like to thank you for viewing.