• Create a Looback 1 interface in R1 with the IP address 1.1.1.1/24 and advertise it into BGP.
• Configure AS 200 routers to suppress advertisement of oscillating networks.
• Once a prefix flaps two times in a row, the advertisement should resume in 5 minutes.
------------------------------------------------------
若不想因flapping造成網路不穩定。
Two main methods to reduce the impact of network instabilities are summarization (information hiding) and prefix dampening.
Summarization aggregates reachability information and hides flaps of the specific prefixes constituting a summary. Dampening is the process of suppressing a flapping prefix advertisement till the moment it becomes “stable”. This introduces some “inertial” mechanism to new prefix advertisement, delaying the changes announcements for oscillating prefixes.
Max penalty = reuse-limit * 2 ^ (maximum suppress time/half time)
P(t) = P(0)/2^(t/Half_Life)
This command is disabled by default
half-life: 15 minutes
reuse: 750
suppress: 2000
max-suppress-time: 4 times half-life
So if we used default values we would have
P = 750 * 2^(60/15) = 750 * 2^4 = 12000.
P(15) = 12000 / 2 ^ (15/15) = 6000
bgp dampening [<Half_Life> <ReuseLimit> <SuppressLimit> <MaximumSuppressTime>]
說實話,太難懂了。。。。。有時間的話請參考:
IEOC 7.53 BGP Dampening
http://ieoc.com/forums/t/17521.aspx
------------------------------------------------------
R2, R3, R5, SW2, SW4:
router bgp 200
bgp dampening 4 750 2000 16
R1:
!
! We adjust the advertisement interval to minimize prefix batching
! and make R1 advertise prefix changes ASAP
!
router bgp 146
network 1.1.1.0 mask 255.255.255.0
neighbor 155.1.13.3 advertisement-interval 0
!
interface Loopback1
ip address 1.1.1.1 255.255.255.0
------------------------------------------------------
Start by checking the BGP dampening parameters in any of AS 200 routers.
Next, go to R1 and shutdown/no shutdown Loopback1 interface a few times emulating route flaps, enough to accumulate the suppress-limit penalty in AS 200 routers.
Rack1R3#show ip bgp dampening parameters
dampening 4 750 2000 16
Half-life time : 4 mins Decay Time : 620 secs
Max suppress penalty: 12000 Max suppress time: 16 mins
Suppress penalty : 2000 Reuse penalty : 750
Rack1R3#
Inspect dampened path and flap statistics in R3. Notice the character “d” meaning the prefixes have been damped.
Rack1R3#show ip bgp dampening dampened-paths
BGP table version is 229, local router ID is 150.1.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network From Reuse Path
*d 1.1.1.0/24 155.1.13.1 00:05:10 100 i
Rack1R3#
Rack1R3#show ip bgp dampening flap-statistics
BGP table version is 229, local router ID is 150.1.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network From Flaps Duration Reuse Path
*d 1.1.1.0/24 155.1.13.1 3 00:03:38 00:04:40 100
Rack1R3#
Check R3’s BGP table for the prefix 1.1.1.0/24. Notice that the prefix shows up as damped and not advertised to any peer. If you check R2’s BGP table after this, you will notice that the prefix is not there.
Rack1R3#show ip bgp
BGP table version is 232, local router ID is 150.1.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* i0.0.0.0 155.1.0.2 0 100 0 i
*>i 155.1.23.2 0 100 0 i
d 1.1.1.0/24 155.1.13.1 0 0 100 i
Rack1R3#show ip bgp 1.1.1.0
BGP routing table entry for 1.1.1.0/24, version 232
Paths: (1 available, no best path)
Flag: 0x820
Not advertised to any peer
100, (suppressed due to dampening) (history entry)
155.1.13.1 from 155.1.13.1 (150.1.1.1)
Origin IGP, metric 0, localpref 100, external
Dampinfo: penalty 9661, flapped 49 times in 00:08:33, reuse in 00:03:44
Rack1R3#
Rack1R2#show ip bgp 1.1.1.0
% Network not in table
Rack1R2#
沒有留言:
張貼留言