Contents

Introduction

Components Used

Configure BGP AS Path Prepend

Procedure

Configure BGP Local Preference

Configure BGP Weight

BGP AS Path Filter

Introduction

This document describes the options of Border Gateway Protocol (BGP) to manipulate the Path Selection when multiple paths lead to the same destination.

Components Used

The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.

Configure BGP AS Path Prepend

You can use AS Path Prepend to manipulate the path selection. Review the next documentation for further information regarding the BGP path selection:

- BGP Path Selection

Procedure

Step 1.    Click Objects, then click Route Map.

Step 2.   Select the Route Map you have assigned to the BGP peer where you need to apply the AS Path Prepend or add a new Route Map by clicking Add Route Map.

Step 3.   Configure the name of the Route Map, then click Add under the Entries section.

Step 4.   Configure at least the next basic settings:

- Sequence No. Select the number of the sequence

- Redistribution. Select Allow

Step 5. (Optional) You can specify multiple variables like Prefix-List and Access lists in the Match Classes section.

Step 6.  Click Set Clauses, then BGP Clauses, then AS Path. Configure the Prepend option based on the next options:

- Prepend AS Path. Add the AS you want to add to the Path separated by commas.

- Prepend last AS to the AS Path. Select the number of times you want to add the last AS to the AS path (you can add the AS up to 10 times).

Step 7.  Click Add, then Save.

Step 8.  Click Device, then Device Management, and select the Device you want to apply the AS Path Prepend.

Step 9.  Click Routing, then IPv4 in the BGP section, then Neighbor.

Step 10.  Click the edit icon for the Neighbor where you want to apply the AS Path Prepend, then on the Filtering Routes section, select the Route Map from the dropdown menu in the Incoming or Outgoing traffic in the Route Map section.

Step 11.  Click OK, then Save.

Configure BGP Local Preference

You can use Local Preference to manipulate locally the path selection. Review the next documentation for further information regarding the BGP path selection:

- BGP Path Selection

Procedure

Step 1.    Click Objects, then click Route Map.

Step 2.   Select the Route Map you have assigned to the BGP peer where you have to apply the Local Preference or add a new Route Map by clicking Add Route Map.

Step 3.   Configure the name of the Route Map, then click Add under the Entries section.

Step 4.   Configure at least the next basic settings:

- Sequence No. Select the number of the sequence

- Redistribution. Select Allow

Step 5. (Optional) You can specify multiple variables like Prefix-List and Access lists in the Match Classes section.

Step 6.  Click Set Clauses, then BGP Clauses, then Others. Configure the Local Preference you want to apply in the Local Preference section.

Step 7.  Click Add, then Save.

Step 8.  Click Device, then Device Management, and select the Device you want to apply the Local Preference.

Step 9.  Click Routing, then IPv4 in the BGP section, then Neighbor.

Step 10.  Click the edit icon for the Neighbor where you want to apply the AS Local Preference, then on the Filtering Routes section, select the Route Map from the dropdown menu in the Incoming or Outgoing traffic in the Route Map section.

Step 11.  Click OK, then Save.

Configure BGP Weight

You can use Weight to manipulate locally the path selection. Review the next documentation for further information regarding the BGP path selection:

- BGP Path Selection

Procedure

Step 1.    Click Objects, then click Route Map.

Step 2.   Select the Route Map you have assigned to the BGP peer where you have to apply the Local Preference or add a new Route Map by clicking Add Route Map.

Step 3.   Configure the name of the Route Map, then click Add under the Entries section.

Step 4.   Configure at least the next basic settings:

- Sequence No. Select the number of the sequence

- Redistribution. Select Allow

Step 5. (Optional) You can specify multiple variables like Prefix-List and Access lists in the Match Classes section.

Step 6.  Click Set Clauses, then BGP Clauses, then Others. Configure the Weight you want to apply in the Set Weight section.

Step 7.  Click Add, then Save.

Step 8.  Click Device, then Device Management, and select the Device you want to apply the Local Preference.

Step 9.  Click Routing, then IPv4 in the BGP section, then Neighbor.

Step 10.  Click the edit icon for the Neighbor where you want to apply the Weight, then on the Filtering Routes section, select the Route Map from the dropdown menu in the Incoming or Outgoing traffic in the Route Map section.

Step 11.  Click OK, then Save.

BGP AS Path Filter

You can Allow or Block prefixes from certain autonomous systems. FTD allows you to filter based on Regular Expressions.

Review the next documentation for further information on Regular Expressions in BGP: https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13754-26.html.

Procedure

Step 1.    Click Objects, then click AS Path

Step 2.    Configure at least the next basic settings:

- Name. Select the number to the AS Path Object

- Sequence No. Click Add under the Entries section, then Allow or Deny based on the action you want to take. Configure the Regular Expression you want to use, then click Add, then Save.

Step 3.    (Optional) You can configure the AS Path Object directly on the peer or into a Route Map. If you want to configure directly on the peer, click the edit icon for the Neighbor where you want to apply the As Path Filter, then on the Filtering Routes section, select the AS Path Object from the dropdown menu in the Incoming or Outgoing traffic in the AS Path Filter section.

Step 3.    Click Objects, then click Route Map.

Step 4.   Select the Route Map you have assigned to the BGP peer where you have to apply the Path Filter or add a new Route Map by clicking Add Route Map.

Step 5.   Configure the name of the Route Map, then click Add under the Entries section.

Step 6.   Configure at least the next basic settings:

- Sequence No. Select the number of the sequence

- Redistribution. Select Allow (the action on the traffic is defined in Sequence No. In Step 2).

Step 7.  Click Match Clauses then BGP, select the AS Path Object created in Step 1, then Click Add.

Step 8.  Click Save.

Step 9.  Click Device, then Device Management, and select the Device you want to apply the Regular Expression.

Step 10.  Click Routing, then IPv4 in the BGP section, then Neighbor.

Step 11.  Click the edit icon for the Neighbor where you want to apply the As Path Filter, then on the Filtering Routes section, select the Route Map from the dropdown menu in the Incoming or Outgoing traffic in the Route Map section.

Step 12.  Click OK, then Save.