MAC Address Accounting for Dynamically Learned Addresses on Ethernet Interfaces Overview
Junos OS supports the capability to compute MAC address statistics for dynamically learned static and destination MAC addresses on physical interfaces. Starting in Junos OS Release 15.1, Junos OS enables you to configure source MAC (SMAC) address and destination MAC (DMAC) address-based accounting for MAC addresses that are dynamically learned on aggregated Ethernet (ae-) interfaces in routed mode. When you include the mac-learn-enable statement at the [edit interfaces aex aggregated-ether-options ethernet-switch-profile] hierarchy level, dynamic learning of source and destination MAC addresses is enabled. By default, this capability is disabled. When dynamic learning of MAC addresses is enabled for AE interfaces in routed mode, the MAC-filter settings are updated for each of the child links of the AE bundle interface. This feature provides for both the configuration of the mac-learn-enable filter and the display of SMAC and DMAC based accounting information on the aggregated interface in the output of the show interfaces mac-database interface-name mac-address mac-address command.
When this functionality is enabled, source and destination MAC addresses-based accounting is supported on the routed interfaces on MX Series routers with DPCs and MPCs. Support for mixed mode LAG interfaces is also available. This feature supports MAC address accounting for AE interfaces in routed mode (for inet family). Destination MAC-based accounting is supported only for MAC addresses dynamically learned at the ingress interface, including each individual child or member link of the AE bundle. This behavior occurs because MPCs do not support destination MAC address learning. As a result, if a packet exits a child link without passing in the ingress direction through that link, destination MAC (DMAC) accounting for this packet occurs at the child link level and this data is not available at the aggregate level. Dynamic learning of MAC addresses can be supported on only the AE interface or on selective individual member links. MAC learning support on the bundle depends on the capability of individual member links. If a link in the bundle does not contain the capability to support MAC learning or accounting, it is disabled on the AE bundle.
The MAC data for the aggregated bundle is displayed by collecting data form individual child links. This data is collected when the command to display the MAC database is triggered from the CLI. This method of data collection implies that based on the number of child links and the size of the MAC database, the time take to display the database differs. This approach to obtain the current snapshot of the MAC database from the currently active child links is used instead of maintaining a database at the Routing Engine because of the dynamic nature of the MAC database and the overhead required to maintain the database information in synchronization with all the child Packet Forwarding Engines. A difference in the DMAC-based accounting for packets generated from the Routing Engine (packets sent in the host path). On DPCs, these packets are accounted in egress direction (Output Packet/Byte count), whereas on MPCs, these packets are not accounted because DMAC learning is not supported. This difference in behavior also occurs between child links on DPCs and MPCs. Because this feature to enable dynamic learning is related to collecting MAC database statistics from child links based on the command issued from the CLI, there is a impact on the time it takes to display the data on the console based on the size of the MAC database and the number of child-links spread across different FPCs. The limit on the maximum number of MAC addresses that can be learned from an interface does not apply to this dynamic learning of MAC addresses functionality.