- play_arrow Understanding Layer 2 Networking
- play_arrow Configuring MAC Addresses
- play_arrow Configuring MAC Accounting
- play_arrow Configuring MAC Notification
- play_arrow Configuring MAC Table Aging
- play_arrow Configuring Learning and Forwarding
- play_arrow Configuring Bridging and VLANs
- play_arrow Configuring 802.1Q VLANs
- 802.1Q VLANs Overview
- 802.1Q VLAN IDs and Ethernet Interface Types
- Configuring Dynamic 802.1Q VLANs
- Enabling VLAN Tagging
- Configuring Tagged Interface with multiple tagged vlans and native vlan
- Sending Untagged Traffic Without VLAN ID to Remote End
- Configuring Tag Protocol IDs (TPIDs) on QFX Series Switches
- Configuring Flexible VLAN Tagging on PTX Series Packet Transport Routers
- Configuring an MPLS-Based VLAN CCC with Pop, Push, and Swap and Control Passthrough
- Binding VLAN IDs to Logical Interfaces
- Associating VLAN IDs to VLAN Demux Interfaces
- Configuring VLAN and Extended VLAN Encapsulation
- Configuring a Layer 2 VPN Routing Instance on a VLAN-Bundled Logical Interface
- Example: Configuring a Layer 2 VPN Routing Instance on a VLAN-Bundled Logical Interface
- Specifying the Interface Over Which VPN Traffic Travels to the CE Router
- Configuring Access Mode on a Logical Interface
- Configuring a Logical Interface for Trunk Mode
- Configuring the VLAN ID List for a Trunk Interface
- Configuring a Trunk Interface on a Bridge Network
- Configuring a VLAN-Bundled Logical Interface to Support a Layer 2 VPN Routing Instance
- Configuring a VLAN-Bundled Logical Interface to Support a Layer 2 VPN Routing Instance
- Configuring a Layer 2 Circuit on a VLAN-Bundled Logical Interface
- Example: Configuring a Layer 2 Circuit on a VLAN-Bundled Logical Interface
- Guidelines for Configuring VLAN ID List-Bundled Logical Interfaces That Connect CCCs
- Specifying the Interface to Handle Traffic for a CCC
- Specifying the Interface to Handle Traffic for a CCC Connected to the Layer 2 Circuit
- play_arrow Configuring Static ARP Table Entries
- play_arrow Configuring Restricted and Unrestricted Proxy ARP
- play_arrow Configuring Gratuitous ARP
- play_arrow Adjusting the ARP Aging Timer
- play_arrow Configuring Tagged VLANs
- play_arrow Stacking and Rewriting Gigabit Ethernet VLAN Tags
- Stacking and Rewriting Gigabit Ethernet VLAN Tags Overview
- Stacking and Rewriting Gigabit Ethernet VLAN Tags
- Configuring Frames with Particular TPIDs to Be Processed as Tagged Frames
- Configuring Tag Protocol IDs (TPIDs) on PTX Series Packet Transport Routers
- Configuring Stacked VLAN Tagging
- Configuring Dual VLAN Tags
- Configuring Inner and Outer TPIDs and VLAN IDs
- Stacking a VLAN Tag
- Stacking Two VLAN Tags
- Removing a VLAN Tag
- Removing the Outer and Inner VLAN Tags
- Removing the Outer VLAN Tag and Rewriting the Inner VLAN Tag
- Rewriting the VLAN Tag on Tagged Frames
- Rewriting a VLAN Tag on Untagged Frames
- Rewriting a VLAN Tag and Adding a New Tag
- Rewriting the Inner and Outer VLAN Tags
- Examples: Stacking and Rewriting Gigabit Ethernet IQ VLAN Tags
- Understanding Transparent Tag Operations and IEEE 802.1p Inheritance
- Understanding swap-by-poppush
- Configuring IEEE 802.1p Inheritance push and swap from the Transparent Tag
- play_arrow Configuring Private VLANs
- Private VLANs
- Understanding Private VLANs
- Bridge Domains Setup in PVLANs on MX Series Routers
- Bridging Functions With PVLANs
- Flow of Frames on PVLAN Ports Overview
- Guidelines for Configuring PVLANs on MX Series Routers
- Configuring PVLANs on MX Series Routers in Enhanced LAN Mode
- Example: Configuring PVLANs with Secondary VLAN Trunk Ports and Promiscuous Access Ports on a QFX Series Switch
- IRB Interfaces in Private VLANs on MX Series Routers
- Guidelines for Configuring IRB Interfaces in PVLANs on MX Series Routers
- Forwarding of Packets Using IRB Interfaces in PVLANs
- Configuring IRB Interfaces in PVLAN Bridge Domains on MX Series Routers in Enhanced LAN Mode
- Example: Configuring an IRB Interface in a Private VLAN on a Single MX Series Router
- play_arrow Configuring Layer 2 Bridging Interfaces
- play_arrow Configuring Layer 2 Virtual Switch Instances
- play_arrow Configuring Link Layer Discovery Protocol
- play_arrow Configuring Layer 2 Protocol Tunneling
- play_arrow Configuring Virtual Routing Instances
- play_arrow Configuring Layer 3 Logical Interfaces
- play_arrow Configuring Routed VLAN Interfaces
- play_arrow Configuring Integrated Routing and Bridging
- play_arrow Configuring VLANS and VPLS Routing Instances
- play_arrow Configuring Multiple VLAN Registration Protocol (MVRP)
- play_arrow Configuring Ethernet Ring Protection Switching
- play_arrow Configuring Q-in-Q Tunneling and VLAN Translation
- play_arrow Configuring Redundant Trunk Groups
- play_arrow Configuring Proxy ARP
- play_arrow Configuring Layer 2 Interfaces on Security Devices
- play_arrow Configuring Security Zones and Security Policies on Security Devices
- play_arrow Configuring Ethernet Port Switching Modes on Security Devices
- play_arrow Configuring Ethernet Port VLANs in Switching Mode on Security Devices
- play_arrow Configuring Secure Wire on Security Devices
- play_arrow Configuring Reflective Relay on Switches
- play_arrow Configuring Edge Virtual Bridging
- play_arrow Troubleshooting Ethernet Switching
- play_arrow Configuration Statements and Operational Commands
MAC Learning
Understanding MAC Learning
MAC learning is the process of obtaining the MAC addresses of all the nodes on a network.
When a node is first connected to an Ethernet LAN or VLAN, it has no information about the other nodes on the network. As data is sent through the network, data packets include a data frame listing their source and destination MAC addresses. The data frame is forwarded to a target port, which is connected to the second device. The MAC address is learned locally at the target port, which facilitates communications for frames that later enter the target port and contain addresses previously learned from a received frame.
By default, MAC learning is enabled on the QFX and NFX Series.
Disabling MAC Learning on Devices with ELS Support
By default, MAC learning is globally enabled on all nodes. This topic describes how to disable MAC learning, as well as how to reenable and verify that MAC learning has been enabled or disabled.
This task supports the Enhanced Layer 2 Software (ELS) configuration style. For ELS details, see Using the Enhanced Layer 2 Software CLI If your switch runs software that does not support ELS, see Disabling MAC Learning on QFX Switches.
Disabling dynamic MAC learning prevents a node from learning source and destination MAC addresses.
To disable MAC learning:
content_copy zoom_out_map[edit vlans vlan-name switch-options interface interface-name] user@switch# set no-mac-learning
To enable MAC learning:
content_copy zoom_out_map[edit vlans vlan-name switch-options interface interface-name] user@switch# delete no-mac-learning user@switch# deactivate no-mac-learning
To verify the status of MAC learning, view the Ethernet MAC learning statistics in operational mode.
content_copy zoom_out_mapuser@switch> show ethernet-switching table Ethernet-switching table: 2 entries, 1 learned VLAN MAC address Type Age Interfaces default * Flood - All-members default 00:1f:12:39:90:80 Learn 29 xe-/0/0.0
Disabling MAC Learning on QFX Switches
By default, MAC learning is globally enabled on all nodes in a device. This topic describes how to disable MAC learning, as well as how to reenable and verify that MAC learning has been enabled or disabled.
Disabling dynamic MAC learning on the device prevents a node from learning source and destination MAC addresses.
This task uses Junos OS for QFX3500 and QFX3600 switches and does not support the Enhanced Layer 2 Software (ELS) configuration style. If your switch runs software that supports ELS, see Disabling MAC Learning on Devices with ELS Support.
To disable MAC learning on the QFX Series:
content_copy zoom_out_map[edit ethernet-switching-options interfaces interface] user@switch# set no-mac-learning
To enable MAC learning on the QFX Series:
content_copy zoom_out_map[edit ethernet-switching-options interfaces interface] user@switch# delete no-mac-learning user@switch# deactivate no-mac-learning
To verify the status of MAC learning on the QFX Series, view the Ethernet MAC learning statistics in operational mode.
content_copy zoom_out_mapuser@switch> show ethernet-switching table Ethernet-switching table: 2 entries, 1 learned VLAN MAC address Type Age Interfaces default * Flood - All-members default 00:1f:12:39:90:80 Learn 29 xe-/0/0.0
Disabling MAC Learning in a VLAN on a QFX Switch
By default, MAC learning is enabled on a VLAN. This topic describes how to disable MAC learning in a VLAN, as well as how to reenable and verify that MAC learning has been enabled or disabled.
Disabling dynamic MAC learning in a VLAN on a QFX Series product prevents a node from learning source and destination MAC addresses.
To disable MAC learning in a VLAN:
content_copy zoom_out_map[edit vlans vlan-name] user@switch# set no-mac-learning
To reenable MAC learning in a VLAN, use either of the following two commands:
content_copy zoom_out_map[edit vlans vlan-name] user@switch# delete no-mac-learning user@switch# deactivate no-mac-learning
To verify the status of MAC learning on the QFX series:
content_copy zoom_out_mapuser@switch> show ethernet-switching table
Disabling MAC Learning for a VLAN or Logical Interface
You can disable MAC learning for all logical interfaces in a specified VLAN, or for a specific logical interface in a VLAN. Disabling dynamic MAC learning prevents the specified interfaces from learning source MAC addresses.
To disable MAC learning for all logical interfaces in
a VLAN in a virtual switch, include the no-mac-learning
statement at the [edit vlans vlan-name switch-options]
hierarchy level:
[edit] vlans { vlan-name { domain-type bridge; interface interface-name; switch-options { no-mac-learning; } } }
To disable MAC learning for a specific logical interface
in a VLAN, include the no-mac-learning
statement at the [edit vlans vlan-name switch-options interface interface-name]
hierarchy level.
[edit] vlans { vlan-name { domain-type bridge; interface interface-name; switch-options { interface interface-name { no-mac-learning; } } } }
When you disable MAC learning, source MAC addresses are not dynamically learned, and any packets sent to these source addresses are flooded into the VLAN.
When you gather interfaces into a VLAN, the no-mac-learn-enable
statement at the [edit interfaces interface-name ether-options ethernet-switch-profile]
hierarchy level is
not supported. You must use the no-mac-learning
statement
at the [edit vlans vlan-name switch-options
interface interface-name]
hierarchy
level to disable MAC learning on an interface in a VLAN.
When MAC learning is disabled for a VPLS routing instance, traffic is not load balanced and only one of the equal-cost next hops is used.
Disabling MAC Learning for a Set of VLANs
You can disable MAC learning for a set of VLANs. Disabling dynamic MAC learning prevents the Layer 2 trunk port associated with the set of VLANs from learning source and destination MAC addresses. When you disable MAC learning, source MAC addresses are not dynamically learned, and any packets sent to these source addresses are flooded into the switch.
To disable MAC learning for a set of VLANs, include the no-mac-learning
statement at the [edit switch-options]
hierarchy level:
[edit switch-options] no-mac-learning;