Event-options configuration for deactivate bgp when the device reboots
Configuration Requirement: BGP should deactivate when device reboots or RE fails.
Following configuration can be used to achieve this requirement on Junos EVO.
set event-options policy SYSTEM-RELOADED events snmpd_trap_cold_start
set event-options policy SYSTEM-RELOADED within 30 trigger on
set event-options policy SYSTEM-RELOADED within 30 trigger 1
set event-options policy SYSTEM-RELOADED then change-configuration commands "deactivate protocols bgp"
set event-options policy SYSTEM-RELOADED then change-configuration commit-options log "updating bgp configuartion from event policy update as system restarted"
Once the event is triggered, script takes action and deactivates BGP as listed below.
user@host> show configuration protocols
inactive: bgp {
group external {
type external;
local-address 192.X.X.X;
log-updown;
peer-as 300;
neighbor 192.X.X.X;
}