System should have cli configuration to shut down the link when BPDU error is seen. You should be able to find a lot from techPub and KB. However, I am trying to understand your requirement, you want to shut down port 2 when port 1 receives BPDU error? Can you help elaborate the motiv here?
I have pc farm with internet access, (interface irb is the farm D.G ) there are cases that we need to disallow access to internet to these stations, the simple way to do it is to disable interface irb
So i thought to do it with event-option i used event-policy in past with "snmp_trap_link_up"
Please see example:
set event-options policy CS-DR-on-snmp-trap-link-up events SNMP_TRAP_LINK_UP
set event-options policy CS-DR-on-snmp-trap-link-up attributes-match snmp_trap_link_up.interface-name matches ae4
set event-options policy CS-DR-on-snmp-trap-link-up then change-configuration retry count 5
set event-options policy CS-DR-on-snmp-trap-link-up then change-configuration retry interval 4
set event-options policy CS-DR-on-snmp-trap-link-down then change-configuration commands "set interfaces ae4 unit 0 family inet address x.x.x.x/29"
set event-options policy CS-DR-on-snmp-trap-link-down then change-configuration commands "del interfaces ae4 disable"
The idea is that every time we need to diasable internet access the farm adminstrator will connect looper to interface ge-0/0/47 this will cause interafce ge-0/0/47 to be in "bpdu error detect" (interface ge-0/0/47 is just for the trigger)
l2cpd: BPDU_PROTECT: Interface ge-0/0/47 is DOWN: BPDU error detected
And according to this log i want to configure event-policy to disable the interface irb.x
The problem is that i didnt find any event or attributes-match to do this with "BPDU error detected"
Thanks. This makes much more sense. You'd like to disable the L3 interface irb when L2 interface is receiving BPDU error. And I assume you have other L2 interface in the same VLAN thus irb is not shut down because of lack of L2 interface. Event option seems the best approach here. Will search what can be a matching term here