Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

Example: Disabling MAC Learning on a Switch

 

By default, MAC learning is enabled on the QFX Series and EX4600. 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.

Note

This task uses Junos OS for QFX3500 and QFX3600 switches does not support the Enhanced Layer 2 Software (ELS) configuration style. If your switch runs software that supports ELS, see Example: Disabling MAC Learning on Devices with ELS Support.

  • To disable MAC learning in a VLAN:

    [edit]

    user@switch# edit ethernet-switching-options interfaces xe-0/0/0.0



    [edit ethernet-switching-options interfaces xe-0/0/0.0]

    user@switch# set no-mac-learning
  • To reenable MAC learning:

    [edit]

    user@switch# edit ethernet-switching-options interfaces xe-0/0/0.0



    [edit ethernet-switching-options interfaces xe-0/0/0.0]

    user@switch# delete no-mac-learning
  • To verify the status of MAC learning on the QFX Series:

    user@switch> show ethernet-switching table