Example: Disabling MAC Learning on Devices with ELS Support
By default, MAC learning is enabled on the QFX Series. This topic provides examples for disabling, enabling, and verifying the operation of MAC learning on the QFX Series. These examples require that you be logged in as the root user to the switch on which you wish to modify MAC learning.
This task uses Junos OS for QFX3500, QFX3600, EX4600, QFX5100, and QFX10002 switches with support for the Enhanced Layer 2 Software (ELS) configuration style. If your switch runs software that does not support ELS, see Example: Disabling MAC Learning on a Switch. For ELS details, see Using the Enhanced Layer 2 Software CLI.
To disable MAC learning in a VLAN:
[edit]
user@switch# set vlans vlan10 switch-options interface xe-0/0/0.0 no-mac-learningTo reenable MAC learning:
[edit] vlans vlan10 switch-options interface xe-0/0/0.0
user@switch# delete no-mac-learningTo verify the status of MAC learning on the QFX Series:
user@switch> show ethernet-switching table
Learning stats: 10 learn msg rcvd, 2 error, 0 forced update Interface Local pkts Transit pkts Error xe-0/0/0.0 0 6 1 xe-0/0/22.0 0 0 0 xe-0/0/1.0 0 4 1 xe-0/0/2.0 0 0 0 xe-0/0/3.0 0 0 0 xe-0/0/4.0 0 0 0 xe-0/0/19.0 0 0 0 xe-0/0/18.0 0 0 0 xe-0/0/9.0 0 0 0