[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]

Configuring Layer 2 Learning and Forwarding Properties for a Set of Bridge Domains with a Layer 2 Trunk Port

Layer 2 learning is enabled by default. A set of bridge domains, configured to function as a switch with a Layer 2 trunk port, learns unicast media access control (MAC) addresses to avoid flooding packets to the trunk port.

Note: Traffic is not flooded back onto the interface on which it was received. However, because this “split horizon” occurs at a late stage, the packet statistics displayed by commands such as show interfaces queue will include flood traffic.

You can optionally disable Layer 2 learning for the entire set of bridge domains as well as modify the following Layer 2 learning and forwarding properties:

For more information about how to configure Layer 2 learning and forwarding properties for a set of bridge domains, see the following sections:

Disabling MAC Learning for a Set of Bridge Domains

You can disable MAC learning for a set of bridge domains. Disabling dynamic MAC learning prevents the Layer 2 trunk port associated with the set of bridge domains 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 bridge domains, include the no-mac-learning statement at the [edit switch-options] hierarchy level:

[edit switch-options]
no-mac-learning;

Limiting the Number of MAC Addresses Learned from a Trunk Port

You can configure a limit on the number of MAC addresses learned from a trunk port or from a specific trunk or access interface.

To limit the number of MAC addresses learned through a trunk port associated with a set of bridge domains, include the interface-mac-limit limit statement at the [edit switch-options] hierarchy level:

[edit switch-options]
interface-mac-limit limit;

To limit the number of MAC addresses learned from a specific logical interface configured as an access interface or a trunk interface, include the interface-mac-limit limit statement at the [edit switch-options interface interface-name] hierarchy level:

[edit switch-options interface interface-name]
interface-mac-limit limit;

The default value for the number MAC addresses that can be learned from a logical interface is 1024. You can specify a limit either for a set of bridge domains or for a specific logical interface in the range from 16 through 131,071. The value you configure for a specific logical interface overrides any value you specify for the set of bridge domains.

After the specified MAC address limit is reached, the default is for any incoming packets with a new source MAC address to be forwarded. You can specify that the packets be dropped for the entire virtual switch after the MAC address limit is reached by including the packet-action drop statement at the [edit switch-options interface-mac-limit limit] hierarchy level:

[edit switch-options interface interface-name interface-mac-limit limit]
packet-action drop;

To specify that the packets be dropped from a specific logical interface in a set of bridge domains with a trunk port after the MAC address limit is reached, include the packet-action drop statement at the [edit routing-instances routing-instance-name interface interface-name interface-mac-limit limit] hierarchy level:

[edit routing-instances routing-instance-name interface interface-name interface-mac-limit limit]
packet-action drop;

Modifying the Size of the MAC Address Table for a Set of Bridge Domains

You can modify the size of the MAC address table for a set of bridge domains. The minimum you can configure is 16 addresses, and the maximum is 1,048,575 addresses. The default table size is 5120 addresses.

If the MAC table limit is reached, new addresses can no longer be added to the table. Unused MAC addresses are removed from the MAC address table automatically. This frees space in the table, allowing new entries to be added to the table.

To modify the size of the MAC table for a set of bridge domains, include the mac-table-size limit statement at the [edit switch-options] hierarchy level:

[edit switch-options]
mac-table-size;

Enabling MAC Accounting for a Set of Bridge Domains

By default, MAC accounting is disabled. You can enable packet counting for a set of bridge domains. After you enable packet accounting, the JUNOS software maintains packet counters for each MAC address learned on the trunk port associated with the set of bridge domains.

To enable MAC accounting for a set of bridge domains, include the mac-statistics statement at the [edit switch-options] hierarchy level:

[edit switch-options]
mac-statistics;

[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]