Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Example: Configuring BGP Route Flap Damping Parameters

This example shows how to configure damping parameters.

Requirements

Before you begin, configure router interfaces and configure routing protocols.

Overview

This example has three routing devices. Device R2 has external BGP (EBGP) connections with Device R1 and Device R3.

Device R1 and Device R3 have some static routes configured for testing purposes, and these static routes are advertised through BGP to Device R2.

Device R2 damps routes received from Device R1 and Device R3 according to these criteria:

  • Damp all prefixes with a mask length equal to or greater than 17 more aggressively than routes with a mask length between 9 and 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 exported from the routing table into the forwarding table. Only the active routes are exported from the routing table.

Figure 1 shows the sample network.

Figure 1: BGP Flap Damping TopologyBGP Flap Damping Topology

CLI Quick Configuration shows the configuration for all of the devices in Figure 1.

The section #configuration649__bgp-damp-policy-st describes the steps on Device R2.

Configuration

Procedure

CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy level.

Device R1

Device R2

Device R3

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.

To configure damping parameters:

  1. Configure the interfaces.

  2. Configure the BGP neighbors.

  3. Create and configure the damping parameter groups.

  4. Configure the damping policy.

  5. Enable damping for BGP.

  6. Apply the policy as an import policy for the BGP neighbor.

    Note:

    You can refer to the same routing policy one or more times in the same or different import statements.

  7. Configure an export policy.

  8. Apply the export policy.

  9. Configure the autonomous system (AS) number.

Results

From configuration mode, confirm your configuration by 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.

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

Purpose

To verify your route flap damping policy, some routes must flap. Having a live Internet feed almost guarantees that a certain number of route flaps will be present. If you have control over a remote system that is advertising the routes, you can modify the advertising router's policy to effect the advertisement and withdrawal of all routes or of a given prefix. In a test environment, you can cause routes to flap by clearing the BGP neighbors or by restarting the routing process on the BGP neighbors, as shown here.

Action

From operational mode on Device R1 and Device R3, enter the restart routing command.

CAUTION:

Use this command cautiously in a production network.

Meaning

On Device R2, all of the routes from the neighbors are 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.

Meaning

This output was captured after the routing process was 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 damping suppressed command.

Meaning

The output shows some routing instability. Eleven routes are 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 damping suppressed 172.16.192.0/20 detail command.

Meaning

This output indicates that the displayed route has a mask length that is equal to or greater than /17, and confirms that it has been correctly mapped to the aggressive damping profile. You can also see the route’s current (and last) figure of merit value, and when the route is expected to become active if it remains stable.

Verifying That Default Damping Parameters Are in Effect

Purpose

Locating a damped route with a /16 mask confirms that the default parameters are in effect.

Action

From operational mode, enter the show route damping suppressed detail | match 0/16 command.

Meaning

Routes with a /16 mask are not impacted by the custom damping 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 greater than 17 more aggressively than routes with a mask length between 9 and 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 the determination of what damping profile is being used for routes with a given mask length.

Action

From operational mode, enter the show route damping suppressed command.

Meaning

When you are satisfied that your EBGP routes are correctly associated with a damping profile, you can issue the clear bgp damping operational mode command to restore an active status to your damped routes, which will return your connectivity to normal operation.