Understanding Damping Parameters
BGP route flapping describes the situationin which BGP systems send an excessive number of update messages toadvertise network reachability information. BGP flap damping is a method of reducing the number of update messages sent betweenBGP peers, thereby reducing the load on these peers, without adverselyaffecting the route convergence time for stable routes.
Flap damping reduces the number of update messages by markingroutes as ineligible for selection as the active or preferable route.Marking routes in this way leads to some delay, or suppression, in the propagation of route information, but the result is increasednetwork stability. You typically apply flap damping to external BGP(EBGP) routes (routes in different ASs). You can also apply flap dampingwithin a confederation, between confederation member ASs. Becauserouting consistency within an AS is important, do not apply flap dampingto internal BGP (IBGP) routes. (If you do, it is ignored.)
There is an exception that rule. Starting in Junos OS Release 12.2, you can apply flapdamping at the address family level. In aJunos OS Release 12.2 or later installation, when you apply flap dampingat the address family level, it works for both IBGP and EBGP.
By default, route flap damping is not enabled. Damping is appliedto external peers and to peers at confederation boundaries.
When you enable damping, default parameters are applied, assummarized in Table1.
Table 1: DampingParameters
Damping Parameter | Description | Default Value | Possible Values |
---|---|---|---|
half-life minutes | Decay half-life—Number of minutes afterwhich an arbitrary value is halved if a route stays stable. | 15(minutes) | 1 through 45 |
max-suppress minutes | Maximum hold-down time for a route, in minutes. | 60 (minutes) | 1 through 720 |
reuse | Reuse threshold—Arbitrary value belowwhich a suppressed route can be used again. | 750 | 1 through 20,000 |
suppress | Cutoff (suppression) threshold—Arbitraryvalue above which a route can no longer be used or included in advertisem*nts. | 3000 | 1 through 20,000 |
To change the default BGP flap damping values, you define actionsby creating a named set of damping parameters and including it ina routing policy with the damping action. For the damping routingpolicy to work, you also must enable BGP route flap damping.
See also
Understanding Routing Policies
Example: Configuring BGP Route Flap Damping Parameters
Example: Configuring BGP Route Flap Damping Parameters
This example shows how to configure dampingparameters.
Requirements
Overview
Configuration
Verification
Requirements
Before you begin, configure router interfacesand configure routing protocols.
Overview
This example has three routing devices. Device R2 has externalBGP (EBGP) connections with Device R1 and Device R3.
Device R1 and Device R3 have some static routes configured fortesting purposes, and these static routes are advertised through BGPto Device R2.
Device R2 damps routes received from Device R1 and Device R3according to these criteria:
Damp all prefixes with a mask length equal to or greaterthan 17 more aggressively than routes with a mask length between 9and 16.
Damp routes with a mask length between 0 and 8, inclusive,less than routes with a mask length greater than 8.
Do not damp the 10.128.0.0/9 prefix at all.
The routing policy is evaluated when routes are being exportedfrom the routing table into the forwarding table. Only the activeroutes are exported from the routing table.
Figure1 shows the sample network.
CLI Quick Configuration shows the configurationfor all of the devices in Figure1.
The section Step-by-Step Procedure describesthe steps on Device R2.
Configuration
CLI Quick Configuration
To quickly configurethis example, copy the following commands, paste them into a textfile, remove any line breaks, change any details necessary to matchyour network configuration, and then copy and paste the commands intothe CLI at the [edit] hierarchy level.
Device R1
set interfaces fe-1/2/0 unit 0 family inetaddress 10.0.0.1/30
set interfaces lo0 unit 0 family inet address192.168.0.1/32
set protocols bgp group ext type external
set protocols bgp group ext export send-direct-and-static
set protocols bgp group ext peer-as 200
set protocols bgp group ext neighbor 10.0.0.2
set policy-options policy-statement send-direct-and-staticterm 1 from protocol direct
set policy-options policy-statement send-direct-and-staticterm 1 from protocol static
set policy-options policy-statement send-direct-and-staticterm 1 then accept
set routing-options static route 172.16.0.0/16reject
set routing-options static route 172.16.128.0/17reject
set routing-options static route 172.16.192.0/20reject
set routing-options static route 10.0.0.0/9reject
set routing-options static route 172.16.233.0/7reject
set routing-options static route 10.224.0.0/11reject
set routing-options static route 0.0.0.0/0reject
set routing-options autonomous-system 100
Device R2
set interfaces fe-1/2/0 unit 0 family inetaddress 10.0.0.2/30
set interfaces fe-1/2/1 unit 0 family inetaddress 10.1.0.1/30
set interfaces lo0 unit 0 family inet address192.168.0.2/32
set protocols bgp damping
set protocols bgp group ext type external
set protocols bgp group ext import damp
set protocols bgp group ext export send-direct
set protocols bgp group ext neighbor 10.0.0.1peer-as 100
set protocols bgp group ext neighbor 10.1.0.2peer-as 300
set policy-options policy-statement damp term1 from route-filter 10.128.0.0/9 exact damping dry
set policy-options policy-statement damp term1 from route-filter 0.0.0.0/0 prefix-length-range /0-/8 damping timid
set policy-options policy-statement damp term1 from route-filter 0.0.0.0/0 prefix-length-range /17-/32 dampingaggressive
set policy-options policy-statement send-directterm 1 from protocol direct
set policy-options policy-statement send-directterm 1 then accept
set policy-options damping aggressive half-life30
set policy-options damping aggressive suppress2500
set policy-options damping timid half-life5
set policy-options damping dry disable
set routing-options autonomous-system 200
Device R3
set interfaces fe-1/2/1 unit 0 family inetaddress 10.1.0.2/30
set interfaces lo0 unit 0 family inet address192.168.0.3/32
set protocols bgp group ext type external
set protocols bgp group ext export send-direct-and-static
set protocols bgp group ext peer-as 200
set protocols bgp group ext neighbor 10.1.0.1
set policy-options policy-statement send-direct-and-staticterm 1 from protocol direct
set policy-options policy-statement send-direct-and-staticterm 1 from protocol static
set policy-options policy-statement send-direct-and-staticterm 1 then accept
set routing-options static route 10.128.0.0/9reject
set routing-options autonomous-system 300
Step-by-Step Procedure
The following example requires you to navigate variouslevels in the configuration hierarchy. For information about navigatingthe CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.
To configure damping parameters:
Configure the interfaces.
[edit interfaces]
user@R2# set fe-1/2/0 unit 0 family inet address10.0.0.2/30
user@R2# set fe-1/2/1 unit 0 family inet address10.1.0.1/30
user@R2# set lo0 unit 0 family inet address192.168.0.2/32
- Configure the BGP neighbors.
[edit protocols bgp group ext]
user@R2# set type external
user@R2# set neighbor 10.0.0.1 peer-as 100
user@R2# set neighbor 10.1.0.2 peer-as 300
Create and configure the damping parameter groups.
[edit policy-options]
user@R2# set damping aggressive half-life30
user@R2# set damping aggressive suppress 2500
user@R2# set damping timid half-life 5
user@R2# set damping dry disable
Configure the damping policy.
[edit policy-options policy-statement damp term 1]
user@R2# set from route-filter 10.128.0.0/9exact damping dry
user@R2# set from route-filter 0.0.0.0/0 prefix-length-range/0-/8 damping timid
user@R2# set from route-filter 0.0.0.0/0 prefix-length-range/17-/32 damping aggressive
Enable damping for BGP.
[edit protocols bgp]
user@R2# set damping
Apply the policy as an import policy for the BGP neighbor.
[edit protocols bgp group ext]
user@R2# set import damp
Note You can refer to the same routing policy one or more timesin the same or different import statements.
- Configure an export policy.
[edit policy-options policy-statement send-direct term1]
user@R2# set from protocol direct
user@R2# set then accept
- Apply the export policy.
[edit protocols bgp group ext]
user@R2# set export send-direct
- Configure the autonomous system (AS) number.
[edit routing-options]
user@R2# set autonomous-system 200
Results
From configuration mode, confirm your configurationby issuing the show interfaces, show protocols, show policy-options, and show routing-options commands. If the output does not display the intended configuration,repeat the instructions in this example to correct the configuration.
user@R2# show interfaces
fe-1/2/0 {
unit 0 {
family inet {
address 10.0.0.2/30;
}
}
}
fe-1/2/1 {
unit 0 {
family inet {
address 10.1.0.1/30;
}
}
}
lo0 {
unit 0 {
family inet {
address 192.168.0.2/32;
}
}
}
user@R2# show protocols
bgp {
damping;
group ext {
type external;
import damp;
export send-direct;
neighbor 10.0.0.1 {
peer-as 100;
}
neighbor 10.1.0.2 {
peer-as 300;
}
}
}
user@R2# show policy-options
policy-statement damp {
term 1 {
from {
route-filter 10.128.0.0/9 exact damping dry;
route-filter 0.0.0.0/0 prefix-length-range /0-/8 dampingtimid;
route-filter 0.0.0.0/0 prefix-length-range /17-/32 dampingaggressive;
}
}
}
policy-statement send-direct {
term 1 {
from protocol direct;
then accept;
}
}
damping aggressive {
half-life 30;
suppress 2500;
}
damping timid {
half-life 5;
}
damping dry {
disable;
}
user@R2# show routing-options
autonomous-system 200;
If you are done configuring the device, enter commit from configuration mode.
Verification
Confirm that the configuration is working properly.
Causing Some Routes to Flap
Checking the Route Flaps
Verifying Route Flap Damping
Displaying the Details of a Damped Route
Verifying That Default Damping Parameters Are in Effect
Filtering the Damping Information
Causing Some Routes to Flap
Purpose
To verify your route flap damping policy, some routesmust flap. Having a live Internet feed almost guarantees that a certainnumber of route flaps will be present. If you have control over aremote system that is advertising the routes, you can modify the advertisingrouter's policy to effect the advertisem*nt and withdrawal of allroutes or of a given prefix. In a test environment, you can causeroutes to flap by clearing the BGP neighbors or by restarting therouting process on the BGP neighbors, as shown here.
Action
From operational mode on Device R1 and Device R3, enterthe restart routing command.
Use this command cautiously in a production network.
user@R1> restart routing
R1 started, pid 10474
user@R3> restart routing
R3 started, pid 10478
Meaning
On Device R2, all of the routes from the neighborsare withdrawn and re-advertised.
Checking the Route Flaps
Purpose
View the number of neighbor flaps.
Action
From operational mode, enter the show bgp summary command.
user@R2> show bgp summary
Groups: 1 Peers: 2 Down peers: 0Table Tot Paths Act Paths Suppressed History Damp State Pendinginet.0 12 1 11 0 11 0Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...10.0.0.1 100 10 10 0 4 2:50 0/9/0/9 0/0/0/010.1.0.2 300 10 10 0 4 2:53 1/3/1/2 0/0/0/0
Meaning
This output was captured after the routing processwas restarted on Device R2’s neighbors four times.
Verifying Route Flap Damping
Purpose
Verify that routes are being hidden due to damping.
Action
From operational mode, enter the show route dampingsuppressed command.
user@R2> show route damping suppressed
inet.0: 15 destinations, 17 routes (6 active, 0 holddown, 11 hidden)+ = Active Route, - = Last Active, * = Both0.0.0.0/0 [BGP ] 00:00:12, localpref 100 AS path: 100 I, validation-state: unverified > to 10.0.0.1 via fe-1/2/0.010.0.0.0/9 [BGP ] 00:00:12, localpref 100 AS path: 100 I, validation-state: unverified > to 10.0.0.1 via fe-1/2/0.010.0.0.0/30 [BGP ] 00:00:12, localpref 100 AS path: 100 I, validation-state: unverified > to 10.0.0.1 via fe-1/2/0.010.1.0.0/30 [BGP ] 00:00:15, localpref 100 AS path: 300 I, validation-state: unverified > to 10.1.0.2 via fe-1/2/1.010.224.0.0/11 [BGP ] 00:00:12, localpref 100 AS path: 100 I, validation-state: unverified > to 10.0.0.1 via fe-1/2/0.0172.16.0.0/16 [BGP ] 00:00:12, localpref 100 AS path: 100 I, validation-state: unverified > to 10.0.0.1 via fe-1/2/0.0172.16.128.0/17 [BGP ] 00:00:12, localpref 100 AS path: 100 I, validation-state: unverified > to 10.0.0.1 via fe-1/2/0.0172.16.192.0/20 [BGP ] 00:00:12, localpref 100 AS path: 100 I, validation-state: unverified > to 10.0.0.1 via fe-1/2/0.0192.168.0.1/32 [BGP ] 00:00:12, localpref 100 AS path: 100 I, validation-state: unverified > to 10.0.0.1 via fe-1/2/0.0192.168.0.3/32 [BGP ] 00:00:15, localpref 100 AS path: 300 I, validation-state: unverified > to 10.1.0.2 via fe-1/2/1.0172.16.233.0/7 [BGP ] 00:00:12, localpref 100 AS path: 100 I, validation-state: unverified > to 10.0.0.1 via fe-1/2/0.0
Meaning
The output shows some routing instability. Eleven routesare hidden due to damping.
Displaying the Details of a Damped Route
Purpose
Display the details of damped routes.
Action
From operational mode, enter the show route dampingsuppressed 172.16.192.0/20 detail command.
user@R2> show route damping suppressed 172.16.192.0/20detail
inet.0: 15 destinations, 17 routes (6 active, 0 holddown, 11 hidden)172.16.192.0/20 (1 entry, 0 announced) BGP /-101 Next hop type: Router, Next hop index: 758 Address: 0x9414484 Next-hop reference count: 9 Source: 10.0.0.1 Next hop: 10.0.0.1 via fe-1/2/0.0, selected Session Id: 0x100201 State: <Hidden Ext> Local AS: 200 Peer AS: 100 Age: 52 Validation State: unverified Task: BGP_100.10.0.0.1+55922 AS path: 100 I Localpref: 100 Router ID: 192.168.0.1 Merit (last update/now): 4278/4196 damping-parameters: aggressive Last update: 00:00:52 First update: 01:01:55 Flaps: 8 Suppressed. Reusable in: 01:14:40 Preference will be: 170
Meaning
This output indicates that the displayed route hasa mask length that is equal to or greater than /17, and confirms thatit has been correctly mapped to the aggressive damping profile. Youcan also see the route’s current (and last) figure of meritvalue, and when the route is expected to become active if it remainsstable.
Verifying That Default Damping Parameters Are in Effect
Purpose
Locating a damped route with a /16 mask confirms thatthe default parameters are in effect.
Action
From operational mode, enter the show route dampingsuppressed detail | match 0/16 command.
user@R2> show route damping suppressed detail| match 0/16
172.16.0.0/16 (1 entry, 0 announced)
user@R2> show route damping suppressed 172.16.0.0/16detail
inet.0: 15 destinations, 17 routes (6 active, 0 holddown, 11 hidden)172.16.0.0/16 (1 entry, 0 announced) BGP /-101 Next hop type: Router, Next hop index: 758 Address: 0x9414484 Next-hop reference count: 9 Source: 10.0.0.1 Next hop: 10.0.0.1 via fe-1/2/0.0, selected Session Id: 0x100201 State: <Hidden Ext> Local AS: 200 Peer AS: 100 Age: 1:58 Validation State: unverified Task: BGP_100.10.0.0.1+55922 AS path: 100 I Localpref: 100 Router ID: 192.168.0.1 Merit (last update/now): 3486/3202 Default damping parameters used Last update: 00:01:58 First update: 01:03:01 Flaps: 8 Suppressed. Reusable in: 00:31:40 Preference will be: 170
Meaning
Routes with a /16 mask are not impacted by the customdamping rules. Therefore, the default damping rules are in effect.
To repeat, the custom rules are as follows:
Damp all prefixes with a mask length equal to or greaterthan 17 more aggressively than routes with a mask length between 9and 16.
Damp routes with a mask length between 0 and 8, inclusive,less than routes with a mask length greater than 8.
Do not damp the 10.128.0.0/9 prefix at all.
Filtering the Damping Information
Purpose
Use OR groupings or cascaded piping to simplify thedetermination of what damping profile is being used for routes witha given mask length.
Action
From operational mode, enter the show route dampingsuppressed command.
user@R2> show route damping suppressed detail| match "0 announced | damp"
0.0.0.0/0 (1 entry, 0 announced) damping-parameters: timid10.0.0.0/9 (1 entry, 0 announced) Default damping parameters used damping-parameters: aggressive damping-parameters: aggressive10.224.0.0/11 (1 entry, 0 announced) Default damping parameters used172.16.0.0/16 (1 entry, 0 announced) Default damping parameters used172.16.128.0/17 (1 entry, 0 announced) damping-parameters: aggressive172.16.192.0/20 (1 entry, 0 announced) damping-parameters: aggressive192.168.0.1/32 (1 entry, 0 announced) damping-parameters: aggressive192.168.0.3/32 (1 entry, 0 announced) damping-parameters: aggressive172.16.233.0/7 (1 entry, 0 announced) damping-parameters: timid
Meaning
When you are satisfied that your EBGP routes are correctlyassociated with a damping profile, you can issue the clear bgpdamping operational mode command to restore an active statusto your damped routes, which will return your connectivity to normaloperation.
See also
Understanding Damping Parameters
Using Routing Policies to Damp BGP Route Flapping
Example: Configuring BGP Route Flap Damping Based on the MBGPMVPN Address Family
This example shows how to configure an multiprotocolBGP multicast VPN (also called Next-Generation MVPN) with BGP routeflap damping.
Requirements
Overview
Configuration
Verification
Requirements
This example uses Junos OS Release 12.2. BGProute flap damping support for MBGP MVPN, specifically, and on anaddress family basis, in general, is introduced in Junos OS Release12.2.
Overview
BGP route flap damping helps to diminish route instability causedby routes being repeatedly withdrawn and readvertised when a linkis intermittently failing.
This example uses the default damping parameters and demonstratesan MBGP MVPN scenario with three provider edge (PE) routing devices,three customer edge (CE) routing devices, and one provider (P) routingdevice.
Figure2 shows thetopology used in this example.
On PE Device R4, BGP route flap damping is configured for addressfamily inet-mvpn. A routing policy called dampPolicy uses the nlri-route-type match condition to damp onlyMVPN route types 3, 4, and 5. All other MVPN route types are not damped.
This example shows the full configuration on all devices inthe CLI Quick Configuration section. The Configuring Device R4 section shows the step-by-stepconfiguration for PE Device R4.
Configuration
CLI Quick Configuration
To quickly configure thisexample, copy the following commands, paste them into a text file,remove any line breaks, change any details necessary to match yournetwork configuration, and then copy and paste the commands into theCLI at the [edit] hierarchy level.
Device R1
set interfaces ge-1/2/0 unit 1 family inetaddress 10.1.1.1/30
set interfaces ge-1/2/0 unit 1 family mpls
set interfaces lo0 unit 1 family inet address172.16.1.1/32
set protocols ospf area 0.0.0.0 interfacelo0.1 passive
set protocols ospf area 0.0.0.0 interfacege-1/2/0.1
set protocols pim rp static address 172.16.100.1
set protocols pim interface all
set routing-options router-id 172.16.1.1
Device R2
set interfaces ge-1/2/0 unit 2 family inetaddress 10.1.1.2/30
set interfaces ge-1/2/0 unit 2 family mpls
set interfaces ge-1/2/1 unit 5 family inetaddress 10.1.1.5/30
set interfaces ge-1/2/1 unit 5 family mpls
set interfaces vt-1/2/0 unit 2 family inet
set interfaces lo0 unit 2 family inet address172.16.1.2/32
set interfaces lo0 unit 102 family inet address172.16.100.1/32
set protocols mpls interface ge-1/2/1.5
set protocols bgp group ibgp type internal
set protocols bgp group ibgp local-address172.16.1.2
set protocols bgp group ibgp family inet-vpnany
set protocols bgp group ibgp family inet-mvpnsignaling
set protocols bgp group ibgp neighbor 172.16.1.4
set protocols bgp group ibgp neighbor 172.16.1.5
set protocols ospf area 0.0.0.0 interfacelo0.2 passive
set protocols ospf area 0.0.0.0 interfacege-1/2/1.5
set protocols ldp interface ge-1/2/1.5
set protocols ldp p2mp
set policy-options policy-statement parent_vpn_routesfrom protocol bgp
set policy-options policy-statement parent_vpn_routesthen accept
set routing-instances vpn-1 instance-typevrf
set routing-instances vpn-1 interface ge-1/2/0.2
set routing-instances vpn-1 interface vt-1/2/0.2
set routing-instances vpn-1 interface lo0.102
set routing-instances vpn-1 route-distinguisher100:100
set routing-instances vpn-1 provider-tunnelldp-p2mp
set routing-instances vpn-1 vrf-target target:1:1
set routing-instances vpn-1 protocols ospfexport parent_vpn_routes
set routing-instances vpn-1 protocols ospfarea 0.0.0.0 interface lo0.102 passive
set routing-instances vpn-1 protocols ospfarea 0.0.0.0 interface ge-1/2/0.2
set routing-instances vpn-1 protocols pimrp static address 172.16.1.2 with 172.16.4.1100.1
set routing-instances vpn-1 protocols piminterface ge-1/2/0.2 mode sparse
set routing-instances vpn-1 protocols mvpn
set routing-options router-id 172.16.1.2
set routing-options autonomous-system 1001
Device R3
set interfaces ge-1/2/0 unit 6 family inetaddress 10.1.1.6/30
set interfaces ge-1/2/0 unit 6 family mpls
set interfaces ge-1/2/1 unit 9 family inetaddress 10.1.1.9/30
set interfaces ge-1/2/1 unit 9 family mpls
set interfaces ge-1/2/2 unit 13 family inetaddress 10.1.1.13/30
set interfaces ge-1/2/2 unit 13 family mpls
set interfaces lo0 unit 3 family inet address172.16.1.3/32
set protocols mpls interface ge-1/2/0.6
set protocols mpls interface ge-1/2/1.9
set protocols mpls interface ge-1/2/2.13
set protocols ospf area 0.0.0.0 interfacelo0.3 passive
set protocols ospf area 0.0.0.0 interfacege-1/2/0.6
set protocols ospf area 0.0.0.0 interfacege-1/2/1.9
set protocols ospf area 0.0.0.0 interfacege-1/2/2.13
set protocols ldp interface ge-1/2/0.6
set protocols ldp interface ge-1/2/1.9
set protocols ldp interface ge-1/2/2.13
set protocols ldp p2mp
set routing-options router-id 172.16.1.3
Device R4
set interfaces ge-1/2/0 unit 10 family inetaddress 10.1.1.10/30
set interfaces ge-1/2/0 unit 10 family mpls
set interfaces ge-1/2/1 unit 17 family inetaddress 10.1.1.17/30
set interfaces ge-1/2/1 unit 17 family mpls
set interfaces vt-1/2/0 unit 4 family inet
set interfaces lo0 unit 4 family inet address172.16.1.4/32
set interfaces lo0 unit 104 family inet address172.16.100.1/32
set protocols rsvp interface all aggregate
set protocols mpls interface all
set protocols mpls interface ge-1/2/0.10
set protocols bgp group ibgp type internal
set protocols bgp group ibgp local-address172.16.1.4
set protocols bgp group ibgp family inet-vpnunicast
set protocols bgp group ibgp family inet-vpnany
set protocols bgp group ibgp family inet-mvpnsignaling damping
set protocols bgp group ibgp neighbor 172.16.1.2import dampPolicy
set protocols bgp group ibgp neighbor 172.16.1.5
set protocols ospf traffic-engineering
set protocols ospf area 0.0.0.0 interfaceall
set protocols ospf area 0.0.0.0 interfacelo0.4 passive
set protocols ospf area 0.0.0.0 interfacege-1/2/0.10
set protocols ldp interface ge-1/2/0.10
set protocols ldp p2mp
set policy-options policy-statement dampPolicyterm term1 from family inet-mvpn
set policy-options policy-statement dampPolicyterm term1 from nlri-route-type 3
set policy-options policy-statement dampPolicyterm term1 from nlri-route-type 4
set policy-options policy-statement dampPolicyterm term1 from nlri-route-type 5
set policy-options policy-statement dampPolicyterm term1 then accept
set policy-options policy-statement dampPolicythen damping no-damp
set policy-options policy-statement dampPolicythen accept
set policy-options policy-statement parent_vpn_routesfrom protocol bgp
set policy-options policy-statement parent_vpn_routesthen accept
set policy-options damping no-damp disable
set routing-instances vpn-1 instance-typevrf
set routing-instances vpn-1 interface vt-1/2/0.4
set routing-instances vpn-1 interface ge-1/2/1.17
set routing-instances vpn-1 interface lo0.104
set routing-instances vpn-1 route-distinguisher100:100
set routing-instances vpn-1 vrf-target target:1:1
set routing-instances vpn-1 protocols ospfexport parent_vpn_routes
set routing-instances vpn-1 protocols ospfarea 0.0.0.0 interface lo0.104 passive
set routing-instances vpn-1 protocols ospfarea 0.0.0.0 interface ge-1/2/1.17
set routing-instances vpn-1 protocols pimrp static address 172.16.100.1
set routing-instances vpn-1 protocols piminterface ge-1/2/1.17 mode sparse
set routing-instances vpn-1 protocols mvpn
set routing-options router-id 172.16.1.4
set routing-options autonomous-system 64501
Device R5
set interfaces ge-1/2/0 unit 14 family inetaddress 10.1.1.14/30
set interfaces ge-1/2/0 unit 14 family mpls
set interfaces ge-1/2/1 unit 21 family inetaddress 10.1.1.21/30
set interfaces ge-1/2/1 unit 21 family mpls
set interfaces vt-1/2/0 unit 5 family inet
set interfaces lo0 unit 5 family inet address172.16.1.5/32
set interfaces lo0 unit 105 family inet address172.16.100.5/32
set protocols mpls interface ge-1/2/0.14
set protocols bgp group ibgp type internal
set protocols bgp group ibgp local-address172.16.1.5
set protocols bgp group ibgp family inet-vpnany
set protocols bgp group ibgp family inet-mvpnsignaling
set protocols bgp group ibgp neighbor 172.16.1.2
set protocols bgp group ibgp neighbor 172.16.1.4
set protocols ospf area 0.0.0.0 interfacelo0.5 passive
set protocols ospf area 0.0.0.0 interfacege-1/2/0.14
set protocols ldp interface ge-1/2/0.14
set protocols ldp p2mp
set policy-options policy-statement parent_vpn_routesfrom protocol bgp
set policy-options policy-statement parent_vpn_routesthen accept
set routing-instances vpn-1 instance-typevrf
set routing-instances vpn-1 interface vt-1/2/0.5
set routing-instances vpn-1 interface ge-1/2/1.21
set routing-instances vpn-1 interface lo0.105
set routing-instances vpn-1 route-distinguisher100:100
set routing-instances vpn-1 vrf-target target:1:1
set routing-instances vpn-1 protocols ospfexport parent_vpn_routes
set routing-instances vpn-1 protocols ospfarea 0.0.0.0 interface lo0.105 passive
set routing-instances vpn-1 protocols ospfarea 0.0.0.0 interface ge-1/2/1.21
set routing-instances vpn-1 protocols pimrp static address 172.16.100.2
set routing-instances vpn-1 protocols piminterface ge-1/2/1.21 mode sparse
set routing-instances vpn-1 protocols mvpn
set routing-options router-id 172.16.1.5
set routing-options autonomous-system 1001
Device R6
set interfaces ge-1/2/0 unit 18 family inetaddress 10.1.1.18/30
set interfaces ge-1/2/0 unit 18 family mpls
set interfaces lo0 unit 6 family inet address172.16.1.6/32
set protocols sap listen 233.1.1.1
set protocols ospf area 0.0.0.0 interfacelo0.6 passive
set protocols ospf area 0.0.0.0 interfacege-1/2/0.18
set protocols pim rp static address 172.16.100.2
set protocols pim interface all
set routing-options router-id 172.16.1.6
Device R7
set interfaces ge-1/2/0 unit 22 family inetaddress 10.1.1.22/30
set interfaces ge-1/2/0 unit 22 family mpls
set interfaces lo0 unit 7 family inet address172.16.1.7/32
set protocols ospf area 0.0.0.0 interfacelo0.7 passive
set protocols ospf area 0.0.0.0 interfacege-1/2/0.22
set protocols pim rp static address 172.16.100.2
set protocols pim interface all
set routing-options router-id 172.16.1.7
Configuring Device R4
Step-by-Step Procedure
The following example requires you to navigate variouslevels in the configuration hierarchy. For information about navigatingthe CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.
To configure Device R4:
Configure the interfaces.
[edit interfaces]
user@R4# set ge-1/2/0 unit 10 family inetaddress 10.1.1.10/30
user@R4# set ge-1/2/0 unit 10 family mpls
user@R4# set ge-1/2/1 unit 17 family inetaddress 10.1.1.17/30
user@R4# set ge-1/2/1 unit 17 family mpls
user@R4# set vt-1/2/0 unit 4 family inet
user@R4# set lo0 unit 4 family inet address172.16.1.4/32
user@R4# set lo0 unit 104 family inet address172.16.100.4/32
Configure MPLS and the signaling protocols on the interfaces.
[edit protocols]
user@R4# set mpls interface all
user@R4# set mpls interface ge-1/2/0.10
user@R4# set rsvp interface all aggregate
user@R4# set ldp interface ge-1/2/0.10
user@R4# set ldp p2mp
Configure BGP.
The BGP configuration enables BGP route flap damping for the inet-mvpn address family. The BGP configuration also importsinto the routing table the routing policy called dampPolicy. This policy is applied to neighbor PE Device R2.
[edit protocols bgp group ibgp]
user@R4# set type internal
user@R4# set local-address 172.16.1.4
user@R4# set family inet-vpn unicast
user@R4# set family inet-vpn any
user@R4# set family inet-mvpn signaling damping
user@R4# set neighbor 172.16.1.2 import dampPolicy
user@R4# set neighbor 172.16.1.5
Configure an interior gateway protocol.
[edit protocols ospf]
user@R4# set traffic-engineering
[edit protocols ospf area 0.0.0.0]
user@R4# set interface all
user@R4# set interface lo0.4 passive
user@R4# set interface ge-1/2/0.10
Configure a damping policy that uses the nlri-route-type match condition to damp only MVPN route types 3, 4, and 5.
[edit policy-options policy-statement dampPolicy term term1]
user@R4# set from family inet-mvpn
user@R4# set from nlri-route-type 3
user@R4# set from nlri-route-type 4
user@R4# set from nlri-route-type 5
user@R4# set then accept
Configure the damping policy to disable BGProute flap damping.
The no-damp policy (damping no-damp disable) causes any damping state that is present in the routing table tobe deleted. The then damping no-damp statement appliesthe no-damp policy as an action and has no from match conditions. Therefore, all routes that are not matched by term1 are matched by this term, with the result that all otherMVPN route types are not damped.
[edit policy-options policy-statement dampPolicy]
user@R4# set then damping no-damp
user@R4# set then accept
[edit policy-options]
user@R4# set damping no-damp disable
Configure the parent_vpn_routes to acceptall other BGP routes that are not from the inet-mvpn addressfamily.
This policy is applied as an OSPF export policy in the routinginstance.
[edit policy-options policy-statement parent_vpn_routes]
user@R4# set from protocol bgp
user@R4# set then accept
Configure the VPN routing and forwarding (VRF) instance.
[edit routing-instances vpn-1]
user@R4# set instance-type vrf
user@R4# set interface vt-1/2/0.4
user@R4# set interface ge-1/2/1.17
user@R4# set interface lo0.104
user@R4# set route-distinguisher 100:100
user@R4# set vrf-target target:1:1
user@R4# set protocols ospf export parent_vpn_routes
user@R4# set protocols ospf area 0.0.0.0 interfacelo0.104 passive
user@R4# set protocols ospf area 0.0.0.0 interfacege-1/2/1.17
user@R4# set protocols pim rp static address172.16.100.2
user@R4# set protocols pim interface ge-1/2/1.17mode sparse
user@R4# set protocols mvpn
Configure the router ID and the autonomous system (AS)number.
[edit routing-options]
user@R4# set router-id 172.16.1.4
user@R4# set autonomous-system 1001
If you are done configuring the device, commit the configuration.
user@R4# commit
Results
From configuration mode, confirm your configurationby entering the show interfaces, show protocols, show policy-options, show routing-instances, and show routing-options commands. If the output doesnot display the intended configuration, repeat the instructions inthis example to correct the configuration.
user@R4# show interfaces
ge-1/2/0 {
unit 10 {
family inet {
address 10.1.1.10/30;
}
family mpls;
}
}
ge-1/2/1 {
unit 17 {
family inet {
address 10.1.1.17/30;
}
family mpls;
}
}
vt-1/2/0 {
unit 4 {
family inet;
}
}
lo0 {
unit 4 {
family inet {
address 172.16.1.4/32;
}
}
unit 104 {
family inet {
address 172.16.100.4/32;
}
}
}
user@R4# show protocols
rsvp {
interface all {
aggregate;
}
}
mpls {
interface all;
interface ge-1/2/0.10;
}
bgp {
group ibgp {
type internal;
local-address 172.16.1.4;
family inet-vpn {
unicast;
any;
}
family inet-mvpn {
signaling {
damping;
}
}
neighbor 172.16.1.2 {
import dampPolicy;
}
neighbor 172.16.1.5;
}
}
ospf {
traffic-engineering;
area 0.0.0.0 {
interface all;
interface lo0.4 {
passive;
}
interface ge-1/2/0.10;
}
}
ldp {
interface ge-1/2/0.10;
p2mp;
}
user@R4# show policy-options
policy-statement dampPolicy {
term term1 {
from {
family inet-mvpn;
nlri-route-type [ 3 4 5 ];
}
then accept;
}
then {
damping no-damp;
accept;
}
}
policy-statement parent_vpn_routes {
from protocol bgp;
then accept;
}
damping no-damp {
disable;
}
user@R4# show routing-instances
vpn-1 {
instance-type vrf;
interface vt-1/2/0.4;
interface ge-1/2/1.17;
interface lo0.104;
route-distinguisher 100:100;
vrf-target target:1:1;
protocols {
ospf {
export parent_vpn_routes;
area 0.0.0.0 {
interface lo0.104 {
passive;
}
interface ge-1/2/1.17;
}
}
pim {
rp {
static {
address 172.16.100.2;
}
}
interface ge-1/2/1.17 {
mode sparse;
}
}
mvpn;
}
}
user@R4# show routing-optons
router-id 172.16.1.4;
autonomous-system 1001;
Verification
Confirm that the configuration is working properly.
Verifying That Route Flap Damping Is Disabled
Verifying Route Flap Damping
Verifying That Route Flap Damping Is Disabled
Purpose
Verify the presence of the no-damp policy,which disables damping for MVPN route types other than 3, 4, and 5.
Action
From operational mode, enter the show policy damping command.
user@R4> show policy damping
Default damping information: Halflife: 15 minutes Reuse merit: 750 Suppress/cutoff merit: 3000 Maximum suppress time: 60 minutes Computed values: Merit ceiling: 12110 Maximum decay: 6193Damping information for "no-damp": Damping disabled
Meaning
The output shows that the default damping parametersare in effect and that the no-damp policy is also in effectfor the specified route types.
Verifying Route Flap Damping
Purpose
Check whether BGP routes have been damped.
Action
From operational mode, enter the show bgp summary command.
user@R4> show bgp summary
Groups: 1 Peers: 2 Down peers: 0Table Tot Paths Act Paths Suppressed History Damp State Pendingbgp.l3vpn.0 6 6 0 0 0 0bgp.l3vpn.2 0 0 0 0 0 0bgp.mvpn.0 2 2 0 0 0 0Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...172.16.1.2 1001 3159 3155 0 0 23:43:47 Establ bgp.l3vpn.0: 3/3/3/0 bgp.l3vpn.2: 0/0/0/0 bgp.mvpn.0: 1/1/1/0 vpn-1.inet.0: 3/3/3/0 vpn-1.mvpn.0: 1/1/1/0172.16.1.5 1001 3157 3154 0 0 23:43:40 Establ bgp.l3vpn.0: 3/3/3/0 bgp.l3vpn.2: 0/0/0/0 bgp.mvpn.0: 1/1/1/0 vpn-1.inet.0: 3/3/3/0 vpn-1.mvpn.0: 1/1/1/0
Meaning
The Damp State field shows that zero routes in thebgp.mvpn.0 routing table have been damped. Further down, the lastnumber in the State field shows that zero routes have been dampedfor BGP peer 172.16.1.2.
See also
Understanding Damping Parameters
Using Routing Policies to Damp BGP Route Flapping
Example: Configuring BGP Route Flap Damping Parameters
Related Documentation
Understanding External BGP Peering Sessions
BGP Configuration Overview
Release History Table
Release
Description
12.2
Starting in Junos OS Release 12.2, you can apply flapdamping at the address family level.