Description

This KB article describes about the behaviour related to BGP adjacency while switch is configured with apply-path knob for BGP neighbors

Symptoms

While the apply path knob is expected to work as per https://www.juniper.net/documentation/us/en/software/junos/cli-reference/topics/ref/statement/apply-path-edit-policy-options.html

The customer reported that BGP peer adjacency will not get established for dynamic peers under 10.0.0.0/16 subnet. The apply path verification indicated only statically defined neighbors are listed.

To overcome this, either the policy needs to be modified to include the prefixes manually or the apply path string shall be changed as given in solution.

Solution

# show | display set | match apply-path 

set policy-options prefix-list BGP-IP4-PEERS apply-path "protocols bgp group <*> neighbor <*.*>"



# show policy-options prefix-list BGP-IP4-PEERS| display inheritance 

##

## apply-path was expanded to:

##  10.24.x.x/32; 

##  10.24.x.x/32; 

##  10.24.x.x/32; 

##  10.24.x.x/32; 

##  10.x.x.x/32; 

##  10.x.x.x/32; 

##

apply-path "protocols bgp group <*> neighbor <*.*>";


Configuration during Problem state:

[edit policy-options]

 prefix-list BGP-IP4-PEERS {

  apply-path "protocols bgp group <*> neighbor <*.*>";


Configuration that recovered Problem state:

[edit policy-options]

+ prefix-list BGP-IP4-PEERS-RHOSP {

+ apply-path "protocols bgp group <*> allow <*.*>”;  

Modification History

2025-10-31 : Article Created