Description

To clarify the operational impact of enabling the enforce-first-as statement on an existing, active BGP group or neighbor configuration, and to confirm whether it causes BGP session flaps or triggers "non-disruptive" route evaluation

 

Regarding this BGP knob: Does applying this to existing BGP groups cause BGP neighbor flaps, or just a route refresh/import sync?

 

set protocols bgp group enforce-first-as

https://www.juniper.net/documentation/us/en/software/junos/cli-reference/topics/ref/statement/enforce-first-as-edit-protocols.html

 

 

 

Symptoms

When configuring set protocols bgp group <name> enforce-first-as on an operational production network (specifically on platforms like QFX10002, QFX10008, or general Junos OS devices):

  • Will the BGP established neighbor session flap?
  • Will it cause packet drop or peer downtime?


Solution

No, applying enforce-first-as to an active BGP configuration does not cause BGP neighbor 


-In Junos OS, the Routing Protocol Process (rpd) separates BGP session state management (the TCP state machine, KEEPALIVEs, and HOLD timers) from BGP route policy and validation constraints.

When you commit this knob, Junos OS keeps the TCP/BGP session intact and performs an internal soft inbound update.


-If an existing or incoming route violates the condition (the leftmost AS in the AS_PATH does not match the peer's ASN), Junos simply rejects the prefix rather than tearing down the entire BGP session.

Modification History

2026-05-21 : Article Created