This should work on ELS style switches (EX2300, EX3400, EX4300 and similar). Example with ge-0/0/4.
## Interface config - recovery timeout relates to mac-limit
user@els-switch# show interfaces ge-0/0/4
description "Link to unmanaged switch";
unit 0 {
family ethernet-switching {
vlan {
members XXX;
}
storm-control default;
recovery-timeout 60;
}
}
### spanning-tree edge port + bpdu-block
user@els-switch# show protocols rstp
interface ge-0/0/4 {
edge;
}
bpdu-block-on-edge;
### recovery timeout for bpdu-block - otherwise you have to clear the block manually
user@els-switch# show protocols layer2-control
bpdu-block {
disable-timeout 60;
}
### limits number of mac addresses which will be learned. When the 25th shows up, the port i shut down. Can be used to ensure no ### daisy-chaining occurs from the unmanaged switch (or AP connected to it...)
user@els-switch# show switch-options
interface ge-0/0/4.0 {
interface-mac-limit {
24;
packet-action shutdown;
}
}