Prevent Invalid Prefixes from being used for best path calculation

The default behavior is to allow prefix validation for all prefixes when performing best path calculations. Prefix validation is enabled by default. Use this command to prevent prefixes marked as invalid from being used for best path calculation. This configuration is performed from the address-family context within route map mode.

Before you begin

You must be within one of the following modes.

  • BGP address-family IPv4 unicast configuration mode

  • BGP address-family IPv6 unicast configuration mode

  • BGP address-family IPv4 unicast VRF configuration mode

  • BGP address-family IPv6 unicast VRF configuration mode

Procedure

  1. Navigate to the router bgp context.
    SLX(config)# router bgp
    SLX(config-bgp-router)#
                        
  2. Navigate to the address-family context. Choose the correct address family that you want to configure this setting for.
    SLX(config-bgp-router)#
    SLX(config-bgp-router)# address-family ipv4 unicast
    SLX(config-bgp-router)# 
                        
  3. Disable prefix validation for prefixes marked as invalid when calculating best path. The no format of this command enables default validation. The default is to allow using invalid prefixes for best path calculations.
    SLX(config-bgp-router)# bestpath prefix-validation disallow-invalid
    SLX(config-bgp-router)#
                        

    Prefix validation for invalid prefixes is disabled for IPv4 addresses when calculating best path.

Example

The following example summarizes the commands in this procedure. This command disable prefix validation for prefixes marked as invalid when calculating best path.

SLX# configure terminal
SLX(config)# router bgp 
SLX(config-bgp-router)# address-family ipv4 unicast 
SLX(config-bgp-ipv4u)# bestpath prefix-validation disallow-invalid 
SLX(config-bgp-ipv4u)#