system { syslog { file log-autoconfig { any any; match log=Autoconfig-script; } } } interfaces { ae2 { description "TG - ex2200-1"; native-vlan-id 66; aggregated-ether-options { lacp { active; } } unit 0 { family ethernet-switching { interface-mode trunk; vlan { members [ e-65 mgmt ]; } } } } ge-0/0/2 { description "TG - ex2200-1"; ether-options { 802.3ad ae2; } inactive: unit 0 { family ethernet-switching { interface-mode access; vlan { members distro-1-autoprov; } } } } ge-1/0/2 { description "TG - ex2200-1"; ether-options { 802.3ad ae2; } } } event-options { policy ae2down { events snmp_trap_link_down; attributes-match { snmp_trap_link_down.interface-name matches "ae2$"; } then { change-configuration { retry count 5 interval 4; commands { "activate interfaces ge-0/0/2 unit 0"; "deactivate interfaces ge-0/0/2 ether-options"; } user-name nlogic; commit-options { log "Autoconfig-script: ae2 went down so removed ge-0/0/2 from bundle"; } } } } policy ae2up { events snmp_trap_link_up; attributes-match { snmp_trap_link_up.interface-name matches ae2$; } then { change-configuration { retry count 5 interval 4; commands { "deactivate interfaces ge-0/0/2 unit 0"; "activate interfaces ge-0/0/2 ether-options"; } user-name nlogic; commit-options { log "Autoconfig-script: ae2 came up so added ge-0/0/2 to bundle"; } } } } }