Supported Platforms
Related Documentation
- QFabric System, QFX Series standalone switches
- Understanding MAC Learning
- show ethernet-switching table
- QFX Series
- Disabling MAC Learning in a VLAN
- no-mac-learning (Per VLAN)
Example: Disabling MAC Learning in a VLAN
When MAC learning is enabled, a MAC address is learned dynamically from a packet's source MAC address. By default, MAC learning is enabled on a VLAN. This topic provides examples for disabling, enabling, and verifying the operation of MAC learning in a VLAN. Disabling dynamic MAC learning in a VLAN on a QFX Series product prevents a node from learning source and destination MAC addresses. These examples require that you be logged in as the root user to the switch on which you wish to modify MAC learning. This example uses a VLAN named blue.
- To disable MAC learning in a VLAN:
[edit vlans vlan-name]
user@switch# set no-mac-learning
For example:
[edit vlans blue]
user@switch# set no-mac-learning
- To verify that you have disabled MAC learning, issue the show ethernet-switching table command:
user@switch> show ethernet-switching table
Ethernet-switching table: 5 entries, 2 learned VLAN MAC address Type Age Interfaces blue * Flood - All-members blue 00:1f:12:39:90:80 Static - Router default * Flood - All-members default 00:1f:12:39:90:89 Learn 3:15 ge-0/0/1.0 default 00:1f:12:39:a3:81 Learn 0 ge-0/0/1.0
The CLI output shows that the VLAN named blue is not configured for MAC learning. The Type column includes only static (MAC address that are manually created) and flood (MAC addresses that are unknown and flooded to all members of the VLAN) entries.
- To reenable MAC learning in a VLAN, issue either of the
following two commands::
For example:
- To verify that you have enabled MAC learning, issue the show ethernet-switching table command:
user@switch> show ethernet-switching table
Ethernet-switching table: 6 entries, 3 learned VLAN MAC address Type Age Interfaces blue * Flood - All-members blue 00:1f:12:39:90:80 Static - Router blue 00:1f:12:39:a3:80 Learn 0 ge-0/0/9.0 default * Flood - All-members default 00:1f:12:39:90:89 Learn 0 ge-0/0/1.0 default 00:1f:12:39:a3:81 Learn 0 ge-0/0/1.0
The CLI output shows that the VLAN named blue is configured for MAC learning. The Type column includes static (MAC address that are manually created), flood (MAC addresses that are unknown and flooded to all members of the VLAN), and .Learn (MAC addresses that are earned dynamically from a packet's source MAC address) entries.
Related Documentation
- QFabric System, QFX Series standalone switches
- Understanding MAC Learning
- show ethernet-switching table
- QFX Series
- Disabling MAC Learning in a VLAN
- no-mac-learning (Per VLAN)
Published: 2014-07-28
Supported Platforms
Related Documentation
- QFabric System, QFX Series standalone switches
- Understanding MAC Learning
- show ethernet-switching table
- QFX Series
- Disabling MAC Learning in a VLAN
- no-mac-learning (Per VLAN)