MAC Address Blocking (Juniper)

Use the following command to block all devices except the listed MAC address on a particular port:

set interfaces ge-x/x/x unit 0 accept-source-mac mac-address xx:xx:xx:xx:xx:xx

Additional allowed MAC addresses can be added by using the same syntax (This can be handy in situations where the PC is tethered through the Phone).

 

Sticky MAC (Persistent MAC Learning)

Persistent MAC learning, also known as sticky MAC, is a port security feature that enables an interface to retain dynamically learned MAC addresses when the switch is restarted or if the interface goes down and is brought back online.

If you move a device within your network that has a persistent MAC address entry on the switch, use the clear ethernet-switching table persistent-mac command to clear the persistent MAC address entry from the interface.

 

Example Configuration:

set switch-options interface ge-0/0/0.0 interface-mac-limit 1

set switch-options interface ge-0/0/0.0 interface-mac-limit packet-action shutdown

set switch-options interface ge-0/0/0.0 persistent-learning

 

image-20240617-165348.png

show ethernet-switching table persistent-mac